示例#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 BtAddRib_Click(object sender, EventArgs e)
 {
     Analysis.AddRib(Convert.ToInt32(TBRibAdd.Text));
     UpdateRibs();
 }