diff --git a/Builder.sln b/Builder.sln index fc0ee868..3bddec51 100644 --- a/Builder.sln +++ b/Builder.sln @@ -9,8 +9,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Statistics", "Source\Plugin EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CopyPasteSectorProperties", "Source\Plugins\CopyPasteSectorProps\CopyPasteSectorProperties.csproj", "{A5F93B70-18D9-4F3C-9B72-BC8B5B13998E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MassUndoRedo", "Source\Plugins\MassUndoRedo\MassUndoRedo.csproj", "{2D55F377-4582-4F86-B751-5E6876EB0003}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x86 = Debug|x86 @@ -29,10 +27,6 @@ Global {FBC0A503-9152-4BE2-9B5C-128FFD0B0D3F}.Release|x86.ActiveCfg = Release|x86 {A5F93B70-18D9-4F3C-9B72-BC8B5B13998E}.Debug|x86.ActiveCfg = Debug|x86 {A5F93B70-18D9-4F3C-9B72-BC8B5B13998E}.Release|x86.ActiveCfg = Release|x86 - {2D55F377-4582-4F86-B751-5E6876EB0003}.Debug|x86.ActiveCfg = Debug|x86 - {2D55F377-4582-4F86-B751-5E6876EB0003}.Debug|x86.Build.0 = Debug|x86 - {2D55F377-4582-4F86-B751-5E6876EB0003}.Release|x86.ActiveCfg = Release|x86 - {2D55F377-4582-4F86-B751-5E6876EB0003}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Source/Plugins/MassUndoRedo/Actions.cfg b/Source/Plugins/MassUndoRedo/Actions.cfg deleted file mode 100644 index eb55c0f8..00000000 --- a/Source/Plugins/MassUndoRedo/Actions.cfg +++ /dev/null @@ -1,32 +0,0 @@ - -// -// This file defines which actions there are, what description they have and -// some behaviour options. The Doom Builder core will bind to these actions -// with delegates (function pointers) where you use the BeginAction and -// EndAction attributes. This file must be named Actions.cfg and must be -// included in the plugin project as "Embedded Resource". -// - -// -// Options: -// -// allowkeys: Allows the user to bind standard keys to this action. -// allowmouse: Allows the user to bind mouse buttons to this action. -// allowscroll: Allows the user to bind the scrollwheel to this action. -// disregardshift: This action will trigger regardless if Shift or Control is used. -// repeat: BeginAction will be called for automatic key repetition. -// default: Default key is only used when the action is loaded for the first -// time and the default key is not used by any other action. -// -// allowkeys and allowmouse are true by default, the others are false by default. -// - -showundoredowindow -{ - title = "Show Undo/Redo Levels"; - category = "edit"; - description = "Shows the Undo/Redo levels and allows you to jump instantly to any level."; - allowkeys = true; - allowmouse = true; - allowscroll = true; -} diff --git a/Source/Plugins/MassUndoRedo/BuilderPlug.cs b/Source/Plugins/MassUndoRedo/BuilderPlug.cs deleted file mode 100644 index 3bf7f7f9..00000000 --- a/Source/Plugins/MassUndoRedo/BuilderPlug.cs +++ /dev/null @@ -1,100 +0,0 @@ - -#region ================== Copyright (c) 2009 Pascal vd Heiden - -/* - * Copyright (c) 2009 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; -using System.Collections.Generic; -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 CodeImp.DoomBuilder.Editing; -using CodeImp.DoomBuilder.Plugins; -using CodeImp.DoomBuilder.Types; -using CodeImp.DoomBuilder.Config; -using CodeImp.DoomBuilder.Data; -using CodeImp.DoomBuilder.Actions; - -#endregion - -namespace CodeImp.DoomBuilder.MassUndoRedo -{ - public class BuilderPlug : Plug - { - #region ================== Variables - - private static BuilderPlug me; - - #endregion - - #region ================== Properties - - public static BuilderPlug Me { get { return me; } } - public override string Name { get { return "Mass Undo/Redo Plugin"; } } - - #endregion - - #region ================== Initialize / Dispose - - // This event is called when the plugin is initialized - public override void OnInitialize() - { - base.OnInitialize(); - - // Keep a static reference - me = this; - - // Bind action methods - General.Actions.BindMethods(this); - } - - // This is called when the plugin is terminated - public override void Dispose() - { - // Unbind action methods - General.Actions.UnbindMethods(this); - - base.Dispose(); - } - - #endregion - - #region ================== Events - - #endregion - - #region ================== Actions - - [BeginAction("showundoredowindow")] - public void ShowUndoRedoWindow() - { - UndoRedoForm form = new UndoRedoForm(); - form.Setup((Form)General.Interface); - form.ShowDialog(General.Interface); - form.Dispose(); - } - - #endregion - } -} diff --git a/Source/Plugins/MassUndoRedo/MassUndoRedo.csproj b/Source/Plugins/MassUndoRedo/MassUndoRedo.csproj deleted file mode 100644 index 5120100f..00000000 --- a/Source/Plugins/MassUndoRedo/MassUndoRedo.csproj +++ /dev/null @@ -1,89 +0,0 @@ - - - - Debug - AnyCPU - 8.0.50727 - 2.0 - {2D55F377-4582-4F86-B751-5E6876EB0003} - Library - Properties - CodeImp.DoomBuilder.MassUndoRedo - MassUndoRedo - v3.5 - 512 - - - true - ..\..\..\Build\Plugins\ - DEBUG;TRACE - true - full - x86 - false - prompt - - - ..\..\..\Build\Plugins\ - true - true - pdbonly - x86 - false - prompt - - - - - 3.5 - - - - - - - - - True - True - Resources.resx - - - Form - - - UndoRedoForm.cs - - - - - {818B3D10-F791-4C3F-9AF5-BB2D0079B63C} - Builder - - - - - Designer - UndoRedoForm.cs - - - - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - - - - - - \ No newline at end of file diff --git a/Source/Plugins/MassUndoRedo/Properties/AssemblyInfo.cs b/Source/Plugins/MassUndoRedo/Properties/AssemblyInfo.cs deleted file mode 100644 index 9144567e..00000000 --- a/Source/Plugins/MassUndoRedo/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -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("MassUndoRedo")] -[assembly: AssemblyDescription("Doom Builder Mass Undo/Redo")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("CodeImp")] -[assembly: AssemblyProduct("Doom Builder 2")] -[assembly: AssemblyCopyright("Copyright © 2009")] -[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("f424d9b8-b289-4027-b694-df98abe6eb06")] - -// 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 Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Source/Plugins/MassUndoRedo/Properties/Resources.Designer.cs b/Source/Plugins/MassUndoRedo/Properties/Resources.Designer.cs deleted file mode 100644 index dfaf8a1c..00000000 --- a/Source/Plugins/MassUndoRedo/Properties/Resources.Designer.cs +++ /dev/null @@ -1,70 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.3082 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace CodeImp.DoomBuilder.MassUndoRedo.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", "2.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("CodeImp.DoomBuilder.MassUndoRedo.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 Pushpin { - get { - object obj = ResourceManager.GetObject("Pushpin", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - } -} diff --git a/Source/Plugins/MassUndoRedo/Properties/Resources.resx b/Source/Plugins/MassUndoRedo/Properties/Resources.resx deleted file mode 100644 index eeced7f0..00000000 --- a/Source/Plugins/MassUndoRedo/Properties/Resources.resx +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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\Pushpin.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - \ No newline at end of file diff --git a/Source/Plugins/MassUndoRedo/Resources/Pushpin.png b/Source/Plugins/MassUndoRedo/Resources/Pushpin.png deleted file mode 100644 index a4e0ac27..00000000 Binary files a/Source/Plugins/MassUndoRedo/Resources/Pushpin.png and /dev/null differ diff --git a/Source/Plugins/MassUndoRedo/UndoRedoForm.Designer.cs b/Source/Plugins/MassUndoRedo/UndoRedoForm.Designer.cs deleted file mode 100644 index e6093612..00000000 --- a/Source/Plugins/MassUndoRedo/UndoRedoForm.Designer.cs +++ /dev/null @@ -1,98 +0,0 @@ -namespace CodeImp.DoomBuilder.MassUndoRedo -{ - partial class UndoRedoForm - { - /// - /// 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.list = new System.Windows.Forms.ListView(); - this.coldescription = new System.Windows.Forms.ColumnHeader(); - this.pinned = new System.Windows.Forms.CheckBox(); - this.SuspendLayout(); - // - // list - // - this.list.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.list.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.coldescription}); - this.list.FullRowSelect = true; - this.list.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; - this.list.HideSelection = false; - this.list.Location = new System.Drawing.Point(12, 14); - this.list.MultiSelect = false; - this.list.Name = "list"; - this.list.ShowGroups = false; - this.list.Size = new System.Drawing.Size(267, 579); - this.list.TabIndex = 0; - this.list.UseCompatibleStateImageBehavior = false; - this.list.View = System.Windows.Forms.View.Details; - this.list.SelectedIndexChanged += new System.EventHandler(this.list_SelectedIndexChanged); - this.list.MouseUp += new System.Windows.Forms.MouseEventHandler(this.list_MouseUp); - this.list.KeyUp += new System.Windows.Forms.KeyEventHandler(this.list_KeyUp); - // - // coldescription - // - this.coldescription.Text = "Description"; - this.coldescription.Width = 238; - // - // pinned - // - this.pinned.Appearance = System.Windows.Forms.Appearance.Button; - this.pinned.Image = global::CodeImp.DoomBuilder.MassUndoRedo.Properties.Resources.Pushpin; - this.pinned.Location = new System.Drawing.Point(285, 14); - this.pinned.Name = "pinned"; - this.pinned.Size = new System.Drawing.Size(30, 30); - this.pinned.TabIndex = 2; - this.pinned.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; - this.pinned.UseVisualStyleBackColor = true; - // - // UndoRedoForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.ClientSize = new System.Drawing.Size(325, 605); - this.Controls.Add(this.pinned); - this.Controls.Add(this.list); - this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "UndoRedoForm"; - this.Opacity = 0; - this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; - this.Text = "UndoRedoForm"; - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.ListView list; - private System.Windows.Forms.ColumnHeader coldescription; - private System.Windows.Forms.CheckBox pinned; - } -} \ No newline at end of file diff --git a/Source/Plugins/MassUndoRedo/UndoRedoForm.cs b/Source/Plugins/MassUndoRedo/UndoRedoForm.cs deleted file mode 100644 index e07487d5..00000000 --- a/Source/Plugins/MassUndoRedo/UndoRedoForm.cs +++ /dev/null @@ -1,177 +0,0 @@ - -#region ================== Copyright (c) 2009 Pascal vd Heiden - -/* - * Copyright (c) 2009 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.Linq; -using System.Text; -using System.Windows.Forms; -using CodeImp.DoomBuilder.Windows; -using CodeImp.DoomBuilder.Editing; - -#endregion - -namespace CodeImp.DoomBuilder.MassUndoRedo -{ - public partial class UndoRedoForm : DelayedForm - { - #region ================== Variables - - private bool ignoreevents; - private int currentselection; - private bool ignorefirstevent; - - #endregion - - #region ================== Constructor - - // Constructor - public UndoRedoForm() - { - InitializeComponent(); - ignorefirstevent = true; - } - - #endregion - - #region ================== Methods - - // This sets up the form for display - public void Setup(Form owner) - { - List levels; - - ignoreevents = true; - - // Position window on the left side of the main window - SizeF scalefactor = new SizeF(owner.CurrentAutoScaleDimensions.Width / owner.AutoScaleDimensions.Width, - owner.CurrentAutoScaleDimensions.Height / owner.AutoScaleDimensions.Height); - int topoffset = SystemInformation.CaptionHeight + (int)(80 * scalefactor.Height); - this.Location = new Point(owner.Location.X + (int)(20 * scalefactor.Width), owner.Location.Y + topoffset); - this.Height = owner.Height - (topoffset + (int)(50 * scalefactor.Height)); - - // Reset the list - list.Items.Clear(); - list.Items.Add("Begin"); - - // Add undo levels - levels = General.Map.UndoRedo.GetUndoList(); - levels.Reverse(); - foreach(UndoSnapshot u in levels) - { - ListViewItem item = list.Items.Add(u.Description); - } - - // Select the last undo level: that's where we currently are at. - list.Items[list.Items.Count - 1].Selected = true; - currentselection = list.Items.Count - 1; - - // Add redo levels - levels = General.Map.UndoRedo.GetRedoList(); - foreach(UndoSnapshot r in levels) - { - ListViewItem item = list.Items.Add(r.Description); - item.ForeColor = SystemColors.GrayText; - item.BackColor = SystemColors.Control; - } - - ignoreevents = false; - } - - #endregion - - #region ================== Events - - // Item selected - private void list_SelectedIndexChanged(object sender, EventArgs e) - { - if(ignoreevents) return; - if(ignorefirstevent) - { - ignorefirstevent = false; - return; - } - - ignoreevents = true; - - // We must have something selected - if(list.SelectedIndices.Count > 0) - { - // Not the same as last selected? - int selectedindex = list.SelectedIndices[0]; - if(selectedindex != currentselection) - { - // Perform the undo/redos - int delta = currentselection - selectedindex; - if(delta < 0) - General.Map.UndoRedo.PerformRedo(-delta); - else - General.Map.UndoRedo.PerformUndo(delta); - - // Update list - list.BeginUpdate(); - foreach(ListViewItem item in list.Items) - { - if(item.Index <= selectedindex) - { - item.ForeColor = SystemColors.WindowText; - item.BackColor = SystemColors.Window; - } - else - { - item.ForeColor = SystemColors.GrayText; - item.BackColor = SystemColors.Control; - } - } - list.EndUpdate(); - currentselection = selectedindex; - } - } - - ignoreevents = false; - } - - // Mouse released - private void list_MouseUp(object sender, MouseEventArgs e) - { - ignoreevents = true; - - // If selection was removed, then keep the last selected - if(list.SelectedIndices.Count == 0) - list.Items[currentselection].Selected = true; - - ignoreevents = false; - } - - // Key released - private void list_KeyUp(object sender, KeyEventArgs e) - { - ignoreevents = true; - - // If selection was removed, then keep the last selected - if(list.SelectedIndices.Count == 0) - list.Items[currentselection].Selected = true; - - ignoreevents = false; - } - - #endregion - } -} \ No newline at end of file diff --git a/Source/Plugins/MassUndoRedo/UndoRedoForm.resx b/Source/Plugins/MassUndoRedo/UndoRedoForm.resx deleted file mode 100644 index a8113848..00000000 --- a/Source/Plugins/MassUndoRedo/UndoRedoForm.resx +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - - True - - \ No newline at end of file