Ejemplo n.º 1
0
        public void DeleteObject()
        {
            if (LivePreview.currentObject == null)
            {
                return;
            }

            thePaper.Controls.Remove(LivePreview.currentObject.Holder);
            Objects.DeleteObject(LivePreview.currentObject);

            LivePreview.UnSelect();
            PopulateObjectList();
        }
Ejemplo n.º 2
0
        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);
            }
        }
Ejemplo n.º 3
0
        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);
            }
        }
Ejemplo n.º 4
0
        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();
        }
Ejemplo n.º 5
0
        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();
        }