Beispiel #1
0
 public void Read_Array()
 {
     GetWave.Filter = " Array Description Text File (*.txt) |*.txt";
     if (GetWave.ShowDialog() == DialogResult.OK)
     {
         Channel_View.Items.Clear();
         System.IO.StreamReader Reader;
         Reader = new System.IO.StreamReader(GetWave.OpenFile());
         do
         {
             try
             {
                 string   speaker = Reader.ReadLine();
                 string[] s       = speaker.Split(new char[] { ':' });
                 Channel_View.Items.Add(new channel(int.Parse(s[0]), new Hare.Geometry.Vector(double.Parse(s[1]), double.Parse(s[2]), double.Parse(s[3])), (channel.channel_type) int.Parse(s[4]), double.Parse(s[5])));
             }
             catch (System.Exception)
             {
                 Reader.Close();
                 break;
             }
         } while (!Reader.EndOfStream);
         Reader.Close();
     }
 }
Beispiel #2
0
    void Start()
    {
        water = GameObject.Find("Water");
        wave  = water.GetComponent <GetWave>();
        List <GUILayoutOption> option = new List <GUILayoutOption>();

        option.Add(GUILayout.MinHeight(button_height));
        option.Add(GUILayout.MinWidth(button_width));
//        option.Add(GUILayout.)
        button_option                 = option.ToArray();
        button_style                  = new GUIStyle("box");
        button_style.fontSize         = (int)button_height - 20;
        button_style.normal.textColor = Color.white;
        init();
        //button_style.normal.background = ;
    }