This commit is contained in:
codeimp 2007-09-29 15:43:59 +00:00
parent 5a9da91bcb
commit d284a2cd5e
15 changed files with 791 additions and 240 deletions

View file

@ -9,6 +9,7 @@ shortcuts
newmap = 131150;
zoomin = 65530;
zoomout = 65531;
configuration = 116;
}
@ -195,11 +196,38 @@ configurations
legacy
{
nodebuilder = "";
nodebuilder = "glBSP.cfg";
buildonsave = true;
resources
{
resource0
{
type = 1;
location = "E:\\Projects\\Builder\\Package";
textures = true;
flats = true;
}
resource1
{
type = 0;
location = "F:\\Doom\\csDoom\\Doom2.wad";
textures = false;
flats = false;
}
resource2
{
type = 0;
location = "F:\\Doom\\csDoom\\Doom.wad";
textures = false;
flats = false;
}
}
testprogram = "";
@ -209,15 +237,33 @@ configurations
doom2
{
nodebuilder = "";
buildonsave = true;
nodebuilder = "ZenNode.cfg";
buildonsave = false;
resources
{
resource0
{
type = 0;
location = "F:\\Doom\\csDoom\\csdoom.wad";
textures = false;
flats = false;
}
resource1
{
type = 0;
location = "F:\\Doom\\csDoom\\Doom2.wad";
textures = false;
flats = false;
}
}
testprogram = "";
testparameters = "";
testparameters = "-map MAP01";
}

View file

@ -43,12 +43,14 @@ namespace CodeImp.DoomBuilder.Controls
public const string SCROLLEAST = "scrolleast";
public const string ZOOMIN = "zoomin";
public const string ZOOMOUT = "zoomout";
public const string CONFIGURATION = "configuration";
#endregion
#region ================== Variables
// Description
private string name;
private string title;
private string description;
@ -67,6 +69,7 @@ namespace CodeImp.DoomBuilder.Controls
#region ================== Properties
public string Name { get { return name; } }
public string Title { get { return title; } }
public string Description { get { return description; } }
public int ShortcutKey { get { return key; } }
@ -79,10 +82,11 @@ namespace CodeImp.DoomBuilder.Controls
#region ================== Constructor / Disposer
// Constructor
public Action(string title, string description, int key,
public Action(string name, string title, string description, int key,
bool allowkeys, bool allowmouse, bool allowscroll)
{
// Initialize
this.name = name;
this.title = title;
this.description = description;
this.delegates = new List<ActionDelegate>();

View file

@ -120,7 +120,7 @@ namespace CodeImp.DoomBuilder.Controls
ascroll = cfg.ReadSetting(name + ".allowscroll", false);
// Create an action
actions.Add(name, new Action(title, desc, key, akeys, amouse, ascroll));
actions.Add(name, new Action(name, title, desc, key, akeys, amouse, ascroll));
}
}
@ -130,6 +130,14 @@ namespace CodeImp.DoomBuilder.Controls
return actions.ContainsKey(action);
}
// This returns a list of all actions
public Action[] GetAllActions()
{
Action[] list = new Action[actions.Count];
actions.Values.CopyTo(list, 0);
return list;
}
#endregion
#region ================== Shortcut Keys

View file

@ -48,11 +48,11 @@ namespace CodeImp.DoomBuilder
public string Name { get { return name; } }
public string Filename { get { return filename; } }
public string Nodebuilder { get { return nodebuilder; } }
public bool BuildOnSave { get { return buildonsave; } }
public string Nodebuilder { get { return nodebuilder; } set { nodebuilder = value; } }
public bool BuildOnSave { get { return buildonsave; } set { buildonsave = value; } }
public ResourceLocationList Resources { get { return resources; } }
public string TestProgram { get { return testprogram; } }
public string TestParameters { get { return testparameters; } }
public string TestProgram { get { return testprogram; } set { testprogram = value; } }
public string TestParameters { get { return testparameters; } set { testparameters = value; } }
#endregion

View file

@ -257,7 +257,7 @@ namespace CodeImp.DoomBuilder
else
{
// Make nodebuilder info
nodebuilders.Add(new NodebuilderInfo(cfg));
nodebuilders.Add(new NodebuilderInfo(cfg, filepath));
}
}
catch(Exception)

View file

