Exemplo n.º 1
0
 private void SaveRotationManager()
 {
     if (rotationManagerController.Name != string.Empty)
     {
         rotationManagerController.ResetControllers();
         foreach (Node node in BeRotations.Nodes)
         {
             var rotation = (Rotation)node.Tag;
             rotationManagerController.Rotations.Add(rotation);
         }
         rotationManagerController.Save();
     }
 }
Exemplo n.º 2
0
 private void BeTbNewBehaviorPreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
 {
     if (e.KeyValue == 13)
     {
         SaveRotationManager();
         rotationManagerController = new RotationManagerController {
             Name = BeTBNewBehavior.Text
         };
         rotationManagerController.ResetControllers();
         ClearTree(BeRotations);
         BeTBSelectBehavior.Items.Add(rotationManagerController.Name);
         BeTBSelectBehavior.SelectedIndex       = BeTBSelectBehavior.FindStringExact(rotationManagerController.Name);
         BeTBNewBehavior.Text                   = "Enter name and press return to create.";
         RotationSettings.LoadedRotationManager = rotationManagerController.Name;
         SaveRotationManager();
         LoadBehavior();
     }
 }
Exemplo n.º 3
0
 private void BeTbNewBehaviorPreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
 {
     if (e.KeyValue == 13)
     {
         SaveRotationManager();
         rotationManagerController = new RotationManagerController {Name = BeTBNewBehavior.Text};
         rotationManagerController.ResetControllers();
         ClearTree(BeRotations);
         BeTBSelectBehavior.Items.Add(rotationManagerController.Name);
         BeTBSelectBehavior.SelectedIndex = BeTBSelectBehavior.FindStringExact(rotationManagerController.Name);
         BeTBNewBehavior.Text = "Enter name and press return to create.";
         RotationSettings.LoadedRotationManager = rotationManagerController.Name;
         SaveRotationManager();
         LoadBehavior();
     }
 }