コード例 #1
0
ファイル: Form1.cs プロジェクト: xiaoxiongnpu/7Sharp
 private void LoadButton_Click(object sender, EventArgs e)
 {
     Console.WriteLine("HI");
     if (OFD.ShowDialog() == DialogResult.OK)
     {
         Console.WriteLine("HI");
         StreamReader sr = new StreamReader(OFD.FileName);
         CmdName.Text = sr.ReadLine();                 //command name
         while (sr.EndOfStream == false)
         {
             string[] split = sr.ReadLine().Split(' ');
             foreach (string i in split)
             {
                 i.Replace(' ', '~');
                 i.Replace("~", "\\~");
             }
             Blocks b = new Blocks();
             b.com = split[0];
             b.a1  = split[1];
             b.a2  = split[2];
             b.a3  = split[3];
             b.a4  = split[4];
             CommandSpace.Controls.Add(b);
             Console.WriteLine("YES!");
             CommandSpace.Update();
         }
         sr.Close();
         sr.Dispose();
     }
 }
コード例 #2
0
ファイル: Form1.cs プロジェクト: xiaoxiongnpu/7Sharp
 private void UpdateClock_Tick(object sender, EventArgs e)
 {
     CommandSpace.Update();
 }
コード例 #3
0
ファイル: Form1.cs プロジェクト: xiaoxiongnpu/7Sharp
 private void AddBlock_Click(object sender, EventArgs e)
 {
     CommandSpace.Controls.Add(new Blocks());
     CommandSpace.Update();
 }