@ -39,6 +39,7 @@ namespace CodeImp.DoomBuilder
#region ================== Variables
private string name;
private string filename;
private ProcessStartInfo savemapprocess;
private ProcessStartInfo testmapprocess;
private ProcessStartInfo mode3dbuildprocess;
@ -48,6 +49,7 @@ namespace CodeImp.DoomBuilder
#region ================== Properties
public string Name { get { return name; } }
public string Filename { get { return filename; } }
public ProcessStartInfo SaveMapProcess { get { return savemapprocess; } }
public ProcessStartInfo TestMapProcess { get { return testmapprocess; } }
public ProcessStartInfo Mode3DBuildProcess { get { return mode3dbuildprocess; } }
@ -57,9 +59,10 @@ namespace CodeImp.DoomBuilder
#region ================== Constructor / Disposer
// Constructor
public NodebuilderInfo(Configuration cfg)
public NodebuilderInfo(Configuration cfg, string filename)
{
// Initialize
this.filename = Path.GetFileName(filename);
this.name = cfg.ReadSetting("title", "");
// Setup save map process

View file

@ -35,10 +35,10 @@ namespace CodeImp.DoomBuilder.Images
res = new ResourceLocation();
// Copy information from Configuration to ResourceLocation
if(resinfo.Contains("type") && (resinfo["type"] is int)) res.type = (int)resinfo["type"];
if(resinfo.Contains("location") && (resinfo["location"] is string)) res.location = (string)resinfo["location"];
if(resinfo.Contains("textures") && (resinfo["textures"] is bool)) res.textures = (bool)resinfo["textures"];
if(resinfo.Contains("flats") && (resinfo["flats"] is bool)) res.flats = (bool)resinfo["flats"];
if(rlinfo.Contains("type") && (rlinfo["type"] is int)) res.type = (int)rlinfo["type"];
if(rlinfo.Contains("location") && (rlinfo["location"] is string)) res.location = (string)rlinfo["location"];
if(rlinfo.Contains("textures") && (rlinfo["textures"] is bool)) res.textures = (bool)rlinfo["textures"];
if(rlinfo.Contains("flats") && (rlinfo["flats"] is bool)) res.flats = (bool)rlinfo["flats"];
// Add resource
Add(res);

View file

@ -28,63 +28,54 @@ namespace CodeImp.DoomBuilder.Interface
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.GroupBox groupBox1;
System.Windows.Forms.Label label2;
System.Windows.Forms.Label label3;
System.Windows.Forms.GroupBox groupBox2;
System.Windows.Forms.Label label4;
System.Windows.Forms.Label label1;
System.Windows.Forms.Label label6;
System.Windows.Forms.Label label7;
System.Windows.Forms.Label label5;
this.panelnodebuilder = new System.Windows.Forms.GroupBox();
this.configbuildonsave = new System.Windows.Forms.CheckBox();
this.confignodebuilder = new System.Windows.Forms.ComboBox();
this.textBox1 = new System.Windows.Forms.TextBox();
this.paneltesting = new System.Windows.Forms.GroupBox();
this.testparameters = new System.Windows.Forms.TextBox();
this.browsewad = new System.Windows.Forms.Button();
this.wadlocation = new System.Windows.Forms.TextBox();
this.testapplication = new System.Windows.Forms.TextBox();
this.tabs = new System.Windows.Forms.TabControl();
this.tabinterface = new System.Windows.Forms.TabPage();
this.tabediting = new System.Windows.Forms.TabPage();
this.tabkeys = new System.Windows.Forms.TabPage();
this.listactions = new System.Windows.Forms.ListView();
this.columncontrolaction = new System.Windows.Forms.ColumnHeader();
this.columncontrolkey = new System.Windows.Forms.ColumnHeader();
this.actioncontrolpanel = new System.Windows.Forms.GroupBox();
this.actioncontrol = new System.Windows.Forms.ComboBox();
this.actiontitle = new System.Windows.Forms.Label();
this.actioncontrolclear = new System.Windows.Forms.Button();
this.actionkey = new System.Windows.Forms.TextBox();
this.actiondescription = new System.Windows.Forms.Label();
this.tabconfigs = new System.Windows.Forms.TabPage();
this.panelres = new System.Windows.Forms.GroupBox();
this.resourcelocations = new CodeImp.DoomBuilder.Interface.ResourceListEditor();
this.panelresources = new System.Windows.Forms.GroupBox();
this.configresources = new CodeImp.DoomBuilder.Interface.ResourceListEditor();
this.listconfigs = new System.Windows.Forms.ListBox();
this.cancel = new System.Windows.Forms.Button();
this.apply = new System.Windows.Forms.Button();
groupBox1 = new System.Windows.Forms.GroupBox();
label2 = new System.Windows.Forms.Label();
label3 = new System.Windows.Forms.Label();
groupBox2 = new System.Windows.Forms.GroupBox();
label4 = new System.Windows.Forms.Label();
label1 = new System.Windows.Forms.Label();
groupBox1.SuspendLayout();
groupBox2.SuspendLayout();
label6 = new System.Windows.Forms.Label();
label7 = new System.Windows.Forms.Label();
label5 = new System.Windows.Forms.Label();
this.panelnodebuilder.SuspendLayout();
this.paneltesting.SuspendLayout();
this.tabs.SuspendLayout();
this.tabkeys.SuspendLayout();
this.actioncontrolpanel.SuspendLayout();
this.tabconfigs.SuspendLayout();
this.panelres.SuspendLayout();
this.panelresources.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
//
groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
groupBox1.Controls.Add(this.configbuildonsave);
groupBox1.Controls.Add(label2);
groupBox1.Controls.Add(this.confignodebuilder);
groupBox1.Location = new System.Drawing.Point(235, 154);
groupBox1.Name = "groupBox1";
groupBox1.Size = new System.Drawing.Size(342, 97);
groupBox1.TabIndex = 2;
groupBox1.TabStop = false;
groupBox1.Text = " Nodebuilder";
//
// configbuildonsave
//
this.configbuildonsave.AutoSize = true;
this.configbuildonsave.Location = new System.Drawing.Point(49, 62);
this.configbuildonsave.Name = "configbuildonsave";
this.configbuildonsave.Size = new System.Drawing.Size(242, 18);
this.configbuildonsave.TabIndex = 4;
this.configbuildonsave.Text = "Build nodes every time when saving the map";
this.configbuildonsave.UseVisualStyleBackColor = true;
//
// label2
//
label2.AutoSize = true;
@ -94,47 +85,16 @@ namespace CodeImp.DoomBuilder.Interface
label2.TabIndex = 3;
label2.Text = "Configuration:";
//
// confignodebuilder
//
this.confignodebuilder.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.confignodebuilder.FormattingEnabled = true;
this.confignodebuilder.Location = new System.Drawing.Point(105, 28);
this.confignodebuilder.Name = "confignodebuilder";
this.confignodebuilder.Size = new System.Drawing.Size(186, 22);
this.confignodebuilder.TabIndex = 2;
//
// label3
//
label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
label3.Location = new System.Drawing.Point(14, 112);
label3.AutoSize = true;
label3.Location = new System.Drawing.Point(11, 112);
label3.Name = "label3";
label3.Size = new System.Drawing.Size(322, 22);
label3.Size = new System.Drawing.Size(312, 14);
label3.TabIndex = 17;
label3.Text = "Drag items to change order (lower items override higher items).";
//
// groupBox2
//
groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
groupBox2.Controls.Add(this.textBox1);
groupBox2.Controls.Add(label4);
groupBox2.Controls.Add(this.browsewad);
groupBox2.Controls.Add(this.wadlocation);
groupBox2.Controls.Add(label1);
groupBox2.Location = new System.Drawing.Point(235, 257);
groupBox2.Name = "groupBox2";
groupBox2.Size = new System.Drawing.Size(342, 102);
groupBox2.TabIndex = 13;
groupBox2.TabStop = false;
groupBox2.Text = " Testing ";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(94, 64);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(197, 20);
this.textBox1.TabIndex = 8;
//
// label4
//
label4.AutoSize = true;
@ -144,6 +104,106 @@ namespace CodeImp.DoomBuilder.Interface
label4.TabIndex = 7;
label4.Text = "Parameters:";
//
// label1
//
label1.AutoSize = true;
label1.Location = new System.Drawing.Point(25, 32);
label1.Name = "label1";
label1.Size = new System.Drawing.Size(63, 14);
label1.TabIndex = 4;
label1.Text = "Application:";
//
// label6
//
label6.AutoSize = true;
label6.Location = new System.Drawing.Point(20, 28);
label6.Name = "label6";
label6.Size = new System.Drawing.Size(41, 14);
label6.TabIndex = 2;
label6.Text = "Action:";
//
// label7
//
label7.AutoSize = true;
label7.Location = new System.Drawing.Point(20, 170);
label7.Name = "label7";
label7.Size = new System.Drawing.Size(187, 14);
label7.TabIndex = 7;
label7.Text = "Or select a special input control here:";
//
// label5
//
label5.AutoSize = true;
label5.Location = new System.Drawing.Point(20, 113);
label5.Name = "label5";
label5.Size = new System.Drawing.Size(200, 14);
label5.TabIndex = 4;
label5.Text = "Press the desired key combination here:";
//
// panelnodebuilder
//
this.panelnodebuilder.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panelnodebuilder.Controls.Add(this.configbuildonsave);
this.panelnodebuilder.Controls.Add(label2);
this.panelnodebuilder.Controls.Add(this.confignodebuilder);
this.panelnodebuilder.Enabled = false;
this.panelnodebuilder.Location = new System.Drawing.Point(237, 151);
this.panelnodebuilder.Margin = new System.Windows.Forms.Padding(6);
this.panelnodebuilder.Name = "panelnodebuilder";
this.panelnodebuilder.Size = new System.Drawing.Size(341, 97);
this.panelnodebuilder.TabIndex = 2;
this.panelnodebuilder.TabStop = false;
this.panelnodebuilder.Text = " Nodebuilder";
//
// configbuildonsave
//
this.configbuildonsave.AutoSize = true;
this.configbuildonsave.Location = new System.Drawing.Point(49, 62);
this.configbuildonsave.Name = "configbuildonsave";
this.configbuildonsave.Size = new System.Drawing.Size(242, 18);
this.configbuildonsave.TabIndex = 4;
this.configbuildonsave.Text = "Build nodes every time when saving the map";
this.configbuildonsave.UseVisualStyleBackColor = true;
this.configbuildonsave.CheckedChanged += new System.EventHandler(this.configbuildonsave_CheckedChanged);
//
// confignodebuilder
//
this.confignodebuilder.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.confignodebuilder.FormattingEnabled = true;
this.confignodebuilder.Location = new System.Drawing.Point(105, 28);
this.confignodebuilder.Name = "confignodebuilder";
this.confignodebuilder.Size = new System.Drawing.Size(186, 22);
this.confignodebuilder.Sorted = true;
this.confignodebuilder.TabIndex = 2;
this.confignodebuilder.SelectedIndexChanged += new System.EventHandler(this.confignodebuilder_SelectedIndexChanged);
//
// paneltesting
//
this.paneltesting.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.paneltesting.Controls.Add(this.testparameters);
this.paneltesting.Controls.Add(label4);
this.paneltesting.Controls.Add(this.browsewad);
this.paneltesting.Controls.Add(this.testapplication);
this.paneltesting.Controls.Add(label1);
this.paneltesting.Enabled = false;
this.paneltesting.Location = new System.Drawing.Point(237, 254);
this.paneltesting.Margin = new System.Windows.Forms.Padding(6);
this.paneltesting.Name = "paneltesting";
this.paneltesting.Size = new System.Drawing.Size(341, 107);
this.paneltesting.TabIndex = 13;
this.paneltesting.TabStop = false;
this.paneltesting.Text = " Testing ";
//
// testparameters
//
this.testparameters.Location = new System.Drawing.Point(94, 64);
this.testparameters.Name = "testparameters";
this.testparameters.Size = new System.Drawing.Size(197, 20);
this.testparameters.TabIndex = 8;
this.testparameters.TextChanged += new System.EventHandler(this.testparameters_TextChanged);
//
// browsewad
//
this.browsewad.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@ -154,22 +214,14 @@ namespace CodeImp.DoomBuilder.Interface
this.browsewad.Text = "...";
this.browsewad.UseVisualStyleBackColor = true;
//
// wadlocation
// testapplication
//
this.wadlocation.Location = new System.Drawing.Point(94, 29);
this.wadlocation.Name = "wadlocation";
this.wadlocation.ReadOnly = true;
this.wadlocation.Size = new System.Drawing.Size(197, 20);
this.wadlocation.TabIndex = 5;
//
// label1
//
label1.AutoSize = true;
label1.Location = new System.Drawing.Point(25, 32);
label1.Name = "label1";
label1.Size = new System.Drawing.Size(63, 14);
label1.TabIndex = 4;
label1.Text = "Application:";
this.testapplication.Location = new System.Drawing.Point(94, 29);
this.testapplication.Name = "testapplication";
this.testapplication.ReadOnly = true;
this.testapplication.Size = new System.Drawing.Size(197, 20);
this.testapplication.TabIndex = 5;
this.testapplication.TextChanged += new System.EventHandler(this.testapplication_TextChanged);
//
// tabs
//
@ -177,7 +229,7 @@ namespace CodeImp.DoomBuilder.Interface
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tabs.Controls.Add(this.tabinterface);
this.tabs.Controls.Add(this.tabediting);
this.tabs.Controls.Add(this.tabkeys);
this.tabs.Controls.Add(this.tabconfigs);
this.tabs.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tabs.ItemSize = new System.Drawing.Size(110, 19);
@ -199,67 +251,172 @@ namespace CodeImp.DoomBuilder.Interface
this.tabinterface.Text = "Interface";
this.tabinterface.UseVisualStyleBackColor = true;
//
// tabediting
// tabkeys
//
this.tabediting.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tabediting.Location = new System.Drawing.Point(4, 23);
this.tabediting.Name = "tabediting";
this.tabediting.Padding = new System.Windows.Forms.Padding(3);
this.tabediting.Size = new System.Drawing.Size(587, 372);
this.tabediting.TabIndex = 1;
this.tabediting.Text = "Editing";
this.tabediting.UseVisualStyleBackColor = true;
this.tabkeys.Controls.Add(this.listactions);
this.tabkeys.Controls.Add(this.actioncontrolpanel);
this.tabkeys.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tabkeys.Location = new System.Drawing.Point(4, 23);
this.tabkeys.Name = "tabkeys";
this.tabkeys.Padding = new System.Windows.Forms.Padding(3);
this.tabkeys.Size = new System.Drawing.Size(587, 372);
this.tabkeys.TabIndex = 1;
this.tabkeys.Text = "Controls";
this.tabkeys.UseVisualStyleBackColor = true;
//
// listactions
//
this.listactions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.listactions.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columncontrolaction,
this.columncontrolkey});
this.listactions.FullRowSelect = true;
this.listactions.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.listactions.Location = new System.Drawing.Point(11, 11);
this.listactions.Margin = new System.Windows.Forms.Padding(8);
this.listactions.MultiSelect = false;
this.listactions.Name = "listactions";
this.listactions.ShowGroups = false;
this.listactions.Size = new System.Drawing.Size(275, 350);
this.listactions.Sorting = System.Windows.Forms.SortOrder.Ascending;
this.listactions.TabIndex = 0;
this.listactions.UseCompatibleStateImageBehavior = false;
this.listactions.View = System.Windows.Forms.View.Details;
this.listactions.MouseUp += new System.Windows.Forms.MouseEventHandler(this.listactions_MouseUp);
this.listactions.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.listactions_ItemSelectionChanged);
this.listactions.KeyUp += new System.Windows.Forms.KeyEventHandler(this.listactions_KeyUp);
//
// columncontrolaction
//
this.columncontrolaction.Text = "Action";
this.columncontrolaction.Width = 150;
//
// columncontrolkey
//
this.columncontrolkey.Text = "Key";
this.columncontrolkey.Width = 100;
//
// actioncontrolpanel
//
this.actioncontrolpanel.Controls.Add(this.actioncontrol);
this.actioncontrolpanel.Controls.Add(label7);
this.actioncontrolpanel.Controls.Add(this.actiontitle);
this.actioncontrolpanel.Controls.Add(this.actioncontrolclear);
this.actioncontrolpanel.Controls.Add(label6);
this.actioncontrolpanel.Controls.Add(this.actionkey);
this.actioncontrolpanel.Controls.Add(this.actiondescription);
this.actioncontrolpanel.Controls.Add(label5);
this.actioncontrolpanel.Enabled = false;
this.actioncontrolpanel.Location = new System.Drawing.Point(300, 11);
this.actioncontrolpanel.Margin = new System.Windows.Forms.Padding(6);
this.actioncontrolpanel.Name = "actioncontrolpanel";
this.actioncontrolpanel.Size = new System.Drawing.Size(278, 350);
this.actioncontrolpanel.TabIndex = 9;
this.actioncontrolpanel.TabStop = false;
this.actioncontrolpanel.Text = " Action control ";
//
// actioncontrol
//
this.actioncontrol.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.actioncontrol.FormattingEnabled = true;
this.actioncontrol.Location = new System.Drawing.Point(23, 189);
this.actioncontrol.Name = "actioncontrol";
this.actioncontrol.Size = new System.Drawing.Size(184, 22);
this.actioncontrol.TabIndex = 8;
//
// actiontitle
//
this.actiontitle.AutoSize = true;
this.actiontitle.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.actiontitle.Location = new System.Drawing.Point(67, 28);
this.actiontitle.Name = "actiontitle";
this.actiontitle.Size = new System.Drawing.Size(172, 14);
this.actiontitle.TabIndex = 1;
this.actiontitle.Text = "(select an action from the list)";
this.actiontitle.UseMnemonic = false;
//
// actioncontrolclear
//
this.actioncontrolclear.Location = new System.Drawing.Point(193, 130);
this.actioncontrolclear.Name = "actioncontrolclear";
this.actioncontrolclear.Size = new System.Drawing.Size(72, 25);
this.actioncontrolclear.TabIndex = 6;
this.actioncontrolclear.Text = "Clear";
this.actioncontrolclear.UseVisualStyleBackColor = true;
//
// actionkey
//
this.actionkey.Location = new System.Drawing.Point(23, 132);
this.actionkey.Name = "actionkey";
this.actionkey.Size = new System.Drawing.Size(163, 20);
this.actionkey.TabIndex = 5;
//
// actiondescription
//
this.actiondescription.AutoEllipsis = true;
this.actiondescription.Location = new System.Drawing.Point(20, 48);
this.actiondescription.Name = "actiondescription";
this.actiondescription.Size = new System.Drawing.Size(245, 65);
this.actiondescription.TabIndex = 3;
this.actiondescription.UseMnemonic = false;
//
// tabconfigs
//
this.tabconfigs.Controls.Add(groupBox2);
this.tabconfigs.Controls.Add(this.panelres);
this.tabconfigs.Controls.Add(groupBox1);
this.tabconfigs.Controls.Add(this.paneltesting);
this.tabconfigs.Controls.Add(this.panelresources);
this.tabconfigs.Controls.Add(this.panelnodebuilder);
this.tabconfigs.Controls.Add(this.listconfigs);
this.tabconfigs.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tabconfigs.Location = new System.Drawing.Point(4, 23);
this.tabconfigs.Margin = new System.Windows.Forms.Padding(8);
this.tabconfigs.Name = "tabconfigs";
this.tabconfigs.Padding = new System.Windows.Forms.Padding(3);
this.tabconfigs.Size = new System.Drawing.Size(587, 372);
this.tabconfigs.TabIndex = 2;
this.tabconfigs.Text = "Configurations";
this.tabconfigs.UseVisualStyleBackColor = true;
//
// panelres
// panelresources
//
this.panelres.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
this.panelresources.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.panelres.Controls.Add(this.resourcelocations);
this.panelres.Controls.Add(label3);
this.panelres.Location = new System.Drawing.Point(235, 11);
this.panelres.Name = "panelres";
this.panelres.Size = new System.Drawing.Size(342, 137);
this.panelres.TabIndex = 12;
this.panelres.TabStop = false;
this.panelres.Text = " Resources ";
this.panelresources.Controls.Add(this.configresources);
this.panelresources.Controls.Add(label3);
this.panelresources.Enabled = false;
this.panelresources.Location = new System.Drawing.Point(237, 11);
this.panelresources.Margin = new System.Windows.Forms.Padding(6);
this.panelresources.Name = "panelresources";
this.panelresources.Size = new System.Drawing.Size(341, 134);
this.panelresources.TabIndex = 12;
this.panelresources.TabStop = false;
this.panelresources.Text = " Resources ";
//
// resourcelocations
// configresources
//
this.resourcelocations.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
this.configresources.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.resourcelocations.DialogOffset = new System.Drawing.Point(-120, -80);
this.resourcelocations.Location = new System.Drawing.Point(14, 28);
this.resourcelocations.Name = "resourcelocations";
this.resourcelocations.Size = new System.Drawing.Size(313, 81);
this.resourcelocations.TabIndex = 18;
this.configresources.DialogOffset = new System.Drawing.Point(-120, 10);
this.configresources.Location = new System.Drawing.Point(11, 25);
this.configresources.Name = "configresources";
this.configresources.Size = new System.Drawing.Size(318, 84);
this.configresources.TabIndex = 18;
this.configresources.OnContentChanged += new CodeImp.DoomBuilder.Interface.ResourceListEditor.ContentChanged(this.resourcelocations_OnContentChanged);
//
// listconfigs
//
this.listconfigs.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.listconfigs.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.listconfigs.FormattingEnabled = true;
this.listconfigs.IntegralHeight = false;
this.listconfigs.ItemHeight = 14;
this.listconfigs.Location = new System.Drawing.Point(11, 11);
this.listconfigs.Margin = new System.Windows.Forms.Padding(8);
this.listconfigs.Name = "listconfigs";
this.listconfigs.Size = new System.Drawing.Size(212, 348);
this.listconfigs.ScrollAlwaysVisible = true;
this.listconfigs.Size = new System.Drawing.Size(212, 350);
this.listconfigs.Sorted = true;
this.listconfigs.TabIndex = 0;
this.listconfigs.SelectedIndexChanged += new System.EventHandler(this.listconfigs_SelectedIndexChanged);
@ -274,6 +431,7 @@ namespace CodeImp.DoomBuilder.Interface
this.cancel.TabIndex = 17;
this.cancel.Text = "Cancel";
this.cancel.UseVisualStyleBackColor = true;
this.cancel.Click += new System.EventHandler(this.cancel_Click);
//
// apply
//
@ -284,6 +442,7 @@ namespace CodeImp.DoomBuilder.Interface
this.apply.TabIndex = 16;
this.apply.Text = "OK";
this.apply.UseVisualStyleBackColor = true;
this.apply.Click += new System.EventHandler(this.apply_Click);
//
// ConfigForm
//
@ -303,13 +462,17 @@ namespace CodeImp.DoomBuilder.Interface
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Configuration";
groupBox1.ResumeLayout(false);
groupBox1.PerformLayout();
groupBox2.ResumeLayout(false);
groupBox2.PerformLayout();
this.panelnodebuilder.ResumeLayout(false);
this.panelnodebuilder.PerformLayout();
this.paneltesting.ResumeLayout(false);
this.paneltesting.PerformLayout();
this.tabs.ResumeLayout(false);
this.tabkeys.ResumeLayout(false);
this.actioncontrolpanel.ResumeLayout(false);
this.actioncontrolpanel.PerformLayout();
this.tabconfigs.ResumeLayout(false);
this.panelres.ResumeLayout(false);
this.panelresources.ResumeLayout(false);
this.panelresources.PerformLayout();
this.ResumeLayout(false);
}
@ -318,17 +481,28 @@ namespace CodeImp.DoomBuilder.Interface
private System.Windows.Forms.TabControl tabs;
private System.Windows.Forms.TabPage tabinterface;
private System.Windows.Forms.TabPage tabediting;
private System.Windows.Forms.TabPage tabkeys;
private System.Windows.Forms.TabPage tabconfigs;
private System.Windows.Forms.Button cancel;
private System.Windows.Forms.Button apply;
private System.Windows.Forms.ListBox listconfigs;
private System.Windows.Forms.ComboBox confignodebuilder;
private System.Windows.Forms.CheckBox configbuildonsave;
private System.Windows.Forms.GroupBox panelres;
private ResourceListEditor resourcelocations;
private System.Windows.Forms.GroupBox panelresources;
private ResourceListEditor configresources;
private System.Windows.Forms.Button browsewad;
private System.Windows.Forms.TextBox wadlocation;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox testapplication;
private System.Windows.Forms.TextBox testparameters;
private System.Windows.Forms.GroupBox panelnodebuilder;
private System.Windows.Forms.GroupBox paneltesting;
private System.Windows.Forms.ListView listactions;
private System.Windows.Forms.ColumnHeader columncontrolaction;
private System.Windows.Forms.ColumnHeader columncontrolkey;
private System.Windows.Forms.Label actiondescription;
private System.Windows.Forms.Label actiontitle;
private System.Windows.Forms.ComboBox actioncontrol;
private System.Windows.Forms.Button actioncontrolclear;
private System.Windows.Forms.TextBox actionkey;
private System.Windows.Forms.GroupBox actioncontrolpanel;
}
}

