RPF Explorer Edit mode warning message

This commit is contained in:
dexyfex 2018-01-11 15:03:58 +11:00
parent 54a3c1fc71
commit 8c7415e8a8
3 changed files with 134 additions and 12 deletions

View File

@ -127,6 +127,12 @@
this.SaveFileDialog = new System.Windows.Forms.SaveFileDialog();
this.OpenFileDialog = new System.Windows.Forms.OpenFileDialog();
this.FolderBrowserDialog = new System.Windows.Forms.FolderBrowserDialog();
this.EditModeBaseWarningPanel = new System.Windows.Forms.Panel();
this.label1 = new System.Windows.Forms.Label();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.EditModeModsWarningPanel = new System.Windows.Forms.Panel();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.label2 = new System.Windows.Forms.Label();
this.MainMenu.SuspendLayout();
this.MainToolbar.SuspendLayout();
this.StatusBar.SuspendLayout();
@ -136,6 +142,10 @@
this.MainSplitContainer.SuspendLayout();
this.ListContextMenu.SuspendLayout();
this.TreeContextMenu.SuspendLayout();
this.EditModeBaseWarningPanel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.EditModeModsWarningPanel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
this.SuspendLayout();
//
// MainMenu
@ -658,6 +668,8 @@
// MainSplitContainer.Panel2
//
this.MainSplitContainer.Panel2.Controls.Add(this.MainListView);
this.MainSplitContainer.Panel2.Controls.Add(this.EditModeBaseWarningPanel);
this.MainSplitContainer.Panel2.Controls.Add(this.EditModeModsWarningPanel);
this.MainSplitContainer.Size = new System.Drawing.Size(876, 516);
this.MainSplitContainer.SplitterDistance = 309;
this.MainSplitContainer.TabIndex = 3;
@ -717,7 +729,7 @@
// MainNameColumnHeader
//
this.MainNameColumnHeader.Text = "Name";
this.MainNameColumnHeader.Width = 225;
this.MainNameColumnHeader.Width = 219;
//
// MainTypeColumnHeader
//
@ -1017,6 +1029,72 @@
//
this.OpenFileDialog.Multiselect = true;
//
// EditModeBaseWarningPanel
//
this.EditModeBaseWarningPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.EditModeBaseWarningPanel.BackColor = System.Drawing.Color.DarkRed;
this.EditModeBaseWarningPanel.Controls.Add(this.pictureBox1);
this.EditModeBaseWarningPanel.Controls.Add(this.label1);
this.EditModeBaseWarningPanel.Location = new System.Drawing.Point(1, 3);
this.EditModeBaseWarningPanel.Name = "EditModeBaseWarningPanel";
this.EditModeBaseWarningPanel.Size = new System.Drawing.Size(559, 24);
this.EditModeBaseWarningPanel.TabIndex = 1;
//
// label1
//
this.label1.AutoSize = true;
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.ForeColor = System.Drawing.Color.White;
this.label1.Location = new System.Drawing.Point(25, 5);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(285, 13);
this.label1.TabIndex = 0;
this.label1.Text = "Warning: You are directly editing base game files";
//
// pictureBox1
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(6, 3);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(16, 16);
this.pictureBox1.TabIndex = 1;
this.pictureBox1.TabStop = false;
//
// EditModeModsWarningPanel
//
this.EditModeModsWarningPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.EditModeModsWarningPanel.BackColor = System.Drawing.Color.DarkGreen;
this.EditModeModsWarningPanel.Controls.Add(this.pictureBox2);
this.EditModeModsWarningPanel.Controls.Add(this.label2);
this.EditModeModsWarningPanel.Location = new System.Drawing.Point(1, 28);
this.EditModeModsWarningPanel.Name = "EditModeModsWarningPanel";
this.EditModeModsWarningPanel.Size = new System.Drawing.Size(559, 24);
this.EditModeModsWarningPanel.TabIndex = 2;
//
// pictureBox2
//
this.pictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image")));
this.pictureBox2.Location = new System.Drawing.Point(6, 3);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(16, 16);
this.pictureBox2.TabIndex = 1;
this.pictureBox2.TabStop = false;
//
// label2
//
this.label2.AutoSize = true;
this.label2.BackColor = System.Drawing.Color.Transparent;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.ForeColor = System.Drawing.Color.White;
this.label2.Location = new System.Drawing.Point(25, 5);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(225, 13);
this.label2.TabIndex = 0;
this.label2.Text = "You are editing files in the mods folder";
//
// ExploreForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -1043,6 +1121,12 @@
this.MainSplitContainer.ResumeLayout(false);
this.ListContextMenu.ResumeLayout(false);
this.TreeContextMenu.ResumeLayout(false);
this.EditModeBaseWarningPanel.ResumeLayout(false);
this.EditModeBaseWarningPanel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.EditModeModsWarningPanel.ResumeLayout(false);
this.EditModeModsWarningPanel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@ -1147,5 +1231,11 @@
private System.Windows.Forms.ToolStripMenuItem ListContextNewRpfArchiveMenu;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator10;
private System.Windows.Forms.ToolStripButton EditModeButton;
private System.Windows.Forms.Panel EditModeBaseWarningPanel;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Panel EditModeModsWarningPanel;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.Label label2;
}
}

View File

