Esempio n. 1
0
 public redactorPL(object parentF, object parentM, string namePort, string nameLine1, string nameLine2)
 {
     parentManager = (cnManager)parentM;
     parent        = (connectFormPL)parentF;
     InitializeComponent();
     portName.Text  = namePort;
     lineName1.Text = nameLine1;
     lineName2.Text = nameLine2;
     this.SetStyle(ControlStyles.OptimizedDoubleBuffer |
                   ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true);
     this.UpdateStyles();
 }
Esempio n. 2
0
 public cnManager(Port port1, Line line, System.Windows.Forms.UserControl parent)
 {
     this.parent = parent;
     assign      = new SortedList <int, int>();
     if (port1.bus)
     {
         if (line.bus)
         {
             connectFormPL cf = new connectFormPL(port1, line, this);
             cf.ShowDialog();
             if (assign.Count == 0)
             {
                 resultOk = false;
             }
         }
         else
         {
             connectForm1 cf = new connectForm1(port1.LeftBusBound, port1.RightBusBound, this, false);
             cf.ShowDialog();
             if (assign.Count == 0)
             {
                 resultOk = false;
             }
         }
     }
     else
     if (line.bus)
     {
         connectForm1 cf = new connectForm1(line.LeftBusBound, line.RightBusBound, this, true);
         cf.ShowDialog();
         if (assign.Count == 0)
         {
             resultOk = false;
         }
     }
     else
     {
         assign.Add(0, 0);
         resultOk = true;
         if (assign.Count == 0)
         {
             resultOk = false;
         }
     }
 }