Пример #1
0
        public static AnalysisRefactored LoadTemp()
        {
            AnalysisRefactored retAnalysis = new AnalysisRefactored();

            String[] Lines = File.ReadAllLines(@"C:\Ginger\temp.dsf");

            for (int i = 0; i < Lines.Length; i++)
            {
                string input = Lines[i];
                int    index = input.IndexOf(":");
                if (index > 0)
                {
                    input = input.Substring(0, index);
                }

                if (input == "R" || input == "r")
                {
                    string temp = Lines[i];
                    temp = temp.Substring(index + 1);
                    retAnalysis.AddRib(Convert.ToInt32(temp));
                }

                else if (input == "T" || input == "t")
                {
                    string temp = Lines[i];
                    temp = temp.Substring(index + 1);
                    string[] chars = temp.Split(',');
                    retAnalysis.AddTopStringer(Convert.ToInt32(chars[0]), Convert.ToInt32(chars[1]), Convert.ToInt32(chars[2]));
                }
                else if (input == "B" || input == "b")
                {
                    string temp = Lines[i];
                    temp = temp.Substring(index + 1);
                    string[] chars = temp.Split(',');
                    retAnalysis.AddBotStringer(Convert.ToInt32(chars[0]), Convert.ToInt32(chars[1]));
                }
            }

            return(retAnalysis);
        }
Пример #2
0
 private void BtAddStrTop_Click(object sender, EventArgs e)
 {
     Analysis.AddTopStringer(Convert.ToInt32(TBStrTopVert.Text), Convert.ToInt32(CbRibStr1.Text), Convert.ToInt32(CbRibStr2.Text));
     UpdateTopStr();
 }