示例#1
0
 private void button7_Click(object sender, EventArgs e)
 {
     Analysis = new AnalysisRefactored();
     UpdateRibs();
     UpdateStrBot();
     UpdateTopStr();
 }
示例#2
0
 private void button9_Click(object sender, EventArgs e)
 {
     Analysis = Saver.LoadTemp();
     UpdateRibs();
     UpdateStrBot();
     UpdateTopStr();
 }
示例#3
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);
        }