public void DeleteObject() { if (LivePreview.currentObject == null) { return; } thePaper.Controls.Remove(LivePreview.currentObject.Holder); Objects.DeleteObject(LivePreview.currentObject); LivePreview.UnSelect(); PopulateObjectList(); }
private void openToolStripMenuItem_Click(object sender, EventArgs e) { Project.OpenProject(); UpdateFormTitle(); PopulateObjectList(); LivePreview.UnSelect(); // Add all the controls to the paper panel foreach (DocumentObject docObj in Objects.objectList) { thePaper.Controls.Add(docObj.Holder); } }
private void LayersTable_SelectionChanged(object sender, EventArgs e) { if (isPopulating || ignoreSelectionChange) { return; } if (layersTable.SelectedCells.Count <= 0) { LivePreview.UnSelect(); } else { int index = layersTable.SelectedCells[0].RowIndex; LivePreview.Select((DocumentObject)layersTable[layer_object.Index, index].Value); } }
private void newToolStripMenuItem_Click(object sender, EventArgs e) { // Initialize a new project Project.NewProject(); UpdateFormTitle(); // Set application title // Resize the paper ResizePaper(); // Populate object list PopulateObjectList(); // Reset zooms LoadZoomList(); // Update even if not object is selected to reset properties LivePreview.UnSelect(); }
public static void InitializeComponents() { // Empty the temp folder for the new project files Resources.EmptyTempFolder(); // Clear paper from the controls LivePreview.paperReference.Controls.Clear(); if (colorDialog != null) { colorDialog.Dispose(); } colorDialog = new ColorDialog(); colorDialog.FullOpen = true; Paper.Initialize(); Fonts.Initialize(); Languages.Initialize(); Objects.Initialize(); LivePreview.UnSelect(); }