View file

@ -24,6 +24,7 @@ using System.Text;
using System.Windows.Forms;
using Microsoft.Win32;
using System.Diagnostics;
using CodeImp.DoomBuilder.Controls;
#endregion
@ -31,12 +32,35 @@ namespace CodeImp.DoomBuilder.Interface
{
public partial class ConfigForm : DelayedForm
{
#region ================== Constructor
// Constructor
public ConfigForm()
{
Action[] actions;
ListViewItem item;
// Initialize
InitializeComponent();
// Fill list of actions
actions = General.Actions.GetAllActions();
foreach(Action a in actions)
{
// Create item
item = listactions.Items.Add(a.Name, a.Title, 0);
item.SubItems.Add(Action.GetShortcutKeyDesc(a.ShortcutKey));
}
// Fill combobox with special controls
actioncontrol.Items.Add(Keys.LButton);
actioncontrol.Items.Add(Keys.MButton);
actioncontrol.Items.Add(Keys.RButton);
actioncontrol.Items.Add(Keys.XButton1);
actioncontrol.Items.Add(Keys.XButton2);
actioncontrol.Items.Add(SpecialKeys.MScrollUp);
actioncontrol.Items.Add(SpecialKeys.MScrollDown);
// Fill list of configurations
foreach(ConfigurationInfo ci in General.Configs)
{
@ -44,16 +68,195 @@ namespace CodeImp.DoomBuilder.Interface
listconfigs.Items.Add(ci.Clone());
}
// Fill list of nodebuilders
// Fill combobox with nodebuilders
confignodebuilder.Items.AddRange(General.Nodebuilders.ToArray());
}
#endregion
#region ================== Controls Panel
// Item selected
private void listactions_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
{
Action action;
// Anything selected?
if(listactions.SelectedItems.Count > 0)
{
// Get the selected action
action = General.Actions[listactions.SelectedItems[0].Name];
// Enable panel
actioncontrolpanel.Enabled = true;
actiontitle.Text = action.Title;
actiondescription.Text = action.Description;
// See if the key is in the combobox
// Otherwise display the key in the textbox
}
}
// Key released
private void listactions_KeyUp(object sender, KeyEventArgs e)
{
// Nothing selected?
if(listactions.SelectedItems.Count == 0)
{
// Disable panel
actioncontrolpanel.Enabled = false;
actiontitle.Text = "(select an action from the list)";
actiondescription.Text = "";
actionkey.Text = "";
actioncontrol.SelectedIndex = -1;
}
}
// Mouse released
private void listactions_MouseUp(object sender, MouseEventArgs e)
{
listactions_KeyUp(sender, new KeyEventArgs(Keys.None));
}
#endregion
#region ================== Configuration Panel
// Configuration item selected
private void listconfigs_SelectedIndexChanged(object sender, EventArgs e)
{
ConfigurationInfo ci;
NodebuilderInfo ni;
// Item selected?
if(listconfigs.SelectedIndex > -1)
{
// Enable panels
panelresources.Enabled = true;
panelnodebuilder.Enabled = true;
paneltesting.Enabled = true;
// Get config info of selected item
ci = listconfigs.SelectedItem as ConfigurationInfo;
// Fill resources list
configresources.EditResourceLocationList(ci.Resources);
// Go for all nodebuilder items
confignodebuilder.SelectedIndex = -1;
for(int i = 0; i < confignodebuilder.Items.Count; i++)
{
// Get item
ni = confignodebuilder.Items[i] as NodebuilderInfo;
// Item matches configuration setting?
if(string.Compare(ni.Filename, ci.Nodebuilder, false) == 0)
{
// Select this item
confignodebuilder.SelectedIndex = i;
break;
}
}
// Nodebuilder settings
configbuildonsave.Checked = ci.BuildOnSave;
// Set test application and parameters
testapplication.Text = ci.TestProgram;
testparameters.Text = ci.TestParameters;
}
else
{
// Disable panels
panelresources.Enabled = false;
panelnodebuilder.Enabled = false;
paneltesting.Enabled = false;
}
}
// Resource locations changed
private void resourcelocations_OnContentChanged()
{
ConfigurationInfo ci;
// Apply to selected configuration
ci = listconfigs.SelectedItem as ConfigurationInfo;
ci.Resources.Clear();
ci.Resources.AddRange(configresources.GetResources());
}
// Nodebuilder selection changed
private void confignodebuilder_SelectedIndexChanged(object sender, EventArgs e)
{
ConfigurationInfo ci;
// Apply to selected configuration
ci = listconfigs.SelectedItem as ConfigurationInfo;
if(confignodebuilder.SelectedItem != null)
ci.Nodebuilder = (confignodebuilder.SelectedItem as NodebuilderInfo).Filename;
}
// Build on save selection changed
private void configbuildonsave_CheckedChanged(object sender, EventArgs e)
{
ConfigurationInfo ci;
// Apply to selected configuration
ci = listconfigs.SelectedItem as ConfigurationInfo;
ci.BuildOnSave = configbuildonsave.Checked;
}
// Test application changed
private void testapplication_TextChanged(object sender, EventArgs e)
{
ConfigurationInfo ci;
// Apply to selected configuration
ci = listconfigs.SelectedItem as ConfigurationInfo;
ci.TestProgram = testapplication.Text;
}
// Test parameters changed
private void testparameters_TextChanged(object sender, EventArgs e)
{
ConfigurationInfo ci;
// Apply to selected configuration
ci = listconfigs.SelectedItem as ConfigurationInfo;
ci.TestParameters = testparameters.Text;
}
#endregion
#region ================== OK / Cancel
// OK clicked
private void apply_Click(object sender, EventArgs e)
{
// Apply configuration items
foreach(ConfigurationInfo ci in listconfigs.Items)
{
// Find same configuration info in originals
foreach(ConfigurationInfo oci in General.Configs)
{
// Apply settings when they match
if(string.Compare(ci.Filename, oci.Filename) == 0) oci.Apply(ci);
}
}
// Close
this.DialogResult = DialogResult.OK;
this.Hide();
}
// Cancel clicked
private void cancel_Click(object sender, EventArgs e)
{
// Close
this.DialogResult = DialogResult.Cancel;
this.Hide();
}
#endregion

View file

@ -117,73 +117,106 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="groupBox1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="groupBox1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="configbuildonsave.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label2.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label2.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="confignodebuilder.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label3.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label3.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="groupBox2.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="groupBox2.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="textBox1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label4.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label4.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="browsewad.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="wadlocation.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label6.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label6.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label7.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label7.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label5.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label5.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="panelnodebuilder.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="configbuildonsave.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="confignodebuilder.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="paneltesting.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="testparameters.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="browsewad.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="testapplication.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="tabs.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="tabinterface.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="tabediting.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="tabkeys.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="listactions.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="actioncontrolpanel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="actioncontrol.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="actiontitle.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="actioncontrolclear.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="actionkey.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="actiondescription.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="tabconfigs.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="panelres.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="panelresources.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="resourcelocations.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="configresources.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="listconfigs.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

View file

@ -76,6 +76,9 @@ namespace CodeImp.DoomBuilder.Interface
// Fix things
buttonzoom.Font = menufile.Font;
// Bind any methods
ActionAttribute.BindMethods(this);
// Apply shortcut keys
ApplyShortcutKeys();
@ -503,14 +506,21 @@ namespace CodeImp.DoomBuilder.Interface
#region ================== Tools Menu
// Configuration clicked
private void configurationToolStripMenuItem_Click(object sender, EventArgs e)
// Configuration action
[Action(Action.CONFIGURATION)]
public void ShowConfiguration()
{
// Show configuration dialog
ConfigForm cfgform = new ConfigForm();
cfgform.ShowDialog(this);
cfgform.Dispose();
}
// Configuration clicked
public void configurationToolStripMenuItem_Click(object sender, EventArgs e)
{
ShowConfiguration();
}
#endregion
}

View file

@ -172,7 +172,10 @@ namespace CodeImp.DoomBuilder.Interface
this.resourceitems.TabIndex = 20;
this.resourceitems.UseCompatibleStateImageBehavior = false;
this.resourceitems.View = System.Windows.Forms.View.Details;
this.resourceitems.ClientSizeChanged += new System.EventHandler(this.resourceitems_ClientSizeChanged);
this.resourceitems.DragDrop += new System.Windows.Forms.DragEventHandler(this.resourceitems_DragDrop);
this.resourceitems.DoubleClick += new System.EventHandler(this.resourceitems_DoubleClick);
this.resourceitems.DragOver += new System.Windows.Forms.DragEventHandler(this.resourceitems_DragOver);
this.resourceitems.SizeChanged += new System.EventHandler(this.resources_SizeChanged);
this.resourceitems.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.resourceitems_ItemSelectionChanged);
//

