From cf62273cf104f1e7cbea3fe6f38f14488528f42f Mon Sep 17 00:00:00 2001 From: Lex Li Date: Sat, 28 Apr 2012 15:56:13 +0800 Subject: [PATCH] Crad's ActionList for .NET 1.1.1.0 source code check-in. --- .gitignore | 32 +- ActionsDemo/AboutBox.Designer.cs | 187 +++ ActionsDemo/AboutBox.cs | 114 ++ ActionsDemo/AboutBox.resx | 132 +++ .../Crad.Windows.Forms.Actions.Sample.csproj | 153 +++ ActionsDemo/EditorForm.Designer.cs | 1020 +++++++++++++++++ ActionsDemo/EditorForm.cs | 172 +++ ActionsDemo/EditorForm.resx | 639 +++++++++++ ActionsDemo/Program.cs | 26 + ActionsDemo/Properties/AssemblyInfo.cs | 33 + ActionsDemo/Properties/Resources.Designer.cs | 98 ++ ActionsDemo/Properties/Resources.resx | 136 +++ ActionsDemo/Properties/Settings.Designer.cs | 26 + ActionsDemo/Properties/Settings.settings | 7 + ActionsDemo/Resources/About.jpg | Bin 0 -> 18993 bytes ActionsDemo/Resources/Font.png | Bin 0 -> 363 bytes ActionsDemo/Resources/New.png | Bin 0 -> 315 bytes ActionsDemo/Resources/Open.png | Bin 0 -> 491 bytes ActionsDemo/Resources/Save.png | Bin 0 -> 494 bytes Crad.Windows.Forms.Actions.sln | 26 + Crad.Windows.Forms.Actions/AboutAction.cs | 44 + Crad.Windows.Forms.Actions/Action.cs | 455 ++++++++ .../ActionCollection.cs | 51 + Crad.Windows.Forms.Actions/ActionList.cs | 266 +++++ .../ActionTargetDescriptionInfo.cs | 40 + .../AlignCenterAction.cs | 33 + .../AlignCenterAction.resx | 123 ++ Crad.Windows.Forms.Actions/AlignLeftAction.cs | 31 + .../AlignLeftAction.resx | 123 ++ .../AlignRightAction.cs | 31 + .../AlignRightAction.resx | 123 ++ .../AlignmentBaseAction.cs | 45 + .../AlignmentBaseAction.resx | 123 ++ Crad.Windows.Forms.Actions/BoldAction.cs | 38 + Crad.Windows.Forms.Actions/BoldAction.resx | 123 ++ Crad.Windows.Forms.Actions/CopyAction.cs | 44 + Crad.Windows.Forms.Actions/CopyAction.resx | 123 ++ .../Crad.Windows.Forms.Actions.csproj | 319 ++++++ Crad.Windows.Forms.Actions/Crad.snk | Bin 0 -> 596 bytes Crad.Windows.Forms.Actions/CutAction.cs | 45 + Crad.Windows.Forms.Actions/CutAction.resx | 123 ++ Crad.Windows.Forms.Actions/DeleteAction.cs | 43 + Crad.Windows.Forms.Actions/DeleteAction.resx | 123 ++ .../Design/ActionCollectionEditor.cs | 50 + Crad.Windows.Forms.Actions/FontStyleAction.cs | 85 ++ .../FontStyleAction.resx | 123 ++ Crad.Windows.Forms.Actions/Images/Action.bmp | Bin 0 -> 1334 bytes .../Images/ActionList.bmp | Bin 0 -> 1078 bytes Crad.Windows.Forms.Actions/ItalicAction.cs | 36 + Crad.Windows.Forms.Actions/ItalicAction.resx | 123 ++ Crad.Windows.Forms.Actions/ListAction.cs | 57 + Crad.Windows.Forms.Actions/ListAction.resx | 123 ++ Crad.Windows.Forms.Actions/PasteAction.cs | 41 + Crad.Windows.Forms.Actions/PasteAction.resx | 133 +++ .../Properties/AssemblyInfo.cs | 35 + .../Properties/Resources.Designer.cs | 161 +++ .../Properties/Resources.resx | 163 +++ Crad.Windows.Forms.Actions/RedoAction.cs | 44 + Crad.Windows.Forms.Actions/RedoAction.resx | 123 ++ .../Resources/AlignCenter.png | Bin 0 -> 172 bytes .../Resources/AlignJustified.png | Bin 0 -> 170 bytes .../Resources/AlignLeft.png | Bin 0 -> 178 bytes .../Resources/AlignRight.png | Bin 0 -> 181 bytes .../Resources/BulletedList.png | Bin 0 -> 226 bytes Crad.Windows.Forms.Actions/Resources/Copy.png | Bin 0 -> 439 bytes Crad.Windows.Forms.Actions/Resources/Cut.png | Bin 0 -> 417 bytes .../Resources/Paste.png | Bin 0 -> 514 bytes Crad.Windows.Forms.Actions/Resources/Redo.png | Bin 0 -> 420 bytes .../Resources/StyleBold.png | Bin 0 -> 222 bytes .../Resources/StyleItalic.png | Bin 0 -> 200 bytes .../Resources/StyleUnderline.png | Bin 0 -> 233 bytes Crad.Windows.Forms.Actions/Resources/Undo.png | Bin 0 -> 417 bytes .../Resources/delete.png | Bin 0 -> 432 bytes Crad.Windows.Forms.Actions/RichTextAction.cs | 22 + Crad.Windows.Forms.Actions/SelectAllAction.cs | 44 + .../SelectAllAction.resx | 123 ++ .../StandardActionAttribute.cs | 11 + .../TextBoxBaseAction.cs | 22 + Crad.Windows.Forms.Actions/UnderlineAction.cs | 36 + .../UnderlineAction.resx | 123 ++ Crad.Windows.Forms.Actions/UndoAction.cs | 43 + Crad.Windows.Forms.Actions/UndoAction.resx | 123 ++ .../UpdatablePropertyAttribute.cs | 10 + .../ViewDetailsAction.cs | 29 + .../ViewDetailsAction.resx | 131 +++ .../ViewLargeIconsAction.cs | 30 + .../ViewLargeIconsAction.resx | 133 +++ Crad.Windows.Forms.Actions/ViewListAction.cs | 31 + .../ViewListAction.resx | 132 +++ .../ViewSmallIconsAction.cs | 30 + .../ViewSmallIconsAction.resx | 132 +++ Crad.Windows.Forms.Actions/license.txt | 213 ++++ 92 files changed, 7979 insertions(+), 6 deletions(-) create mode 100644 ActionsDemo/AboutBox.Designer.cs create mode 100644 ActionsDemo/AboutBox.cs create mode 100644 ActionsDemo/AboutBox.resx create mode 100644 ActionsDemo/Crad.Windows.Forms.Actions.Sample.csproj create mode 100644 ActionsDemo/EditorForm.Designer.cs create mode 100644 ActionsDemo/EditorForm.cs create mode 100644 ActionsDemo/EditorForm.resx create mode 100644 ActionsDemo/Program.cs create mode 100644 ActionsDemo/Properties/AssemblyInfo.cs create mode 100644 ActionsDemo/Properties/Resources.Designer.cs create mode 100644 ActionsDemo/Properties/Resources.resx create mode 100644 ActionsDemo/Properties/Settings.Designer.cs create mode 100644 ActionsDemo/Properties/Settings.settings create mode 100644 ActionsDemo/Resources/About.jpg create mode 100644 ActionsDemo/Resources/Font.png create mode 100644 ActionsDemo/Resources/New.png create mode 100644 ActionsDemo/Resources/Open.png create mode 100644 ActionsDemo/Resources/Save.png create mode 100644 Crad.Windows.Forms.Actions.sln create mode 100644 Crad.Windows.Forms.Actions/AboutAction.cs create mode 100644 Crad.Windows.Forms.Actions/Action.cs create mode 100644 Crad.Windows.Forms.Actions/ActionCollection.cs create mode 100644 Crad.Windows.Forms.Actions/ActionList.cs create mode 100644 Crad.Windows.Forms.Actions/ActionTargetDescriptionInfo.cs create mode 100644 Crad.Windows.Forms.Actions/AlignCenterAction.cs create mode 100644 Crad.Windows.Forms.Actions/AlignCenterAction.resx create mode 100644 Crad.Windows.Forms.Actions/AlignLeftAction.cs create mode 100644 Crad.Windows.Forms.Actions/AlignLeftAction.resx create mode 100644 Crad.Windows.Forms.Actions/AlignRightAction.cs create mode 100644 Crad.Windows.Forms.Actions/AlignRightAction.resx create mode 100644 Crad.Windows.Forms.Actions/AlignmentBaseAction.cs create mode 100644 Crad.Windows.Forms.Actions/AlignmentBaseAction.resx create mode 100644 Crad.Windows.Forms.Actions/BoldAction.cs create mode 100644 Crad.Windows.Forms.Actions/BoldAction.resx create mode 100644 Crad.Windows.Forms.Actions/CopyAction.cs create mode 100644 Crad.Windows.Forms.Actions/CopyAction.resx create mode 100644 Crad.Windows.Forms.Actions/Crad.Windows.Forms.Actions.csproj create mode 100644 Crad.Windows.Forms.Actions/Crad.snk create mode 100644 Crad.Windows.Forms.Actions/CutAction.cs create mode 100644 Crad.Windows.Forms.Actions/CutAction.resx create mode 100644 Crad.Windows.Forms.Actions/DeleteAction.cs create mode 100644 Crad.Windows.Forms.Actions/DeleteAction.resx create mode 100644 Crad.Windows.Forms.Actions/Design/ActionCollectionEditor.cs create mode 100644 Crad.Windows.Forms.Actions/FontStyleAction.cs create mode 100644 Crad.Windows.Forms.Actions/FontStyleAction.resx create mode 100644 Crad.Windows.Forms.Actions/Images/Action.bmp create mode 100644 Crad.Windows.Forms.Actions/Images/ActionList.bmp create mode 100644 Crad.Windows.Forms.Actions/ItalicAction.cs create mode 100644 Crad.Windows.Forms.Actions/ItalicAction.resx create mode 100644 Crad.Windows.Forms.Actions/ListAction.cs create mode 100644 Crad.Windows.Forms.Actions/ListAction.resx create mode 100644 Crad.Windows.Forms.Actions/PasteAction.cs create mode 100644 Crad.Windows.Forms.Actions/PasteAction.resx create mode 100644 Crad.Windows.Forms.Actions/Properties/AssemblyInfo.cs create mode 100644 Crad.Windows.Forms.Actions/Properties/Resources.Designer.cs create mode 100644 Crad.Windows.Forms.Actions/Properties/Resources.resx create mode 100644 Crad.Windows.Forms.Actions/RedoAction.cs create mode 100644 Crad.Windows.Forms.Actions/RedoAction.resx create mode 100644 Crad.Windows.Forms.Actions/Resources/AlignCenter.png create mode 100644 Crad.Windows.Forms.Actions/Resources/AlignJustified.png create mode 100644 Crad.Windows.Forms.Actions/Resources/AlignLeft.png create mode 100644 Crad.Windows.Forms.Actions/Resources/AlignRight.png create mode 100644 Crad.Windows.Forms.Actions/Resources/BulletedList.png create mode 100644 Crad.Windows.Forms.Actions/Resources/Copy.png create mode 100644 Crad.Windows.Forms.Actions/Resources/Cut.png create mode 100644 Crad.Windows.Forms.Actions/Resources/Paste.png create mode 100644 Crad.Windows.Forms.Actions/Resources/Redo.png create mode 100644 Crad.Windows.Forms.Actions/Resources/StyleBold.png create mode 100644 Crad.Windows.Forms.Actions/Resources/StyleItalic.png create mode 100644 Crad.Windows.Forms.Actions/Resources/StyleUnderline.png create mode 100644 Crad.Windows.Forms.Actions/Resources/Undo.png create mode 100644 Crad.Windows.Forms.Actions/Resources/delete.png create mode 100644 Crad.Windows.Forms.Actions/RichTextAction.cs create mode 100644 Crad.Windows.Forms.Actions/SelectAllAction.cs create mode 100644 Crad.Windows.Forms.Actions/SelectAllAction.resx create mode 100644 Crad.Windows.Forms.Actions/StandardActionAttribute.cs create mode 100644 Crad.Windows.Forms.Actions/TextBoxBaseAction.cs create mode 100644 Crad.Windows.Forms.Actions/UnderlineAction.cs create mode 100644 Crad.Windows.Forms.Actions/UnderlineAction.resx create mode 100644 Crad.Windows.Forms.Actions/UndoAction.cs create mode 100644 Crad.Windows.Forms.Actions/UndoAction.resx create mode 100644 Crad.Windows.Forms.Actions/UpdatablePropertyAttribute.cs create mode 100644 Crad.Windows.Forms.Actions/ViewDetailsAction.cs create mode 100644 Crad.Windows.Forms.Actions/ViewDetailsAction.resx create mode 100644 Crad.Windows.Forms.Actions/ViewLargeIconsAction.cs create mode 100644 Crad.Windows.Forms.Actions/ViewLargeIconsAction.resx create mode 100644 Crad.Windows.Forms.Actions/ViewListAction.cs create mode 100644 Crad.Windows.Forms.Actions/ViewListAction.resx create mode 100644 Crad.Windows.Forms.Actions/ViewSmallIconsAction.cs create mode 100644 Crad.Windows.Forms.Actions/ViewSmallIconsAction.resx create mode 100644 Crad.Windows.Forms.Actions/license.txt diff --git a/.gitignore b/.gitignore index 9ac0ec3..d3214a7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,26 @@ -# Build Folders (you can keep bin if you'd like, to store dlls and pdbs) -bin -obj - -# mstest test results -TestResults \ No newline at end of file +build/ +*.suo +*.user +_ReSharper* +*.csproj.user +*.resharper.user +*.userprefs +*.suo +*.cache +*.trx +*.pidb +Thumbs.db +[Bb]in +[Dd]ebug +[Oo]bj +[Rr]elease +[Tt]est[Rr]esult* +_UpgradeReport_Files +*[Pp]ublish.xml +*.project +*.metadata +logs +*.generated.cs +T4MVC.cs +/SharpSnmpLib/sharpsnmplib.snk +/packages \ No newline at end of file diff --git a/ActionsDemo/AboutBox.Designer.cs b/ActionsDemo/AboutBox.Designer.cs new file mode 100644 index 0000000..30cf0c0 --- /dev/null +++ b/ActionsDemo/AboutBox.Designer.cs @@ -0,0 +1,187 @@ +namespace Crad.Windows.Forms.Actions.Sample +{ + partial class AboutBox + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutBox)); + this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); + this.logoPictureBox = new System.Windows.Forms.PictureBox(); + this.labelProductName = new System.Windows.Forms.Label(); + this.labelVersion = new System.Windows.Forms.Label(); + this.labelCopyright = new System.Windows.Forms.Label(); + this.labelCompanyName = new System.Windows.Forms.Label(); + this.textBoxDescription = new System.Windows.Forms.TextBox(); + this.okButton = new System.Windows.Forms.Button(); + this.tableLayoutPanel.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).BeginInit(); + this.SuspendLayout(); + // + // tableLayoutPanel + // + this.tableLayoutPanel.ColumnCount = 2; + this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33F)); + this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 67F)); + this.tableLayoutPanel.Controls.Add(this.logoPictureBox, 0, 0); + this.tableLayoutPanel.Controls.Add(this.labelProductName, 1, 0); + this.tableLayoutPanel.Controls.Add(this.labelVersion, 1, 1); + this.tableLayoutPanel.Controls.Add(this.labelCopyright, 1, 2); + this.tableLayoutPanel.Controls.Add(this.labelCompanyName, 1, 3); + this.tableLayoutPanel.Controls.Add(this.textBoxDescription, 1, 4); + this.tableLayoutPanel.Controls.Add(this.okButton, 1, 5); + this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel.Location = new System.Drawing.Point(9, 9); + this.tableLayoutPanel.Name = "tableLayoutPanel"; + this.tableLayoutPanel.RowCount = 6; + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); + this.tableLayoutPanel.Size = new System.Drawing.Size(475, 297); + this.tableLayoutPanel.TabIndex = 0; + // + // logoPictureBox + // + this.logoPictureBox.Dock = System.Windows.Forms.DockStyle.Fill; + this.logoPictureBox.Image = global::Crad.Windows.Forms.Actions.Sample.Properties.Resources.About; + this.logoPictureBox.Location = new System.Drawing.Point(3, 3); + this.logoPictureBox.Name = "logoPictureBox"; + this.tableLayoutPanel.SetRowSpan(this.logoPictureBox, 6); + this.logoPictureBox.Size = new System.Drawing.Size(150, 291); + this.logoPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; + this.logoPictureBox.TabIndex = 12; + this.logoPictureBox.TabStop = false; + // + // labelProductName + // + this.labelProductName.Dock = System.Windows.Forms.DockStyle.Fill; + this.labelProductName.Location = new System.Drawing.Point(162, 0); + this.labelProductName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); + this.labelProductName.MaximumSize = new System.Drawing.Size(0, 17); + this.labelProductName.Name = "labelProductName"; + this.labelProductName.Size = new System.Drawing.Size(310, 17); + this.labelProductName.TabIndex = 19; + this.labelProductName.Text = "Product Name"; + this.labelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labelVersion + // + this.labelVersion.Dock = System.Windows.Forms.DockStyle.Fill; + this.labelVersion.Location = new System.Drawing.Point(162, 29); + this.labelVersion.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); + this.labelVersion.MaximumSize = new System.Drawing.Size(0, 17); + this.labelVersion.Name = "labelVersion"; + this.labelVersion.Size = new System.Drawing.Size(310, 17); + this.labelVersion.TabIndex = 0; + this.labelVersion.Text = "Version"; + this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labelCopyright + // + this.labelCopyright.Dock = System.Windows.Forms.DockStyle.Fill; + this.labelCopyright.Location = new System.Drawing.Point(162, 58); + this.labelCopyright.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); + this.labelCopyright.MaximumSize = new System.Drawing.Size(0, 17); + this.labelCopyright.Name = "labelCopyright"; + this.labelCopyright.Size = new System.Drawing.Size(310, 17); + this.labelCopyright.TabIndex = 21; + this.labelCopyright.Text = "Copyright"; + this.labelCopyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labelCompanyName + // + this.labelCompanyName.Dock = System.Windows.Forms.DockStyle.Fill; + this.labelCompanyName.Location = new System.Drawing.Point(162, 87); + this.labelCompanyName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); + this.labelCompanyName.MaximumSize = new System.Drawing.Size(0, 17); + this.labelCompanyName.Name = "labelCompanyName"; + this.labelCompanyName.Size = new System.Drawing.Size(310, 17); + this.labelCompanyName.TabIndex = 22; + this.labelCompanyName.Text = "Company Name"; + this.labelCompanyName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // textBoxDescription + // + this.textBoxDescription.Dock = System.Windows.Forms.DockStyle.Fill; + this.textBoxDescription.Location = new System.Drawing.Point(162, 119); + this.textBoxDescription.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3); + this.textBoxDescription.Multiline = true; + this.textBoxDescription.Name = "textBoxDescription"; + this.textBoxDescription.ReadOnly = true; + this.textBoxDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both; + this.textBoxDescription.Size = new System.Drawing.Size(310, 142); + this.textBoxDescription.TabIndex = 23; + this.textBoxDescription.TabStop = false; + this.textBoxDescription.Text = resources.GetString("textBoxDescription.Text"); + this.textBoxDescription.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // okButton + // + this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.okButton.Location = new System.Drawing.Point(397, 271); + this.okButton.Name = "okButton"; + this.okButton.Size = new System.Drawing.Size(75, 23); + this.okButton.TabIndex = 24; + this.okButton.Text = "&OK"; + // + // AboutBox + // + this.AcceptButton = this.okButton; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(493, 315); + this.Controls.Add(this.tableLayoutPanel); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "AboutBox"; + this.Padding = new System.Windows.Forms.Padding(9); + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "AboutBox"; + this.tableLayoutPanel.ResumeLayout(false); + this.tableLayoutPanel.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel; + private System.Windows.Forms.PictureBox logoPictureBox; + private System.Windows.Forms.Label labelProductName; + private System.Windows.Forms.Label labelVersion; + private System.Windows.Forms.Label labelCopyright; + private System.Windows.Forms.Label labelCompanyName; + private System.Windows.Forms.TextBox textBoxDescription; + private System.Windows.Forms.Button okButton; + } +} diff --git a/ActionsDemo/AboutBox.cs b/ActionsDemo/AboutBox.cs new file mode 100644 index 0000000..7d1a09f --- /dev/null +++ b/ActionsDemo/AboutBox.cs @@ -0,0 +1,114 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Windows.Forms; +using System.Reflection; + +namespace Crad.Windows.Forms.Actions.Sample +{ + partial class AboutBox : Form + { + public AboutBox() + { + InitializeComponent(); + + // Initialize the AboutBox to display the product information from the assembly information. + // Change assembly information settings for your application through either: + // - Project->Properties->Application->Assembly Information + // - AssemblyInfo.cs + this.Text = String.Format("About {0}", AssemblyTitle); + this.labelProductName.Text = AssemblyProduct; + this.labelVersion.Text = String.Format("Version {0}", AssemblyVersion); + this.labelCopyright.Text = AssemblyCopyright; + this.labelCompanyName.Text = AssemblyCompany; + } + + #region Assembly Attribute Accessors + + public string AssemblyTitle + { + get + { + // Get all Title attributes on this assembly + object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false); + // If there is at least one Title attribute + if (attributes.Length > 0) + { + // Select the first one + AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0]; + // If it is not an empty string, return it + if (titleAttribute.Title != "") + return titleAttribute.Title; + } + // If there was no Title attribute, or if the Title attribute was the empty string, return the .exe name + return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase); + } + } + + public string AssemblyVersion + { + get + { + return Assembly.GetExecutingAssembly().GetName().Version.ToString(); + } + } + + public string AssemblyDescription + { + get + { + // Get all Description attributes on this assembly + object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false); + // If there aren't any Description attributes, return an empty string + if (attributes.Length == 0) + return ""; + // If there is a Description attribute, return its value + return ((AssemblyDescriptionAttribute)attributes[0]).Description; + } + } + + public string AssemblyProduct + { + get + { + // Get all Product attributes on this assembly + object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false); + // If there aren't any Product attributes, return an empty string + if (attributes.Length == 0) + return ""; + // If there is a Product attribute, return its value + return ((AssemblyProductAttribute)attributes[0]).Product; + } + } + + public string AssemblyCopyright + { + get + { + // Get all Copyright attributes on this assembly + object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false); + // If there aren't any Copyright attributes, return an empty string + if (attributes.Length == 0) + return ""; + // If there is a Copyright attribute, return its value + return ((AssemblyCopyrightAttribute)attributes[0]).Copyright; + } + } + + public string AssemblyCompany + { + get + { + // Get all Company attributes on this assembly + object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false); + // If there aren't any Company attributes, return an empty string + if (attributes.Length == 0) + return ""; + // If there is a Company attribute, return its value + return ((AssemblyCompanyAttribute)attributes[0]).Company; + } + } + #endregion + } +} diff --git a/ActionsDemo/AboutBox.resx b/ActionsDemo/AboutBox.resx new file mode 100644 index 0000000..a152569 --- /dev/null +++ b/ActionsDemo/AboutBox.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + The purpose of this simple RTF editor is to demonstrate a possible usage of Crad's Actions for .NET 2.0. +Crad's Actions are absolutely free and released under Common Public License 1.0. + +If you want more informations, you can catch some at the URL +http://blogs.ugidotnet.org/crad/category/1935.aspx +or subscribing the feed +http://blogs.ugidotnet.org/crad/category/1935.aspx/rss + +Any kind of feedback about this work is really appreciated. Eventually, you can contact me using "Contacts" section on my personal blog: +http://blogs.ugidotnet.org/crad/contact.aspx + + \ No newline at end of file diff --git a/ActionsDemo/Crad.Windows.Forms.Actions.Sample.csproj b/ActionsDemo/Crad.Windows.Forms.Actions.Sample.csproj new file mode 100644 index 0000000..4c7ff77 --- /dev/null +++ b/ActionsDemo/Crad.Windows.Forms.Actions.Sample.csproj @@ -0,0 +1,153 @@ + + + + Debug + AnyCPU + 8.0.50727 + 2.0 + {88AB67C7-A0CF-4811-BC0F-7F908A38E9CF} + WinExe + Properties + Crad.Windows.Forms.Actions.Sample + Crad.Windows.Forms.Actions.Sample + Crad.Windows.Forms.Actions.Sample.Program + + + + + + + + + v2.0 + + + + + 2.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + Form + + + AboutBox.cs + + + Form + + + EditorForm.cs + + + + + Designer + AboutBox.cs + + + Designer + EditorForm.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + + + + + + + + + + + + + {6e50d1bd-d8ea-4992-8b25-c5a0d7e179a5} + Crad.Windows.Forms.Actions + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + + + \ No newline at end of file diff --git a/ActionsDemo/EditorForm.Designer.cs b/ActionsDemo/EditorForm.Designer.cs new file mode 100644 index 0000000..fbf8e17 --- /dev/null +++ b/ActionsDemo/EditorForm.Designer.cs @@ -0,0 +1,1020 @@ +namespace Crad.Windows.Forms.Actions.Sample +{ + partial class EditorForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditorForm)); + this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer(); + this.richTextBox1 = new System.Windows.Forms.RichTextBox(); + this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); + this.toolStripMenuItem15 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem16 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripMenuItem17 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem18 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem19 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem20 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripMenuItem21 = new System.Windows.Forms.ToolStripMenuItem(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem6 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripMenuItem7 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem8 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem9 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripMenuItem10 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem11 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem12 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem13 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripMenuItem14 = new System.Windows.Forms.ToolStripMenuItem(); + this.formattingToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem22 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem23 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem25 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem26 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem27 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripMenuItem24 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem28 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem29 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem30 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem31 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStrip1 = new System.Windows.Forms.ToolStrip(); + this.toolStripButton1 = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton2 = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton3 = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripButton4 = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton5 = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripButton6 = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton7 = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton8 = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripButton9 = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton10 = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton11 = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripButton12 = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton13 = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton14 = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator(); + this.actionList1 = new Crad.Windows.Forms.Actions.ActionList(); + this.undoAction1 = new Crad.Windows.Forms.Actions.UndoAction(); + this.redoAction1 = new Crad.Windows.Forms.Actions.RedoAction(); + this.cutAction1 = new Crad.Windows.Forms.Actions.CutAction(); + this.copyAction1 = new Crad.Windows.Forms.Actions.CopyAction(); + this.pasteAction1 = new Crad.Windows.Forms.Actions.PasteAction(); + this.deleteAction1 = new Crad.Windows.Forms.Actions.DeleteAction(); + this.selectAllAction1 = new Crad.Windows.Forms.Actions.SelectAllAction(); + this.actNew = new Crad.Windows.Forms.Actions.Action(); + this.actLoad = new Crad.Windows.Forms.Actions.Action(); + this.actSave = new Crad.Windows.Forms.Actions.Action(); + this.actSaveAs = new Crad.Windows.Forms.Actions.Action(); + this.actExit = new Crad.Windows.Forms.Actions.Action(); + this.actSelectFont = new Crad.Windows.Forms.Actions.Action(); + this.boldAction1 = new Crad.Windows.Forms.Actions.BoldAction(); + this.italicAction1 = new Crad.Windows.Forms.Actions.ItalicAction(); + this.underlineAction1 = new Crad.Windows.Forms.Actions.UnderlineAction(); + this.alignLeftAction1 = new Crad.Windows.Forms.Actions.AlignLeftAction(); + this.alignCenterAction1 = new Crad.Windows.Forms.Actions.AlignCenterAction(); + this.alignRightAction1 = new Crad.Windows.Forms.Actions.AlignRightAction(); + this.actAbout = new Crad.Windows.Forms.Actions.Action(); + this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); + this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); + this.fontDialog1 = new System.Windows.Forms.FontDialog(); + this.toolStripContainer1.ContentPanel.SuspendLayout(); + this.toolStripContainer1.TopToolStripPanel.SuspendLayout(); + this.toolStripContainer1.SuspendLayout(); + this.contextMenuStrip1.SuspendLayout(); + this.menuStrip1.SuspendLayout(); + this.toolStrip1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.actionList1)).BeginInit(); + this.SuspendLayout(); + // + // toolStripContainer1 + // + // + // toolStripContainer1.ContentPanel + // + this.toolStripContainer1.ContentPanel.Controls.Add(this.richTextBox1); + this.toolStripContainer1.ContentPanel.Size = new System.Drawing.Size(583, 327); + this.toolStripContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.toolStripContainer1.Location = new System.Drawing.Point(0, 0); + this.toolStripContainer1.Name = "toolStripContainer1"; + this.toolStripContainer1.Size = new System.Drawing.Size(583, 376); + this.toolStripContainer1.TabIndex = 0; + this.toolStripContainer1.Text = "toolStripContainer1"; + // + // toolStripContainer1.TopToolStripPanel + // + this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.menuStrip1); + this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.toolStrip1); + // + // richTextBox1 + // + this.richTextBox1.ContextMenuStrip = this.contextMenuStrip1; + this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill; + this.richTextBox1.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.richTextBox1.Location = new System.Drawing.Point(0, 0); + this.richTextBox1.Name = "richTextBox1"; + this.richTextBox1.Size = new System.Drawing.Size(583, 327); + this.richTextBox1.TabIndex = 0; + this.richTextBox1.Text = resources.GetString("richTextBox1.Text"); + this.richTextBox1.TextChanged += new System.EventHandler(this.richTextBox1_TextChanged); + // + // contextMenuStrip1 + // + this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripMenuItem15, + this.toolStripMenuItem16, + this.toolStripSeparator9, + this.toolStripMenuItem17, + this.toolStripMenuItem18, + this.toolStripMenuItem19, + this.toolStripMenuItem20, + this.toolStripSeparator10, + this.toolStripMenuItem21}); + this.contextMenuStrip1.Name = "contextMenuStrip1"; + this.contextMenuStrip1.Size = new System.Drawing.Size(206, 170); + // + // toolStripMenuItem15 + // + this.actionList1.SetAction(this.toolStripMenuItem15, this.undoAction1); + this.toolStripMenuItem15.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItem15.Image"))); + this.toolStripMenuItem15.Name = "toolStripMenuItem15"; + this.toolStripMenuItem15.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Z))); + this.toolStripMenuItem15.Size = new System.Drawing.Size(205, 22); + this.toolStripMenuItem15.Text = "&Undo"; + // + // toolStripMenuItem16 + // + this.actionList1.SetAction(this.toolStripMenuItem16, this.redoAction1); + this.toolStripMenuItem16.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItem16.Image"))); + this.toolStripMenuItem16.Name = "toolStripMenuItem16"; + this.toolStripMenuItem16.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Y))); + this.toolStripMenuItem16.Size = new System.Drawing.Size(205, 22); + this.toolStripMenuItem16.Text = "&Redo"; + // + // toolStripSeparator9 + // + this.toolStripSeparator9.Name = "toolStripSeparator9"; + this.toolStripSeparator9.Size = new System.Drawing.Size(202, 6); + // + // toolStripMenuItem17 + // + this.actionList1.SetAction(this.toolStripMenuItem17, this.cutAction1); + this.toolStripMenuItem17.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItem17.Image"))); + this.toolStripMenuItem17.Name = "toolStripMenuItem17"; + this.toolStripMenuItem17.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.X))); + this.toolStripMenuItem17.Size = new System.Drawing.Size(205, 22); + this.toolStripMenuItem17.Text = "&Cut"; + // + // toolStripMenuItem18 + // + this.actionList1.SetAction(this.toolStripMenuItem18, this.copyAction1); + this.toolStripMenuItem18.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItem18.Image"))); + this.toolStripMenuItem18.Name = "toolStripMenuItem18"; + this.toolStripMenuItem18.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C))); + this.toolStripMenuItem18.Size = new System.Drawing.Size(205, 22); + this.toolStripMenuItem18.Text = "&Copy"; + // + // toolStripMenuItem19 + // + this.actionList1.SetAction(this.toolStripMenuItem19, this.pasteAction1); + this.toolStripMenuItem19.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItem19.Image"))); + this.toolStripMenuItem19.Name = "toolStripMenuItem19"; + this.toolStripMenuItem19.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.V))); + this.toolStripMenuItem19.Size = new System.Drawing.Size(205, 22); + this.toolStripMenuItem19.Text = "&Paste"; + // + // toolStripMenuItem20 + // + this.actionList1.SetAction(this.toolStripMenuItem20, this.deleteAction1); + this.toolStripMenuItem20.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItem20.Image"))); + this.toolStripMenuItem20.Name = "toolStripMenuItem20"; + this.toolStripMenuItem20.ShortcutKeys = System.Windows.Forms.Keys.Delete; + this.toolStripMenuItem20.Size = new System.Drawing.Size(205, 22); + this.toolStripMenuItem20.Text = "&Delete"; + // + // toolStripSeparator10 + // + this.toolStripSeparator10.Name = "toolStripSeparator10"; + this.toolStripSeparator10.Size = new System.Drawing.Size(202, 6); + // + // toolStripMenuItem21 + // + this.actionList1.SetAction(this.toolStripMenuItem21, this.selectAllAction1); + this.toolStripMenuItem21.Name = "toolStripMenuItem21"; + this.toolStripMenuItem21.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.NumPad5))); + this.toolStripMenuItem21.Size = new System.Drawing.Size(205, 22); + this.toolStripMenuItem21.Text = "Select &All"; + // + // menuStrip1 + // + this.menuStrip1.Dock = System.Windows.Forms.DockStyle.None; + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.fileToolStripMenuItem, + this.toolStripMenuItem1, + this.formattingToolStripMenuItem, + this.toolStripMenuItem2}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(583, 24); + this.menuStrip1.TabIndex = 0; + this.menuStrip1.Text = "menuStrip1"; + // + // fileToolStripMenuItem + // + this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripMenuItem3, + this.toolStripMenuItem4, + this.toolStripMenuItem5, + this.toolStripMenuItem6, + this.toolStripSeparator1, + this.toolStripMenuItem7}); + this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; + this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20); + this.fileToolStripMenuItem.Text = "&File"; + // + // toolStripMenuItem3 + // + this.actionList1.SetAction(this.toolStripMenuItem3, this.actNew); + this.toolStripMenuItem3.Image = global::Crad.Windows.Forms.Actions.Sample.Properties.Resources.New; + this.toolStripMenuItem3.Name = "toolStripMenuItem3"; + this.toolStripMenuItem3.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N))); + this.toolStripMenuItem3.Size = new System.Drawing.Size(145, 22); + this.toolStripMenuItem3.Text = "&New"; + // + // toolStripMenuItem4 + // + this.actionList1.SetAction(this.toolStripMenuItem4, this.actLoad); + this.toolStripMenuItem4.Image = global::Crad.Windows.Forms.Actions.Sample.Properties.Resources.Open; + this.toolStripMenuItem4.Name = "toolStripMenuItem4"; + this.toolStripMenuItem4.Size = new System.Drawing.Size(145, 22); + this.toolStripMenuItem4.Text = "&Open..."; + // + // toolStripMenuItem5 + // + this.actionList1.SetAction(this.toolStripMenuItem5, this.actSave); + this.toolStripMenuItem5.Image = global::Crad.Windows.Forms.Actions.Sample.Properties.Resources.Save; + this.toolStripMenuItem5.Name = "toolStripMenuItem5"; + this.toolStripMenuItem5.Size = new System.Drawing.Size(145, 22); + this.toolStripMenuItem5.Text = "&Save"; + // + // toolStripMenuItem6 + // + this.actionList1.SetAction(this.toolStripMenuItem6, this.actSaveAs); + this.toolStripMenuItem6.Name = "toolStripMenuItem6"; + this.toolStripMenuItem6.Size = new System.Drawing.Size(145, 22); + this.toolStripMenuItem6.Text = "Save &As..."; + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(142, 6); + // + // toolStripMenuItem7 + // + this.actionList1.SetAction(this.toolStripMenuItem7, this.actExit); + this.toolStripMenuItem7.Name = "toolStripMenuItem7"; + this.toolStripMenuItem7.Size = new System.Drawing.Size(145, 22); + this.toolStripMenuItem7.Text = "&Exit"; + // + // toolStripMenuItem1 + // + this.toolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripMenuItem8, + this.toolStripMenuItem9, + this.toolStripSeparator3, + this.toolStripMenuItem10, + this.toolStripMenuItem11, + this.toolStripMenuItem12, + this.toolStripMenuItem13, + this.toolStripSeparator4, + this.toolStripMenuItem14}); + this.toolStripMenuItem1.Name = "toolStripMenuItem1"; + this.toolStripMenuItem1.Size = new System.Drawing.Size(37, 20); + this.toolStripMenuItem1.Text = "&Edit"; + // + // toolStripMenuItem8 + // + this.actionList1.SetAction(this.toolStripMenuItem8, this.undoAction1); + this.toolStripMenuItem8.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItem8.Image"))); + this.toolStripMenuItem8.Name = "toolStripMenuItem8"; + this.toolStripMenuItem8.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Z))); + this.toolStripMenuItem8.Size = new System.Drawing.Size(205, 22); + this.toolStripMenuItem8.Text = "&Undo"; + // + // toolStripMenuItem9 + // + this.actionList1.SetAction(this.toolStripMenuItem9, this.redoAction1); + this.toolStripMenuItem9.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItem9.Image"))); + this.toolStripMenuItem9.Name = "toolStripMenuItem9"; + this.toolStripMenuItem9.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Y))); + this.toolStripMenuItem9.Size = new System.Drawing.Size(205, 22); + this.toolStripMenuItem9.Text = "&Redo"; + // + // toolStripSeparator3 + // + this.toolStripSeparator3.Name = "toolStripSeparator3"; + this.toolStripSeparator3.Size = new System.Drawing.Size(202, 6); + // + // toolStripMenuItem10 + // + this.actionList1.SetAction(this.toolStripMenuItem10, this.cutAction1); + this.toolStripMenuItem10.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItem10.Image"))); + this.toolStripMenuItem10.Name = "toolStripMenuItem10"; + this.toolStripMenuItem10.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.X))); + this.toolStripMenuItem10.Size = new System.Drawing.Size(205, 22); + this.toolStripMenuItem10.Text = "&Cut"; + // + // toolStripMenuItem11 + // + this.actionList1.SetAction(this.toolStripMenuItem11, this.copyAction1); + this.toolStripMenuItem11.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItem11.Image"))); + this.toolStripMenuItem11.Name = "toolStripMenuItem11"; + this.toolStripMenuItem11.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C))); + this.toolStripMenuItem11.Size = new System.Drawing.Size(205, 22); + this.toolStripMenuItem11.Text = "&Copy"; + // + // toolStripMenuItem12 + // + this.actionList1.SetAction(this.toolStripMenuItem12, this.pasteAction1); + this.toolStripMenuItem12.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItem12.Image"))); + this.toolStripMenuItem12.Name = "toolStripMenuItem12"; + this.toolStripMenuItem12.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.V))); + this.toolStripMenuItem12.Size = new System.Drawing.Size(205, 22); + this.toolStripMenuItem12.Text = "&Paste"; + // + // toolStripMenuItem13 + // + this.actionList1.SetAction(this.toolStripMenuItem13, this.deleteAction1); + this.toolStripMenuItem13.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItem13.Image"))); + this.toolStripMenuItem13.Name = "toolStripMenuItem13"; + this.toolStripMenuItem13.ShortcutKeys = System.Windows.Forms.Keys.Delete; + this.toolStripMenuItem13.Size = new System.Drawing.Size(205, 22); + this.toolStripMenuItem13.Text = "&Delete"; + // + // toolStripSeparator4 + // + this.toolStripSeparator4.Name = "toolStripSeparator4"; + this.toolStripSeparator4.Size = new System.Drawing.Size(202, 6); + // + // toolStripMenuItem14 + // + this.actionList1.SetAction(this.toolStripMenuItem14, this.selectAllAction1); + this.toolStripMenuItem14.Name = "toolStripMenuItem14"; + this.toolStripMenuItem14.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.NumPad5))); + this.toolStripMenuItem14.Size = new System.Drawing.Size(205, 22); + this.toolStripMenuItem14.Text = "Select &All"; + // + // formattingToolStripMenuItem + // + this.formattingToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripMenuItem22, + this.toolStripMenuItem23, + this.toolStripSeparator11, + this.toolStripMenuItem24}); + this.formattingToolStripMenuItem.Name = "formattingToolStripMenuItem"; + this.formattingToolStripMenuItem.Size = new System.Drawing.Size(71, 20); + this.formattingToolStripMenuItem.Text = "For&matting"; + // + // toolStripMenuItem22 + // + this.actionList1.SetAction(this.toolStripMenuItem22, this.actSelectFont); + this.toolStripMenuItem22.Image = global::Crad.Windows.Forms.Actions.Sample.Properties.Resources.Font; + this.toolStripMenuItem22.Name = "toolStripMenuItem22"; + this.toolStripMenuItem22.Size = new System.Drawing.Size(156, 22); + this.toolStripMenuItem22.Text = "Select &font..."; + // + // toolStripMenuItem23 + // + this.toolStripMenuItem23.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripMenuItem25, + this.toolStripMenuItem26, + this.toolStripMenuItem27}); + this.toolStripMenuItem23.Name = "toolStripMenuItem23"; + this.toolStripMenuItem23.Size = new System.Drawing.Size(156, 22); + this.toolStripMenuItem23.Text = "Font style"; + // + // toolStripMenuItem25 + // + this.actionList1.SetAction(this.toolStripMenuItem25, this.boldAction1); + this.toolStripMenuItem25.CheckOnClick = true; + this.toolStripMenuItem25.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItem25.Image"))); + this.toolStripMenuItem25.Name = "toolStripMenuItem25"; + this.toolStripMenuItem25.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.B))); + this.toolStripMenuItem25.Size = new System.Drawing.Size(169, 22); + this.toolStripMenuItem25.Text = "&Bold"; + // + // toolStripMenuItem26 + // + this.actionList1.SetAction(this.toolStripMenuItem26, this.italicAction1); + this.toolStripMenuItem26.CheckOnClick = true; + this.toolStripMenuItem26.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItem26.Image"))); + this.toolStripMenuItem26.Name = "toolStripMenuItem26"; + this.toolStripMenuItem26.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.I))); + this.toolStripMenuItem26.Size = new System.Drawing.Size(169, 22); + this.toolStripMenuItem26.Text = "&Italic"; + // + // toolStripMenuItem27 + // + this.actionList1.SetAction(this.toolStripMenuItem27, this.underlineAction1); + this.toolStripMenuItem27.CheckOnClick = true; + this.toolStripMenuItem27.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItem27.Image"))); + this.toolStripMenuItem27.Name = "toolStripMenuItem27"; + this.toolStripMenuItem27.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.U))); + this.toolStripMenuItem27.Size = new System.Drawing.Size(169, 22); + this.toolStripMenuItem27.Text = "&Underline"; + // + // toolStripSeparator11 + // + this.toolStripSeparator11.Name = "toolStripSeparator11"; + this.toolStripSeparator11.Size = new System.Drawing.Size(153, 6); + // + // toolStripMenuItem24 + // + this.toolStripMenuItem24.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripMenuItem28, + this.toolStripMenuItem29, + this.toolStripMenuItem30}); + this.toolStripMenuItem24.Name = "toolStripMenuItem24"; + this.toolStripMenuItem24.Size = new System.Drawing.Size(156, 22); + this.toolStripMenuItem24.Text = "Text alignment"; + // + // toolStripMenuItem28 + // + this.actionList1.SetAction(this.toolStripMenuItem28, this.alignLeftAction1); + this.toolStripMenuItem28.CheckOnClick = true; + this.toolStripMenuItem28.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItem28.Image"))); + this.toolStripMenuItem28.Name = "toolStripMenuItem28"; + this.toolStripMenuItem28.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.T))); + this.toolStripMenuItem28.Size = new System.Drawing.Size(157, 22); + this.toolStripMenuItem28.Text = "&Left"; + // + // toolStripMenuItem29 + // + this.actionList1.SetAction(this.toolStripMenuItem29, this.alignCenterAction1); + this.toolStripMenuItem29.CheckOnClick = true; + this.toolStripMenuItem29.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItem29.Image"))); + this.toolStripMenuItem29.Name = "toolStripMenuItem29"; + this.toolStripMenuItem29.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.A))); + this.toolStripMenuItem29.Size = new System.Drawing.Size(157, 22); + this.toolStripMenuItem29.Text = "&Center"; + // + // toolStripMenuItem30 + // + this.actionList1.SetAction(this.toolStripMenuItem30, this.alignRightAction1); + this.toolStripMenuItem30.CheckOnClick = true; + this.toolStripMenuItem30.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItem30.Image"))); + this.toolStripMenuItem30.Name = "toolStripMenuItem30"; + this.toolStripMenuItem30.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.R))); + this.toolStripMenuItem30.Size = new System.Drawing.Size(157, 22); + this.toolStripMenuItem30.Text = "&Right"; + // + // toolStripMenuItem2 + // + this.toolStripMenuItem2.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripMenuItem31}); + this.toolStripMenuItem2.Name = "toolStripMenuItem2"; + this.toolStripMenuItem2.Size = new System.Drawing.Size(40, 20); + this.toolStripMenuItem2.Text = "&Help"; + // + // toolStripMenuItem31 + // + this.actionList1.SetAction(this.toolStripMenuItem31, this.actAbout); + this.toolStripMenuItem31.Name = "toolStripMenuItem31"; + this.toolStripMenuItem31.Size = new System.Drawing.Size(114, 22); + this.toolStripMenuItem31.Text = "About"; + // + // toolStrip1 + // + this.toolStrip1.Dock = System.Windows.Forms.DockStyle.None; + this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripButton1, + this.toolStripButton2, + this.toolStripButton3, + this.toolStripSeparator2, + this.toolStripButton4, + this.toolStripButton5, + this.toolStripSeparator5, + this.toolStripButton6, + this.toolStripButton7, + this.toolStripButton8, + this.toolStripSeparator6, + this.toolStripButton9, + this.toolStripButton10, + this.toolStripButton11, + this.toolStripSeparator7, + this.toolStripButton12, + this.toolStripButton13, + this.toolStripButton14, + this.toolStripSeparator8}); + this.toolStrip1.Location = new System.Drawing.Point(3, 24); + this.toolStrip1.Name = "toolStrip1"; + this.toolStrip1.Size = new System.Drawing.Size(364, 25); + this.toolStrip1.TabIndex = 0; + this.toolStrip1.Text = "toolStrip1"; + // + // toolStripButton1 + // + this.actionList1.SetAction(this.toolStripButton1, this.actNew); + this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.toolStripButton1.Image = global::Crad.Windows.Forms.Actions.Sample.Properties.Resources.New; + this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton1.Name = "toolStripButton1"; + this.toolStripButton1.Size = new System.Drawing.Size(23, 22); + this.toolStripButton1.Text = "&New"; + // + // toolStripButton2 + // + this.actionList1.SetAction(this.toolStripButton2, this.actLoad); + this.toolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.toolStripButton2.Image = global::Crad.Windows.Forms.Actions.Sample.Properties.Resources.Open; + this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton2.Name = "toolStripButton2"; + this.toolStripButton2.Size = new System.Drawing.Size(23, 22); + this.toolStripButton2.Text = "&Open..."; + // + // toolStripButton3 + // + this.actionList1.SetAction(this.toolStripButton3, this.actSave); + this.toolStripButton3.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.toolStripButton3.Image = global::Crad.Windows.Forms.Actions.Sample.Properties.Resources.Save; + this.toolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton3.Name = "toolStripButton3"; + this.toolStripButton3.Size = new System.Drawing.Size(23, 22); + this.toolStripButton3.Text = "&Save"; + // + // toolStripSeparator2 + // + this.toolStripSeparator2.Name = "toolStripSeparator2"; + this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25); + // + // toolStripButton4 + // + this.actionList1.SetAction(this.toolStripButton4, this.undoAction1); + this.toolStripButton4.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.toolStripButton4.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton4.Image"))); + this.toolStripButton4.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton4.Name = "toolStripButton4"; + this.toolStripButton4.Size = new System.Drawing.Size(23, 22); + this.toolStripButton4.Text = "&Undo"; + // + // toolStripButton5 + // + this.actionList1.SetAction(this.toolStripButton5, this.redoAction1); + this.toolStripButton5.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.toolStripButton5.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton5.Image"))); + this.toolStripButton5.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton5.Name = "toolStripButton5"; + this.toolStripButton5.Size = new System.Drawing.Size(23, 22); + this.toolStripButton5.Text = "&Redo"; + // + // toolStripSeparator5 + // + this.toolStripSeparator5.Name = "toolStripSeparator5"; + this.toolStripSeparator5.Size = new System.Drawing.Size(6, 25); + // + // toolStripButton6 + // + this.actionList1.SetAction(this.toolStripButton6, this.cutAction1); + this.toolStripButton6.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.toolStripButton6.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton6.Image"))); + this.toolStripButton6.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton6.Name = "toolStripButton6"; + this.toolStripButton6.Size = new System.Drawing.Size(23, 22); + this.toolStripButton6.Text = "&Cut"; + // + // toolStripButton7 + // + this.actionList1.SetAction(this.toolStripButton7, this.copyAction1); + this.toolStripButton7.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.toolStripButton7.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton7.Image"))); + this.toolStripButton7.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton7.Name = "toolStripButton7"; + this.toolStripButton7.Size = new System.Drawing.Size(23, 22); + this.toolStripButton7.Text = "&Copy"; + // + // toolStripButton8 + // + this.actionList1.SetAction(this.toolStripButton8, this.pasteAction1); + this.toolStripButton8.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.toolStripButton8.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton8.Image"))); + this.toolStripButton8.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton8.Name = "toolStripButton8"; + this.toolStripButton8.Size = new System.Drawing.Size(23, 22); + this.toolStripButton8.Text = "&Paste"; + // + // toolStripSeparator6 + // + this.toolStripSeparator6.Name = "toolStripSeparator6"; + this.toolStripSeparator6.Size = new System.Drawing.Size(6, 25); + // + // toolStripButton9 + // + this.actionList1.SetAction(this.toolStripButton9, this.boldAction1); + this.toolStripButton9.CheckOnClick = true; + this.toolStripButton9.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.toolStripButton9.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton9.Image"))); + this.toolStripButton9.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton9.Name = "toolStripButton9"; + this.toolStripButton9.Size = new System.Drawing.Size(23, 22); + this.toolStripButton9.Text = "&Bold"; + // + // toolStripButton10 + // + this.actionList1.SetAction(this.toolStripButton10, this.italicAction1); + this.toolStripButton10.CheckOnClick = true; + this.toolStripButton10.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.toolStripButton10.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton10.Image"))); + this.toolStripButton10.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton10.Name = "toolStripButton10"; + this.toolStripButton10.Size = new System.Drawing.Size(23, 22); + this.toolStripButton10.Text = "&Italic"; + // + // toolStripButton11 + // + this.actionList1.SetAction(this.toolStripButton11, this.underlineAction1); + this.toolStripButton11.CheckOnClick = true; + this.toolStripButton11.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.toolStripButton11.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton11.Image"))); + this.toolStripButton11.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton11.Name = "toolStripButton11"; + this.toolStripButton11.Size = new System.Drawing.Size(23, 22); + this.toolStripButton11.Text = "&Underline"; + // + // toolStripSeparator7 + // + this.toolStripSeparator7.Name = "toolStripSeparator7"; + this.toolStripSeparator7.Size = new System.Drawing.Size(6, 25); + // + // toolStripButton12 + // + this.actionList1.SetAction(this.toolStripButton12, this.alignLeftAction1); + this.toolStripButton12.CheckOnClick = true; + this.toolStripButton12.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.toolStripButton12.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton12.Image"))); + this.toolStripButton12.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton12.Name = "toolStripButton12"; + this.toolStripButton12.Size = new System.Drawing.Size(23, 22); + this.toolStripButton12.Text = "&Left"; + // + // toolStripButton13 + // + this.actionList1.SetAction(this.toolStripButton13, this.alignCenterAction1); + this.toolStripButton13.CheckOnClick = true; + this.toolStripButton13.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.toolStripButton13.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton13.Image"))); + this.toolStripButton13.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton13.Name = "toolStripButton13"; + this.toolStripButton13.Size = new System.Drawing.Size(23, 22); + this.toolStripButton13.Text = "&Center"; + // + // toolStripButton14 + // + this.actionList1.SetAction(this.toolStripButton14, this.alignRightAction1); + this.toolStripButton14.CheckOnClick = true; + this.toolStripButton14.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.toolStripButton14.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton14.Image"))); + this.toolStripButton14.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton14.Name = "toolStripButton14"; + this.toolStripButton14.Size = new System.Drawing.Size(23, 22); + this.toolStripButton14.Text = "&Right"; + // + // toolStripSeparator8 + // + this.toolStripSeparator8.Name = "toolStripSeparator8"; + this.toolStripSeparator8.Size = new System.Drawing.Size(6, 25); + // + // actionList1 + // + this.actionList1.Actions.Add(this.actNew); + this.actionList1.Actions.Add(this.actLoad); + this.actionList1.Actions.Add(this.actSave); + this.actionList1.Actions.Add(this.actSaveAs); + this.actionList1.Actions.Add(this.actExit); + this.actionList1.Actions.Add(this.undoAction1); + this.actionList1.Actions.Add(this.redoAction1); + this.actionList1.Actions.Add(this.copyAction1); + this.actionList1.Actions.Add(this.pasteAction1); + this.actionList1.Actions.Add(this.cutAction1); + this.actionList1.Actions.Add(this.deleteAction1); + this.actionList1.Actions.Add(this.boldAction1); + this.actionList1.Actions.Add(this.italicAction1); + this.actionList1.Actions.Add(this.underlineAction1); + this.actionList1.Actions.Add(this.alignCenterAction1); + this.actionList1.Actions.Add(this.alignLeftAction1); + this.actionList1.Actions.Add(this.alignRightAction1); + this.actionList1.Actions.Add(this.selectAllAction1); + this.actionList1.Actions.Add(this.actSelectFont); + this.actionList1.Actions.Add(this.actAbout); + this.actionList1.ContainerControl = this; + // + // undoAction1 + // + this.undoAction1.Image = ((System.Drawing.Image)(resources.GetObject("undoAction1.Image"))); + this.undoAction1.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Z))); + this.undoAction1.Text = "&Undo"; + this.undoAction1.ToolTipText = "Undo"; + // + // redoAction1 + // + this.redoAction1.Image = ((System.Drawing.Image)(resources.GetObject("redoAction1.Image"))); + this.redoAction1.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Y))); + this.redoAction1.Text = "&Redo"; + this.redoAction1.ToolTipText = "Redo"; + // + // cutAction1 + // + this.cutAction1.Image = ((System.Drawing.Image)(resources.GetObject("cutAction1.Image"))); + this.cutAction1.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.X))); + this.cutAction1.Text = "&Cut"; + this.cutAction1.ToolTipText = "Cut"; + // + // copyAction1 + // + this.copyAction1.Image = ((System.Drawing.Image)(resources.GetObject("copyAction1.Image"))); + this.copyAction1.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C))); + this.copyAction1.Text = "&Copy"; + this.copyAction1.ToolTipText = "Copy"; + // + // pasteAction1 + // + this.pasteAction1.Image = ((System.Drawing.Image)(resources.GetObject("pasteAction1.Image"))); + this.pasteAction1.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.V))); + this.pasteAction1.Text = "&Paste"; + this.pasteAction1.ToolTipText = "Paste"; + // + // deleteAction1 + // + this.deleteAction1.Image = ((System.Drawing.Image)(resources.GetObject("deleteAction1.Image"))); + this.deleteAction1.ShortcutKeys = System.Windows.Forms.Keys.Delete; + this.deleteAction1.Text = "&Delete"; + this.deleteAction1.ToolTipText = "Delete"; + // + // selectAllAction1 + // + this.selectAllAction1.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.NumPad5))); + this.selectAllAction1.Text = "Select &All"; + this.selectAllAction1.ToolTipText = "Select All"; + // + // actNew + // + this.actNew.Image = global::Crad.Windows.Forms.Actions.Sample.Properties.Resources.New; + this.actNew.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N))); + this.actNew.Text = "&New"; + this.actNew.ToolTipText = "New RTF File"; + this.actNew.Execute += new System.EventHandler(this.actNew_Execute); + this.actNew.BeforeExecute += new System.ComponentModel.CancelEventHandler(this.actNew_BeforeExecute); + // + // actLoad + // + this.actLoad.Image = global::Crad.Windows.Forms.Actions.Sample.Properties.Resources.Open; + this.actLoad.Text = "&Open..."; + this.actLoad.ToolTipText = "Open a RTF File..."; + this.actLoad.Execute += new System.EventHandler(this.actLoad_Execute); + this.actLoad.BeforeExecute += new System.ComponentModel.CancelEventHandler(this.actLoad_BeforeExecute); + // + // actSave + // + this.actSave.Image = global::Crad.Windows.Forms.Actions.Sample.Properties.Resources.Save; + this.actSave.Text = "&Save"; + this.actSave.ToolTipText = "Save the RTF File"; + this.actSave.Execute += new System.EventHandler(this.actSave_Execute); + this.actSave.Update += new System.EventHandler(this.actSave_Update); + // + // actSaveAs + // + this.actSaveAs.Text = "Save &As..."; + this.actSaveAs.ToolTipText = "Save the RTF File with a given name"; + this.actSaveAs.Execute += new System.EventHandler(this.actSaveAs_Execute); + // + // actExit + // + this.actExit.Text = "&Exit"; + this.actExit.ToolTipText = "Exit"; + this.actExit.Execute += new System.EventHandler(this.actExit_Execute); + // + // actSelectFont + // + this.actSelectFont.Image = global::Crad.Windows.Forms.Actions.Sample.Properties.Resources.Font; + this.actSelectFont.Text = "Select &font..."; + this.actSelectFont.ToolTipText = "Select font"; + this.actSelectFont.Execute += new System.EventHandler(this.actSelectFont_Execute); + // + // boldAction1 + // + this.boldAction1.CheckOnClick = true; + this.boldAction1.Image = ((System.Drawing.Image)(resources.GetObject("boldAction1.Image"))); + this.boldAction1.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.B))); + this.boldAction1.Text = "&Bold"; + this.boldAction1.ToolTipText = "Bold"; + // + // italicAction1 + // + this.italicAction1.CheckOnClick = true; + this.italicAction1.Image = ((System.Drawing.Image)(resources.GetObject("italicAction1.Image"))); + this.italicAction1.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.I))); + this.italicAction1.Text = "&Italic"; + this.italicAction1.ToolTipText = "Italic"; + // + // underlineAction1 + // + this.underlineAction1.CheckOnClick = true; + this.underlineAction1.Image = ((System.Drawing.Image)(resources.GetObject("underlineAction1.Image"))); + this.underlineAction1.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.U))); + this.underlineAction1.Text = "&Underline"; + this.underlineAction1.ToolTipText = "Underline"; + // + // alignLeftAction1 + // + this.alignLeftAction1.CheckOnClick = true; + this.alignLeftAction1.Image = ((System.Drawing.Image)(resources.GetObject("alignLeftAction1.Image"))); + this.alignLeftAction1.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.T))); + this.alignLeftAction1.Text = "&Left"; + this.alignLeftAction1.ToolTipText = "Left alignment"; + // + // alignCenterAction1 + // + this.alignCenterAction1.CheckOnClick = true; + this.alignCenterAction1.Image = ((System.Drawing.Image)(resources.GetObject("alignCenterAction1.Image"))); + this.alignCenterAction1.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.A))); + this.alignCenterAction1.Text = "&Center"; + this.alignCenterAction1.ToolTipText = "Center alignment"; + // + // alignRightAction1 + // + this.alignRightAction1.CheckOnClick = true; + this.alignRightAction1.Image = ((System.Drawing.Image)(resources.GetObject("alignRightAction1.Image"))); + this.alignRightAction1.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.R))); + this.alignRightAction1.Text = "&Right"; + this.alignRightAction1.ToolTipText = "Right alignment"; + // + // actAbout + // + this.actAbout.Text = "About"; + this.actAbout.Execute += new System.EventHandler(this.actAbout_Execute); + // + // saveFileDialog1 + // + this.saveFileDialog1.DefaultExt = "rtf"; + this.saveFileDialog1.Filter = "RichTextFormat|*.rtf|All files|*.*"; + // + // openFileDialog1 + // + this.openFileDialog1.DefaultExt = "rtf"; + this.openFileDialog1.FileName = "openFileDialog1"; + this.openFileDialog1.Filter = "RichTextFormat|*.rtf|All files|*.*"; + // + // EditorForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(583, 376); + this.Controls.Add(this.toolStripContainer1); + this.Name = "EditorForm"; + this.Text = "EditorForm"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.EditorForm_FormClosing); + this.toolStripContainer1.ContentPanel.ResumeLayout(false); + this.toolStripContainer1.TopToolStripPanel.ResumeLayout(false); + this.toolStripContainer1.TopToolStripPanel.PerformLayout(); + this.toolStripContainer1.ResumeLayout(false); + this.toolStripContainer1.PerformLayout(); + this.contextMenuStrip1.ResumeLayout(false); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.toolStrip1.ResumeLayout(false); + this.toolStrip1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.actionList1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.ToolStripContainer toolStripContainer1; + private System.Windows.Forms.ToolStrip toolStrip1; + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1; + private ActionList actionList1; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2; + private System.Windows.Forms.RichTextBox richTextBox1; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem4; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem5; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem6; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem7; + private Action actNew; + private Action actLoad; + private Action actSave; + private Action actSaveAs; + private Action actExit; + private UndoAction undoAction1; + private RedoAction redoAction1; + private CopyAction copyAction1; + private PasteAction pasteAction1; + private CutAction cutAction1; + private System.Windows.Forms.ToolStripButton toolStripButton1; + private System.Windows.Forms.ToolStripButton toolStripButton2; + private System.Windows.Forms.ToolStripButton toolStripButton3; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; + private DeleteAction deleteAction1; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem8; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem9; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem10; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem11; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem12; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem13; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem14; + private System.Windows.Forms.ToolStripButton toolStripButton4; + private System.Windows.Forms.ToolStripButton toolStripButton5; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator5; + private System.Windows.Forms.ToolStripButton toolStripButton6; + private System.Windows.Forms.ToolStripButton toolStripButton7; + private System.Windows.Forms.ToolStripButton toolStripButton8; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator6; + private BoldAction boldAction1; + private ItalicAction italicAction1; + private UnderlineAction underlineAction1; + private System.Windows.Forms.ToolStripMenuItem formattingToolStripMenuItem; + private System.Windows.Forms.ToolStripButton toolStripButton9; + private System.Windows.Forms.ToolStripButton toolStripButton10; + private System.Windows.Forms.ToolStripButton toolStripButton11; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator7; + private AlignCenterAction alignCenterAction1; + private AlignLeftAction alignLeftAction1; + private System.Windows.Forms.ToolStripButton toolStripButton12; + private System.Windows.Forms.ToolStripButton toolStripButton13; + private System.Windows.Forms.ToolStripButton toolStripButton14; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator8; + private AlignRightAction alignRightAction1; + private SelectAllAction selectAllAction1; + private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem15; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem16; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator9; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem17; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem18; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem19; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem20; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator10; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem21; + private System.Windows.Forms.SaveFileDialog saveFileDialog1; + private System.Windows.Forms.OpenFileDialog openFileDialog1; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem22; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem23; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem25; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem26; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem27; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator11; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem24; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem28; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem29; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem30; + private Action actSelectFont; + private System.Windows.Forms.FontDialog fontDialog1; + private Action actAbout; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem31; + + } +} \ No newline at end of file diff --git a/ActionsDemo/EditorForm.cs b/ActionsDemo/EditorForm.cs new file mode 100644 index 0000000..f97346e --- /dev/null +++ b/ActionsDemo/EditorForm.cs @@ -0,0 +1,172 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace Crad.Windows.Forms.Actions.Sample +{ + public partial class EditorForm : Form + { + private bool _modified; + private bool modified + { + get { return _modified; } + set + { + if (_modified != value) + { + _modified = value; + buildFormTitle(); + } + } + } + + private string _fileName; + private string fileName + { + get + { + if (string.IsNullOrEmpty(_fileName)) + return "Untitled Document"; + else + return _fileName; + } + set + { + if (_fileName != value) + { + _fileName = value; + buildFormTitle(); + } + } + } + + private void buildFormTitle() + { + StringBuilder sb = new StringBuilder(Application.ProductName); + sb.Append(" - "); + sb.Append(fileName); + if (modified) + sb.Append(" *"); + this.Text = sb.ToString(); + } + + public EditorForm() + { + InitializeComponent(); + buildFormTitle(); + actAbout.Text = string.Format("About {0}...", Application.ProductName); + } + + private void richTextBox1_TextChanged(object sender, EventArgs e) + { + modified = true; + } + + private void actNew_Execute(object sender, EventArgs e) + { + richTextBox1.Text = string.Empty; + fileName = string.Empty; + modified = false; + } + + private void actNew_BeforeExecute(object sender, CancelEventArgs e) + { + askSaveChanges(e); + } + + private void askSaveChanges(CancelEventArgs e) + { + DialogResult toSave = (modified ? + MessageBox.Show("Save changes?", Application.ProductName, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) : + DialogResult.No); + + if (toSave == DialogResult.Cancel) + { + e.Cancel = true; + return; + } + + if (toSave == DialogResult.Yes) + { + actSave.DoExecute(); + e.Cancel = modified; // this checks if user cancelled save + } + } + + private void actSave_Update(object sender, EventArgs e) + { + actSave.Enabled = modified; + } + + private void actSave_Execute(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(_fileName)) + actSaveAs.DoExecute(); + else + saveRTF(_fileName); + } + + private void saveRTF(string fileName) + { + richTextBox1.SaveFile(fileName); + this.fileName = fileName; + modified = false; + } + + private void actSaveAs_Execute(object sender, EventArgs e) + { + saveFileDialog1.FileName = fileName; + + if (saveFileDialog1.ShowDialog() == DialogResult.OK) + saveRTF(saveFileDialog1.FileName); + } + + private void actLoad_BeforeExecute(object sender, CancelEventArgs e) + { + askSaveChanges(e); + } + + private void actLoad_Execute(object sender, EventArgs e) + { + if (openFileDialog1.ShowDialog() == DialogResult.OK) + loadRTF(openFileDialog1.FileName); + } + + private void loadRTF(string fileName) + { + richTextBox1.LoadFile(fileName); + this.fileName = fileName; + modified = false; + } + + private void actExit_Execute(object sender, EventArgs e) + { + Application.Exit(); + } + + private void actSelectFont_Execute(object sender, EventArgs e) + { + fontDialog1.Font = richTextBox1.SelectionFont; + if (fontDialog1.ShowDialog() == DialogResult.OK) + richTextBox1.SelectionFont = fontDialog1.Font; + } + + private void EditorForm_FormClosing(object sender, FormClosingEventArgs e) + { + CancelEventArgs cea = new CancelEventArgs(false); + askSaveChanges(cea); + e.Cancel = cea.Cancel; + } + + private void actAbout_Execute(object sender, EventArgs e) + { + AboutBox f = new AboutBox(); + f.ShowDialog(); + } + + } +} \ No newline at end of file diff --git a/ActionsDemo/EditorForm.resx b/ActionsDemo/EditorForm.resx new file mode 100644 index 0000000..2b14d2e --- /dev/null +++ b/ActionsDemo/EditorForm.resx @@ -0,0 +1,639 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 560, 128 + + + 225, 17 + + + 329, 17 + + + 417, 17 + + + 507, 17 + + + 597, 17 + + + 112, 54 + + + 196, 54 + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAU1JREFUOE+1kDFy + wjAQRTlCbhBfAPAFCOqShrFLUjB2SYc63MllOrl0Z3XQWU0m6VCbCt8A3cB7g82uSWZggBAKNLOjYve/ + /3d7vXs+/dGm2oIzn+ArB67eQFFv2uBfniwsLCD9Xq33xSDrAM5CijVg9dWGTNc1GBbPCgAhGxRzi/2Z + hVHmwbwDEMQfpSDiQ04A46BRqzZncVp4FNKR2OEgsW60sF6kBuO3bu4YwDRZepQloDQ/zqlFQTVMasn9 + SNVBf2q6FGoF7uQO7Bjn7LyHDF60JbE4HOQ0FwFx7jGUewgnYaCq2hPARFGCNdiTBCLjnflgDkOKHk6p + 4gJ/BylNwD2+waLcdWv9+fiwhwOPz1qwCa94TXu2/zR3DbtHanvd/ZCQ6DYYL7YpiydZAze7R8udYHGc + NTh8reObAZQgHS+3OR3x6CY3g+4m+AaSPfHVJVQGYQAAAABJRU5ErkJggg== + + + + 427, 54 + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAVpJREFUOE/FkTFu + wkAQRXMELpDABQBfgOAmCQ3YJQ3BJRV2F3ebLnTrks7bh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PAAAAFhJREFUOE9jYBhm + gIPhPwN2/AHo0wQgFsDvYy4GAxQDQKrZGRzAYgxgDDKEAEB2AUwpwoAHhLQzUNcFqK5ZQDgMQO5D9wJ9 + wwBmG8wVJMcCxemAcBwNRxUAUWA5fgBbXE4AAAAASUVORK5CYII= + + + + 464, 91 + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAExJREFUOE9jYBj2 + 4D/Qh+iYBE+zMyjADYCwSQScDAFgAyA0WQDmfDI0w2xnZ0ggQzdYCxVs52QoIN125JDnYjAg1QBs8Q4S + GwV4QgAAlz4Y3vzVVKUAAAAASUVORK5CYII= + + + + 575, 91 + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAGtJREFUOE9jYBh2 + 4D/QR8gY5EFsYtg9rm9lbwDToG9u7wBSBaXBhsDECAUbzEZkddjEcJoz4g3QM7M7AApxeXl5cCxA6f96 + FnYXCIU+RJ6dQYGPj28BcvyD+UBx4gygUBV6qsPGp9AKamsHAByoN0xYzNRiAAAAAElFTkSuQmCC + + + + 17, 128 + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAACpJREFUOE9jYBgs + 4D/QIeRg6rufWFcMnM3oLhw4lwyczcM5DKgfqsSaCABzP0e5eSSYDAAAAABJRU5ErkJggg== + + + + 162, 128 + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADBJREFUOE9jYBgs + 4D/QIeRg6rmfWNupZyO6ScS6AF0d9VxErAuoZ+NoGNAuLEk3GQBiXke5mtFczgAAAABJRU5ErkJggg== + + + + 293, 128 + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNJREFUOE9jYBgs + 4D/QIeRg2rmfWNdQzwXE2oiujnouQDeJWBdRzwXE2jicw4B6oUmqSQCEIEe545CU4QAAAABJRU5ErkJg + gg== + + + + 431, 128 + + + 309, 54 + + + 17, 54 + + + 76 + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAU1JREFUOE+1kDFy + wjAQRTlCbhBfAPAFCOqShrFLUjB2SYc63MllOrl0Z3XQWU0m6VCbCt8A3cB7g82uSWZggBAKNLOjYve/ + /3d7vXs+/dGm2oIzn+ArB67eQFFv2uBfniwsLCD9Xq33xSDrAM5CijVg9dWGTNc1GBbPCgAhGxRzi/2Z + hVHmwbwDEMQfpSDiQ04A46BRqzZncVp4FNKR2OEgsW60sF6kBuO3bu4YwDRZepQloDQ/zqlFQTVMasn9 + SNVBf2q6FGoF7uQO7Bjn7LyHDF60JbE4HOQ0FwFx7jGUewgnYaCq2hPARFGCNdiTBCLjnflgDkOKHk6p + 4gJ/BylNwD2+waLcdWv9+fiwhwOPz1qwCa94TXu2/zR3DbtHanvd/ZCQ6DYYL7YpiydZAze7R8udYH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9ThDK0JGZAN8z7Yz4eVaJunW5tglGLS+HjGd+jx3KUP3xr/1fwCT+uc5NLsNSu + AAAAAElFTkSuQmCC + + + + The purpose of this simple RTF editor is to demonstrate a possible usage of Crad's Actions for .NET 2.0. +Crad's Actions are absolutely free and released under Common Public License 1.0. + +If you want more informations, you can catch some at the URL +http://blogs.ugidotnet.org/crad/category/1935.aspx +or subscribing the feed +http://blogs.ugidotnet.org/crad/category/1935.aspx/rss + +Any kind of feedback about this work is really appreciated. Eventually, you can contact me using "Contacts" section on my personal blog: +http://blogs.ugidotnet.org/crad/contact.aspx + + + 17, 17 + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAU1JREFUOE+1kDFy + wjAQRTlCbhBfAPAFCOqShrFLUjB2SYc63MllOrl0Z3XQWU0m6VCbCt8A3cB7g82uSWZggBAKNLOjYve/ + /3d7vXs+/dGm2oIzn+ArB67eQFFv2uBfniwsLCD9Xq33xSDrAM5CijVg9dWGTNc1GBbPCgAhGxRzi/2Z + hVHmwbwDEMQfpSDiQ04A46BRqzZncVp4FNKR2OEgsW60sF6kBuO3bu4YwDRZepQloDQ/zqlFQTVMasn9 + SNVBf2q6FGoF7uQO7Bjn7LyHDF60JbE4HOQ0FwFx7jGUewgnYaCq2hPARFGCNdiTBCLjnflgDkOKHk6p + 4gJ/BylNwD2+waLcdWv9+fiwhwOPz1qwCa94TXu2/zR3DbtHanvd/ZCQ6DYYL7YpiydZAze7R8udYHGc + NTh8reObAZQgHS+3OR3x6CY3g+4m+AaSPfHVJVQGYQAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6A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KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAACpJREFUOE9jYBgs + 4D/QIeRg6rufWFcMnM3oLhw4lwyczcM5DKgfqsSaCABzP0e5eSSYDAAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNJREFUOE9jYBgs + 4D/QIeRg2rmfWNdQzwXE2oiujnouQDeJWBdRzwXE2jicw4B6oUmqSQCEIEe545CU4QAAAABJRU5ErkJg + gg== + + + + 126, 17 + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAU5JREFUOE+1kKFy + wkAQhnmEvkGjERDfaTnXCmYSSQWTSBzniLvIukTGcY643NS0jrNV5A24N8i+wXY3tDNhgNIIbmbnxO7/ + /f/uYHDLl300cWbA6k9wawu22kJebRvvX54szA0g/U6Vh2KQsQBnIXkJuP5qfKZnFWgWz3MAIWsUC4PD + uYGHxIF+ByCIO0pBxLuUANpCrTZNyuI4dyikJbHFUWTs49I4EWsM39q5YwDTZOFQFoBS/zjHBgXVOKok + 9wNVecOZblOoDdiTO7BjmLLzATJ6yQyJRXeQ01wEhKlDXx4gnISBat2cAKaKEpRgThKIhHfmg1n0Kbo/ + owpz/B2kNB73+AbLYt+u9efjw3YH7p8zwSa84jXt2f7TwtbsHqjddfcuIcoab7LcxSyeJjX0dg9We8Hi + MKlx/FqFvQGUIJ6sdikd8egmvUE3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IN125JDnYjAg1QBs8Q4S + GwV4QgAAlz4Y3vzVVKUAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAGtJREFUOE9jYBh2 + 4D/QR8gY5EFsYtg9rm9lbwDToG9u7wBSBaXBhsDECAUbzEZkddjEcJoz4g3QM7M7AApxeXl5cCxA6f96 + FnYXCIU+RJ6dQYGPj28BcvyD+UBx4gygUBV6qsPGp9AKamsHAByoN0xYzNRiAAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADBJREFUOE9jYBgs + 4D/QIeRg6rmfWNupZyO6ScS6AF0d9VxErAuoZ+NoGNAuLEk3GQBiXke5mtFczgAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAACpJREFUOE9jYBgs + 4D/QIeRg6rufWFcMnM3oLhw4lwyczcM5DKgfqsSaCABzP0e5eSSYDAAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNJREFUOE9jYBgs + 4D/QIeRg2rmfWNdQzwXE2oiujnouQDeJWBdRzwXE2jicw4B6oUmqSQCEIEe545CU4QAAAABJRU5ErkJg + gg== + + + + 17, 165 + + + 145, 165 + + + 275, 165 + + \ No newline at end of file diff --git a/ActionsDemo/Program.cs b/ActionsDemo/Program.cs new file mode 100644 index 0000000..2bdfc79 --- /dev/null +++ b/ActionsDemo/Program.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Windows.Forms; + +namespace Crad.Windows.Forms.Actions.Sample +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException); + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new EditorForm()); + } + + static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e) + { + MessageBox.Show("Woooops! Unexpected error!" + Environment.NewLine + Environment.NewLine + e.Exception.Message); + } + } +} \ No newline at end of file diff --git a/ActionsDemo/Properties/AssemblyInfo.cs b/ActionsDemo/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..8c5429d --- /dev/null +++ b/ActionsDemo/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Crad's simple RTF Editor")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Crad's simple RTF Editor")] +[assembly: AssemblyCopyright("Copyright © 2006")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("d32a800e-8039-40c0-9614-1360ffd03fb1")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ActionsDemo/Properties/Resources.Designer.cs b/ActionsDemo/Properties/Resources.Designer.cs new file mode 100644 index 0000000..90d428e --- /dev/null +++ b/ActionsDemo/Properties/Resources.Designer.cs @@ -0,0 +1,98 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.17379 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Crad.Windows.Forms.Actions.Sample.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crad.Windows.Forms.Actions.Sample.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + internal static System.Drawing.Bitmap About { + get { + object obj = ResourceManager.GetObject("About", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap Font { + get { + object obj = ResourceManager.GetObject("Font", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap New { + get { + object obj = ResourceManager.GetObject("New", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap Open { + get { + object obj = ResourceManager.GetObject("Open", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap Save { + get { + object obj = ResourceManager.GetObject("Save", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/ActionsDemo/Properties/Resources.resx b/ActionsDemo/Properties/Resources.resx new file mode 100644 index 0000000..3fd5016 --- /dev/null +++ b/ActionsDemo/Properties/Resources.resx @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\Font.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\Open.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\New.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\Save.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\About.jpg;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/ActionsDemo/Properties/Settings.Designer.cs b/ActionsDemo/Properties/Settings.Designer.cs new file mode 100644 index 0000000..5d0b0bb --- /dev/null +++ b/ActionsDemo/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.17379 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Crad.Windows.Forms.Actions.Sample.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/ActionsDemo/Properties/Settings.settings b/ActionsDemo/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/ActionsDemo/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/ActionsDemo/Resources/About.jpg b/ActionsDemo/Resources/About.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d6e2bcff3b3638b0d623e0675189cbf9c8f247e0 GIT binary patch literal 18993 zcmaI7Wl&sA+bujmaCdiicXx;2?t{BK1PJc#?hbI=5Ii`C`+lDDp6~th zUAt;mO?6jy*X(_*y{@&o-&fvu0B8y_@-hGj2nc}O#|3y_2S@@S|5reLf`WvE`UL&y zpMZve{x@J?U}524VPW9m5fI?vk^Xo5GYA9}6cqF)Xm}VHcw|I)L}XNyk3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?Wu4xVo}6tgKX{;#AmXZXQDn zR6q`jcXa_fiZ6Urp*Qga-7LTYgyCV2QQqhvsK%nDM}tzjUcTIXA@<Y_1D%ZYt-YA%NOAZaQypf(y_3uhhbQUllA?!}*?g1Ke9bs25j=oXjlR zdxJ8FSF(Y)P{giDdj)EiJULA22-C8mnhqC#>INHylj>0EV+-bTY00nL8zysz$b0#5 zjX+)bL#~Z>hndkzf9@kWc~der{5_AcjLa?D7HW3JH;m8JbkFq@Wk$mh6KwwgtaWiO zVQ_LeYN1vL9%D3Aia;GTO2A^_!l|kTTP4EcQ&ln62Dy%7VK_cv*?u9Je4Sxq>|qnl zZhqorwKV>j!Gy3rj1<7TAKW`yNiwiA3rSuXceo#^d3dedIdc^eyY5^gB)$X=Nn5+5 zt%SD^0VqdzDi}fG#2&mb{{XlhdFO~-sJkLd?b?iMWw9t+7n9~53R!goGVDGzX6FpK38&?I=F_?1e>4NT_o8X~kz4a@jIC@&+_cntN2 zQ0uo=D&RdaE9Q&&i!aG#lvctegiPQHqBY8@F!RCl7)+Hdi5;`8#-bIOvJZH5G1ZX; k+jqIn&4)!q$P}38t`f|B!7eM)D50ki>Z1YE;J&B-*$zTD@c;k- literal 0 HcmV?d00001 diff --git a/ActionsDemo/Resources/Font.png b/ActionsDemo/Resources/Font.png new file mode 100644 index 0000000000000000000000000000000000000000..b47bd598c010414d0adb47a2b065512d93d296c8 GIT binary patch literal 363 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#NP~xSh zi(`m||JjLqc@HaywAeB!?=ezcdOCbriKpkwNrD=|Moh{EP3{RTJqOsH$Zb@e4p!o-x}{Ya^lO@1-pGjS+5?qk3J*!<3%mVe>0|RCqy;;9c@BmAMm@&h}=^}f=U(Ic~ z7qvhku~4Z@D)H<*#@As7)++4PnNc6bxMW*{Sb#(|Kyl;=F&nP?F`EqqHeY&T$wnB|7OgpYSDZK2DT*) zzZiJ4mV6QN)I7^@<$L{^kCx0C0k#XR&lvhKc*f9#?B-m6+GJ zW8K}$A1OCzS+F^r-SUr9<9~HY(#&1e7xJR_R=)in$!}47@3i!%ZCf)_{ehlf@O1Ta JS?83{1OQnua?}6- literal 0 HcmV?d00001 diff --git a/ActionsDemo/Resources/Open.png b/ActionsDemo/Resources/Open.png new file mode 100644 index 0000000000000000000000000000000000000000..91d05c879bd7e16ef0cfd1bb4319925c4ce33f90 GIT binary patch literal 491 zcmVPx#1ZP1_K>z@;j|==^1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUzX-PyuR5(w)lc8<{F%U%W6ATLt0}Trg1{xL`1{xkTJZKoWFwij2 zFwn5@V4?qDy6baK7d258(nup&$goQnmz8CHGmj;@@ft&_fWq8lF|TOIYo%JJE6eq^cKBIYcuyYQm-zt0hSvN^POPf z2G7K+$$I5t;hm*n129C)`O1Jcv|FL@xme(4QLiHwGHf0z1I!?GD(`%kUOJ!|Sz^p% zGuLDgP8#m0)@N>jvQ{s-r|*o&YpNLQ#h}cJ%^K#QbOXp`l)T%$CvK_TxR6GPs->HQ zPTNz;v&d7H#1|8XO_|S`(^6PPlScGXodHJMJ3tH$VPg4qvv40H>~X~SZe$onYv?xx hr4%&lr9aYN!{7a?<^-t1I6(ja002ovPDHLkV1nBl!}$OJ literal 0 HcmV?d00001 diff --git a/ActionsDemo/Resources/Save.png b/ActionsDemo/Resources/Save.png new file mode 100644 index 0000000000000000000000000000000000000000..7fab7ea6c213a52750627c8ec408ac277b1c8105 GIT binary patch literal 494 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#N(3~7k z7sn6_|Fyx2MTZRp&Itc%u{mfE0EZW#tP2|gfbh+(>av`pzTUTH-#po~^zQDv!Dh4n zuP9l)$U}HtXcCK_>#w>)J3TlKWD5BIaC~-8<(bY7o&8~dMK-qUyqh3$pY_~Vcg9KC zYm;)Ott%GDVo`E?#v=1E)b_;F#a`*cIU*a)^n@?yv)b@oyE>`8oa4>pU-e=R5n2t+ z+paya5xF@_*@Ohl36n@9sO$vi3my bzl-q~&RX-z$WLwsMhJtatDnm{r-UW|a`?!y literal 0 HcmV?d00001 diff --git a/Crad.Windows.Forms.Actions.sln b/Crad.Windows.Forms.Actions.sln new file mode 100644 index 0000000..313d4cb --- /dev/null +++ b/Crad.Windows.Forms.Actions.sln @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 11 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Crad.Windows.Forms.Actions", "Crad.Windows.Forms.Actions\Crad.Windows.Forms.Actions.csproj", "{6E50D1BD-D8EA-4992-8B25-C5A0D7E179A5}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Crad.Windows.Forms.Actions.Sample", "ActionsDemo\Crad.Windows.Forms.Actions.Sample.csproj", "{88AB67C7-A0CF-4811-BC0F-7F908A38E9CF}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6E50D1BD-D8EA-4992-8B25-C5A0D7E179A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6E50D1BD-D8EA-4992-8B25-C5A0D7E179A5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6E50D1BD-D8EA-4992-8B25-C5A0D7E179A5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6E50D1BD-D8EA-4992-8B25-C5A0D7E179A5}.Release|Any CPU.Build.0 = Release|Any CPU + {88AB67C7-A0CF-4811-BC0F-7F908A38E9CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {88AB67C7-A0CF-4811-BC0F-7F908A38E9CF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {88AB67C7-A0CF-4811-BC0F-7F908A38E9CF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {88AB67C7-A0CF-4811-BC0F-7F908A38E9CF}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Crad.Windows.Forms.Actions/AboutAction.cs b/Crad.Windows.Forms.Actions/AboutAction.cs new file mode 100644 index 0000000..1f06c2a --- /dev/null +++ b/Crad.Windows.Forms.Actions/AboutAction.cs @@ -0,0 +1,44 @@ +using System; +using System.ComponentModel; +using System.Windows.Forms; + +namespace Crad.Windows.Forms.Actions +{ + [StandardAction] + public class AboutAction: Action, ISupportInitialize + { + public AboutAction() + { + productName = Application.ProductName; + textPrefix = "About {0}..."; + } + + private string productName; + + private string textPrefix; + [DefaultValue("About {0}...")] + public string TextPrefix + { + get { return textPrefix; } + set + { + textPrefix = value; + (this as ISupportInitialize).EndInit(); + } + } + + #region ISupportInitialize Members + + void ISupportInitialize.BeginInit() + { + } + + void ISupportInitialize.EndInit() + { + if (!DesignMode) + this.Text = string.Format(textPrefix, productName); + } + + #endregion + } +} diff --git a/Crad.Windows.Forms.Actions/Action.cs b/Crad.Windows.Forms.Actions/Action.cs new file mode 100644 index 0000000..7e7a2a7 --- /dev/null +++ b/Crad.Windows.Forms.Actions/Action.cs @@ -0,0 +1,455 @@ +using System; +using System.Diagnostics; +using System.Reflection; +using System.ComponentModel; +using System.Collections.Generic; +using System.Windows.Forms; +using System.Drawing; + +namespace Crad.Windows.Forms.Actions +{ + [ToolboxBitmap(typeof(Action), "Images.Action.bmp"), + DefaultEvent("Execute"), StandardAction] + public class Action: Component + { + protected enum ActionWorkingState + { + Listening, + Driving + } + + public Action() + { + targets = new List(); + this._enabled = true; + this._text = string.Empty; + this.WorkingState = ActionWorkingState.Listening; + this.shortcutKeys = Keys.None; + this.toolTipText = string.Empty; + this.visible = true; + + this.clickEventHandler = new EventHandler(target_Click); + this.checkStateChangedEventHandler = new EventHandler(target_CheckStateChanged); + } + + private ActionWorkingState workingState; + protected ActionWorkingState WorkingState + { + get { return workingState; } + set { workingState = value; } + } + + #region Events and event handlers + public event CancelEventHandler BeforeExecute; + protected virtual void OnBeforeExecute(CancelEventArgs e) + { + if (BeforeExecute != null) + BeforeExecute(this, e); + } + + public event EventHandler Execute; + protected virtual void OnExecute(EventArgs e) + { + if (Execute != null) + Execute(this, e); + } + + public event EventHandler AfterExecute; + protected virtual void OnAfterExecute(EventArgs e) + { + if (AfterExecute != null) + AfterExecute(this, e); + } + + public event EventHandler Update; + protected virtual void OnUpdate(EventArgs e) + { + if (Update != null) + Update(this, e); + } + + public void DoUpdate() + { + OnUpdate(EventArgs.Empty); + } + #endregion + + #region Gestione di collection di oggetti associati + private List targets; + internal void InternalRemoveTarget(Component extendee) + { + targets.Remove(extendee); + RemoveHandler(extendee); + OnRemovingTarget(extendee); + } + + internal void InternalAddTarget(Component extendee) + { + targets.Add(extendee); + refreshState(extendee); + AddHandler(extendee); + OnAddingTarget(extendee); + } + + protected virtual void OnRemovingTarget(Component extendee) + { + } + + protected virtual void OnAddingTarget(Component extendee) + { + } + #endregion + + private ActionList actionList; + protected internal ActionList ActionList + { + get { return actionList; } + set + { + if (actionList != value) + { + actionList = value; + } + } + } + + #region common properties + private string _text; + [DefaultValue(""), UpdatableProperty(), Localizable(true)] + public string Text + { + get { return _text; } + set + { + if (_text != value) + { + _text = value; + UpdateAllTargets("Text", value); + } + } + } + + [DefaultValue(false)] + public bool Checked + { + get + { + return (this.checkState != CheckState.Unchecked); + } + set + { + if (value != this.Checked) + { + this.CheckState = value ? CheckState.Checked : CheckState.Unchecked; + } + } + } + + private CheckState checkState; + [DefaultValue(CheckState.Unchecked), UpdatableProperty()] + public CheckState CheckState + { + get { return checkState; } + set + { + if (checkState != value) + { + checkState = value; + UpdateAllTargets("CheckState", value); + } + } + } + + private bool _enabled; + [DefaultValue(true), UpdatableProperty] + public bool Enabled + { + get + { + if (ActionList != null) + return _enabled && ActionList.Enabled; + else + return _enabled; + } + set + { + if (_enabled != value) + { + _enabled = value; + UpdateAllTargets("Enabled", value); + } + } + } + + private Image image; + [DefaultValue(null), UpdatableProperty] + public Image Image + { + get { return image; } + set + { + if (image != value) + { + image = value; + UpdateAllTargets("Image", value); + } + } + } + + private bool checkOnClick; + [DefaultValue(false), UpdatableProperty] + public bool CheckOnClick + { + get { return checkOnClick; } + set + { + if (checkOnClick != value) + { + checkOnClick = value; + UpdateAllTargets("CheckOnClick", value); + } + } + } + + private Keys shortcutKeys; + [DefaultValue(Keys.None), UpdatableProperty, Localizable(true)] + public Keys ShortcutKeys + { + get { return shortcutKeys; } + set + { + if (shortcutKeys != value) + { + shortcutKeys = value; + KeysConverter kc = new KeysConverter(); + string s = (string) kc.ConvertTo(value, typeof(string)); + UpdateAllTargets("ShortcutKeyDisplayString", s); + } + } + } + + private bool visible; + [DefaultValue(true), UpdatableProperty] + public bool Visible + { + get { return visible; } + set + { + if (visible != value) + { + visible = value; + UpdateAllTargets("Visible", value); + } + } + } + + private string toolTipText; + [DefaultValue(""), UpdatableProperty, Localizable(true)] + public string ToolTipText + { + get { return toolTipText; } + set + { + if (toolTipText != value) + { + toolTipText = value; + UpdateAllTargets("ToolTipText", value); + } + } + } + #endregion + + #region updating targets + internal void RefreshEnabledCheckState() + { + UpdateAllTargets("Enabled", this.Enabled); + UpdateAllTargets("CheckState", this.CheckState); + } + + protected void UpdateAllTargets(string propertyName, object value) + { + foreach (Component c in targets) + { + updateProperty(c, propertyName, value); + } + } + + private void updateProperty(Component target, string propertyName, object value) + { + WorkingState = ActionWorkingState.Driving; + try + { + if (ActionList != null) + { + if (!SpecialUpdateProperty(target, propertyName, value)) + ActionList.TypesDescription[target.GetType()].SetValue( + propertyName, target, value); + } + } + finally + { + WorkingState = ActionWorkingState.Listening; + } + } + + protected virtual bool SpecialUpdateProperty( + Component target, string propertyName, object value) + { + if (propertyName == "ToolTipText") + { + Control c = target as Control; + + if (c != null && ActionList.ToolTip.CanExtend(c)) + ActionList.ToolTip.SetToolTip(c, (string)value); + return true; + } + return false; + } + + private void refreshState(Component target) + { + PropertyDescriptorCollection properties = + TypeDescriptor.GetProperties(this, new Attribute[] { new UpdatablePropertyAttribute() }); + + foreach (PropertyDescriptor property in properties) + { + updateProperty(target, property.Name, property.GetValue(this)); + } + } + #endregion + + #region Hook su eventi target + private EventHandler clickEventHandler; + private EventHandler checkStateChangedEventHandler; + + protected virtual void AddHandler(Component extendee) + { + // verifico se extendee possiede l'evento click + EventInfo clickEvent = extendee.GetType().GetEvent("Click"); + if (clickEvent != null) + { + clickEvent.AddEventHandler(extendee, clickEventHandler); + } + + // verifico se extendee possiede l'evento CheckStateChanged + EventInfo checkStateChangedEvent = extendee.GetType().GetEvent("CheckStateChanged"); + if (checkStateChangedEvent != null) + { + checkStateChangedEvent.AddEventHandler(extendee, checkStateChangedEventHandler); + } + + // Casi particolari + // verifico se extendee è un ToolbarButton + ToolBarButton button = extendee as ToolBarButton; + if (button != null) + { + button.Parent.ButtonClick += new ToolBarButtonClickEventHandler(toolbar_ButtonClick); + } + } + + protected virtual void RemoveHandler(Component extendee) + { + // verifico se extendee possiede l'evento click + EventInfo clickEvent = extendee.GetType().GetEvent("Click"); + if (clickEvent != null) + { + clickEvent.RemoveEventHandler(extendee, clickEventHandler); + } + + // verifico se extendee possiede l'evento CheckStateChanged + EventInfo checkStateChangedEvent = extendee.GetType().GetEvent("CheckStateChanged"); + if (checkStateChangedEvent != null) + { + checkStateChangedEvent.RemoveEventHandler(extendee, checkStateChangedEventHandler); + } + + // Casi particolari + // verifico se extendee è un ToolbarButton + ToolBarButton button = extendee as ToolBarButton; + if (button != null) + { + button.Parent.ButtonClick -= new ToolBarButtonClickEventHandler(toolbar_ButtonClick); + } + } + + #endregion + + #region Handling eventi target + #region Click + private void toolbar_ButtonClick(object sender, ToolBarButtonClickEventArgs e) + { + // called if sender is ToolBarButton + if (this.targets.Contains(e.Button)) + handleClick(e.Button, e); + } + + private void target_Click(object sender, EventArgs e) + { + // called if sender is Control + handleClick(sender, e); + } + + private void handleClick(object sender, EventArgs e) + { + if (WorkingState == ActionWorkingState.Listening) + { + Component target = sender as Component; + Debug.Assert(target != null, "Target non è un component su handleClick"); + Debug.Assert(targets.Contains(target), "Target non esiste su collection targets su handleClick"); + + DoExecute(); + } + } + #endregion + + #region CheckStateChanged + private void target_CheckStateChanged(object sender, EventArgs e) + { + handleCheckStateChanged(sender, e); + } + + private bool interceptingCheckStateChanged; + internal bool InterceptingCheckStateChanged + { + get { return interceptingCheckStateChanged; } + set { interceptingCheckStateChanged = value; } + } + private void handleCheckStateChanged(object sender, EventArgs e) + { + if (WorkingState == ActionWorkingState.Listening) + { + Component target = sender as Component; + CheckState = (CheckState)ActionList. + TypesDescription[sender.GetType()].GetValue("CheckState", sender); + + } + } + #endregion + #endregion + + #region Action execution + public void DoExecute() + { + if (!Enabled) + return; + + CancelEventArgs e = new CancelEventArgs(); + OnBeforeExecute(e); + if (e.Cancel) + return; + OnExecute(EventArgs.Empty); + OnAfterExecute(EventArgs.Empty); + } + + internal void ExecuteShortcut() + { + if (!Enabled) + return; + + if (CheckOnClick) + this.Checked = !this.Checked; + DoExecute(); + } + #endregion + } +} diff --git a/Crad.Windows.Forms.Actions/ActionCollection.cs b/Crad.Windows.Forms.Actions/ActionCollection.cs new file mode 100644 index 0000000..baaab7d --- /dev/null +++ b/Crad.Windows.Forms.Actions/ActionCollection.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.ObjectModel; +using System.ComponentModel; +using System.Drawing.Design; + +namespace Crad.Windows.Forms.Actions +{ + [Editor(typeof(Design.ActionCollectionEditor), typeof(UITypeEditor))] + public class ActionCollection: Collection + { + public ActionCollection(ActionList parent) + { + this.parent = parent; + } + + private ActionList parent; + public ActionList Parent + { + get { return parent; } + } + + protected override void ClearItems() + { + foreach (Action action in this) + action.ActionList = null; + + base.ClearItems(); + } + + protected override void InsertItem(int index, Action item) + { + base.InsertItem(index, item); + item.ActionList = Parent; + } + + protected override void RemoveItem(int index) + { + this[index].ActionList = null; + base.RemoveItem(index); + } + + protected override void SetItem(int index, Action item) + { + if (this.Count > index) + this[index].ActionList = null; + base.SetItem(index, item); + + item.ActionList = Parent; + } + } +} diff --git a/Crad.Windows.Forms.Actions/ActionList.cs b/Crad.Windows.Forms.Actions/ActionList.cs new file mode 100644 index 0000000..7b5a8a9 --- /dev/null +++ b/Crad.Windows.Forms.Actions/ActionList.cs @@ -0,0 +1,266 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.Design; +using System.Collections.Generic; +using System.Windows.Forms; +using System.Drawing; + +namespace Crad.Windows.Forms.Actions +{ + [ProvideProperty("Action", typeof(Component)), + ToolboxBitmap(typeof(ActionList), "Images.ActionList.bmp"), + ToolboxItemFilter("System.Windows.Forms")] + public class ActionList: Component, IExtenderProvider, ISupportInitialize + { + public ActionList() + { + this.actions = new ActionCollection(this); + this.targets = new Dictionary(); + this.typesDescription = new Dictionary(); + this.enabled = true; + this.tooltip = new ToolTip(); + + if (!DesignMode) + Application.Idle += new EventHandler(Application_Idle); + } + + #region ToolTip section + private ToolTip tooltip; + public ToolTip ToolTip + { + get { return tooltip; } + } + #endregion + + #region events and event raisers + void Application_Idle(object sender, EventArgs e) + { + OnUpdate(EventArgs.Empty); + } + + public event EventHandler Update; + protected virtual void OnUpdate(EventArgs eventArgs) + { + // si solleva l'evento Update per l'ActionList + if (Update != null) + Update(this, eventArgs); + + foreach (Action action in actions) + { + action.DoUpdate(); + } + } + #endregion + + #region Properties + private bool enabled; + [DefaultValue(true)] + public bool Enabled + { + get { return enabled; } + set + { + if (enabled != value) + { + enabled = value; + refreshActions(); + } + } + } + + private ActionCollection actions; + [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] + public ActionCollection Actions + { + get { return actions; } + } + #endregion + + #region IExtenderProvider Members + private Dictionary targets; + + [DefaultValue(null)] + public Action GetAction(Component extendee) + { + if (targets.ContainsKey(extendee)) + return targets[extendee]; + else + return null; + } + + public void SetAction(Component extendee, Action action) + { + if (!initializing) + { + if (extendee == null) + throw new ArgumentNullException("extendee"); + if (action != null && action.ActionList != this) + throw new ArgumentException("The Action you selected is owned by another ActionList"); + } + + /* Se extendee appartiene già alla collection, rimuovo l'handler + * sul suo evento Click e lo rimuovo dai component associati alla + * collection */ + if (targets.ContainsKey(extendee)) + { + targets[extendee].InternalRemoveTarget(extendee); + targets.Remove(extendee); + } + + /* Aggiungo extendee alla collection */ + if (action != null) + { + // eventualmente aggiungo le informazioni sul tipo + if (!typesDescription.ContainsKey(extendee.GetType())) + { + typesDescription.Add(extendee.GetType(), + new ActionTargetDescriptionInfo(extendee.GetType())); + } + + targets.Add(extendee, action); + action.InternalAddTarget(extendee); + } + } + + bool IExtenderProvider.CanExtend(object extendee) + { + Type targetType = extendee.GetType(); + + foreach (Type t in GetSupportedTypes()) + if (t.IsAssignableFrom(targetType)) + { + return true; + } + + return false; + } + + protected virtual Type[] GetSupportedTypes() + { + return new Type[] {typeof(ButtonBase), typeof(ToolStripButton), + typeof(ToolStripMenuItem), typeof(ToolBarButton), typeof(MenuItem)}; + } + #endregion + + #region types informations + private Dictionary typesDescription; + + [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] + public Dictionary TypesDescription + { + get { return typesDescription; } + } + #endregion + + #region ISupportInitialize Members + private bool initializing; + + public void BeginInit() + { + initializing = true; + } + + public void EndInit() + { + initializing = false; + checkInternalCollections(); + refreshActions(); + } + + private void refreshActions() + { + /* questo metodo effettua il refresh dello stato Enabled e CheckState + * di ogni action */ + if (DesignMode) + return; + + foreach (Action action in actions) + action.RefreshEnabledCheckState(); + } + + private void checkInternalCollections() + { + /* questo metodo verifica che ogni action su targets + * appartenga a questa actionList e che abbia la proprietà + * ActionList correttamente impostata */ + foreach (Action action in targets.Values) + { + if (!Actions.Contains(action) || action.ActionList != this) + throw new InvalidOperationException( + "Action owned by another action list or invalid Action.ActionList"); + } + } + + #endregion + + #region reference to ContainerControl + private ContainerControl containerControl; + public ContainerControl ContainerControl + { + get { return containerControl; } + set + { + if (containerControl != value) + { + containerControl = value; + if (!DesignMode) + { + Form f = containerControl as Form; + f.KeyPreview = true; + f.KeyDown += new KeyEventHandler(form_KeyDown); + } + } + } + } + + [Browsable(false)] + public Control ActiveControl + { + get { return getActiveControl(this.ContainerControl); } + } + + private Control getActiveControl(ContainerControl containerControl) + { + if (containerControl == null) + return null; + else if (containerControl.ActiveControl is ContainerControl) + return getActiveControl((ContainerControl)containerControl.ActiveControl); + else + return containerControl.ActiveControl; + } + + private void form_KeyDown(object sender, KeyEventArgs e) + { + foreach (Action action in actions) + { + if (action.ShortcutKeys == (Keys) e.KeyData) + action.ExecuteShortcut(); + } + } + + public override ISite Site + { + get + { + return base.Site; + } + set + { + base.Site = value; + if (value != null) + { + IDesignerHost host1 = value.GetService(typeof(IDesignerHost)) as IDesignerHost; + if (host1 != null) + { + IComponent component1 = host1.RootComponent; + if (component1 is ContainerControl) + { + this.ContainerControl = (ContainerControl)component1; + } + } + } + } + } + #endregion + } +} diff --git a/Crad.Windows.Forms.Actions/ActionTargetDescriptionInfo.cs b/Crad.Windows.Forms.Actions/ActionTargetDescriptionInfo.cs new file mode 100644 index 0000000..2f6e4ae --- /dev/null +++ b/Crad.Windows.Forms.Actions/ActionTargetDescriptionInfo.cs @@ -0,0 +1,40 @@ +using System; +using System.Reflection; +using System.Collections.Generic; + +namespace Crad.Windows.Forms.Actions +{ + public class ActionTargetDescriptionInfo + { + public ActionTargetDescriptionInfo(Type targetType) + { + this.properties = new Dictionary(); + this.targetType = targetType; + + foreach (PropertyInfo property in targetType.GetProperties()) + properties.Add(property.Name, property); + } + + private Dictionary properties; + + private Type targetType; + public Type TargetType + { + get { return targetType; } + } + + internal void SetValue(string propertyName, object target, object value) + { + if (properties.ContainsKey(propertyName)) + properties[propertyName].SetValue(target, value, null); + } + + internal object GetValue(string propertyName, object source) + { + if (properties.ContainsKey(propertyName)) + return properties[propertyName].GetValue(source, null); + + return null; + } + } +} diff --git a/Crad.Windows.Forms.Actions/AlignCenterAction.cs b/Crad.Windows.Forms.Actions/AlignCenterAction.cs new file mode 100644 index 0000000..a2b4c55 --- /dev/null +++ b/Crad.Windows.Forms.Actions/AlignCenterAction.cs @@ -0,0 +1,33 @@ +using System; +using System.Windows.Forms; + +namespace Crad.Windows.Forms.Actions +{ + [StandardAction] + public class AlignCenterAction: AlignmentBaseAction + { + protected override HorizontalAlignment Alignment + { + get + { + return HorizontalAlignment.Center; + } + } + + public AlignCenterAction() + { + InitializeComponent(); + } + private void InitializeComponent() + { + // + // AlignCenterAction + // + this.Image = global::Crad.Windows.Forms.Actions.Properties.Resources.AlignCenter; + this.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.A))); + this.Text = "&Center"; + this.ToolTipText = "Center alignment"; + + } + } +} diff --git a/Crad.Windows.Forms.Actions/AlignCenterAction.resx b/Crad.Windows.Forms.Actions/AlignCenterAction.resx new file mode 100644 index 0000000..52a9ad3 --- /dev/null +++ b/Crad.Windows.Forms.Actions/AlignCenterAction.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + \ No newline at end of file diff --git a/Crad.Windows.Forms.Actions/AlignLeftAction.cs b/Crad.Windows.Forms.Actions/AlignLeftAction.cs new file mode 100644 index 0000000..11ece6b --- /dev/null +++ b/Crad.Windows.Forms.Actions/AlignLeftAction.cs @@ -0,0 +1,31 @@ +using System; +using System.Windows.Forms; + +namespace Crad.Windows.Forms.Actions +{ + [StandardAction] + public class AlignLeftAction: AlignmentBaseAction + { + protected override HorizontalAlignment Alignment + { + get { return HorizontalAlignment.Left; } + } + + public AlignLeftAction() + { + InitializeComponent(); + } + + private void InitializeComponent() + { + // + // AlignLeftAction + // + this.Image = global::Crad.Windows.Forms.Actions.Properties.Resources.AlignLeft; + this.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.T))); + this.Text = "&Left"; + this.ToolTipText = "Left alignment"; + + } + } +} diff --git a/Crad.Windows.Forms.Actions/AlignLeftAction.resx b/Crad.Windows.Forms.Actions/AlignLeftAction.resx new file mode 100644 index 0000000..52a9ad3 --- /dev/null +++ b/Crad.Windows.Forms.Actions/AlignLeftAction.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + \ No newline at end of file diff --git a/Crad.Windows.Forms.Actions/AlignRightAction.cs b/Crad.Windows.Forms.Actions/AlignRightAction.cs new file mode 100644 index 0000000..5a57029 --- /dev/null +++ b/Crad.Windows.Forms.Actions/AlignRightAction.cs @@ -0,0 +1,31 @@ +using System; +using System.Windows.Forms; + +namespace Crad.Windows.Forms.Actions +{ + [StandardAction] + public class AlignRightAction: AlignmentBaseAction + { + protected override HorizontalAlignment Alignment + { + get { return HorizontalAlignment.Right; } + } + + public AlignRightAction() + { + InitializeComponent(); + } + + private void InitializeComponent() + { + // + // AlignRightAction + // + this.Image = global::Crad.Windows.Forms.Actions.Properties.Resources.AlignRight; + this.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.R))); + this.Text = "&Right"; + this.ToolTipText = "Right alignment"; + + } + } +} diff --git a/Crad.Windows.Forms.Actions/AlignRightAction.resx b/Crad.Windows.Forms.Actions/AlignRightAction.resx new file mode 100644 index 0000000..52a9ad3 --- /dev/null +++ b/Crad.Windows.Forms.Actions/AlignRightAction.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + \ No newline at end of file diff --git a/Crad.Windows.Forms.Actions/AlignmentBaseAction.cs b/Crad.Windows.Forms.Actions/AlignmentBaseAction.cs new file mode 100644 index 0000000..8c2e244 --- /dev/null +++ b/Crad.Windows.Forms.Actions/AlignmentBaseAction.cs @@ -0,0 +1,45 @@ +using System; +using System.Windows.Forms; + +namespace Crad.Windows.Forms.Actions +{ + public class AlignmentBaseAction: RichTextAction + { + protected virtual HorizontalAlignment Alignment + { + get { return HorizontalAlignment.Left; } + } + + protected override void OnExecute(EventArgs e) + { + if (!DesignMode && ActiveRichTextBox != null) + { + ActiveRichTextBox.SelectionAlignment = Alignment; + } + base.OnExecute(e); + } + protected override void OnUpdate(EventArgs e) + { + if (!DesignMode) + { + this.Checked = + (ActiveRichTextBox != null && + ActiveRichTextBox.SelectionAlignment == Alignment); + } + base.OnUpdate(e); + } + + public AlignmentBaseAction() + { + InitializeComponent(); + } + + private void InitializeComponent() + { + // + // ParagraphStyleAction + // + this.CheckOnClick = true; + } + } +} diff --git a/Crad.Windows.Forms.Actions/AlignmentBaseAction.resx b/Crad.Windows.Forms.Actions/AlignmentBaseAction.resx new file mode 100644 index 0000000..52a9ad3 --- /dev/null +++ b/Crad.Windows.Forms.Actions/AlignmentBaseAction.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + \ No newline at end of file diff --git a/Crad.Windows.Forms.Actions/BoldAction.cs b/Crad.Windows.Forms.Actions/BoldAction.cs new file mode 100644 index 0000000..a95c340 --- /dev/null +++ b/Crad.Windows.Forms.Actions/BoldAction.cs @@ -0,0 +1,38 @@ +using System; +using System.ComponentModel; +using System.Drawing; + +namespace Crad.Windows.Forms.Actions +{ + [StandardAction] + public class BoldAction: FontStyleAction + { + public BoldAction() + { + InitializeComponent(); + } + + #region InitializeComponent + private void InitializeComponent() + { + // + // BoldAction + // + this.CheckOnClick = true; + this.Image = global::Crad.Windows.Forms.Actions.Properties.Resources.StyleBold; + this.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.B))); + this.Text = "&Bold"; + this.ToolTipText = "Bold"; + + } + #endregion + + protected override FontStyle ActionFontStyle + { + get + { + return FontStyle.Bold; + } + } + } +} diff --git a/Crad.Windows.Forms.Actions/BoldAction.resx b/Crad.Windows.Forms.Actions/BoldAction.resx new file mode 100644 index 0000000..52a9ad3 --- /dev/null +++ b/Crad.Windows.Forms.Actions/BoldAction.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + \ No newline at end of file diff --git a/Crad.Windows.Forms.Actions/CopyAction.cs b/Crad.Windows.Forms.Actions/CopyAction.cs new file mode 100644 index 0000000..49d20c1 --- /dev/null +++ b/Crad.Windows.Forms.Actions/CopyAction.cs @@ -0,0 +1,44 @@ +using System; + +namespace Crad.Windows.Forms.Actions +{ + [StandardAction] + public class CopyAction: TextBoxBaseAction + { + public CopyAction() + { + InitializeComponent(); + } + + private void InitializeComponent() + { + // + // CopyAction + // + this.Image = global::Crad.Windows.Forms.Actions.Properties.Resources.Copy; + this.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C))); + this.Text = "&Copy"; + this.ToolTipText = "Copy"; + + } + + protected override void OnExecute(EventArgs e) + { + if (!DesignMode && ActiveTextBox != null) + { + ActiveTextBox.Copy(); + } + base.OnExecute(e); + } + + protected override void OnUpdate(EventArgs e) + { + if (!DesignMode) + { + this.Enabled = (ActiveTextBox != null && + ActiveTextBox.SelectionLength > 0); + } + base.OnUpdate(e); + } + } +} diff --git a/Crad.Windows.Forms.Actions/CopyAction.resx b/Crad.Windows.Forms.Actions/CopyAction.resx new file mode 100644 index 0000000..52a9ad3 --- /dev/null +++ b/Crad.Windows.Forms.Actions/CopyAction.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + \ No newline at end of file diff --git a/Crad.Windows.Forms.Actions/Crad.Windows.Forms.Actions.csproj b/Crad.Windows.Forms.Actions/Crad.Windows.Forms.Actions.csproj new file mode 100644 index 0000000..51dc9fe --- /dev/null +++ b/Crad.Windows.Forms.Actions/Crad.Windows.Forms.Actions.csproj @@ -0,0 +1,319 @@ + + + + Debug + AnyCPU + 8.0.50727 + 2.0 + {6E50D1BD-D8EA-4992-8B25-C5A0D7E179A5} + Library + Properties + Crad.Windows.Forms.Actions + Crad.Windows.Forms.Actions + + + + + + + + + v2.0 + + + + + 2.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + true + + + Crad.snk + + + + + + + + + + + + Component + + + Component + + + + Component + + + Component + + + Component + + + Component + + + Component + + + Component + + + Component + + + + Component + + + Component + + + Component + + + Component + + + Component + + + Component + + + True + True + Resources.resx + + + Component + + + Component + + + + Component + + + + + Component + + + Component + + + Component + + + Component + + + + Component + + + Component + + + Component + + + + + + + + Designer + AlignCenterAction.cs + + + Designer + AlignLeftAction.cs + + + Designer + AlignRightAction.cs + + + Designer + BoldAction.cs + + + Designer + CopyAction.cs + + + Designer + CutAction.cs + + + Designer + DeleteAction.cs + + + Designer + FontStyleAction.cs + + + + Designer + ItalicAction.cs + + + Designer + AlignmentBaseAction.cs + + + Designer + ListAction.cs + + + Designer + ViewDetailsAction.cs + + + Designer + PasteAction.cs + + + Designer + ResXFileCodeGenerator + Resources.Designer.cs + + + Designer + RedoAction.cs + + + Designer + SelectAllAction.cs + + + Designer + UnderlineAction.cs + + + Designer + UndoAction.cs + + + Designer + ViewLargeIconsAction.cs + + + Designer + ViewListAction.cs + + + Designer + ViewSmallIconsAction.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + + + \ No newline at end of file diff --git a/Crad.Windows.Forms.Actions/Crad.snk b/Crad.Windows.Forms.Actions/Crad.snk new file mode 100644 index 0000000000000000000000000000000000000000..c24f237104bd7d6edb810ec6cb1d84a669561f9e GIT binary patch literal 596 zcmV-a0;~N80ssI2Bme+XQ$aES1ONa50096e*MG7S2VJSnYCdOFXXtw(cl%=UeuSu| zK!I3sJ!4E>Tw8k>*yV~;a-@1suG5N4^AzVWg#Y=&^ZNTtRq?o4md&OezsKOs zOObP*!6EU~Ywz;EM>S2&(FsYAoZ(n|c8nBFI$Y^UkUp2owY0Vh8Q9}6t!X;pHIAdl zKDOV%_zd|jz%jj9-6nf%oI?~`F&Q$%pe7P{f~k0W=-aq4#t&Ct z25U~X;|g55Kn{>wnHNfTnV$R^VIrN~Eh3060}#-&ogx=TJHt*@qz99F*I~@_8I+0Zg3f9ft2(Sl~X#p3> z$$zhpz*QFLKaDF46d%AuX>}^enBcl3WZ@o{e@oWkX&3s-zn(Y!0SFwzr+zek(H@Zb z3q>T{E0^lwGpsqUqggSe|F)ZIv3C@uDZ`wdolWjN(h0}T;UfG~>2UBYsz*#L+ppt1 zA#no%0hyP+A2z 0 && !ActiveTextBox.ReadOnly); + } + base.OnUpdate(e); + } + } +} diff --git a/Crad.Windows.Forms.Actions/CutAction.resx b/Crad.Windows.Forms.Actions/CutAction.resx new file mode 100644 index 0000000..52a9ad3 --- /dev/null +++ b/Crad.Windows.Forms.Actions/CutAction.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + \ No newline at end of file diff --git a/Crad.Windows.Forms.Actions/DeleteAction.cs b/Crad.Windows.Forms.Actions/DeleteAction.cs new file mode 100644 index 0000000..fd50188 --- /dev/null +++ b/Crad.Windows.Forms.Actions/DeleteAction.cs @@ -0,0 +1,43 @@ +using System; +using System.Windows.Forms; + +namespace Crad.Windows.Forms.Actions +{ + [StandardAction] + public class DeleteAction: TextBoxBaseAction + { + public DeleteAction() + { + InitializeComponent(); + } + + private void InitializeComponent() + { + // + // DeleteAction + // + this.Image = global::Crad.Windows.Forms.Actions.Properties.Resources.delete; + this.ShortcutKeys = System.Windows.Forms.Keys.Delete; + this.Text = "&Delete"; + this.ToolTipText = "Delete"; + } + + protected override void OnExecute(EventArgs e) + { + if (!DesignMode && ActiveTextBox != null) + { + ActiveTextBox.SelectedText = string.Empty; + } + base.OnExecute(e); + } + protected override void OnUpdate(EventArgs e) + { + if (!DesignMode) + { + this.Enabled = (ActiveTextBox != null && + ActiveTextBox.SelectionLength > 0 && !ActiveTextBox.ReadOnly); + } + base.OnUpdate(e); + } + } +} diff --git a/Crad.Windows.Forms.Actions/DeleteAction.resx b/Crad.Windows.Forms.Actions/DeleteAction.resx new file mode 100644 index 0000000..52a9ad3 --- /dev/null +++ b/Crad.Windows.Forms.Actions/DeleteAction.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + \ No newline at end of file diff --git a/Crad.Windows.Forms.Actions/Design/ActionCollectionEditor.cs b/Crad.Windows.Forms.Actions/Design/ActionCollectionEditor.cs new file mode 100644 index 0000000..6408c1d --- /dev/null +++ b/Crad.Windows.Forms.Actions/Design/ActionCollectionEditor.cs @@ -0,0 +1,50 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.Design; +using System.Diagnostics; +using System.Reflection; +using System.Collections.Generic; +using System.Windows.Forms; + +namespace Crad.Windows.Forms.Actions.Design +{ + internal sealed class ActionCollectionEditor : CollectionEditor + { + private Type[] returnedTypes; + + public ActionCollectionEditor() + : base(typeof(ActionCollection)) + {} + + protected override Type[] CreateNewItemTypes() + { + return returnedTypes; + } + public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) + { + if (returnedTypes == null) + { + returnedTypes = getReturnedTypes(provider); + } + return base.EditValue(context, provider, value); + } + + private Type[] getReturnedTypes(IServiceProvider provider) + { + List res = new List(); + + ITypeDiscoveryService tds = (ITypeDiscoveryService) + provider.GetService(typeof(ITypeDiscoveryService)); + + if (tds != null) + foreach (Type actionType in tds.GetTypes(typeof(Action), false)) + { + if (actionType.GetCustomAttributes(typeof(StandardActionAttribute), false).Length > 0 && + !res.Contains(actionType)) + res.Add(actionType); + } + + return res.ToArray(); + } + } +} diff --git a/Crad.Windows.Forms.Actions/FontStyleAction.cs b/Crad.Windows.Forms.Actions/FontStyleAction.cs new file mode 100644 index 0000000..a29698d --- /dev/null +++ b/Crad.Windows.Forms.Actions/FontStyleAction.cs @@ -0,0 +1,85 @@ +using System; +using System.ComponentModel; +using System.Drawing; +using System.Windows.Forms; + +namespace Crad.Windows.Forms.Actions +{ + public class FontStyleAction: RichTextAction + { + protected override void OnExecute(EventArgs e) + { + if (!DesignMode && ActiveRichTextBox != null) + { + setFontStyle(ActiveRichTextBox, ActionFontStyle); + } + base.OnExecute(e); + } + protected override void OnUpdate(EventArgs e) + { + if (!DesignMode) + { + this.Checked = + (ActiveRichTextBox != null && + hasFontStyle(ActiveRichTextBox, ActionFontStyle)); + } + base.OnUpdate(e); + } + + private bool hasFontStyle(RichTextBox rtb, FontStyle style) + { + return (rtb.SelectionFont.Style & style) == style; + } + private void setFontStyle(RichTextBox rtb, FontStyle style) + { + if (rtb.SelectionLength == 0) + setCharFontStyle(rtb, style); + else + { + // to avoid screen refreshing, we create a fake RichTextBox + using (RichTextBox a = new RichTextBox()) + { + a.SuspendLayout(); + a.SelectedRtf = rtb.SelectedRtf; + a.SelectAll(); + int selectionStart = a.SelectionStart; + int selectionLength = a.SelectionLength; + int selectionEnd = selectionStart + selectionLength; + for (int x = selectionStart; x < selectionEnd; ++x) + { + // Set temporary selection + a.Select(x, 1); + // Toggle font style of the selection + setCharFontStyle(a, style); + } + // Restore the original selection + a.SelectAll(); + rtb.SelectedRtf = a.SelectedRtf; + } + } + } + + private void setCharFontStyle(RichTextBox rtb, FontStyle style) + { + if (this.Checked) + rtb.SelectionFont = new Font(rtb.SelectionFont, + rtb.SelectionFont.Style | style); + else + rtb.SelectionFont = new Font(rtb.SelectionFont, + rtb.SelectionFont.Style & (~style)); + } + protected virtual FontStyle ActionFontStyle + { + get { return FontStyle.Regular; } + } + + private void InitializeComponent() + { + // + // FontStyleAction + // + this.CheckOnClick = true; + + } + } +} diff --git a/Crad.Windows.Forms.Actions/FontStyleAction.resx b/Crad.Windows.Forms.Actions/FontStyleAction.resx new file mode 100644 index 0000000..52a9ad3 --- /dev/null +++ b/Crad.Windows.Forms.Actions/FontStyleAction.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + \ No newline at end of file diff --git a/Crad.Windows.Forms.Actions/Images/Action.bmp b/Crad.Windows.Forms.Actions/Images/Action.bmp new file mode 100644 index 0000000000000000000000000000000000000000..89da69a14b84974313cf15d8af9232df3b51c0fe GIT binary patch literal 1334 zcma*nua4V55XbR3sg+}u^xj}#pWyJQETAM$FbO=GvKGuUgoX?_m6TrLNrU?eSFpg; z(vg}Jq+e&Ryk39&+g<<5u2=c^>F%vux4SnYAE>>5bt9X8;zs25UDrGQ9Ycg&B6@J7 zDpe)*tK{Y9HxV^BIH8F`6ET5;ia7#_LKAU;!a&0Vi9&mQuaX8wAW>){R3#M#M<7vX z{78Yq;0PoNO@v*V!r%xb3QbJ-nW9*WBakSxJ~UO*;0PoNtq zP#7G6M4|Q1W=a|yfkdJ8PwGk<9Dzik_0P>qA`Ff|qR{$MNF@!9K%&t4GAShujzFT& zu1hGIk_Ja0QD{<(zeHhh1QKg$eQBwZ21g)KXnon4k_Ja0QD}Whx{?M*AW>+2xrUMk zM<7vXeJQ7s21g)KXnmQNk_Ja0<>k*s9=I-ep2+38%jL4xKv}!i!~bmC)4bo`zFxWA z%4yylo{sx#$7wpBrg5|X{N?NY`iFBGhIt&8{qaZ#?d>!U!?+xNJRa{4BIh&h&9EGv z9=~q}5pEsE`8*sBzsK=Jds&9%EDxJyoN3DQc^H;yx0~0i))!7ZY~hKNc}sh~EWB>v i^gLbL^EA^l4!iAoKNrY!na}fhy}S3!lT6RMYyB_X(UT4U literal 0 HcmV?d00001 diff --git a/Crad.Windows.Forms.Actions/Images/ActionList.bmp b/Crad.Windows.Forms.Actions/Images/ActionList.bmp new file mode 100644 index 0000000000000000000000000000000000000000..e5a8059160f49e75be5387f4e57b7a2ead59ffa2 GIT binary patch literal 1078 zcmZ{jYeM*p;74Tr;6MqFCAC$-))#&o3xfD3Epevekpnf0`>4S_55O>u8Ufe=;rGC312^ zst3{((h*uaN3a^!6-GvmcU4s2!-EI-USE%a)>fFiyD@GwLf6n>b~+mRbdPv)EX)WT zO87P7c&b!QK2{Si#LLU)*6Gu_FRx!?u&D{7dOdPgD#S*|KpY+h(UmLKyYhHz^1Dv# zm(ES?4tT-5&cq6WQzVg?noCL+ycRl7lb-Rr=1Gbb?eUmzOTc`m8k)?zxRv&&b> z>h>a5GcVKgxVX7*EiD*sZ^!7s03t%KPoXyp6CG+;no}|UL5BIyIS>l34bb*Hg7sx9 z!FtM(1qSXc5Q&CNIvu7=CftyO1EaN=8-9tY-X|Dq%LF=75f&<%y&4qsj4byFAA5%fK8DaQmb+X#Fwg0?6V1=-nX(`u0~5<#$cZ#j9{9djg> z#MNuHJwFVFX|+maxD_L@#z-O{y%~##8V$_UQ&V#@T8fKt*3GS!Oc#mGOJ)|8>FGAq z15dNre5^*Tu9_Jdg2iA!Z)4-H5I?`tzUpe!Qg7XN?8u?*=ZXLPEXR_nq|(3&x!f>B zXR^D|U0I2~x;k`G4G{vtE84f8VBgxZs!dEx9q#NzE8P#{n>Q$x%O{22-YS20_v2(* lMX+yjS$)jN*jJ-e-b)S+KKw!^(-n)w?7i7LFWfz5{0oj%p@{$h literal 0 HcmV?d00001 diff --git a/Crad.Windows.Forms.Actions/ItalicAction.cs b/Crad.Windows.Forms.Actions/ItalicAction.cs new file mode 100644 index 0000000..50558e3 --- /dev/null +++ b/Crad.Windows.Forms.Actions/ItalicAction.cs @@ -0,0 +1,36 @@ +using System; +using System.ComponentModel; +using System.Drawing; + +namespace Crad.Windows.Forms.Actions +{ + [StandardAction] + public class ItalicAction: FontStyleAction + { + public ItalicAction() + { + InitializeComponent(); + } + + private void InitializeComponent() + { + // + // ItalicAction + // + this.CheckOnClick = true; + this.Image = global::Crad.Windows.Forms.Actions.Properties.Resources.StyleItalic; + this.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.I))); + this.Text = "&Italic"; + this.ToolTipText = "Italic"; + + } + + protected override FontStyle ActionFontStyle + { + get + { + return FontStyle.Italic; + } + } + } +} diff --git a/Crad.Windows.Forms.Actions/ItalicAction.resx b/Crad.Windows.Forms.Actions/ItalicAction.resx new file mode 100644 index 0000000..52a9ad3 --- /dev/null +++ b/Crad.Windows.Forms.Actions/ItalicAction.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + \ No newline at end of file diff --git a/Crad.Windows.Forms.Actions/ListAction.cs b/Crad.Windows.Forms.Actions/ListAction.cs new file mode 100644 index 0000000..ae36b4f --- /dev/null +++ b/Crad.Windows.Forms.Actions/ListAction.cs @@ -0,0 +1,57 @@ +using System; +using System.ComponentModel; +using System.Windows.Forms; + +namespace Crad.Windows.Forms.Actions +{ + public class ListAction: Action + { + public ListAction() + { + InitializeComponent(); + } + + private ListView targetListView; + + [DefaultValue(null)] + public ListView TargetListView + { + get { return targetListView; } + set { targetListView = value; } + } + + + protected virtual View ListViewStyle + { + get { return View.Details; } + } + + protected override void OnExecute(EventArgs e) + { + if (!DesignMode && TargetListView != null) + { + TargetListView.View = ListViewStyle; + } + base.OnExecute(e); + } + + protected override void OnUpdate(EventArgs e) + { + if (!DesignMode) + { + this.Checked = (TargetListView != null && + TargetListView.View == ListViewStyle); + } + base.OnUpdate(e); + } + + private void InitializeComponent() + { + // + // ListAction + // + this.CheckOnClick = true; + + } + } +} diff --git a/Crad.Windows.Forms.Actions/ListAction.resx b/Crad.Windows.Forms.Actions/ListAction.resx new file mode 100644 index 0000000..52a9ad3 --- /dev/null +++ b/Crad.Windows.Forms.Actions/ListAction.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + \ No newline at end of file diff --git a/Crad.Windows.Forms.Actions/PasteAction.cs b/Crad.Windows.Forms.Actions/PasteAction.cs new file mode 100644 index 0000000..a68a603 --- /dev/null +++ b/Crad.Windows.Forms.Actions/PasteAction.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Crad.Windows.Forms.Actions +{ + [StandardAction] + public class PasteAction: TextBoxBaseAction + { + public PasteAction() + { + InitializeComponent(); + } + + private void InitializeComponent() + { + // + // PasteAction + // + this.Image = global::Crad.Windows.Forms.Actions.Properties.Resources.Paste; + this.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.V))); + this.Text = "&Paste"; + this.ToolTipText = "Paste"; + + } + + protected override void OnExecute(EventArgs e) + { + if (!DesignMode && ActiveTextBox != null) + { + ActiveTextBox.Paste(); + } + base.OnExecute(e); + } + + protected override void OnUpdate(EventArgs e) + { + base.OnUpdate(e); + } + } +} diff --git a/Crad.Windows.Forms.Actions/PasteAction.resx b/Crad.Windows.Forms.Actions/PasteAction.resx new file mode 100644 index 0000000..98d4a33 --- /dev/null +++ b/Crad.Windows.Forms.Actions/PasteAction.resx @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + &Paste + + + Paste + + + + Ctrl+V + + + False + + \ No newline at end of file diff --git a/Crad.Windows.Forms.Actions/Properties/AssemblyInfo.cs b/Crad.Windows.Forms.Actions/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..94ebdc2 --- /dev/null +++ b/Crad.Windows.Forms.Actions/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Crad.Windows.Forms.Actions")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Crad.Windows.Forms.Actions")] +[assembly: AssemblyCopyright("Copyright © 2006")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("348ead85-3796-4ae6-aaea-dedf694060d9")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.1.1.0")] +[assembly: AssemblyFileVersion("1.1.1.0")] diff --git a/Crad.Windows.Forms.Actions/Properties/Resources.Designer.cs b/Crad.Windows.Forms.Actions/Properties/Resources.Designer.cs new file mode 100644 index 0000000..9d9b861 --- /dev/null +++ b/Crad.Windows.Forms.Actions/Properties/Resources.Designer.cs @@ -0,0 +1,161 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.17379 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Crad.Windows.Forms.Actions.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Crad.Windows.Forms.Actions.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + internal static System.Drawing.Bitmap AlignCenter { + get { + object obj = ResourceManager.GetObject("AlignCenter", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap AlignJustified { + get { + object obj = ResourceManager.GetObject("AlignJustified", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap AlignLeft { + get { + object obj = ResourceManager.GetObject("AlignLeft", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap AlignRight { + get { + object obj = ResourceManager.GetObject("AlignRight", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap BulletedList { + get { + object obj = ResourceManager.GetObject("BulletedList", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap Copy { + get { + object obj = ResourceManager.GetObject("Copy", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap Cut { + get { + object obj = ResourceManager.GetObject("Cut", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap delete { + get { + object obj = ResourceManager.GetObject("delete", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap Paste { + get { + object obj = ResourceManager.GetObject("Paste", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap Redo { + get { + object obj = ResourceManager.GetObject("Redo", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap StyleBold { + get { + object obj = ResourceManager.GetObject("StyleBold", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap StyleItalic { + get { + object obj = ResourceManager.GetObject("StyleItalic", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap StyleUnderline { + get { + object obj = ResourceManager.GetObject("StyleUnderline", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap Undo { + get { + object obj = ResourceManager.GetObject("Undo", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/Crad.Windows.Forms.Actions/Properties/Resources.resx b/Crad.Windows.Forms.Actions/Properties/Resources.resx new file mode 100644 index 0000000..6d1b51b --- /dev/null +++ b/Crad.Windows.Forms.Actions/Properties/Resources.resx @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\AlignJustified.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\Redo.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\Copy.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\AlignRight.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\AlignLeft.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\StyleItalic.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\Paste.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\Undo.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\StyleUnderline.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\StyleBold.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\Cut.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\AlignCenter.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\BulletedList.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\delete.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/Crad.Windows.Forms.Actions/RedoAction.cs b/Crad.Windows.Forms.Actions/RedoAction.cs new file mode 100644 index 0000000..9af8a77 --- /dev/null +++ b/Crad.Windows.Forms.Actions/RedoAction.cs @@ -0,0 +1,44 @@ +using System; +using System.Windows.Forms; + +namespace Crad.Windows.Forms.Actions +{ + [StandardAction] + public class RedoAction: RichTextAction + { + public RedoAction() + { + InitializeComponent(); + } + + protected override void OnExecute(EventArgs e) + { + if (!DesignMode && ActiveRichTextBox != null) + { + this.ActiveRichTextBox.Redo(); + } + base.OnExecute(e); + } + protected override void OnUpdate(EventArgs e) + { + if (!DesignMode) + { + this.Enabled = (ActiveRichTextBox != null && ActiveRichTextBox.CanRedo); + } + + base.OnUpdate(e); + } + + private void InitializeComponent() + { + // + // RedoAction + // + this.Image = global::Crad.Windows.Forms.Actions.Properties.Resources.Redo; + this.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Y))); + this.Text = "&Redo"; + this.ToolTipText = "Redo"; + + } + } +} diff --git a/Crad.Windows.Forms.Actions/RedoAction.resx b/Crad.Windows.Forms.Actions/RedoAction.resx new file mode 100644 index 0000000..52a9ad3 --- /dev/null +++ b/Crad.Windows.Forms.Actions/RedoAction.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + \ No newline at end of file diff --git a/Crad.Windows.Forms.Actions/Resources/AlignCenter.png b/Crad.Windows.Forms.Actions/Resources/AlignCenter.png new file mode 100644 index 0000000000000000000000000000000000000000..c4cb50371be81b422b04e1ae19e68e59386a81bb GIT binary patch literal 172 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#NP(sVo z#WBRfKRH1{=YjnN#U}}`cF&Ip=b3Z%g`SMXbRd1$l4phdsw1;F7>e!PcUG#*-~sAl N@O1TaS?83{1OTvSFQ5Pb literal 0 HcmV?d00001 diff --git a/Crad.Windows.Forms.Actions/Resources/AlignJustified.png b/Crad.Windows.Forms.Actions/Resources/AlignJustified.png new file mode 100644 index 0000000000000000000000000000000000000000..60f8afd8dc79658e102b8bf4e77f742615b8afb6 GIT binary patch literal 170 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#NP(s7g z#WBRfKRH1{=YjnN#U}}`cFvc%?O3&f-7VH3PD&zgqr+Yi*HxYjsuzOSN_aLb1L|S$ MboFyt=akR{04LKe=l}o! literal 0 HcmV?d00001 diff --git a/Crad.Windows.Forms.Actions/Resources/AlignLeft.png b/Crad.Windows.Forms.Actions/Resources/AlignLeft.png new file mode 100644 index 0000000000000000000000000000000000000000..c227f6c45e6986a41c636fb2c14684693009ff9d GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#NP{P2| z#WBRfKRH1{=YjnN#U}}`cFvEuy)s>Sm*L z#WBRfKRH1{=YjnN#U}~3cFvEu9&n!Z$gPfbeN}o6=A9AZfgrBMoWl)O3q4nPGPEeT V?|eLA%0r-b22WQ%mvv4FO#tIsHnac$ literal 0 HcmV?d00001 diff --git a/Crad.Windows.Forms.Actions/Resources/BulletedList.png b/Crad.Windows.Forms.Actions/Resources/BulletedList.png new file mode 100644 index 0000000000000000000000000000000000000000..853258605acae74461690086695665e5f70f4c66 GIT binary pat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xXvwXHF2zo%bd%4F7RbbP&bhV2vJs%!ns%DJ%-!pk6~$xp>%v zfv0mWEr1gKgA!erZR4?5@B!C4JwM$|;`c`Fm)3qZ^we>BK5fmhFThcX+) zNyF?Fg4-hd0e1fg2)>!YRPPKEMOr54VxlF$+YT^0bw5E^0J3*sdbY@6bJN7nG%ivv z;{#xFy|lvn!u_-6KpXhLm8J;isUtga0p``iSpNhd$rqM1)0|kC0BHU^Z``m}lxu}P zIB4T;kl-bmnpHQSHz;9f$#OzWU8jUx2%tI58A_WDk@uCo7jr!g9l)`%O3s&xlneCU zHnZAkD8)kMM^a~s$ufE&AWwWQ?kr=kCy-uZ%Do>-javeonEMm0C56e(OLCe^Gskn+ z8ldF;<-Lto&}wXCXPx#1ZP1_K>z@;j|==^1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUzB1uF+R5(w?ks)paF%U&_gdAay;3F6Y8WtJ`8ZI;}G+by{Xc%Z% z=p)P#{teteo2YWMjgpljb*0e)&wu~V%;E5^uT)H|lq+h!KvIE^8ON9SH!)NgzlO>H zA^s_Z0HGLm78qY(&!yW?;S&%DVL655Zx|a|-vAj~+$XyE$P^YKq$-Hj3F&@;5aQX_ z?74Ot-jBxERo$mk5*N#)4ipChVO;KnE1-vkCWLMh41hX5ve}wbDk|0_E?!gq1t@$3 zn`L}V7Z}#+yo!T#ewXOqntuRLL+0^X_1q5t O0000!9N=x(;K?Gx!U#p8AKj&adAC}Xt=aMVuypq7sXF9JX}mnOxzP5%b#KI5>97mU3DQ?*37OoEFjvN YA$Ed!u})pjZ=jV7p00i_>zopr0FPWmSO5S3 literal 0 HcmV?d00001 diff --git a/Crad.Windows.Forms.Actions/Resources/Undo.png b/Crad.Windows.Forms.Actions/Resources/Undo.png new file mode 100644 index 0000000000000000000000000000000000000000..1d3bb08640c7348e6b96bd936483ae85d3e035de GIT binary patch literal 417 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#N&>VSB z7sn6_|E&`g^Oy|cU)K!Y@|YvBxhn+1yH@iqjh=tCwr8Ji!yhnZa_J2|@3_Ik=0rS2&z86zzDsYhq>{>y8^&TUZaNu((P5V_DG8 zc`BA^f}ydvSz1`J)6OOLdn;!DI4+xT$MD+x_U>47pW`W+hXm(m%KtmO_u}27-|p1< zHau>*_($NpZ`tnMJ8#dPQC+y3(c{6}J4(}b+&r0g;WSJ9rpizL=kM=22n<68Pgg&e IbxsLQ07jXlGXMYp literal 0 HcmV?d00001 diff --git a/Crad.Windows.Forms.Actions/Resources/delete.png b/Crad.Windows.Forms.Actions/Resources/delete.png new file mode 100644 index 0000000000000000000000000000000000000000..547e7a72b4c2819702be39b667ba57022ea63348 GIT binary patch literal 432 zcmV;h0Z;ykP)Px#1ZP1_K>z@;j|==^1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUzE=fc|R5(wqk}+o-VewJA#3teSk1!~IaKXz(jxnp_zBQ|5(^$HibvK&(Bx!;Q+ zn~|IPPznL*9YpN;_idMffm#`mcfLs}VL8Nn`@Rd=T_RTw6m^(tniFH|#tnt|ue7pHqY~v?OLgH_ZEEJ|0z~Zk=vzf>Dc0;o}+KqsMZTKYVNd aSMUixu5*)1u+**q0000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + \ No newline at end of file diff --git a/Crad.Windows.Forms.Actions/StandardActionAttribute.cs b/Crad.Windows.Forms.Actions/StandardActionAttribute.cs new file mode 100644 index 0000000..e25592b --- /dev/null +++ b/Crad.Windows.Forms.Actions/StandardActionAttribute.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Crad.Windows.Forms.Actions +{ + [AttributeUsage(AttributeTargets.Class, AllowMultiple=false)] + public class StandardActionAttribute: Attribute + { + } +} diff --git a/Crad.Windows.Forms.Actions/TextBoxBaseAction.cs b/Crad.Windows.Forms.Actions/TextBoxBaseAction.cs new file mode 100644 index 0000000..3f528b2 --- /dev/null +++ b/Crad.Windows.Forms.Actions/TextBoxBaseAction.cs @@ -0,0 +1,22 @@ +using System; +using System.ComponentModel; +using System.Windows.Forms; + +namespace Crad.Windows.Forms.Actions +{ + public class TextBoxBaseAction: Action + { + [Browsable(false)] + protected TextBoxBase ActiveTextBox + { + get + { + TextBoxBase result = null; + if (this.ActionList != null) + result = this.ActionList.ActiveControl as TextBoxBase; + + return result; + } + } + } +} diff --git a/Crad.Windows.Forms.Actions/UnderlineAction.cs b/Crad.Windows.Forms.Actions/UnderlineAction.cs new file mode 100644 index 0000000..85109ee --- /dev/null +++ b/Crad.Windows.Forms.Actions/UnderlineAction.cs @@ -0,0 +1,36 @@ +using System; +using System.ComponentModel; +using System.Drawing; + +namespace Crad.Windows.Forms.Actions +{ + [StandardAction] + public class UnderlineAction: FontStyleAction + { + public UnderlineAction() + { + InitializeComponent(); + } + + private void InitializeComponent() + { + // + // UnderlineAction + // + this.CheckOnClick = true; + this.Image = global::Crad.Windows.Forms.Actions.Properties.Resources.StyleUnderline; + this.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.U))); + this.Text = "&Underline"; + this.ToolTipText = "Underline"; + + } + + protected override FontStyle ActionFontStyle + { + get + { + return FontStyle.Underline; + } + } + } +} diff --git a/Crad.Windows.Forms.Actions/UnderlineAction.resx b/Crad.Windows.Forms.Actions/UnderlineAction.resx new file mode 100644 index 0000000..52a9ad3 --- /dev/null +++ b/Crad.Windows.Forms.Actions/UnderlineAction.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + \ No newline at end of file diff --git a/Crad.Windows.Forms.Actions/UndoAction.cs b/Crad.Windows.Forms.Actions/UndoAction.cs new file mode 100644 index 0000000..9eb6d77 --- /dev/null +++ b/Crad.Windows.Forms.Actions/UndoAction.cs @@ -0,0 +1,43 @@ +using System; + +namespace Crad.Windows.Forms.Actions +{ + [StandardAction] + public class UndoAction: TextBoxBaseAction + { + public UndoAction() + { + InitializeComponent(); + } + + private void InitializeComponent() + { + // + // UndoAction + // + this.Image = global::Crad.Windows.Forms.Actions.Properties.Resources.Undo; + this.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Z))); + this.Text = "&Undo"; + this.ToolTipText = "Undo"; + } + + protected override void OnExecute(EventArgs e) + { + if (!DesignMode && ActiveTextBox != null) + { + this.ActiveTextBox.Undo(); + } + base.OnExecute(e); + } + + protected override void OnUpdate(EventArgs e) + { + if (!DesignMode) + { + this.Enabled = (ActiveTextBox != null && ActiveTextBox.CanUndo); + } + + base.OnUpdate(e); + } + } +} diff --git a/Crad.Windows.Forms.Actions/UndoAction.resx b/Crad.Windows.Forms.Actions/UndoAction.resx new file mode 100644 index 0000000..52a9ad3 --- /dev/null +++ b/Crad.Windows.Forms.Actions/UndoAction.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + \ No newline at end of file diff --git a/Crad.Windows.Forms.Actions/UpdatablePropertyAttribute.cs b/Crad.Windows.Forms.Actions/UpdatablePropertyAttribute.cs new file mode 100644 index 0000000..66c8e85 --- /dev/null +++ b/Crad.Windows.Forms.Actions/UpdatablePropertyAttribute.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Crad.Windows.Forms.Actions +{ + public class UpdatablePropertyAttribute: Attribute + { + } +} \ No newline at end of file diff --git a/Crad.Windows.Forms.Actions/ViewDetailsAction.cs b/Crad.Windows.Forms.Actions/ViewDetailsAction.cs new file mode 100644 index 0000000..b5dece0 --- /dev/null +++ b/Crad.Windows.Forms.Actions/ViewDetailsAction.cs @@ -0,0 +1,29 @@ +using System; +using System.Windows.Forms; + +namespace Crad.Windows.Forms.Actions +{ + [StandardAction] + public class ViewDetailsAction: ListAction + { + public ViewDetailsAction() + { + InitializeComponent(); + } + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ViewDetailsAction)); + // + // ViewDetailsAction + // + this.Image = ((System.Drawing.Image)(resources.GetObject("$this.Image"))); + this.Text = "View &details"; + this.ToolTipText = "View details"; + + } + protected override View ListViewStyle + { + get { return View.Details; } + } + } +} diff --git a/Crad.Windows.Forms.Actions/ViewDetailsAction.resx b/Crad.Windows.Forms.Actions/ViewDetailsAction.resx new file mode 100644 index 0000000..3aa9dac --- /dev/null +++ b/Crad.Windows.Forms.Actions/ViewDetailsAction.resx @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAC5JREFUOE9jYKAy + +A80DxmDjCfEp9wJ6LaSyqeOC2CmDFwYjLoAEZMjNRYoSssA/71QsFiGjkIAAAAASUVORK5CYII= + + + \ No newline at end of file diff --git a/Crad.Windows.Forms.Actions/ViewLargeIconsAction.cs b/Crad.Windows.Forms.Actions/ViewLargeIconsAction.cs new file mode 100644 index 0000000..04faf41 --- /dev/null +++ b/Crad.Windows.Forms.Actions/ViewLargeIconsAction.cs @@ -0,0 +1,30 @@ +using System; +using System.Windows.Forms; + +namespace Crad.Windows.Forms.Actions +{ + [StandardAction] + public class ViewLargeIconsAction: ListAction + { + public ViewLargeIconsAction() + { + InitializeComponent(); + } + + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ViewLargeIconsAction)); + // + // ViewLargeIconsAction + // + this.Image = ((System.Drawing.Image)(resources.GetObject("$this.Image"))); + this.Text = "View &large icons"; + this.ToolTipText = "View large icons"; + } + + protected override View ListViewStyle + { + get { return View.LargeIcon; } + } + } +} diff --git a/Crad.Windows.Forms.Actions/ViewLargeIconsAction.resx b/Crad.Windows.Forms.Actions/ViewLargeIconsAction.resx new file mode 100644 index 0000000..09acf9f --- /dev/null +++ b/Crad.Windows.Forms.Actions/ViewLargeIconsAction.resx @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAKJJREFUOE9jYKAW + 2HDgw38QXrDjw3+yzARpBIGGBQ/+F8x4QLohDSse/P/w4///D0BzAhoukG5AwQSgAUDND4DYIOMA6QaA + bHUouADWbJBAhgFkBRySJpCTsWG4koSOC/9BOKCBTNeBNIKAQ8UBoFfJMMShYgM8lgwSNpAeyAYZQAOg + saQQsYB0AxQSFvwHaVQIWPBfIGAC6QbQPJYotYB8/QAq63tJTq5L+gAAAABJRU5ErkJggg== + + + \ No newline at end of file diff --git a/Crad.Windows.Forms.Actions/ViewListAction.cs b/Crad.Windows.Forms.Actions/ViewListAction.cs new file mode 100644 index 0000000..7430d9f --- /dev/null +++ b/Crad.Windows.Forms.Actions/ViewListAction.cs @@ -0,0 +1,31 @@ +using System; +using System.Windows.Forms; + +namespace Crad.Windows.Forms.Actions +{ + [StandardAction] + public class ViewListAction: ListAction + { + public ViewListAction() + { + InitializeComponent(); + } + + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ViewListAction)); + // + // ViewListAction + // + this.Image = ((System.Drawing.Image)(resources.GetObject("$this.Image"))); + this.Text = "View &list"; + this.ToolTipText = "View list"; + + } + + protected override View ListViewStyle + { + get { return View.List; } + } + } +} diff --git a/Crad.Windows.Forms.Actions/ViewListAction.resx b/Crad.Windows.Forms.Actions/ViewListAction.resx new file mode 100644 index 0000000..c0ce22c --- /dev/null +++ b/Crad.Windows.Forms.Actions/ViewListAction.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAFxJREFUOE9jYKAG + SOi48D+g4cJ/XGYRkmdIAGoGAYOEA2BDJkyY8L+goOB/gEcAmE9IniGg4sJ/h4wD/xUiIAagA0Ly1AgF + Cs0gFEiE5AkG0mggAhMSgZQ60gMRALu4qn1HXgO9AAAAAElFTkSuQmCC + + + \ No newline at end of file diff --git a/Crad.Windows.Forms.Actions/ViewSmallIconsAction.cs b/Crad.Windows.Forms.Actions/ViewSmallIconsAction.cs new file mode 100644 index 0000000..eddc89d --- /dev/null +++ b/Crad.Windows.Forms.Actions/ViewSmallIconsAction.cs @@ -0,0 +1,30 @@ +using System; +using System.Windows.Forms; + +namespace Crad.Windows.Forms.Actions +{ + [StandardAction] + public class ViewSmallIconsAction: ListAction + { + public ViewSmallIconsAction() + { + InitializeComponent(); + } + + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ViewSmallIconsAction)); + // + // ViewSmallIconsAction + // + this.Image = ((System.Drawing.Image)(resources.GetObject("$this.Image"))); + this.Text = "View &small icons"; + this.ToolTipText = "View small icons"; + } + + protected override View ListViewStyle + { + get { return View.SmallIcon; } + } + } +} diff --git a/Crad.Windows.Forms.Actions/ViewSmallIconsAction.resx b/Crad.Windows.Forms.Actions/ViewSmallIconsAction.resx new file mode 100644 index 0000000..e19e446 --- /dev/null +++ b/Crad.Windows.Forms.Actions/ViewSmallIconsAction.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAEpJREFUOE9jYKAW + SOi48D+g4cJ/ss1LAGoGAYOEA2BDJkyY8L+goOB/gEcAcYYGVFz475Bx4L9CBMSAYQZGA5jECB0NMBID + DKgcAF/kVT8ruiX9AAAAAElFTkSuQmCC + + + \ No newline at end of file diff --git a/Crad.Windows.Forms.Actions/license.txt b/Crad.Windows.Forms.Actions/license.txt new file mode 100644 index 0000000..c9990a7 --- /dev/null +++ b/Crad.Windows.Forms.Actions/license.txt @@ -0,0 +1,213 @@ +Common Public License Version 1.0 + +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC +LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM +CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. DEFINITIONS + +"Contribution" means: + + a) in the case of the initial Contributor, the initial code and +documentation distributed under this Agreement, and + + b) in the case of each subsequent Contributor: + + i) changes to the Program, and + + ii) additions to the Program; + + where such changes and/or additions to the Program originate from and are +distributed by that particular Contributor. A Contribution 'originates' from a +Contributor if it was added to the Program by such Contributor itself or anyone +acting on such Contributor's behalf. Contributions do not include additions to +the Program which: (i) are separate modules of software distributed in +conjunction with the Program under their own license agreement, and (ii) are not +derivative works of the Program. + +"Contributor" means any person or entity that distributes the Program. + +"Licensed Patents " mean patent claims licensable by a Contributor which are +necessarily infringed by the use or sale of its Contribution alone or when +combined with the Program. + +"Program" means the Contributions distributed in accordance with this Agreement. + +"Recipient" means anyone who receives the Program under this Agreement, +including all Contributors. + +2. GRANT OF RIGHTS + + a) Subject to the terms of this Agreement, each Contributor hereby grants +Recipient a non-exclusive, worldwide, royalty-free copyright license to +reproduce, prepare derivative works of, publicly display, publicly perform, +distribute and sublicense the Contribution of such Contributor, if any, and such +derivative works, in source code and object code form. + + b) Subject to the terms of this Agreement, each Contributor hereby grants +Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed +Patents to make, use, sell, offer to sell, import and otherwise transfer the +Contribution of such Contributor, if any, in source code and object code form. +This patent license shall apply to the combination of the Contribution and the +Program if, at the time the Contribution is added by the Contributor, such +addition of the Contribution causes such combination to be covered by the +Licensed Patents. The patent license shall not apply to any other combinations +which include the Contribution. No hardware per se is licensed hereunder. + + c) Recipient understands that although each Contributor grants the licenses +to its Contributions set forth herein, no assurances are provided by any +Contributor that the Program does not infringe the patent or other intellectual +property rights of any other entity. Each Contributor disclaims any liability to +Recipient for claims brought by any other entity based on infringement of +intellectual property rights or otherwise. As a condition to exercising the +rights and licenses granted hereunder, each Recipient hereby assumes sole +responsibility to secure any other intellectual property rights needed, if any. +For example, if a third party patent license is required to allow Recipient to +distribute the Program, it is Recipient's responsibility to acquire that license +before distributing the Program. + + d) Each Contributor represents that to its knowledge it has sufficient +copyright rights in its Contribution, if any, to grant the copyright license set +forth in this Agreement. + +3. REQUIREMENTS + +A Contributor may choose to distribute the Program in object code form under its +own license agreement, provided that: + + a) it complies with the terms and conditions of this Agreement; and + + b) its license agreement: + + i) effectively disclaims on behalf of all Contributors all warranties and +conditions, express and implied, including warranties or conditions of title and +non-infringement, and implied warranties or conditions of merchantability and +fitness for a particular purpose; + + ii) effectively excludes on behalf of all Contributors all liability for +damages, including direct, indirect, special, incidental and consequential +damages, such as lost profits; + + iii) states that any provisions which differ from this Agreement are offered +by that Contributor alone and not by any other party; and + + iv) states that source code for the Program is available from such +Contributor, and informs licensees how to obtain it in a reasonable manner on or +through a medium customarily used for software exchange. + +When the Program is made available in source code form: + + a) it must be made available under this Agreement; and + + b) a copy of this Agreement must be included with each copy of the Program. + +Contributors may not remove or alter any copyright notices contained within the +Program. + +Each Contributor must identify itself as the originator of its Contribution, if +any, in a manner that reasonably allows subsequent Recipients to identify the +originator of the Contribution. + +4. COMMERCIAL DISTRIBUTION + +Commercial distributors of software may accept certain responsibilities with +respect to end users, business partners and the like. While this license is +intended to facilitate the commercial use of the Program, the Contributor who +includes the Program in a commercial product offering should do so in a manner +which does not create potential liability for other Contributors. Therefore, if +a Contributor includes the Program in a commercial product offering, such +Contributor ("Commercial Contributor") hereby agrees to defend and indemnify +every other Contributor ("Indemnified Contributor") against any losses, damages +and costs (collectively "Losses") arising from claims, lawsuits and other legal +actions brought by a third party against the Indemnified Contributor to the +extent caused by the acts or omissions of such Commercial Contributor in +connection with its distribution of the Program in a commercial product +offering. The obligations in this section do not apply to any claims or Losses +relating to any actual or alleged intellectual property infringement. In order +to qualify, an Indemnified Contributor must: a) promptly notify the Commercial +Contributor in writing of such claim, and b) allow the Commercial Contributor to +control, and cooperate with the Commercial Contributor in, the defense and any +related settlement negotiations. The Indemnified Contributor may participate in +any such claim at its own expense. + +For example, a Contributor might include the Program in a commercial product +offering, Product X. That Contributor is then a Commercial Contributor. If that +Commercial Contributor then makes performance claims, or offers warranties +related to Product X, those performance claims and warranties are such +Commercial Contributor's responsibility alone. Under this section, the +Commercial Contributor would have to defend claims against the other +Contributors related to those performance claims and warranties, and if a court +requires any other Contributor to pay any damages as a result, the Commercial +Contributor must pay those damages. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR +IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, +NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each +Recipient is solely responsible for determining the appropriateness of using and +distributing the Program and assumes all risks associated with its exercise of +rights under this Agreement, including but not limited to the risks and costs of +program errors, compliance with applicable laws, damage to or loss of data, +programs or equipment, and unavailability or interruption of operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY +CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST +PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS +GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. GENERAL + +If any provision of this Agreement is invalid or unenforceable under applicable +law, it shall not affect the validity or enforceability of the remainder of the +terms of this Agreement, and without further action by the parties hereto, such +provision shall be reformed to the minimum extent necessary to make such +provision valid and enforceable. + +If Recipient institutes patent litigation against a Contributor with respect to +a patent applicable to software (including a cross-claim or counterclaim in a +lawsuit), then any patent licenses granted by that Contributor to such Recipient +under this Agreement shall terminate as of the date such litigation is filed. In +addition, if Recipient institutes patent litigation against any entity +(including a cross-claim or counterclaim in a lawsuit) alleging that the Program +itself (excluding combinations of the Program with other software or hardware) +infringes such Recipient's patent(s), then such Recipient's rights granted under +Section 2(b) shall terminate as of the date such litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it fails to +comply with any of the material terms or conditions of this Agreement and does +not cure such failure in a reasonable period of time after becoming aware of +such noncompliance. If all Recipient's rights under this Agreement terminate, +Recipient agrees to cease use and distribution of the Program as soon as +reasonably practicable. However, Recipient's obligations under this Agreement +and any licenses granted by Recipient relating to the Program shall continue and +survive. + +Everyone is permitted to copy and distribute copies of this Agreement, but in +order to avoid inconsistency the Agreement is copyrighted and may only be +modified in the following manner. The Agreement Steward reserves the right to +publish new versions (including revisions) of this Agreement from time to time. +No one other than the Agreement Steward has the right to modify this Agreement. +IBM is the initial Agreement Steward. IBM may assign the responsibility to serve +as the Agreement Steward to a suitable separate entity. Each new version of the +Agreement will be given a distinguishing version number. The Program (including +Contributions) may always be distributed subject to the version of the Agreement +under which it was received. In addition, after a new version of the Agreement +is published, Contributor may elect to distribute the Program (including its +Contributions) under the new version. Except as expressly stated in Sections +2(a) and 2(b) above, Recipient receives no rights or licenses to the +intellectual property of any Contributor under this Agreement, whether +expressly, by implication, estoppel or otherwise. All rights in the Program not +expressly granted under this Agreement are reserved. + +This Agreement is governed by the laws of the State of New York and the +intellectual property laws of the United States of America. No party to this +Agreement will bring a legal action under this Agreement more than one year +after the cause of action arose. Each party waives its rights to a jury trial in +any resulting litigation.