diff --git a/Source/Core/Builder.csproj b/Source/Core/Builder.csproj index cb82b753..df8602ee 100644 --- a/Source/Core/Builder.csproj +++ b/Source/Core/Builder.csproj @@ -663,6 +663,12 @@ + + UserControl + + + DockersControl.cs + UserControl @@ -731,6 +737,10 @@ + + Designer + DockersControl.cs + Designer PasteOptionsControl.cs @@ -902,4 +912,4 @@ - \ No newline at end of file + diff --git a/Source/Core/Config/ProgramConfiguration.cs b/Source/Core/Config/ProgramConfiguration.cs index e9ee7544..f12dcbc9 100644 --- a/Source/Core/Config/ProgramConfiguration.cs +++ b/Source/Core/Config/ProgramConfiguration.cs @@ -79,6 +79,7 @@ namespace CodeImp.DoomBuilder.Config private bool animatevisualselection; private int previousversion; private PasteOptions pasteoptions; + private int dockersposition; // These are not stored in the configuration, only used at runtime private string defaulttexture; @@ -127,6 +128,7 @@ namespace CodeImp.DoomBuilder.Config public bool ScriptAutoIndent { get { return scriptautoindent; } internal set { scriptautoindent = value; } } internal int PreviousVersion { get { return previousversion; } } internal PasteOptions PasteOptions { get { return pasteoptions; } set { pasteoptions = value; } } + internal int DockersPosition { get { return dockersposition; } set { dockersposition = value; } } public string DefaultTexture { get { return defaulttexture; } set { defaulttexture = value; } } public string DefaultFloorTexture { get { return defaultfloortexture; } set { defaultfloortexture = value; } } @@ -191,6 +193,7 @@ namespace CodeImp.DoomBuilder.Config showerrorswindow = cfg.ReadSetting("showerrorswindow", true); animatevisualselection = cfg.ReadSetting("animatevisualselection", true); previousversion = cfg.ReadSetting("currentversion", 0); + dockersposition = cfg.ReadSetting("dockersposition", 1); pasteoptions.ReadConfiguration(cfg, "pasteoptions"); // Success @@ -238,6 +241,7 @@ namespace CodeImp.DoomBuilder.Config cfg.WriteSetting("showerrorswindow", showerrorswindow); cfg.WriteSetting("animatevisualselection", animatevisualselection); cfg.WriteSetting("currentversion", v.Major * 1000000 + v.Revision); + cfg.WriteSetting("dockersposition", dockersposition); pasteoptions.WriteConfiguration(cfg, "pasteoptions"); // Save settings configuration diff --git a/Source/Core/Controls/DockersControl.Designer.cs b/Source/Core/Controls/DockersControl.Designer.cs new file mode 100644 index 00000000..2216069c --- /dev/null +++ b/Source/Core/Controls/DockersControl.Designer.cs @@ -0,0 +1,48 @@ +namespace CodeImp.DoomBuilder.Controls +{ + partial class DockersControl + { + /// + /// 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() + { + this.SuspendLayout(); + // + // DockersControl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; + this.BackColor = System.Drawing.SystemColors.Control; + this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Name = "DockersControl"; + this.Size = new System.Drawing.Size(418, 364); + this.ResumeLayout(false); + + } + + #endregion + + } +} diff --git a/Source/Core/Controls/DockersControl.cs b/Source/Core/Controls/DockersControl.cs new file mode 100644 index 00000000..9a36e850 --- /dev/null +++ b/Source/Core/Controls/DockersControl.cs @@ -0,0 +1,99 @@ + +#region ================== Copyright (c) 2007 Pascal vd Heiden + +/* + * Copyright (c) 2007 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 System.Diagnostics; +using CodeImp.DoomBuilder.Actions; +using CodeImp.DoomBuilder.Data; +using CodeImp.DoomBuilder.Config; +using CodeImp.DoomBuilder.Rendering; +using SlimDX.Direct3D9; +using System.Drawing.Imaging; +using System.Drawing.Drawing2D; +using CodeImp.DoomBuilder.Map; +using System.Globalization; +using System.Windows.Forms.VisualStyles; +using System.Collections.Specialized; + +#endregion + +namespace CodeImp.DoomBuilder.Controls +{ + public partial class DockersControl : UserControl + { + #region ================== Constants + + private const int TAB_ITEM_LENGTH = 150; + private const int TAB_ITEM_SPACING = 6; + private const int TAB_ITEM_HEIGHT = 26; + + public enum DockerOrientation + { + Left, + Right + }; + + #endregion + + #region ================== Variables + + private DockerOrientation orientation; + + #endregion + + #region ================== Properties + + public DockerOrientation Orientation { get { return orientation; } set { orientation = value; } } + + #endregion + + #region ================== Constructor + + // Constructor + public DockersControl() + { + InitializeComponent(); + } + + #endregion + + #region ================== Methods + + #endregion + + #region ================== Events + + // Draw the tabs + protected override void OnPaint(PaintEventArgs e) + { + base.OnPaint(e); + + VisualStyleRenderer tabdrawer = new VisualStyleRenderer(VisualStyleElement.Tab.TabItem.Pressed); + tabdrawer.DrawBackground(e.Graphics, new Rectangle(0, 0, 150, 26)); + + } + + #endregion + } +} diff --git a/Source/Core/Controls/DockersControl.resx b/Source/Core/Controls/DockersControl.resx new file mode 100644 index 00000000..ff31a6db --- /dev/null +++ b/Source/Core/Controls/DockersControl.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file