public ClassAssetButton(VisualClass _visualClass) : base() { visualClass = _visualClass; classTextBox = new TextBox(); this.Controls.Add(classTextBox); classTextBox.Size = new Size(80, 80); classTextBox.Location = new Point(10, 10); classTextBox.Text = visualClass.className; }
public VisualClassScriptEditorManager(Form1 _form, VisualClass _visualClass) : base(_form) { visualClass = _visualClass; currentNodesPanels = new List <BaseNodePanel>(); firstSelectedPin = null; firstSelectedNode = null; firstSelectedVariable = null; firstSelectedFunction = null; firstSelectedNodeOffset = new Size(0, 0); SpawnNode(new Point(50, 50), new VisualNodeCreatePanelPart(typeof(ConstructNode))); //Spawns construct node UpdateVariableAndFunctionPanel(); }
int ClassNavigationPanelExists(VisualClass _visualClass) { for (int i = 0; i < form.projectManager.showingEditors.Count; i++) { var classEditor = form.projectManager.showingEditors[i] as VisualClassScriptEditorManager; if (classEditor != null) { VisualClassScriptEditorManager editor = (VisualClassScriptEditorManager)classEditor; if (editor.visualClass == _visualClass) { return(i); } } } return(-1); }
public void AddNewClass() { Random r = new Random(); string newClassName = "a" + r.Next(0, 1000); while (ClassNameExists(newClassName)) { newClassName = "a" + r.Next(0, 1000); } VisualClass newVisualClass = new VisualClass(newClassName); visualProject.visualClasses.Add(newVisualClass); AddNewShowingEditor(newVisualClass); ChangeSelectedEditorIndex(showingEditors.Count - 1); }
public ProjectManager(Form1 _form) { form = _form; form.projectManager = this; navigationPanel = form.NavigationPanel; Instance = this; visualProject = new VisualProject(); showingEditors = new List <BaseEditorManager>(); AssetsEditorManager assetEditor = new AssetsEditorManager(form); showingEditors.Add(assetEditor); VisualClass newClass = new VisualClass("Program"); VisualClassScriptEditorManager scriptEdditor = new VisualClassScriptEditorManager(form, newClass); showingEditors.Add(scriptEdditor); visualProject.visualClasses.Add(newClass); ChangeSelectedEditorIndex(0); UpdateNavigationPanel(); }
public VisualClassNavigationPanelPart(int index, VisualClass _visualClass) : base(index) { visualClass = _visualClass; nameLabel.Text = visualClass.className; }