//================================================================================================================================================ // Constructors //================================================================================================================================================ #region SQLGenerator(Tool toolRef) public SQLGenerator(Tool toolRef) { _toolRef = toolRef; }
protected void OnAddTool(object parameter) { if (CurrentItem != null) { if (CurrentItem.GetType() == typeof(TreeViewItem)) { TreeViewItem tvItem = (TreeViewItem)CurrentItem; Tool tool; Project tempProject = null; if (tvItem.DataContext.GetType() == typeof(Project)) { tempProject = (Project)tvItem.DataContext; tool = new Tool(tempProject); tempProject.Tools.Add(tool); } else { tool = new Tool(null); } NewToolDialog ntd = new NewToolDialog(tool); ntd.ShowDialog(); UpdateCurrentItem(); OnPropertyChanged("CurrentItem"); TreeViewItem tvi = new TreeViewItem(); tvi.Header = tool.Name; tvi.DataContext = tool; TreeViewItem tvi_ = null; if (tempProject != null) { tvi_ = TreeViewItems.Where(x => x.Header.ToString() == tempProject.Name).FirstOrDefault(); } if (tvi_ != null) { tvi_.Items.Add(tvi); } else { TreeViewItems.Add(tvi); } Tools.Add(tool); CurrentItem = tvi; } } else { Tool tool = new Tool(); //object tool = new object(); NewToolDialog ntd = new NewToolDialog(tool); ntd.ShowDialog(); UpdateCurrentItem(); OnPropertyChanged("CurrentItem"); TreeViewItem tvi = new TreeViewItem(); tvi.Header = tool.Name; tvi.DataContext = tool; //Items.Add(tool); TreeViewItems.Add(tvi); Tools.Add(tool); CurrentItem = tvi; } }
//======================================================================================================= // Constructors //======================================================================================================= #region PHPGenerator(Tool toolRef) public PHPGenerator(Tool toolRef) { ToolRef = toolRef; }
//================================================================================================================================================ // Constructors //================================================================================================================================================ #region HTMLGenerator public HTMLGenerator(Tool toolRef) { ToolRef = ToolRef; }
public NewToolDialog(Tool t) { InitializeComponent(); tool = t; LoadTools(); }
//======================================================================================================= // 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(); }
//================================================================================================================================================ // Constructors //================================================================================================================================================ #region CSSGenerator public CSSGenerator(Tool toolRef) { ToolRef = toolRef; CreateStyles(); }
//================================================================================================================================================ // Constructors //================================================================================================================================================ #region JavascriptGenerator(Tool tool) public JavascriptGenerator(Tool tool) { ToolRef = tool; }
public ObjectCreator(Tool tool) { InitializeComponent(); DataContext = new vmObjectCreator(this, tool); }