From f2a252945965e27f4c85eec0d8db4b09d4b381d9 Mon Sep 17 00:00:00 2001 From: JeffDChapman Date: Wed, 10 Jan 2024 19:06:09 -0800 Subject: [PATCH 1/3] Toolbar and Close Changes Removed some toolbar buttons and cleaned up flow; Moved Yes/No/Cancel routines from Exit menu to Form.Closing event Removed unnecessary Usings --- RTFPad.csproj | 8 +- aboutForm.cs | 5 - app.config | 3 + findForm.cs | 5 - replaceForm.cs | 5 - rtfPadForm.Designer.cs | 496 +++++++++++++++++++---------------------- rtfPadForm.cs | 105 ++++----- rtfPadForm.resx | 51 +++-- 8 files changed, 322 insertions(+), 356 deletions(-) create mode 100644 app.config diff --git a/RTFPad.csproj b/RTFPad.csproj index ee3fc7c..a9e1217 100644 --- a/RTFPad.csproj +++ b/RTFPad.csproj @@ -10,8 +10,9 @@ Properties RTFPad RTFPad - v2.0 + v4.0 512 + x86 @@ -35,6 +36,9 @@ icon.ico + + RTFPad.Program + @@ -83,10 +87,12 @@ True Resources.resx + True rtfPadForm.cs + SettingsSingleFileGenerator Settings.Designer.cs diff --git a/aboutForm.cs b/aboutForm.cs index 0741d75..d861e01 100644 --- a/aboutForm.cs +++ b/aboutForm.cs @@ -1,9 +1,4 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; using System.Windows.Forms; using System.Diagnostics; diff --git a/app.config b/app.config new file mode 100644 index 0000000..fcd0c93 --- /dev/null +++ b/app.config @@ -0,0 +1,3 @@ + + + diff --git a/findForm.cs b/findForm.cs index da91223..f781445 100644 --- a/findForm.cs +++ b/findForm.cs @@ -1,9 +1,4 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; using System.Windows.Forms; diff --git a/replaceForm.cs b/replaceForm.cs index 06f9640..6825f13 100644 --- a/replaceForm.cs +++ b/replaceForm.cs @@ -1,9 +1,4 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; using System.Windows.Forms; namespace RTFPad diff --git a/rtfPadForm.Designer.cs b/rtfPadForm.Designer.cs index 5e109c7..f7f776d 100644 --- a/rtfPadForm.Designer.cs +++ b/rtfPadForm.Designer.cs @@ -64,33 +64,15 @@ private void InitializeComponent() this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.aboutRTFPadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStrip = new System.Windows.Forms.ToolStrip(); - this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); - this.toolStripCBoxFont = new System.Windows.Forms.ToolStripComboBox(); - this.toolStripCBoxFontSize = new System.Windows.Forms.ToolStripComboBox(); - this.dialogOpen = new System.Windows.Forms.OpenFileDialog(); - this.dialogSave = new System.Windows.Forms.SaveFileDialog(); - this.tabControl = new System.Windows.Forms.TabControl(); - this.statusStrip = new System.Windows.Forms.StatusStrip(); - this.statusStripInfoLabel = new System.Windows.Forms.ToolStripStatusLabel(); - this.tabMenu = new System.Windows.Forms.ContextMenuStrip(this.components); - this.contextMenuNew = new System.Windows.Forms.ToolStripMenuItem(); - this.contextMenuClose = new System.Windows.Forms.ToolStripMenuItem(); - this.dialogPrintPreview = new System.Windows.Forms.PrintPreviewDialog(); - this.dialogPrint = new System.Windows.Forms.PrintDialog(); - this.dialogPageSetup = new System.Windows.Forms.PageSetupDialog(); - this.dialogFont = new System.Windows.Forms.FontDialog(); - this.dialogColor = new System.Windows.Forms.ColorDialog(); this.toolStripNew = new System.Windows.Forms.ToolStripButton(); this.toolStripOpen = new System.Windows.Forms.ToolStripButton(); this.toolStripSave = new System.Windows.Forms.ToolStripButton(); this.toolStripPrint = new System.Windows.Forms.ToolStripButton(); this.toolStripPrintPreview = new System.Windows.Forms.ToolStripButton(); - this.toolStripFind = new System.Windows.Forms.ToolStripButton(); - this.toolStripCut = new System.Windows.Forms.ToolStripButton(); - this.toolStripCopy = new System.Windows.Forms.ToolStripButton(); - this.toolStripPaste = new System.Windows.Forms.ToolStripButton(); this.toolStripUndo = new System.Windows.Forms.ToolStripButton(); this.toolStripRedo = new System.Windows.Forms.ToolStripButton(); + this.toolStripCBoxFont = new System.Windows.Forms.ToolStripComboBox(); + this.toolStripCBoxFontSize = new System.Windows.Forms.ToolStripComboBox(); this.toolStripBold = new System.Windows.Forms.ToolStripButton(); this.toolStripItalic = new System.Windows.Forms.ToolStripButton(); this.toolStripUnderline = new System.Windows.Forms.ToolStripButton(); @@ -100,6 +82,19 @@ private void InitializeComponent() this.toolStripAlignCenter = new System.Windows.Forms.ToolStripButton(); this.toolStripAlignRight = new System.Windows.Forms.ToolStripButton(); this.toolStripBullet = new System.Windows.Forms.ToolStripButton(); + this.dialogOpen = new System.Windows.Forms.OpenFileDialog(); + this.dialogSave = new System.Windows.Forms.SaveFileDialog(); + this.tabControl = new System.Windows.Forms.TabControl(); + this.statusStrip = new System.Windows.Forms.StatusStrip(); + this.statusStripInfoLabel = new System.Windows.Forms.ToolStripStatusLabel(); + this.tabMenu = new System.Windows.Forms.ContextMenuStrip(this.components); + this.contextMenuNew = new System.Windows.Forms.ToolStripMenuItem(); + this.contextMenuClose = new System.Windows.Forms.ToolStripMenuItem(); + this.dialogPrintPreview = new System.Windows.Forms.PrintPreviewDialog(); + this.dialogPrint = new System.Windows.Forms.PrintDialog(); + this.dialogPageSetup = new System.Windows.Forms.PageSetupDialog(); + this.dialogFont = new System.Windows.Forms.FontDialog(); + this.dialogColor = new System.Windows.Forms.ColorDialog(); this.menuStrip1.SuspendLayout(); this.toolStrip.SuspendLayout(); this.statusStrip.SuspendLayout(); @@ -108,6 +103,8 @@ private void InitializeComponent() // // menuStrip1 // + this.menuStrip1.GripMargin = new System.Windows.Forms.Padding(2, 2, 0, 2); + this.menuStrip1.ImageScalingSize = new System.Drawing.Size(24, 24); this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.menuFile, this.menuEdit, @@ -116,7 +113,7 @@ private void InitializeComponent() this.helpToolStripMenuItem}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Size = new System.Drawing.Size(792, 24); + this.menuStrip1.Size = new System.Drawing.Size(1258, 33); this.menuStrip1.TabIndex = 1; this.menuStrip1.Text = "menuStrip1"; // @@ -135,7 +132,7 @@ private void InitializeComponent() this.toolStripSeparator2, this.menuFileExit}); this.menuFile.Name = "menuFile"; - this.menuFile.Size = new System.Drawing.Size(37, 20); + this.menuFile.Size = new System.Drawing.Size(54, 29); this.menuFile.Text = "&File"; this.menuFile.Click += new System.EventHandler(this.menuFile_Click); // @@ -143,7 +140,7 @@ private void InitializeComponent() // this.menuFileNewTab.Name = "menuFileNewTab"; this.menuFileNewTab.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N))); - this.menuFileNewTab.Size = new System.Drawing.Size(214, 22); + this.menuFileNewTab.Size = new System.Drawing.Size(320, 34); this.menuFileNewTab.Text = "&New Tab..."; this.menuFileNewTab.Click += new System.EventHandler(this.menuFileNew_Click); // @@ -152,7 +149,7 @@ private void InitializeComponent() this.menuFileCloseCurrentTab.Enabled = false; this.menuFileCloseCurrentTab.Name = "menuFileCloseCurrentTab"; this.menuFileCloseCurrentTab.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W))); - this.menuFileCloseCurrentTab.Size = new System.Drawing.Size(214, 22); + this.menuFileCloseCurrentTab.Size = new System.Drawing.Size(320, 34); this.menuFileCloseCurrentTab.Text = "&Close Current Tab"; this.menuFileCloseCurrentTab.Click += new System.EventHandler(this.menuFileCloseCurrentTab_Click); // @@ -160,7 +157,7 @@ private void InitializeComponent() // this.menuFileOpen.Name = "menuFileOpen"; this.menuFileOpen.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O))); - this.menuFileOpen.Size = new System.Drawing.Size(214, 22); + this.menuFileOpen.Size = new System.Drawing.Size(320, 34); this.menuFileOpen.Text = "&Open..."; this.menuFileOpen.Click += new System.EventHandler(this.menuFileOpen_Click); // @@ -168,52 +165,52 @@ private void InitializeComponent() // this.menuFileSave.Name = "menuFileSave"; this.menuFileSave.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S))); - this.menuFileSave.Size = new System.Drawing.Size(214, 22); + this.menuFileSave.Size = new System.Drawing.Size(320, 34); this.menuFileSave.Text = "&Save"; this.menuFileSave.Click += new System.EventHandler(this.menuFileSave_Click); // // menuFileSaveAs // this.menuFileSaveAs.Name = "menuFileSaveAs"; - this.menuFileSaveAs.Size = new System.Drawing.Size(214, 22); + this.menuFileSaveAs.Size = new System.Drawing.Size(320, 34); this.menuFileSaveAs.Text = "Save &As..."; this.menuFileSaveAs.Click += new System.EventHandler(this.menuFileSaveAs_Click); // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(211, 6); + this.toolStripSeparator1.Size = new System.Drawing.Size(317, 6); // // menuFilePrint // this.menuFilePrint.Name = "menuFilePrint"; - this.menuFilePrint.Size = new System.Drawing.Size(214, 22); + this.menuFilePrint.Size = new System.Drawing.Size(320, 34); this.menuFilePrint.Text = "&Print..."; this.menuFilePrint.Click += new System.EventHandler(this.menuFilePrint_Click); // // menuFilePrintPreview // this.menuFilePrintPreview.Name = "menuFilePrintPreview"; - this.menuFilePrintPreview.Size = new System.Drawing.Size(214, 22); + this.menuFilePrintPreview.Size = new System.Drawing.Size(320, 34); this.menuFilePrintPreview.Text = "Print Pre&view..."; this.menuFilePrintPreview.Click += new System.EventHandler(this.menuFilePrintPreview_Click); // // menuFilePageSetup // this.menuFilePageSetup.Name = "menuFilePageSetup"; - this.menuFilePageSetup.Size = new System.Drawing.Size(214, 22); + this.menuFilePageSetup.Size = new System.Drawing.Size(320, 34); this.menuFilePageSetup.Text = "Page Set&up..."; this.menuFilePageSetup.Click += new System.EventHandler(this.menuFilePageSetup_Click); // // toolStripSeparator2 // this.toolStripSeparator2.Name = "toolStripSeparator2"; - this.toolStripSeparator2.Size = new System.Drawing.Size(211, 6); + this.toolStripSeparator2.Size = new System.Drawing.Size(317, 6); // // menuFileExit // this.menuFileExit.Name = "menuFileExit"; - this.menuFileExit.Size = new System.Drawing.Size(214, 22); + this.menuFileExit.Size = new System.Drawing.Size(320, 34); this.menuFileExit.Text = "E&xit"; this.menuFileExit.Click += new System.EventHandler(this.menuFileExit_Click); // @@ -233,14 +230,14 @@ private void InitializeComponent() this.menuEditFindNext, this.menuEditReplace}); this.menuEdit.Name = "menuEdit"; - this.menuEdit.Size = new System.Drawing.Size(39, 20); + this.menuEdit.Size = new System.Drawing.Size(58, 29); this.menuEdit.Text = "&Edit"; // // menuEditUndo // this.menuEditUndo.Name = "menuEditUndo"; this.menuEditUndo.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Z))); - this.menuEditUndo.Size = new System.Drawing.Size(164, 22); + this.menuEditUndo.Size = new System.Drawing.Size(248, 34); this.menuEditUndo.Text = "&Undo"; this.menuEditUndo.Click += new System.EventHandler(this.menuEditUndo_Click); // @@ -248,20 +245,20 @@ private void InitializeComponent() // this.menuEditRedo.Name = "menuEditRedo"; this.menuEditRedo.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Y))); - this.menuEditRedo.Size = new System.Drawing.Size(164, 22); + this.menuEditRedo.Size = new System.Drawing.Size(248, 34); this.menuEditRedo.Text = "&Redo"; this.menuEditRedo.Click += new System.EventHandler(this.menuEditRedo_Click); // // toolStripSeparator6 // this.toolStripSeparator6.Name = "toolStripSeparator6"; - this.toolStripSeparator6.Size = new System.Drawing.Size(161, 6); + this.toolStripSeparator6.Size = new System.Drawing.Size(245, 6); // // menuEditCut // this.menuEditCut.Name = "menuEditCut"; this.menuEditCut.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.X))); - this.menuEditCut.Size = new System.Drawing.Size(164, 22); + this.menuEditCut.Size = new System.Drawing.Size(248, 34); this.menuEditCut.Text = "Cu&t"; this.menuEditCut.Click += new System.EventHandler(this.menuEditCut_Click); // @@ -269,7 +266,7 @@ private void InitializeComponent() // this.menuEditCopy.Name = "menuEditCopy"; this.menuEditCopy.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C))); - this.menuEditCopy.Size = new System.Drawing.Size(164, 22); + this.menuEditCopy.Size = new System.Drawing.Size(248, 34); this.menuEditCopy.Text = "&Copy"; this.menuEditCopy.Click += new System.EventHandler(this.menuEditCopy_Click); // @@ -277,7 +274,7 @@ private void InitializeComponent() // this.menuEditPaste.Name = "menuEditPaste"; this.menuEditPaste.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.V))); - this.menuEditPaste.Size = new System.Drawing.Size(164, 22); + this.menuEditPaste.Size = new System.Drawing.Size(248, 34); this.menuEditPaste.Text = "&Paste"; this.menuEditPaste.Click += new System.EventHandler(this.menuEditPaste_Click); // @@ -285,7 +282,7 @@ private void InitializeComponent() // this.menuEditClear.Name = "menuEditClear"; this.menuEditClear.ShortcutKeys = System.Windows.Forms.Keys.Delete; - this.menuEditClear.Size = new System.Drawing.Size(164, 22); + this.menuEditClear.Size = new System.Drawing.Size(248, 34); this.menuEditClear.Text = "Cle&ar"; this.menuEditClear.Click += new System.EventHandler(this.menuEditClear_Click); // @@ -293,20 +290,20 @@ private void InitializeComponent() // this.menuEditSelectAll.Name = "menuEditSelectAll"; this.menuEditSelectAll.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.A))); - this.menuEditSelectAll.Size = new System.Drawing.Size(164, 22); + this.menuEditSelectAll.Size = new System.Drawing.Size(248, 34); this.menuEditSelectAll.Text = "Select A&ll"; this.menuEditSelectAll.Click += new System.EventHandler(this.menuEditSelectAll_Click); // // toolStripSeparator7 // this.toolStripSeparator7.Name = "toolStripSeparator7"; - this.toolStripSeparator7.Size = new System.Drawing.Size(161, 6); + this.toolStripSeparator7.Size = new System.Drawing.Size(245, 6); // // menuEditFind // this.menuEditFind.Name = "menuEditFind"; this.menuEditFind.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F))); - this.menuEditFind.Size = new System.Drawing.Size(164, 22); + this.menuEditFind.Size = new System.Drawing.Size(248, 34); this.menuEditFind.Text = "&Find"; this.menuEditFind.Click += new System.EventHandler(this.menuEditFind_Click); // @@ -314,7 +311,7 @@ private void InitializeComponent() // this.menuEditFindNext.Name = "menuEditFindNext"; this.menuEditFindNext.ShortcutKeys = System.Windows.Forms.Keys.F3; - this.menuEditFindNext.Size = new System.Drawing.Size(164, 22); + this.menuEditFindNext.Size = new System.Drawing.Size(248, 34); this.menuEditFindNext.Text = "Find &Next"; this.menuEditFindNext.Click += new System.EventHandler(this.menuEditFindNext_Click); // @@ -322,7 +319,7 @@ private void InitializeComponent() // this.menuEditReplace.Name = "menuEditReplace"; this.menuEditReplace.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.H))); - this.menuEditReplace.Size = new System.Drawing.Size(164, 22); + this.menuEditReplace.Size = new System.Drawing.Size(248, 34); this.menuEditReplace.Text = "&Replace"; this.menuEditReplace.Click += new System.EventHandler(this.menuEditReplace_Click); // @@ -331,13 +328,13 @@ private void InitializeComponent() this.menuView.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.menuViewWordWrap}); this.menuView.Name = "menuView"; - this.menuView.Size = new System.Drawing.Size(44, 20); + this.menuView.Size = new System.Drawing.Size(65, 29); this.menuView.Text = "&View"; // // menuViewWordWrap // this.menuViewWordWrap.Name = "menuViewWordWrap"; - this.menuViewWordWrap.Size = new System.Drawing.Size(134, 22); + this.menuViewWordWrap.Size = new System.Drawing.Size(206, 34); this.menuViewWordWrap.Text = "&Word Wrap"; this.menuViewWordWrap.Click += new System.EventHandler(this.menuViewWordWrap_Click); // @@ -347,20 +344,20 @@ private void InitializeComponent() this.menuFormatFont, this.menuFormatColor}); this.menuFormat.Name = "menuFormat"; - this.menuFormat.Size = new System.Drawing.Size(57, 20); + this.menuFormat.Size = new System.Drawing.Size(85, 29); this.menuFormat.Text = "F&ormat"; // // menuFormatFont // this.menuFormatFont.Name = "menuFormatFont"; - this.menuFormatFont.Size = new System.Drawing.Size(103, 22); + this.menuFormatFont.Size = new System.Drawing.Size(157, 34); this.menuFormatFont.Text = "&Font"; this.menuFormatFont.Click += new System.EventHandler(this.menuFormatFont_Click); // // menuFormatColor // this.menuFormatColor.Name = "menuFormatColor"; - this.menuFormatColor.Size = new System.Drawing.Size(103, 22); + this.menuFormatColor.Size = new System.Drawing.Size(157, 34); this.menuFormatColor.Text = "&Color"; this.menuFormatColor.Click += new System.EventHandler(this.menuFormatColor_Click); // @@ -369,32 +366,28 @@ private void InitializeComponent() this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.aboutRTFPadToolStripMenuItem}); this.helpToolStripMenuItem.Name = "helpToolStripMenuItem"; - this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20); + this.helpToolStripMenuItem.Size = new System.Drawing.Size(65, 29); this.helpToolStripMenuItem.Text = "&Help"; // // aboutRTFPadToolStripMenuItem // this.aboutRTFPadToolStripMenuItem.Name = "aboutRTFPadToolStripMenuItem"; - this.aboutRTFPadToolStripMenuItem.Size = new System.Drawing.Size(150, 22); + this.aboutRTFPadToolStripMenuItem.Size = new System.Drawing.Size(226, 34); this.aboutRTFPadToolStripMenuItem.Text = "&About RTFPad"; this.aboutRTFPadToolStripMenuItem.Click += new System.EventHandler(this.aboutRTFPadToolStripMenuItem_Click); // // toolStrip // this.toolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; + this.toolStrip.ImageScalingSize = new System.Drawing.Size(24, 24); this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripNew, this.toolStripOpen, this.toolStripSave, this.toolStripPrint, this.toolStripPrintPreview, - this.toolStripFind, - this.toolStripCut, - this.toolStripCopy, - this.toolStripPaste, this.toolStripUndo, this.toolStripRedo, - this.toolStripSeparator5, this.toolStripCBoxFont, this.toolStripCBoxFontSize, this.toolStripBold, @@ -406,151 +399,22 @@ private void InitializeComponent() this.toolStripAlignCenter, this.toolStripAlignRight, this.toolStripBullet}); - this.toolStrip.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Flow; - this.toolStrip.Location = new System.Drawing.Point(0, 24); + this.toolStrip.Location = new System.Drawing.Point(0, 33); this.toolStrip.Name = "toolStrip"; - this.toolStrip.Size = new System.Drawing.Size(792, 46); + this.toolStrip.Padding = new System.Windows.Forms.Padding(0); + this.toolStrip.Size = new System.Drawing.Size(1258, 33); + this.toolStrip.Stretch = true; this.toolStrip.TabIndex = 2; this.toolStrip.Text = "toolStrip"; // - // toolStripSeparator5 - // - this.toolStripSeparator5.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; - this.toolStripSeparator5.Margin = new System.Windows.Forms.Padding(0, 0, 500, 0); - this.toolStripSeparator5.Name = "toolStripSeparator5"; - this.toolStripSeparator5.Size = new System.Drawing.Size(6, 23); - // - // toolStripCBoxFont - // - this.toolStripCBoxFont.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.toolStripCBoxFont.DropDownWidth = 200; - this.toolStripCBoxFont.MaxDropDownItems = 30; - this.toolStripCBoxFont.Name = "toolStripCBoxFont"; - this.toolStripCBoxFont.Size = new System.Drawing.Size(180, 23); - this.toolStripCBoxFont.SelectedIndexChanged += new System.EventHandler(this.toolStripCBoxFont_SelectedIndexChanged); - // - // toolStripCBoxFontSize - // - this.toolStripCBoxFontSize.AutoSize = false; - this.toolStripCBoxFontSize.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.toolStripCBoxFontSize.Items.AddRange(new object[] { - "8", - "9", - "10", - "11", - "12", - "14", - "16", - "18", - "20", - "22", - "24", - "26", - "28", - "36", - "48", - "72"}); - this.toolStripCBoxFontSize.MaxDropDownItems = 16; - this.toolStripCBoxFontSize.Name = "toolStripCBoxFontSize"; - this.toolStripCBoxFontSize.Size = new System.Drawing.Size(50, 23); - this.toolStripCBoxFontSize.SelectedIndexChanged += new System.EventHandler(this.toolStripCBoxFontSize_SelectedIndexChanged); - // - // dialogOpen - // - this.dialogOpen.DefaultExt = "rtf"; - this.dialogOpen.Filter = "Rich Text Format (*.rtf)|*.rtf|Plain text File (*.txt)|*.txt|All Files|"; - // - // dialogSave - // - this.dialogSave.DefaultExt = "rtf"; - this.dialogSave.Filter = "Rich Text Format (*.rtf)|*.rtf|Plain text File (*.txt)|*.txt|All Files|"; - // - // tabControl - // - this.tabControl.AllowDrop = true; - this.tabControl.Dock = System.Windows.Forms.DockStyle.Fill; - this.tabControl.ItemSize = new System.Drawing.Size(0, 18); - this.tabControl.Location = new System.Drawing.Point(0, 70); - this.tabControl.Name = "tabControl"; - this.tabControl.SelectedIndex = 0; - this.tabControl.Size = new System.Drawing.Size(792, 476); - this.tabControl.TabIndex = 0; - this.tabControl.SelectedIndexChanged += new System.EventHandler(this.tabControl_SelectedIndexChanged); - this.tabControl.MouseUp += new System.Windows.Forms.MouseEventHandler(this.tabControl_MouseUp); - // - // statusStrip - // - this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.statusStripInfoLabel}); - this.statusStrip.Location = new System.Drawing.Point(0, 546); - this.statusStrip.Name = "statusStrip"; - this.statusStrip.Size = new System.Drawing.Size(792, 22); - this.statusStrip.TabIndex = 3; - // - // statusStripInfoLabel - // - this.statusStripInfoLabel.Name = "statusStripInfoLabel"; - this.statusStripInfoLabel.Size = new System.Drawing.Size(0, 17); - // - // tabMenu - // - this.tabMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.contextMenuNew, - this.contextMenuClose}); - this.tabMenu.Name = "tabMenu"; - this.tabMenu.Size = new System.Drawing.Size(127, 48); - // - // contextMenuNew - // - this.contextMenuNew.Name = "contextMenuNew"; - this.contextMenuNew.Size = new System.Drawing.Size(126, 22); - this.contextMenuNew.Text = "&New Tab"; - this.contextMenuNew.Click += new System.EventHandler(this.contextMenuNew_Click); - // - // contextMenuClose - // - this.contextMenuClose.Name = "contextMenuClose"; - this.contextMenuClose.Size = new System.Drawing.Size(126, 22); - this.contextMenuClose.Text = "&Close Tab"; - this.contextMenuClose.Click += new System.EventHandler(this.contextMenuClose_Click); - // - // dialogPrintPreview - // - this.dialogPrintPreview.AutoScrollMargin = new System.Drawing.Size(0, 0); - this.dialogPrintPreview.AutoScrollMinSize = new System.Drawing.Size(0, 0); - this.dialogPrintPreview.ClientSize = new System.Drawing.Size(400, 300); - this.dialogPrintPreview.Enabled = true; - this.dialogPrintPreview.Icon = ((System.Drawing.Icon)(resources.GetObject("dialogPrintPreview.Icon"))); - this.dialogPrintPreview.Name = "dialogPrintPreview"; - this.dialogPrintPreview.ShowIcon = false; - this.dialogPrintPreview.Visible = false; - // - // dialogPrint - // - this.dialogPrint.UseEXDialog = true; - // - // dialogPageSetup - // - this.dialogPageSetup.EnableMetric = true; - this.dialogPageSetup.MinMargins = new System.Drawing.Printing.Margins(10, 10, 10, 10); - // - // dialogFont - // - this.dialogFont.FontMustExist = true; - this.dialogFont.ShowColor = true; - // - // dialogColor - // - this.dialogColor.AnyColor = true; - this.dialogColor.FullOpen = true; - // // toolStripNew // this.toolStripNew.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.toolStripNew.Image = global::RTFPad.icons.NewDocument; this.toolStripNew.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripNew.Name = "toolStripNew"; - this.toolStripNew.Size = new System.Drawing.Size(23, 20); + this.toolStripNew.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; + this.toolStripNew.Size = new System.Drawing.Size(34, 28); this.toolStripNew.Text = "New Tab"; this.toolStripNew.Click += new System.EventHandler(this.toolStripNew_Click); this.toolStripNew.MouseEnter += new System.EventHandler(this.toolStripNew_MouseEnter); @@ -562,7 +426,8 @@ private void InitializeComponent() this.toolStripOpen.Image = global::RTFPad.icons.OpenFolder; this.toolStripOpen.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripOpen.Name = "toolStripOpen"; - this.toolStripOpen.Size = new System.Drawing.Size(23, 20); + this.toolStripOpen.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; + this.toolStripOpen.Size = new System.Drawing.Size(34, 28); this.toolStripOpen.Text = "Open File"; this.toolStripOpen.Click += new System.EventHandler(this.toolStripOpen_Click); this.toolStripOpen.MouseEnter += new System.EventHandler(this.toolStripOpen_MouseEnter); @@ -574,7 +439,8 @@ private void InitializeComponent() this.toolStripSave.Image = global::RTFPad.icons.Save; this.toolStripSave.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripSave.Name = "toolStripSave"; - this.toolStripSave.Size = new System.Drawing.Size(23, 20); + this.toolStripSave.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; + this.toolStripSave.Size = new System.Drawing.Size(34, 28); this.toolStripSave.Text = "Save Current Tab"; this.toolStripSave.Click += new System.EventHandler(this.toolStripSave_Click); this.toolStripSave.MouseEnter += new System.EventHandler(this.toolStripSave_MouseEnter); @@ -586,7 +452,8 @@ private void InitializeComponent() this.toolStripPrint.Image = global::RTFPad.icons.Print; this.toolStripPrint.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripPrint.Name = "toolStripPrint"; - this.toolStripPrint.Size = new System.Drawing.Size(23, 20); + this.toolStripPrint.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; + this.toolStripPrint.Size = new System.Drawing.Size(34, 28); this.toolStripPrint.Text = "Print Current Tab"; this.toolStripPrint.Click += new System.EventHandler(this.toolStripPrint_Click); this.toolStripPrint.MouseEnter += new System.EventHandler(this.toolStripPrint_MouseEnter); @@ -598,67 +465,21 @@ private void InitializeComponent() this.toolStripPrintPreview.Image = global::RTFPad.icons.PrintPreview; this.toolStripPrintPreview.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripPrintPreview.Name = "toolStripPrintPreview"; - this.toolStripPrintPreview.Size = new System.Drawing.Size(23, 20); + this.toolStripPrintPreview.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; + this.toolStripPrintPreview.Size = new System.Drawing.Size(34, 28); this.toolStripPrintPreview.Text = "Print Preview"; this.toolStripPrintPreview.Click += new System.EventHandler(this.toolStripPrintPreview_Click); this.toolStripPrintPreview.MouseEnter += new System.EventHandler(this.toolStripPrintPreview_MouseEnter); this.toolStripPrintPreview.MouseLeave += new System.EventHandler(this.toolStripPrintPreview_MouseLeave); // - // toolStripFind - // - this.toolStripFind.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.toolStripFind.Image = global::RTFPad.icons.Find; - this.toolStripFind.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripFind.Name = "toolStripFind"; - this.toolStripFind.Size = new System.Drawing.Size(23, 20); - this.toolStripFind.Text = "Find"; - this.toolStripFind.Click += new System.EventHandler(this.toolStripFind_Click); - this.toolStripFind.MouseEnter += new System.EventHandler(this.toolStripFind_MouseEnter); - this.toolStripFind.MouseLeave += new System.EventHandler(this.toolStripFind_MouseLeave); - // - // toolStripCut - // - this.toolStripCut.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.toolStripCut.Image = global::RTFPad.icons.Cut; - this.toolStripCut.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripCut.Name = "toolStripCut"; - this.toolStripCut.Size = new System.Drawing.Size(23, 20); - this.toolStripCut.Text = "Cut"; - this.toolStripCut.Click += new System.EventHandler(this.toolStripCut_Click); - this.toolStripCut.MouseEnter += new System.EventHandler(this.toolStripCut_MouseEnter); - this.toolStripCut.MouseLeave += new System.EventHandler(this.toolStripCut_MouseLeave); - // - // toolStripCopy - // - this.toolStripCopy.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.toolStripCopy.Image = global::RTFPad.icons.Copy; - this.toolStripCopy.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripCopy.Name = "toolStripCopy"; - this.toolStripCopy.Size = new System.Drawing.Size(23, 20); - this.toolStripCopy.Text = "Copy"; - this.toolStripCopy.Click += new System.EventHandler(this.toolStripCopy_Click); - this.toolStripCopy.MouseEnter += new System.EventHandler(this.toolStripCopy_MouseEnter); - this.toolStripCopy.MouseLeave += new System.EventHandler(this.toolStripCopy_MouseLeave); - // - // toolStripPaste - // - this.toolStripPaste.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.toolStripPaste.Image = global::RTFPad.icons.Paste; - this.toolStripPaste.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripPaste.Name = "toolStripPaste"; - this.toolStripPaste.Size = new System.Drawing.Size(23, 20); - this.toolStripPaste.Text = "Paste"; - this.toolStripPaste.Click += new System.EventHandler(this.toolStripPaste_Click); - this.toolStripPaste.MouseEnter += new System.EventHandler(this.toolStripPaste_MouseEnter); - this.toolStripPaste.MouseLeave += new System.EventHandler(this.toolStripPaste_MouseLeave); - // // toolStripUndo // this.toolStripUndo.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.toolStripUndo.Image = global::RTFPad.icons.Edit_Undo; this.toolStripUndo.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripUndo.Name = "toolStripUndo"; - this.toolStripUndo.Size = new System.Drawing.Size(23, 20); + this.toolStripUndo.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; + this.toolStripUndo.Size = new System.Drawing.Size(34, 28); this.toolStripUndo.Text = "Undo"; this.toolStripUndo.Click += new System.EventHandler(this.toolStripUndo_Click); this.toolStripUndo.MouseEnter += new System.EventHandler(this.toolStripUndo_MouseEnter); @@ -670,19 +491,60 @@ private void InitializeComponent() this.toolStripRedo.Image = global::RTFPad.icons.Edit_Redo; this.toolStripRedo.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripRedo.Name = "toolStripRedo"; - this.toolStripRedo.Size = new System.Drawing.Size(23, 20); + this.toolStripRedo.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; + this.toolStripRedo.Size = new System.Drawing.Size(34, 28); this.toolStripRedo.Text = "Redo"; this.toolStripRedo.Click += new System.EventHandler(this.toolStripRedo_Click); this.toolStripRedo.MouseEnter += new System.EventHandler(this.toolStripRedo_MouseEnter); this.toolStripRedo.MouseLeave += new System.EventHandler(this.toolStripRedo_MouseLeave); // + // toolStripCBoxFont + // + this.toolStripCBoxFont.AutoSize = false; + this.toolStripCBoxFont.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.toolStripCBoxFont.DropDownWidth = 200; + this.toolStripCBoxFont.Margin = new System.Windows.Forms.Padding(0); + this.toolStripCBoxFont.MaxDropDownItems = 30; + this.toolStripCBoxFont.Name = "toolStripCBoxFont"; + this.toolStripCBoxFont.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; + this.toolStripCBoxFont.Size = new System.Drawing.Size(200, 33); + this.toolStripCBoxFont.SelectedIndexChanged += new System.EventHandler(this.toolStripCBoxFont_SelectedIndexChanged); + // + // toolStripCBoxFontSize + // + this.toolStripCBoxFontSize.AutoSize = false; + this.toolStripCBoxFontSize.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.toolStripCBoxFontSize.Items.AddRange(new object[] { + "8", + "9", + "10", + "11", + "12", + "14", + "16", + "18", + "20", + "22", + "24", + "26", + "28", + "36", + "48", + "72"}); + this.toolStripCBoxFontSize.MaxDropDownItems = 16; + this.toolStripCBoxFontSize.Name = "toolStripCBoxFontSize"; + this.toolStripCBoxFontSize.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; + this.toolStripCBoxFontSize.Size = new System.Drawing.Size(73, 33); + this.toolStripCBoxFontSize.SelectedIndexChanged += new System.EventHandler(this.toolStripCBoxFontSize_SelectedIndexChanged); + // // toolStripBold // this.toolStripBold.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.toolStripBold.Image = global::RTFPad.icons.Bold; this.toolStripBold.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripBold.Name = "toolStripBold"; - this.toolStripBold.Size = new System.Drawing.Size(23, 20); + this.toolStripBold.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; + this.toolStripBold.Size = new System.Drawing.Size(34, 28); this.toolStripBold.Text = "Bold"; this.toolStripBold.Click += new System.EventHandler(this.toolStripBold_Click); this.toolStripBold.MouseEnter += new System.EventHandler(this.toolStripBold_MouseEnter); @@ -694,7 +556,8 @@ private void InitializeComponent() this.toolStripItalic.Image = global::RTFPad.icons.Italic; this.toolStripItalic.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripItalic.Name = "toolStripItalic"; - this.toolStripItalic.Size = new System.Drawing.Size(23, 20); + this.toolStripItalic.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; + this.toolStripItalic.Size = new System.Drawing.Size(34, 28); this.toolStripItalic.Text = "Italic"; this.toolStripItalic.Click += new System.EventHandler(this.toolStripItalic_Click); this.toolStripItalic.MouseEnter += new System.EventHandler(this.toolStripItalic_MouseEnter); @@ -706,8 +569,9 @@ private void InitializeComponent() this.toolStripUnderline.Image = global::RTFPad.icons.Underline; this.toolStripUnderline.ImageTransparentColor = System.Drawing.Color.White; this.toolStripUnderline.Name = "toolStripUnderline"; - this.toolStripUnderline.Size = new System.Drawing.Size(23, 20); - this.toolStripUnderline.Text = "toolStripButton3"; + this.toolStripUnderline.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; + this.toolStripUnderline.Size = new System.Drawing.Size(34, 28); + this.toolStripUnderline.Text = "Underline"; this.toolStripUnderline.Click += new System.EventHandler(this.toolStripUnderline_Click); this.toolStripUnderline.MouseEnter += new System.EventHandler(this.toolStripUnderline_MouseEnter); this.toolStripUnderline.MouseLeave += new System.EventHandler(this.toolStripUnderline_MouseLeave); @@ -718,7 +582,8 @@ private void InitializeComponent() this.toolStripStrikethrough.Image = global::RTFPad.icons.Strikeout; this.toolStripStrikethrough.ImageTransparentColor = System.Drawing.Color.White; this.toolStripStrikethrough.Name = "toolStripStrikethrough"; - this.toolStripStrikethrough.Size = new System.Drawing.Size(23, 20); + this.toolStripStrikethrough.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; + this.toolStripStrikethrough.Size = new System.Drawing.Size(34, 28); this.toolStripStrikethrough.Text = "Strikethrough"; this.toolStripStrikethrough.Click += new System.EventHandler(this.toolStripStrikethrough_Click); this.toolStripStrikethrough.MouseEnter += new System.EventHandler(this.toolStripStrikethrough_MouseEnter); @@ -730,7 +595,8 @@ private void InitializeComponent() this.toolStripFontColor.Image = global::RTFPad.icons.Color; this.toolStripFontColor.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripFontColor.Name = "toolStripFontColor"; - this.toolStripFontColor.Size = new System.Drawing.Size(29, 20); + this.toolStripFontColor.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; + this.toolStripFontColor.Size = new System.Drawing.Size(42, 28); this.toolStripFontColor.Text = "Color Picker"; this.toolStripFontColor.DropDownItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.toolStripFontColor_DropDownItemClicked); this.toolStripFontColor.MouseEnter += new System.EventHandler(this.toolStripFontColor_MouseEnter); @@ -742,7 +608,8 @@ private void InitializeComponent() this.toolStripAlignLeft.Image = global::RTFPad.icons.Left; this.toolStripAlignLeft.ImageTransparentColor = System.Drawing.Color.White; this.toolStripAlignLeft.Name = "toolStripAlignLeft"; - this.toolStripAlignLeft.Size = new System.Drawing.Size(23, 20); + this.toolStripAlignLeft.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; + this.toolStripAlignLeft.Size = new System.Drawing.Size(34, 28); this.toolStripAlignLeft.Text = "Left Align"; this.toolStripAlignLeft.Click += new System.EventHandler(this.toolStripAlignLeft_Click); this.toolStripAlignLeft.MouseEnter += new System.EventHandler(this.toolStripAlignLeft_MouseEnter); @@ -754,7 +621,8 @@ private void InitializeComponent() this.toolStripAlignCenter.Image = global::RTFPad.icons.Center; this.toolStripAlignCenter.ImageTransparentColor = System.Drawing.Color.White; this.toolStripAlignCenter.Name = "toolStripAlignCenter"; - this.toolStripAlignCenter.Size = new System.Drawing.Size(23, 20); + this.toolStripAlignCenter.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; + this.toolStripAlignCenter.Size = new System.Drawing.Size(34, 28); this.toolStripAlignCenter.Text = "Center"; this.toolStripAlignCenter.Click += new System.EventHandler(this.toolStripAlignCenter_Click); this.toolStripAlignCenter.MouseEnter += new System.EventHandler(this.toolStripAlignCenter_MouseEnter); @@ -766,7 +634,8 @@ private void InitializeComponent() this.toolStripAlignRight.Image = global::RTFPad.icons.Right; this.toolStripAlignRight.ImageTransparentColor = System.Drawing.Color.White; this.toolStripAlignRight.Name = "toolStripAlignRight"; - this.toolStripAlignRight.Size = new System.Drawing.Size(23, 20); + this.toolStripAlignRight.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; + this.toolStripAlignRight.Size = new System.Drawing.Size(34, 28); this.toolStripAlignRight.Text = "Right Align"; this.toolStripAlignRight.Click += new System.EventHandler(this.toolStripAlignRight_Click); this.toolStripAlignRight.MouseEnter += new System.EventHandler(this.toolStripAlignRight_MouseEnter); @@ -777,28 +646,128 @@ private void InitializeComponent() this.toolStripBullet.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.toolStripBullet.Image = global::RTFPad.icons.List_Bullets; this.toolStripBullet.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripBullet.Margin = new System.Windows.Forms.Padding(0); this.toolStripBullet.Name = "toolStripBullet"; - this.toolStripBullet.Size = new System.Drawing.Size(23, 20); + this.toolStripBullet.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; + this.toolStripBullet.Size = new System.Drawing.Size(34, 33); this.toolStripBullet.Text = "Bullets"; this.toolStripBullet.Click += new System.EventHandler(this.toolStripBullet_Click); this.toolStripBullet.MouseEnter += new System.EventHandler(this.toolStripBullet_MouseEnter); this.toolStripBullet.MouseLeave += new System.EventHandler(this.toolStripBullet_MouseLeave); // + // dialogOpen + // + this.dialogOpen.DefaultExt = "rtf"; + this.dialogOpen.Filter = "Rich Text Format (*.rtf)|*.rtf|Plain text File (*.txt)|*.txt|All Files|"; + // + // dialogSave + // + this.dialogSave.DefaultExt = "rtf"; + this.dialogSave.Filter = "Rich Text Format (*.rtf)|*.rtf|Plain text File (*.txt)|*.txt|All Files|"; + // + // tabControl + // + this.tabControl.AllowDrop = true; + this.tabControl.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabControl.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tabControl.ItemSize = new System.Drawing.Size(0, 18); + this.tabControl.Location = new System.Drawing.Point(0, 66); + this.tabControl.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.tabControl.Name = "tabControl"; + this.tabControl.SelectedIndex = 0; + this.tabControl.Size = new System.Drawing.Size(1258, 962); + this.tabControl.TabIndex = 0; + this.tabControl.SelectedIndexChanged += new System.EventHandler(this.tabControl_SelectedIndexChanged); + this.tabControl.MouseUp += new System.Windows.Forms.MouseEventHandler(this.tabControl_MouseUp); + // + // statusStrip + // + this.statusStrip.ImageScalingSize = new System.Drawing.Size(24, 24); + this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.statusStripInfoLabel}); + this.statusStrip.Location = new System.Drawing.Point(0, 1028); + this.statusStrip.Name = "statusStrip"; + this.statusStrip.Padding = new System.Windows.Forms.Padding(2, 0, 21, 0); + this.statusStrip.Size = new System.Drawing.Size(1258, 22); + this.statusStrip.TabIndex = 3; + // + // statusStripInfoLabel + // + this.statusStripInfoLabel.Name = "statusStripInfoLabel"; + this.statusStripInfoLabel.Size = new System.Drawing.Size(0, 15); + // + // tabMenu + // + this.tabMenu.ImageScalingSize = new System.Drawing.Size(24, 24); + this.tabMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.contextMenuNew, + this.contextMenuClose}); + this.tabMenu.Name = "tabMenu"; + this.tabMenu.Size = new System.Drawing.Size(160, 68); + // + // contextMenuNew + // + this.contextMenuNew.Name = "contextMenuNew"; + this.contextMenuNew.Size = new System.Drawing.Size(159, 32); + this.contextMenuNew.Text = "&New Tab"; + this.contextMenuNew.Click += new System.EventHandler(this.contextMenuNew_Click); + // + // contextMenuClose + // + this.contextMenuClose.Name = "contextMenuClose"; + this.contextMenuClose.Size = new System.Drawing.Size(159, 32); + this.contextMenuClose.Text = "&Close Tab"; + this.contextMenuClose.Click += new System.EventHandler(this.contextMenuClose_Click); + // + // dialogPrintPreview + // + this.dialogPrintPreview.AutoScrollMargin = new System.Drawing.Size(0, 0); + this.dialogPrintPreview.AutoScrollMinSize = new System.Drawing.Size(0, 0); + this.dialogPrintPreview.ClientSize = new System.Drawing.Size(400, 300); + this.dialogPrintPreview.Enabled = true; + this.dialogPrintPreview.Icon = ((System.Drawing.Icon)(resources.GetObject("dialogPrintPreview.Icon"))); + this.dialogPrintPreview.Name = "dialogPrintPreview"; + this.dialogPrintPreview.ShowIcon = false; + this.dialogPrintPreview.Visible = false; + // + // dialogPrint + // + this.dialogPrint.UseEXDialog = true; + // + // dialogPageSetup + // + this.dialogPageSetup.EnableMetric = true; + this.dialogPageSetup.MinMargins = new System.Drawing.Printing.Margins(10, 10, 10, 10); + // + // dialogFont + // + this.dialogFont.Color = System.Drawing.Color.FromArgb(((int)(((byte)(182)))), ((int)(((byte)(246)))), ((int)(((byte)(240))))); + this.dialogFont.FontMustExist = true; + this.dialogFont.ShowColor = true; + // + // dialogColor + // + this.dialogColor.AnyColor = true; + this.dialogColor.FullOpen = true; + // // rtfPadForm // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(792, 568); + this.ClientSize = new System.Drawing.Size(1258, 1050); this.Controls.Add(this.tabControl); this.Controls.Add(this.statusStrip); this.Controls.Add(this.toolStrip); this.Controls.Add(this.menuStrip1); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Location = new System.Drawing.Point(175, 50); this.MainMenuStrip = this.menuStrip1; - this.MinimumSize = new System.Drawing.Size(800, 600); + this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.MinimumSize = new System.Drawing.Size(1189, 893); this.Name = "rtfPadForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; this.Text = "RTFPad"; - this.SizeChanged += new System.EventHandler(this.rtfPadForm_SizeChanged); + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.rtfPadForm_FormClosing); this.menuStrip1.ResumeLayout(false); this.menuStrip1.PerformLayout(); this.toolStrip.ResumeLayout(false); @@ -841,12 +810,7 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripButton toolStripOpen; private System.Windows.Forms.ToolStripButton toolStripPrint; private System.Windows.Forms.ToolStripButton toolStripPrintPreview; - private System.Windows.Forms.ToolStripButton toolStripFind; - private System.Windows.Forms.ToolStripButton toolStripCut; - private System.Windows.Forms.ToolStripButton toolStripCopy; - private System.Windows.Forms.ToolStripButton toolStripPaste; private System.Windows.Forms.ToolStripButton toolStripUndo; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator5; private System.Windows.Forms.ToolStripComboBox toolStripCBoxFont; private System.Windows.Forms.ToolStripComboBox toolStripCBoxFontSize; private System.Windows.Forms.ToolStripDropDownButton toolStripFontColor; diff --git a/rtfPadForm.cs b/rtfPadForm.cs index bac72c9..bd02db4 100644 --- a/rtfPadForm.cs +++ b/rtfPadForm.cs @@ -1,9 +1,6 @@ using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Data; using System.Drawing; -using System.Text; using System.Windows.Forms; using System.IO; using PrintPreviewRichTextBox; @@ -58,6 +55,9 @@ public rtfPadForm() } this.newTab(); this.rtb_SelectionChanged(this, new EventArgs()); + this.toolStripCBoxFont.Text = "Calibri"; + this.toolStripCBoxFontSize.Text = "20"; + this.Height = 600; } #endregion @@ -66,29 +66,6 @@ public rtfPadForm() /* File Exit */ private void menuFileExit_Click(object sender, EventArgs e) { - if (this.tabControl.TabCount <= 0) return; - - for (int i = this.tabControl.TabCount; i >= 0; --i) - { - this.tabControl.SelectedIndex = i; - RichTextBox rtb = (RichTextBox)this.tabControl.SelectedTab.Controls[0]; - - if (rtb.Text != (string)rtb.Tag) - { - - DialogResult result = MessageBox.Show("Do you wish to save changes to " + this.tabControl.SelectedTab.Text + " ?", - "RTFPad", MessageBoxButtons.YesNoCancel); - - if (result == DialogResult.Yes) - { - menuFileSave_Click(sender, e); - } - else if (result == DialogResult.Cancel) - { - return; - } - } - } this.Close(); } @@ -948,7 +925,7 @@ private void rtb_TextChanged(Object sender, EventArgs e) if (rtb.TextLength == 0) { this.menuEditFind.Enabled = false; - this.toolStripFind.Enabled = false; + //this.toolStripFind.Enabled = false; this.menuEditFindNext.Enabled = false; this.menuEditReplace.Enabled = false; this.menuEditSelectAll.Enabled = false; @@ -957,7 +934,7 @@ private void rtb_TextChanged(Object sender, EventArgs e) else { this.menuEditFind.Enabled = true; - this.toolStripFind.Enabled = true; + //this.toolStripFind.Enabled = true; this.menuEditFindNext.Enabled = true; this.menuEditReplace.Enabled = true; this.menuEditSelectAll.Enabled = true; @@ -995,7 +972,7 @@ private void rtb_SelectionChanged(Object sender, EventArgs e) if (rtb.TextLength == 0) { this.menuEditFind.Enabled = false; - this.toolStripFind.Enabled = false; + //this.toolStripFind.Enabled = false; this.menuEditFindNext.Enabled = false; this.menuEditReplace.Enabled = false; this.menuEditSelectAll.Enabled = false; @@ -1004,7 +981,7 @@ private void rtb_SelectionChanged(Object sender, EventArgs e) else { this.menuEditFind.Enabled = true; - this.toolStripFind.Enabled = true; + //this.toolStripFind.Enabled = true; this.menuEditFindNext.Enabled = true; this.menuEditReplace.Enabled = true; this.menuEditSelectAll.Enabled = true; @@ -1036,17 +1013,17 @@ private void rtb_SelectionChanged(Object sender, EventArgs e) { this.menuEditClear.Enabled = false; this.menuEditCut.Enabled = false; - this.toolStripCut.Enabled = false; + //this.toolStripCut.Enabled = false; this.menuEditCopy.Enabled = false; - this.toolStripCopy.Enabled = false; + //this.toolStripCopy.Enabled = false; } else { this.menuEditClear.Enabled = true; this.menuEditCut.Enabled = true; - this.toolStripCut.Enabled = true; + //this.toolStripCut.Enabled = true; this.menuEditCopy.Enabled = true; - this.toolStripCopy.Enabled = true; + //this.toolStripCopy.Enabled = true; } if (rtb.SelectionFont.Bold) this.toolStripBold.Checked = true; else this.toolStripBold.Checked = false; @@ -1085,7 +1062,7 @@ private void tabControl_SelectedIndexChanged(object sender, EventArgs e) this.Text = "RTFPad - " + this.tabControl.SelectedTab.Text; this.rtb_SelectionChanged(sender, e); this.menuEditPaste.Enabled = true; - this.toolStripPaste.Enabled = true; + //this.toolStripPaste.Enabled = true; this.menuFilePrint.Enabled = true; this.toolStripPrint.Enabled = true; this.menuFilePrintPreview.Enabled = true; @@ -1121,7 +1098,7 @@ private void tabControl_SelectedIndexChanged(object sender, EventArgs e) else { this.menuEditFind.Enabled = false; - this.toolStripFind.Enabled = false; + //this.toolStripFind.Enabled = false; this.menuEditFindNext.Enabled = false; this.menuEditReplace.Enabled = false; this.menuEditSelectAll.Enabled = false; @@ -1131,11 +1108,11 @@ private void tabControl_SelectedIndexChanged(object sender, EventArgs e) this.toolStripRedo.Enabled = false; this.menuEditClear.Enabled = false; this.menuEditCut.Enabled = false; - this.toolStripCut.Enabled = false; + //this.toolStripCut.Enabled = false; this.menuEditCopy.Enabled = false; - this.toolStripCopy.Enabled = false; + //this.toolStripCopy.Enabled = false; this.menuEditPaste.Enabled = false; - this.toolStripPaste.Enabled = false; + //this.toolStripPaste.Enabled = false; this.menuFilePrint.Enabled = false; this.toolStripPrint.Enabled = false; this.menuFilePrintPreview.Enabled = false; @@ -1171,17 +1148,17 @@ private void tabControl_MouseUp(object sender, MouseEventArgs e) /* Event which watches for the change in form size * Used for styling the Tool Strip so it's displayed in two rows when possible */ - private void rtfPadForm_SizeChanged(object sender, EventArgs e) - { - if (this.WindowState == FormWindowState.Maximized || this.Size.Width > 900 ) - { - toolStripSeparator5.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0); - } - else - { - toolStripSeparator5.Margin = new System.Windows.Forms.Padding(0, 0, 500, 0); - } - } + //private void rtfPadForm_SizeChanged(object sender, EventArgs e) + //{ + // if (this.WindowState == FormWindowState.Maximized || this.Size.Width > 900 ) + // { + // toolStripSeparator5.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0); + // } + // else + // { + // toolStripSeparator5.Margin = new System.Windows.Forms.Padding(0, 0, 500, 0); + // } + //} #endregion #region Tool Strip Mouse Over Events @@ -1386,5 +1363,33 @@ private void toolStripBullet_MouseLeave(object sender, EventArgs e) this.statusStripInfoLabel.Text = ""; } #endregion + + private void rtfPadForm_FormClosing(object sender, FormClosingEventArgs e) + { + if (this.tabControl.TabCount <= 0) return; + + for (int i = this.tabControl.TabCount; i > 0; --i) + { + this.tabControl.SelectedIndex = i; + RichTextBox rtb = (RichTextBox)this.tabControl.SelectedTab.Controls[0]; + + if (rtb.Text != (string)rtb.Tag) + { + + DialogResult result = MessageBox.Show("Do you wish to save changes to " + this.tabControl.SelectedTab.Text + " ?", + "RTFPad", MessageBoxButtons.YesNoCancel); + + if (result == DialogResult.Yes) + { + menuFileSave_Click(sender, e); + } + else if (result == DialogResult.Cancel) + { + e.Cancel = true; + return; + } + } + } + } } } \ No newline at end of file diff --git a/rtfPadForm.resx b/rtfPadForm.resx index 1b7a409..ea2d9e2 100644 --- a/rtfPadForm.resx +++ b/rtfPadForm.resx @@ -112,33 +112,33 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 216, 56 + + 284, 65 - - 118, 56 + + 152, 65 - - 331, 56 + + 440, 65 - - 556, 56 + + 746, 65 - - 447, 56 + + 598, 65 - - 17, 56 + + 17, 65 - - 128, 17 + + 168, 17 - + AAABAAYAICAQAAAAAADoAgAAZgAAABAQEAAAAAAAKAEAAE4DAAAgIAAAAQAIAKgIAAB2BAAAEBAAAAEA @@ -312,17 +312,20 @@ wf+0BQAAgAUAAIAFAACAAQAAgAHB/4ABAACAAQAAgAEAALwBAAC8AQAAvAHB/4ABbP///5H/ - + 17, 17 - - 281, 17 + + 382, 17 - - 540, 17 + + 739, 17 - - 425, 17 + + 582, 17 + + + 121 From 629c543901e95b17ff9c9c93fc2bbe4aaf12bac9 Mon Sep 17 00:00:00 2001 From: JeffDChapman Date: Thu, 13 Feb 2025 18:40:53 -0800 Subject: [PATCH 2/3] Bug Fixes Bug Fixes and allow parm for startup file opening --- Program.cs | 10 +-- RTFPad.csproj | 27 ++++++- rtfPadForm.Designer.cs | 61 +++++++-------- rtfPadForm.cs | 172 ++++++++++++++++++++++++----------------- 4 files changed, 160 insertions(+), 110 deletions(-) diff --git a/Program.cs b/Program.cs index d418d39..4831cc5 100644 --- a/Program.cs +++ b/Program.cs @@ -6,15 +6,15 @@ namespace RTFPad { static class Program { - /// - /// The main entry point for the application. - /// [STAThread] - static void Main() + static void Main(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new rtfPadForm()); + string startDoc = ""; + if (args.Length > 0) { startDoc = args[0]; } + if (startDoc == "") { Application.Run(new rtfPadForm()); } + else { Application.Run(new rtfPadForm(startDoc)); } } } } \ No newline at end of file diff --git a/RTFPad.csproj b/RTFPad.csproj index a9e1217..48b043d 100644 --- a/RTFPad.csproj +++ b/RTFPad.csproj @@ -13,12 +13,27 @@ v4.0 512 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true x86 true full - false + true bin\Debug\ DEBUG;TRACE prompt @@ -34,7 +49,7 @@ 4 - icon.ico + RTFPad.ico RTFPad.Program @@ -105,6 +120,14 @@ + + + + + False + .NET Framework 3.5 SP1 + false +