Esempio n. 1
0
 //================================================================================================================================================
 // Public Methods
 //================================================================================================================================================
 #region UpdateCurrentItem
 public void UpdateCurrentItem()
 {
     if (CurrentItem == null)
     {
         return;
     }
     if (CurrentItem.GetType() == typeof(TreeViewItem))
     {
         TreeViewItem tvi = (TreeViewItem)CurrentItem;
         if (tvi.DataContext.GetType() == typeof(Tool))
         {
             Tool tool = (Tool)tvi.DataContext;
             switch (tool.Language.ToLower())
             {
                 case "javascript":
                     ObjectCreator oc = new ObjectCreator(tool);
                     mainRef.main_content.Content = oc;
                     break;
             }
         }
     }
 }
Esempio n. 2
0
 //=======================================================================================================
 // Constructors
 //=======================================================================================================
 #region vmObjectCreator(Tool tool)
 public vmObjectCreator(ObjectCreator viewRef, Tool tool)
 {
     this.viewRef = viewRef;
     CurrentTool = tool;
     if (tool.Objects.Count > 0)
     {
         CurrentObject = tool.Objects.ElementAt(0);
     }
     else
     {
         CurrentObject = tool.AddNewObject();
     }
     AddNewProperty();
 }