Пример #1
0
        private void newToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (modifiedDocument)
            {
                DialogResult saveDocumentMsgBox = ShowSaveDocumentPrompt();
                switch (saveDocumentMsgBox)
                {
                case DialogResult.Yes:
                    if (newFile)
                    {
                        saveToolStripMenuItem_Click(sender, e);
                    }
                    else
                    {
                        builder.SaveHtmlFile(filePath);
                    }
                    break;

                case DialogResult.No:
                case DialogResult.Cancel:
                    break;
                }
            }

            this.Text        = "Untitled - Easy Web Page Builder";
            newFile          = true;
            openedDocument   = true;
            filePath         = "Untitled";
            modeTabs.Visible = true;
            EnableMenuItems();
            builder.ClearHtmlContent();
            browserDesign.Focus();
        }