diff --git a/Source/Core/Builder.csproj b/Source/Core/Builder.csproj index 7fa9f4e5..436d817a 100644 --- a/Source/Core/Builder.csproj +++ b/Source/Core/Builder.csproj @@ -739,6 +739,7 @@ + diff --git a/Source/Plugins/CommentsPanel/BuilderPlug.cs b/Source/Plugins/CommentsPanel/BuilderPlug.cs new file mode 100644 index 00000000..71b91a4d --- /dev/null +++ b/Source/Plugins/CommentsPanel/BuilderPlug.cs @@ -0,0 +1,79 @@ + +#region ================== Copyright (c) 2010 Pascal vd Heiden + +/* + * Copyright (c) 2010 Pascal vd Heiden + * This program is released under GNU General Public License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#endregion + +#region ================== Namespaces + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Globalization; +using System.Text; +using System.Windows.Forms; +using System.IO; +using System.Reflection; +using CodeImp.DoomBuilder.Windows; +using CodeImp.DoomBuilder.IO; +using CodeImp.DoomBuilder.Map; +using CodeImp.DoomBuilder.Rendering; +using CodeImp.DoomBuilder.Geometry; +using System.Drawing; +using CodeImp.DoomBuilder.Editing; +using CodeImp.DoomBuilder.Plugins; +using CodeImp.DoomBuilder.Actions; +using CodeImp.DoomBuilder.Types; +using CodeImp.DoomBuilder.Config; +using CodeImp.DoomBuilder.Data; + +#endregion + +namespace CodeImp.DoomBuilder.CopyPasteSectorProps +{ + // + // MANDATORY: The plug! + // This is an important class to the Doom Builder core. Every plugin must + // have exactly 1 class that inherits from Plug. When the plugin is loaded, + // this class is instantiated and used to receive events from the core. + // Make sure the class is public, because only public classes can be seen + // by the core. + // + + public class BuilderPlug : Plug + { + // Static instance. We can't use a real static class, because BuilderPlug must + // be instantiated by the core, so we keep a static reference. (this technique + // should be familiar to object-oriented programmers) + private static BuilderPlug me; + + // Static property to access the BuilderPlug + public static BuilderPlug Me { get { return me; } } + + // This event is called when the plugin is initialized + public override void OnInitialize() + { + base.OnInitialize(); + + // Keep a static reference + me = this; + } + + // This is called when the plugin is terminated + public override void Dispose() + { + base.Dispose(); + } + } +} diff --git a/Source/Plugins/CommentsPanel/CommentsDocker.Designer.cs b/Source/Plugins/CommentsPanel/CommentsDocker.Designer.cs new file mode 100644 index 00000000..32f8c001 --- /dev/null +++ b/Source/Plugins/CommentsPanel/CommentsDocker.Designer.cs @@ -0,0 +1,153 @@ +namespace CodeImp.DoomBuilder.CommentsPanel +{ + partial class CommentsDocker + { + /// + /// 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 Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + this.optionsgroup = new System.Windows.Forms.GroupBox(); + this.filtermode = new System.Windows.Forms.CheckBox(); + this.grid = new System.Windows.Forms.DataGridView(); + this.iconcolumn = new System.Windows.Forms.DataGridViewImageColumn(); + this.textcolumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.groupcomments = new System.Windows.Forms.CheckBox(); + this.optionsgroup.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.grid)).BeginInit(); + this.SuspendLayout(); + // + // optionsgroup + // + this.optionsgroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.optionsgroup.Controls.Add(this.groupcomments); + this.optionsgroup.Controls.Add(this.filtermode); + this.optionsgroup.Location = new System.Drawing.Point(3, 551); + this.optionsgroup.Name = "optionsgroup"; + this.optionsgroup.Size = new System.Drawing.Size(244, 103); + this.optionsgroup.TabIndex = 1; + this.optionsgroup.TabStop = false; + this.optionsgroup.Text = " Options "; + // + // filtermode + // + this.filtermode.AutoSize = true; + this.filtermode.Location = new System.Drawing.Point(15, 29); + this.filtermode.Name = "filtermode"; + this.filtermode.Size = new System.Drawing.Size(169, 17); + this.filtermode.TabIndex = 0; + this.filtermode.Text = "Only comments from this mode"; + this.filtermode.UseVisualStyleBackColor = true; + // + // grid + // + this.grid.AllowUserToAddRows = false; + this.grid.AllowUserToDeleteRows = false; + this.grid.AllowUserToResizeColumns = false; + this.grid.AllowUserToResizeRows = false; + this.grid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.grid.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.grid.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells; + this.grid.BackgroundColor = System.Drawing.SystemColors.Window; + this.grid.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.grid.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.grid.ClipboardCopyMode = System.Windows.Forms.DataGridViewClipboardCopyMode.EnableWithoutHeaderText; + this.grid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.grid.ColumnHeadersVisible = false; + this.grid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.iconcolumn, + this.textcolumn}); + this.grid.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; + this.grid.Location = new System.Drawing.Point(0, 0); + this.grid.Name = "grid"; + this.grid.ReadOnly = true; + this.grid.RowHeadersVisible = false; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft; + dataGridViewCellStyle1.Padding = new System.Windows.Forms.Padding(2, 4, 2, 5); + this.grid.RowsDefaultCellStyle = dataGridViewCellStyle1; + this.grid.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.grid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.grid.ShowCellErrors = false; + this.grid.ShowCellToolTips = false; + this.grid.ShowEditingIcon = false; + this.grid.ShowRowErrors = false; + this.grid.Size = new System.Drawing.Size(250, 545); + this.grid.StandardTab = true; + this.grid.TabIndex = 6; + // + // iconcolumn + // + this.iconcolumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.iconcolumn.HeaderText = "Icon"; + this.iconcolumn.MinimumWidth = 20; + this.iconcolumn.Name = "iconcolumn"; + this.iconcolumn.ReadOnly = true; + this.iconcolumn.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.iconcolumn.Width = 24; + // + // textcolumn + // + this.textcolumn.HeaderText = "Text"; + this.textcolumn.Name = "textcolumn"; + this.textcolumn.ReadOnly = true; + // + // groupcomments + // + this.groupcomments.AutoSize = true; + this.groupcomments.Location = new System.Drawing.Point(15, 61); + this.groupcomments.Name = "groupcomments"; + this.groupcomments.Size = new System.Drawing.Size(176, 17); + this.groupcomments.TabIndex = 1; + this.groupcomments.Text = "Group same comments together"; + this.groupcomments.UseVisualStyleBackColor = true; + // + // CommentsDocker + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.grid); + this.Controls.Add(this.optionsgroup); + this.Name = "CommentsDocker"; + this.Size = new System.Drawing.Size(250, 657); + this.optionsgroup.ResumeLayout(false); + this.optionsgroup.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.grid)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.GroupBox optionsgroup; + private System.Windows.Forms.CheckBox filtermode; + private System.Windows.Forms.DataGridView grid; + private System.Windows.Forms.DataGridViewImageColumn iconcolumn; + private System.Windows.Forms.DataGridViewTextBoxColumn textcolumn; + private System.Windows.Forms.CheckBox groupcomments; + } +} diff --git a/Source/Plugins/CommentsPanel/CommentsDocker.cs b/Source/Plugins/CommentsPanel/CommentsDocker.cs new file mode 100644 index 00000000..97c9cd4f --- /dev/null +++ b/Source/Plugins/CommentsPanel/CommentsDocker.cs @@ -0,0 +1,52 @@ +#region ================== Copyright (c) 2010 Pascal vd Heiden + +/* + * Copyright (c) 2010 Pascal vd Heiden, www.codeimp.com + * This program is released under GNU General Public License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#endregion + +#region ================== Namespaces + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using Microsoft.Win32; +using CodeImp.DoomBuilder.Actions; +using CodeImp.DoomBuilder.Data; +using CodeImp.DoomBuilder.Config; +using CodeImp.DoomBuilder.Map; +using CodeImp.DoomBuilder.Controls; +using CodeImp.DoomBuilder.Windows; +using System.Reflection; +using System.Globalization; +using System.Threading; +using CodeImp.DoomBuilder.Editing; + +#endregion + +namespace CodeImp.DoomBuilder.CommentsPanel +{ + public partial class CommentsDocker : UserControl + { + #region ================== Constructor + + // Constructor + public CommentsDocker() + { + InitializeComponent(); + } + + #endregion + } +} diff --git a/Source/Plugins/CommentsPanel/CommentsDocker.resx b/Source/Plugins/CommentsPanel/CommentsDocker.resx new file mode 100644 index 00000000..ebe56530 --- /dev/null +++ b/Source/Plugins/CommentsPanel/CommentsDocker.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + True + + + True + + \ No newline at end of file diff --git a/Source/Plugins/CommentsPanel/CommentsPanel.csproj b/Source/Plugins/CommentsPanel/CommentsPanel.csproj new file mode 100644 index 00000000..cb5464ad --- /dev/null +++ b/Source/Plugins/CommentsPanel/CommentsPanel.csproj @@ -0,0 +1,66 @@ + + + Debug + AnyCPU + 8.0.50727 + 2.0 + {58BD8A5B-1B48-435D-8473-A92F27D06C49} + Library + Properties + CodeImp.DoomBuilder.CommentsPanel + CommentsPanel + + + true + full + false + ..\..\..\Build\Plugins\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\..\..\Build\Plugins\ + + + prompt + 4 + + + + + + + + + + UserControl + + + CommentsDocker.cs + + + + + + {818B3D10-F791-4C3F-9AF5-BB2D0079B63C} + Builder + + + + + Designer + CommentsDocker.cs + + + + + \ No newline at end of file diff --git a/Source/Plugins/CommentsPanel/Properties/AssemblyInfo.cs b/Source/Plugins/CommentsPanel/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..6264acef --- /dev/null +++ b/Source/Plugins/CommentsPanel/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("Comments Panel")] +[assembly: AssemblyDescription("UDMF Comments Panel plugin")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Comments Panel")] +[assembly: AssemblyCopyright("Copyright © 2010")] +[assembly: AssemblyTrademark("CodeImp")] +[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("5da63d9a-d79a-4193-bcdf-1b38773a08ee")] + +// 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.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")]