View file

@ -11,6 +11,14 @@ namespace CodeImp.DoomBuilder.Interface
{
internal partial class ResourceListEditor : UserControl
{
#region ================== Delegates / Events
public delegate void ContentChanged();
public event ContentChanged OnContentChanged;
#endregion
#region ================== Variables
private Point dialogoffset = new Point(40, 20);
@ -81,6 +89,10 @@ namespace CodeImp.DoomBuilder.Interface
// Start editing list
resourceitems.BeginUpdate();
// Scroll to top
if(resourceitems.Items.Count > 0)
resourceitems.TopItem = resourceitems.Items[0];
// Go for all items
for(int i = resourceitems.Items.Count - 1; i >= 0; i--)
{
@ -98,10 +110,24 @@ namespace CodeImp.DoomBuilder.Interface
// Done
resourceitems.EndUpdate();
ResizeColumnHeader();
// Raise content changed event
if(OnContentChanged != null) OnContentChanged();
}
// This adds a normal item
public void AddItem(ResourceLocation rl)
public void AddResourceLocation(ResourceLocation rl)
{
// Add it
AddItem(rl);
// Raise content changed event
if(OnContentChanged != null) OnContentChanged();
}
// This adds a normal item
private void AddItem(ResourceLocation rl)
{
int index;
@ -130,7 +156,7 @@ namespace CodeImp.DoomBuilder.Interface
private void ResizeColumnHeader()
{
// Resize column header to full extend
column.Width = resourceitems.ClientSize.Width - 2;
column.Width = resourceitems.ClientSize.Width - SystemInformation.VerticalScrollBarWidth;
}
// When the resources list resizes
@ -157,6 +183,9 @@ namespace CodeImp.DoomBuilder.Interface
// Add resource
AddItem(resoptions.ResourceLocation);
}
// Raise content changed event
if(OnContentChanged != null) OnContentChanged();
}
// Edit resource
@ -197,6 +226,9 @@ namespace CodeImp.DoomBuilder.Interface
// Done
resourceitems.EndUpdate();
// Raise content changed event
if(OnContentChanged != null) OnContentChanged();
}
}
}
@ -209,6 +241,10 @@ namespace CodeImp.DoomBuilder.Interface
{
// Remove it
resourceitems.Items.Remove(resourceitems.SelectedItems[0]);
ResizeColumnHeader();
// Raise content changed event
if(OnContentChanged != null) OnContentChanged();
}
}
@ -269,6 +305,27 @@ namespace CodeImp.DoomBuilder.Interface
return list;
}
// Item dragged
private void resourceitems_DragOver(object sender, DragEventArgs e)
{
// Raise content changed event
if(OnContentChanged != null) OnContentChanged();
}
// Item dropped
private void resourceitems_DragDrop(object sender, DragEventArgs e)
{
// Raise content changed event
if(OnContentChanged != null) OnContentChanged();
}
// Client size changed
private void resourceitems_ClientSizeChanged(object sender, E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AEBAcABAQEAAQEBwAEHAQABAQHAAQECAAHA
AQcCAAHAAQMCAAHAAQcCAAHAAQcCAAHAAQcCAAHAAQcBAAEHAcABBwEAAQcBwAEHAQABBwHAAQcBAAEH

View file

@ -70,6 +70,9 @@ namespace CodeImp.DoomBuilder.Interface
// Leave when item is grayed
if(insertatitem.ForeColor != SystemColors.WindowText) return;
// Begin updating
base.BeginUpdate();
// Determine index where to insert
dropindex = insertatitem.Index;
if(dropindex > dragitems[0].Index) dropindex++;
@ -92,7 +95,8 @@ namespace CodeImp.DoomBuilder.Interface
base.Items.Remove(lvi);
}
// Clear the list
// Done
base.EndUpdate();
dragitems.Clear();
}
@ -153,6 +157,9 @@ namespace CodeImp.DoomBuilder.Interface
dropindex = insertatitem.Index;
if(dropindex > dragitems[0].Index) dropindex++;
// Begin updating
base.BeginUpdate();
// Deselect items
DeselectAll();
@ -174,6 +181,9 @@ namespace CodeImp.DoomBuilder.Interface
// Copy selected items to the list
dragitems.Clear();
foreach(ListViewItem lvi in base.SelectedItems) dragitems.Add(lvi);
// Done
base.EndUpdate();
}
else
{