This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public double[][] MatrixH | |
| { | |
| get | |
| { | |
| if (matrixH != null) | |
| { | |
| return (double[][])matrixH; | |
| } | |
| double[][] he = new double[3][]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public double[][] MatrixH | |
| { | |
| get | |
| { | |
| if (matrixH != null) | |
| { | |
| return (double[][])matrixH; | |
| } | |
| double[][] he = new double[3][]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static List<T> EnumToList<T>() | |
| { | |
| Type enumType = typeof(T); | |
| if (enumType.BaseType != typeof(Enum)) | |
| throw new ArgumentException("T must be of type System.Enum"); | |
| Array enumValArray = Enum.GetValues(enumType); | |
| List<T> enumValList = new List<T>(enumValArray.Length); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private Dictionary<Side, double> GetValuesForSecondBoundry() | |
| { | |
| Dictionary<Side, double> dict = new Dictionary<Side, double>(); | |
| List<Side> sides = EnumToList<Side>(); | |
| for (int i = 0; i < this.SideAreaSecondConditionsList.Items.Count; i++) | |
| { | |
| int id = int.Parse(this.SideAreaSecondConditionsList.Items[i].SubItems[2].Text); | |
| dict.Add(sides[id], getValueAsDouble(this.SideAreaSecondConditionsList.Items[i].SubItems[1].Text)); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private void goButton_Click(object sender, EventArgs e) | |
| { | |
| if (!CheckErrors()) | |
| { | |
| return; | |
| } | |
| string data = GetProjectData(); | |
| System.IO.StreamWriter writer = new System.IO.StreamWriter("input.xml", false, Encoding.UTF8); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static int AddProject(string name, string data) | |
| { | |
| ProjectsTableAdapters.ProjectsTableAdapter adapter = new Preprocessor.ProjectsTableAdapters.ProjectsTableAdapter(); | |
| ProjectsDataTable table = adapter.GetData(); | |
| ProjectsRow row = table.NewProjectsRow(); | |
| row.Name = name; | |
| row.Data = data; | |
| table.Rows.Add((DataRow)row); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void GenerateGrid(int quantityX, int quantityY) | |
| { | |
| this.divX = quantityX + 1; | |
| this.divY = quantityY + 1; | |
| int nodesQuantity = this.divX * this.divY; | |
| float maxWidth = GetStringWidth(nodesQuantity.ToString()) * 1.7f; | |
| this.offsetY = maxWidth; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [XmlRoot()] | |
| public class InputData | |
| { | |
| ... | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public override bool Equals(object obj) | |
| { | |
| CustomPoint point = (CustomPoint)obj; | |
| if(point == null) | |
| { | |
| return false; | |
| } | |
| if(this.x == point.x && this.y == point.y) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public double this[int index] | |
| { | |
| get | |
| { | |
| switch (index) | |
| { | |
| case 0: | |
| return x; | |
| case 1: | |
| return y; |