@ -405,6 +405,7 @@ namespace CodeWalker
//called after the CurrentFolder and CurrentFiles have changed.
UpdateNavigateUI();
EnsureEditModeWarning();
if (!HistoryNavigating) //only do this if not currently navigating forward or back
{
@ -1600,9 +1601,22 @@ namespace CodeWalker
EditModeButton.Checked = enable;
MainListView.LabelEdit = enable;
EnsureEditModeWarning();
}
private void EnsureEditModeWarning()
{
bool show = EditMode && !CurrentFolder.Path.ToLowerInvariant().StartsWith("mods");
int gap = 3;
int bot = MainListView.Bottom;
EditModeBaseWarningPanel.Top = gap;
EditModeModsWarningPanel.Top = gap;
EditModeModsWarningPanel.Visible = false;
MainListView.Top = show ? EditModeBaseWarningPanel.Bottom + gap : gap;
MainListView.Height = bot - MainListView.Top;
}

View File

@ -271,6 +271,16 @@
e2d2SZBn3BDEyPiVG5X23Ap3LtwYqxPDuBkxUEmGNWnPzTCEn1GZjBBcYawROqpiopbZ8v/CtN9mmB+9
1vZY1yV7KT9+37JAwB1LBeyfTv8N11OX0LGtniroCF2hd2L+f3A9qqp2iWbL30hjPP3/CJi+jvVtWwLw
A4Rmgl76+inbAAAAAElFTkSuQmCC
</value>
</data>
<data name="SearchButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADVSURBVDhPpVIxDoMwDORJfQN7pI5hz1pmytSJ7/EFhrYZ
MqSVgDXlIhslaoga9aQTsn1nOyFVDsuynNd1HTe6gCPyJDnGJrpN0+T6vnd1Xe9EjDzqJP0GJkAkhIjM
TOSpSXoTrMmTu+7qHvene9m3/7aX1udRh44sMXBWnsZmJmKuQUeWGFiPRaGZKaXMN/hrg3meTygopbyo
6A7IbIdh2KekmPwLR+amaaI4+Q6OzDiGMcafNWD8EnNmrbVFnaRppBr8bGaETYrNDG4CFpsZMJaZq+oD
NQar60zqQI0AAAAASUVORK5CYII=
</value>
</data>
<data name="SearchGlobalButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@ -290,16 +300,6 @@
lVY67e7NJiI/2QxXrEetVVZsAY5938U5NzUbthbgknMW7735iOnYsB0AqBXXlJL5jOnYsDUBqA1uMcbh
mYyuz6aAU/M9hKDP3GR0ffYegNrwXEpRADdZr5+aAlB7UAB3j1V/Anh1j1UD4Fub4YrN8HPL9gAVE1vf
J6IiRgAAAABJRU5ErkJggg==
</value>
</data>
<data name="SearchButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADVSURBVDhPpVIxDoMwDORJfQN7pI5hz1pmytSJ7/EFhrYZ
MqSVgDXlIhslaoga9aQTsn1nOyFVDsuynNd1HTe6gCPyJDnGJrpN0+T6vnd1Xe9EjDzqJP0GJkAkhIjM
TOSpSXoTrMmTu+7qHvene9m3/7aX1udRh44sMXBWnsZmJmKuQUeWGFiPRaGZKaXMN/hrg3meTygopbyo
6A7IbIdh2KekmPwLR+amaaI4+Q6OzDiGMcafNWD8EnNmrbVFnaRppBr8bGaETYrNDG4CFpsZMJaZq+oD
NQar60zqQI0AAAAASUVORK5CYII=
</value>
</data>
<metadata name="StatusBar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
@ -313,7 +313,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADo
HwAAAk1TRnQBSQFMAgEBGAEAAdABAAHQAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
HwAAAk1TRnQBSQFMAgEBGAEAAdgBAAHYAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAAXADAAEBAQABCAYAARwYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
@ -450,6 +450,24 @@
AQABAQHAAQEBAAEDAcABAQEAAQEBwAEBAQABAwHAAQEBAAEBAQABAQEAAQcBwAEDAQABAQEAAQEBAAEP
AcABAwEAAQEBAAEBAQABDwHAAQMBAAEBAQABAQEAAQ8BwAEDAQABAQHAAQcBAAEPAcABAwEAAQMB4AEP
AQABDwHAAQMBAAEHCw==
</value>
</data>
<data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAACbSURBVDhPlY/BDYAgDEXZxNWcywsLeXECb45A4kX8n1CC
UBCaPFNq6H+YVjnnVuAjaxyPFy6dz7F4wj6Ox4qJ97V5v5sA+ykLSZcFUxZlujBskafjGGA/ZFGmY5QW
kF+LPF1b0LUo07UFpGlRphOMqwWqhZbeo7LQ0gl+VQbkY9FLby0gyaKV/keywMfOvF+IBlaeYQEHM+Cy
MS8nLPK4Pr55DAAAAABJRU5ErkJggg==
</value>
</data>
<data name="pictureBox2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAC1SURBVDhP3ZO9DUIxDISzBw2bkQWYgGnYA+mJhjYzQIWg
eKJJG/yBLb34GSGg46Qr4vOd8uMkj1prFg7C5kgta9scIi6FZTje2mp3bovtqSM1NHroVdsTah7X+8vM
6Lk5XAkZuxBZFATfbPB1DSlmzmzNN0FDpOlxMgFDdOZ3xIOXgLABGiIN4v2TgJeXaIi06SX+9ow6CyWa
QoOvd4MEZPEY5WgaPcNRBhry3WeaQsQPvnNKd1hjo1V/TdpFAAAAAElFTkSuQmCC
</value>
</data>
<metadata name="ListContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">