public GUIToolEditLightController(LightController controller)
 {
     Controller = controller;
     Setup();
     Load += ReadData;
     FormClosing += SaveData;
 }
Пример #2
0
 private void StopConnection()
 {
     _firstNode = null;
     _firstController = null;
     _firstMoveObject = null;
     _firstNodeConnection = true;
     _firstControllerConnection = true;
     _firstMove = true;
     Viewport.HoverConnection = new Point(-1, -1);
 }
Пример #3
0
 private void LinkLight()
 {
     object obj = Viewport.GetObjByGridPos();
     if (obj != null)
     {
         if (_firstControllerConnection && obj is LightController)
         {
             _firstController = (LightController)obj;
             _firstControllerConnection = false;
             Viewport.HoverConnection = _firstController.Position;
         }
         else if (!_firstControllerConnection && obj is Node)
         {
             _firstController.Lights.Add(obj as Node);
             _firstControllerConnection = true;
             Viewport.HoverConnection = new Point(-1, -1);
         }
         Viewport.Connections.Refresh();
     }
 }