예제 #1
0
파일: Form1.cs 프로젝트: nightwolf93/Bfly
        void leWire_Click(object sender, EventArgs e)
        {
            TestWire     origin = sender as TestWire;
            List <Point> result = null;

            //if (removeWire)
            //{
            //    result = wireSolver.RemoveWire(origin.LocationPoint.X, origin.LocationPoint.Y);
            //}
            //else
            {
                result = wireSolver.AddOrUpdateWire(origin.LocationPoint.X, origin.LocationPoint.Y, this.newType, this.selectedTranser);
            }
            foreach (Point t in result)
            {
                try
                {
                    yaaaay[t].updateWireState(wireSolver.getWireTransfer(t));
                }
                catch { }
            }
            StringBuilder sb = new StringBuilder();

            foreach (Point t in result)
            {
                sb.AppendLine(t.ToString());
            }
            //MessageBox.Show("changed items: " + result.Count + "\r\n" + sb.ToString());
        }
예제 #2
0
파일: Form1.cs 프로젝트: habb0/Bfly
 private void generateButtons()
 {
     TestWire leWire;
     for (int x = 0; x < 12; x++)
     {
         for (int y = 0; y < 14; y++)
         {
             leWire = new TestWire(x, y);
             leWire.Click += new EventHandler(leWire_Click);
             this.Controls.Add(leWire);
             yaaaay.Add(leWire.LocationPoint, leWire);
         }
     }
 }
예제 #3
0
파일: Form1.cs 프로젝트: nightwolf93/Bfly
        private void generateButtons()
        {
            TestWire leWire;

            for (int x = 0; x < 12; x++)
            {
                for (int y = 0; y < 14; y++)
                {
                    leWire        = new TestWire(x, y);
                    leWire.Click += new EventHandler(leWire_Click);
                    this.Controls.Add(leWire);
                    yaaaay.Add(leWire.LocationPoint, leWire);
                }
            }
        }