RPF Explorer improvements

This commit is contained in:
dexy 2020-03-21 12:19:48 +11:00
parent 9ca46e79bf
commit ff93caafcd
3 changed files with 34 additions and 88 deletions

View File

@ -52,7 +52,6 @@
this.EditCopyFileListMenu = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
this.EditRenameMenu = new System.Windows.Forms.ToolStripMenuItem();
this.EditReplaceMenu = new System.Windows.Forms.ToolStripMenuItem();
this.EditDeleteMenu = new System.Windows.Forms.ToolStripMenuItem();
this.EditEditModeMenuSeparator = new System.Windows.Forms.ToolStripSeparator();
this.EditSelectAllMenu = new System.Windows.Forms.ToolStripMenuItem();
@ -135,7 +134,6 @@
this.ListContextOpenFileLocationMenu = new System.Windows.Forms.ToolStripMenuItem();
this.ListContextOpenFileLocationSeparator = new System.Windows.Forms.ToolStripSeparator();
this.ListContextRenameMenu = new System.Windows.Forms.ToolStripMenuItem();
this.ListContextReplaceMenu = new System.Windows.Forms.ToolStripMenuItem();
this.ListContextDeleteMenu = new System.Windows.Forms.ToolStripMenuItem();
this.ListContextEditSeparator = new System.Windows.Forms.ToolStripSeparator();
this.ListContextDefragmentMenu = new System.Windows.Forms.ToolStripMenuItem();
@ -154,6 +152,7 @@
this.OpenFileDialog = new System.Windows.Forms.OpenFileDialog();
this.FolderBrowserDialog = new System.Windows.Forms.FolderBrowserDialog();
this.VSExtender = new WeifenLuo.WinFormsUI.Docking.VisualStudioToolStripExtender(this.components);
this.EditPasteMenu = new System.Windows.Forms.ToolStripMenuItem();
this.MainMenu.SuspendLayout();
this.MainToolbar.SuspendLayout();
this.MainStatusBar.SuspendLayout();
@ -230,9 +229,9 @@
this.EditCopyMenu,
this.EditCopyPathMenu,
this.EditCopyFileListMenu,
this.EditPasteMenu,
this.toolStripSeparator9,
this.EditRenameMenu,
this.EditReplaceMenu,
this.EditDeleteMenu,
this.EditEditModeMenuSeparator,
this.EditSelectAllMenu});
@ -369,16 +368,6 @@
this.EditRenameMenu.Visible = false;
this.EditRenameMenu.Click += new System.EventHandler(this.EditRenameMenu_Click);
//
// EditReplaceMenu
//
this.EditReplaceMenu.Image = ((System.Drawing.Image)(resources.GetObject("EditReplaceMenu.Image")));
this.EditReplaceMenu.Name = "EditReplaceMenu";
this.EditReplaceMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Shift | System.Windows.Forms.Keys.Insert)));
this.EditReplaceMenu.Size = new System.Drawing.Size(208, 22);
this.EditReplaceMenu.Text = "Replace...";
this.EditReplaceMenu.Visible = false;
this.EditReplaceMenu.Click += new System.EventHandler(this.EditReplaceMenu_Click);
//
// EditDeleteMenu
//
this.EditDeleteMenu.Image = ((System.Drawing.Image)(resources.GetObject("EditDeleteMenu.Image")));
@ -981,14 +970,13 @@
this.ListContextOpenFileLocationMenu,
this.ListContextOpenFileLocationSeparator,
this.ListContextRenameMenu,
this.ListContextReplaceMenu,
this.ListContextDeleteMenu,
this.ListContextEditSeparator,
this.ListContextDefragmentMenu,
this.ListContextDefragmentSeparator,
this.ListContextSelectAllMenu});
this.ListContextMenu.Name = "MainContextMenu";
this.ListContextMenu.Size = new System.Drawing.Size(209, 508);
this.ListContextMenu.Size = new System.Drawing.Size(209, 464);
//
// ListContextViewMenu
//
@ -1164,15 +1152,6 @@
this.ListContextRenameMenu.Text = "Rename";
this.ListContextRenameMenu.Click += new System.EventHandler(this.ListContextRenameMenu_Click);
//
// ListContextReplaceMenu
//
this.ListContextReplaceMenu.Image = ((System.Drawing.Image)(resources.GetObject("ListContextReplaceMenu.Image")));
this.ListContextReplaceMenu.Name = "ListContextReplaceMenu";
this.ListContextReplaceMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Shift | System.Windows.Forms.Keys.Insert)));
this.ListContextReplaceMenu.Size = new System.Drawing.Size(208, 22);
this.ListContextReplaceMenu.Text = "Replace...";
this.ListContextReplaceMenu.Click += new System.EventHandler(this.ListContextReplaceMenu_Click);
//
// ListContextDeleteMenu
//
this.ListContextDeleteMenu.Image = ((System.Drawing.Image)(resources.GetObject("ListContextDeleteMenu.Image")));
@ -1283,6 +1262,13 @@
//
this.VSExtender.DefaultRenderer = null;
//
// EditPasteMenu
//
this.EditPasteMenu.Name = "EditPasteMenu";
this.EditPasteMenu.Size = new System.Drawing.Size(208, 22);
this.EditPasteMenu.Text = "Paste";
this.EditPasteMenu.Click += new System.EventHandler(this.EditPasteMenu_Click);
//
// ExploreForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -1370,7 +1356,6 @@
private System.Windows.Forms.ToolStripMenuItem ListContextCopyMenu;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator6;
private System.Windows.Forms.ToolStripMenuItem ListContextRenameMenu;
private System.Windows.Forms.ToolStripMenuItem ListContextReplaceMenu;
private System.Windows.Forms.ToolStripMenuItem ListContextDeleteMenu;
private System.Windows.Forms.ContextMenuStrip TreeContextMenu;
private System.Windows.Forms.ToolStripMenuItem TreeContextCopyPathMenu;
@ -1398,7 +1383,6 @@
private System.Windows.Forms.ToolStripMenuItem EditCopyFileListMenu;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator9;
private System.Windows.Forms.ToolStripMenuItem EditRenameMenu;
private System.Windows.Forms.ToolStripMenuItem EditReplaceMenu;
private System.Windows.Forms.ToolStripMenuItem EditDeleteMenu;
private System.Windows.Forms.ToolStripSeparator EditEditModeMenuSeparator;
private System.Windows.Forms.ToolStripMenuItem EditSelectAllMenu;
@ -1447,5 +1431,6 @@
private System.Windows.Forms.ToolStripMenuItem OptionsStartInFolderDefaultMenu;
private System.Windows.Forms.ToolStripMenuItem OptionsStartInFolderCurrentMenu;
private System.Windows.Forms.ToolStripMenuItem ListContextPasteMenu;
private System.Windows.Forms.ToolStripMenuItem EditPasteMenu;
}
}

