Пример #1
0
        private void SaveCurrentCanvasAsPicture()
        {
            var fileName = PickFileToSave(Constants.DrawingPanel.pictureFileDialogFilter);

            if (fileName != null)
            {
                DrawingProjectManager.SaveCanvasPicture(currentCanvas, fileName);

                isSaved = true;
            }
        }
Пример #2
0
        private void saveProjectButton_Click(object sender, EventArgs e)
        {
            isSaved = true;

            var fileName = PickFileToSave(Constants.DrawingPanel.projectFileDialogFilter);

            if (fileName != null)
            {
                DrawingProjectManager.SaveCanvasProject(currentCanvas, fileName);
            }
        }
Пример #3
0
        private void openProjectButton_Click(object sender, EventArgs e)
        {
            if (!isSaved &&
                SaveProjectQuestionMessage() == DialogResult.Yes)
            {
                SaveCurrentCanvasAsPicture();
            }

            var fileName = PickFileToOpen(Constants.DrawingPanel.projectFileDialogFilter);

            if (fileName != null)
            {
                currentCanvas         = DrawingProjectManager.LoadCanvasProject(fileName);
                currentCanvas.Display = this;

                isSaved = true;
            }
        }