View File

@ -585,7 +585,9 @@ namespace CodeWalker
bool canview = false;
bool canedit = false;
bool canexportxml = false;
bool canimport = EditMode && (CurrentFolder?.RpfFolder != null) && !issearch;
bool canimport = EditMode && !issearch;// && (CurrentFolder?.RpfFolder != null);
bool canpaste = EditMode && (CopiedFiles.Count > 0);
if (sc != 0)
{
long bc = 0;
@ -629,9 +631,10 @@ namespace CodeWalker
EditCopyMenu.Enabled = isfile;
EditCopyPathMenu.Enabled = isitem;
EditPasteMenu.Enabled = canpaste;
EditPasteMenu.Visible = EditMode;
EditRenameMenu.Visible = canedit;
EditReplaceMenu.Visible = canedit;
EditDeleteMenu.Visible = canedit;
EditEditModeMenuSeparator.Visible = canedit;
@ -1865,7 +1868,6 @@ namespace CodeWalker
ListContextOpenFileLocationSeparator.Visible = issearch;
ListContextRenameMenu.Visible = canedit;
ListContextReplaceMenu.Visible = canedit;
ListContextDeleteMenu.Visible = canedit;
ListContextEditSeparator.Visible = canedit;
@ -3111,17 +3113,6 @@ namespace CodeWalker
return;
}
}
private void ReplaceSelected()
{
if (!EditMode) return;
if (CurrentFolder?.IsSearchResults ?? false) return;
if (MainListView.SelectedIndices.Count != 1) return;
MessageBox.Show("ReplaceSelected TODO...");
//delete the selected items, and replace with... choose
//if (!EnsureRpfEncryptionType()) return;
}
private void DeleteSelected()
{
@ -3619,15 +3610,8 @@ namespace CodeWalker
else if (ctrl) ExtractRaw();
break;
case Keys.Insert:
if (MainListView.SelectedIndices.Count == 1)
{
if (shft) ReplaceSelected();
}
else
{
if (shft) ImportXml();
else if (!ctrl) ImportRaw();
}
if (shft) ImportXml();
else if (!ctrl) ImportRaw();
break;
case Keys.C:
if (ctrlshft) CopyPath();
@ -4054,11 +4038,6 @@ namespace CodeWalker
RenameSelected();
}
private void ListContextReplaceMenu_Click(object sender, EventArgs e)
{
ReplaceSelected();
}
private void ListContextDeleteMenu_Click(object sender, EventArgs e)
{
DeleteSelected();
@ -4139,16 +4118,16 @@ namespace CodeWalker
CopyFileList();
}
private void EditPasteMenu_Click(object sender, EventArgs e)
{
Paste();
}
private void EditRenameMenu_Click(object sender, EventArgs e)
{
RenameSelected();
}
private void EditReplaceMenu_Click(object sender, EventArgs e)
{
ReplaceSelected();
}
private void EditDeleteMenu_Click(object sender, EventArgs e)
{
DeleteSelected();

View File

@ -188,15 +188,6 @@
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAFBJREFUOE9joBh8+/btPz4MVYYbgBQ5OTmBMUwTMh+qDDegigHYNBKL4S6A0chs
YmjauYAQhqkbTi5A1ojMJ0QTNIAQRvECNgxNb4MWMDAAAPsOTf9dAGOQAAAAAElFTkSuQmCC
</value>
</data>
<data name="EditReplaceMenu.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
xAAADsQBlSsOGwAAAJ5JREFUOE/VkcEJwzAMRTNSZ/AKuWYenztAIZtkJbcp+OrkK5L5qIbEhxwqeBjZ
+s9gD1w55xlo21caLkqfxMLTcxFI5Ek7D40dtW/U8DC+BJPEGEsIoYL+R+LDXsKCpgRDFuAwVpy906fS
lGDIbjMB77UELBGBwQKDBV4kGR2Uh2SB3nBJIH+OhsHAun7PBb4sDFph8EeCM+4TXCeXDdS/V/ydKVLV
AAAAAElFTkSuQmCC
</value>
</data>
<data name="EditDeleteMenu.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@ -271,6 +262,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 +291,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="MainStatusBar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
@ -313,7 +304,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADo
HwAAAk1TRnQBSQFMAgEBGAEAAYgBAQGIAQEBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
HwAAAk1TRnQBSQFMAgEBGAEAAZABAQGQAQEBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAAXADAAEBAQABCAYAARwYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
@ -540,15 +531,6 @@
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAFBJREFUOE9joBh8+/btPz4MVYYbgBQ5OTmBMUwTMh+qDDegigHYNBKL4S6A0chs
YmjauYAQhqkbTi5A1ojMJ0QTNIAQRvECNgxNb4MWMDAAAPsOTf9dAGOQAAAAAElFTkSuQmCC
</value>
</data>
<data name="ListContextReplaceMenu.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
xAAADsQBlSsOGwAAAJ5JREFUOE/VkcEJwzAMRTNSZ/AKuWYenztAIZtkJbcp+OrkK5L5qIbEhxwqeBjZ
+s9gD1w55xlo21caLkqfxMLTcxFI5Ek7D40dtW/U8DC+BJPEGEsIoYL+R+LDXsKCpgRDFuAwVpy906fS
lGDIbjMB77UELBGBwQKDBV4kGR2Uh2SB3nBJIH+OhsHAun7PBb4sDFph8EeCM+4TXCeXDdS/V/ydKVLV
AAAAAElFTkSuQmCC
</value>
</data>
<data name="ListContextDeleteMenu.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">