mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-05-27 22:00:23 -04:00
Add "show original file" right click menu
This commit is contained in:
parent
bb36839774
commit
9687f823fb
22
Unity Studio/UnityStudioForm.Designer.cs
generated
22
Unity Studio/UnityStudioForm.Designer.cs
generated
@ -105,6 +105,8 @@
|
|||||||
this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
|
this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
|
||||||
this.saveFolderDialog1 = new System.Windows.Forms.SaveFileDialog();
|
this.saveFolderDialog1 = new System.Windows.Forms.SaveFileDialog();
|
||||||
this.treeTip = new System.Windows.Forms.ToolTip(this.components);
|
this.treeTip = new System.Windows.Forms.ToolTip(this.components);
|
||||||
|
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||||
|
this.showOriginalFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.menuStrip1.SuspendLayout();
|
this.menuStrip1.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||||
this.splitContainer1.Panel1.SuspendLayout();
|
this.splitContainer1.Panel1.SuspendLayout();
|
||||||
@ -122,6 +124,7 @@
|
|||||||
this.classPreviewPanel.SuspendLayout();
|
this.classPreviewPanel.SuspendLayout();
|
||||||
this.statusStrip1.SuspendLayout();
|
this.statusStrip1.SuspendLayout();
|
||||||
this.tabPage3.SuspendLayout();
|
this.tabPage3.SuspendLayout();
|
||||||
|
this.contextMenuStrip1.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// menuStrip1
|
// menuStrip1
|
||||||
@ -498,6 +501,7 @@
|
|||||||
this.assetListView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.assetListView_ColumnClick);
|
this.assetListView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.assetListView_ColumnClick);
|
||||||
this.assetListView.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.selectAsset);
|
this.assetListView.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.selectAsset);
|
||||||
this.assetListView.RetrieveVirtualItem += new System.Windows.Forms.RetrieveVirtualItemEventHandler(this.assetListView_RetrieveVirtualItem);
|
this.assetListView.RetrieveVirtualItem += new System.Windows.Forms.RetrieveVirtualItemEventHandler(this.assetListView_RetrieveVirtualItem);
|
||||||
|
this.assetListView.MouseClick += new System.Windows.Forms.MouseEventHandler(this.assetListView_MouseClick);
|
||||||
//
|
//
|
||||||
// columnHeaderName
|
// columnHeaderName
|
||||||
//
|
//
|
||||||
@ -851,6 +855,21 @@
|
|||||||
this.saveFolderDialog1.RestoreDirectory = true;
|
this.saveFolderDialog1.RestoreDirectory = true;
|
||||||
this.saveFolderDialog1.Title = "Browse for folder";
|
this.saveFolderDialog1.Title = "Browse for folder";
|
||||||
//
|
//
|
||||||
|
// contextMenuStrip1
|
||||||
|
//
|
||||||
|
this.contextMenuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||||
|
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.showOriginalFileToolStripMenuItem});
|
||||||
|
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||||
|
this.contextMenuStrip1.Size = new System.Drawing.Size(202, 56);
|
||||||
|
//
|
||||||
|
// showOriginalFileToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.showOriginalFileToolStripMenuItem.Name = "showOriginalFileToolStripMenuItem";
|
||||||
|
this.showOriginalFileToolStripMenuItem.Size = new System.Drawing.Size(201, 24);
|
||||||
|
this.showOriginalFileToolStripMenuItem.Text = "show original file";
|
||||||
|
this.showOriginalFileToolStripMenuItem.Click += new System.EventHandler(this.showOriginalFileToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
// UnityStudioForm
|
// UnityStudioForm
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
@ -891,6 +910,7 @@
|
|||||||
this.statusStrip1.ResumeLayout(false);
|
this.statusStrip1.ResumeLayout(false);
|
||||||
this.statusStrip1.PerformLayout();
|
this.statusStrip1.PerformLayout();
|
||||||
this.tabPage3.ResumeLayout(false);
|
this.tabPage3.ResumeLayout(false);
|
||||||
|
this.contextMenuStrip1.ResumeLayout(false);
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
@ -973,6 +993,8 @@
|
|||||||
private System.Windows.Forms.Label FMODcopyright;
|
private System.Windows.Forms.Label FMODcopyright;
|
||||||
private System.Windows.Forms.ToolStripMenuItem all3DObjectssplitToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem all3DObjectssplitToolStripMenuItem;
|
||||||
private OpenTK.GLControl glControl1;
|
private OpenTK.GLControl glControl1;
|
||||||
|
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem showOriginalFileToolStripMenuItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,6 +69,8 @@ namespace Unity_Studio
|
|||||||
|
|
||||||
private PrivateFontCollection pfc = new PrivateFontCollection();
|
private PrivateFontCollection pfc = new PrivateFontCollection();
|
||||||
|
|
||||||
|
private AssetPreloadData selectasset;
|
||||||
|
|
||||||
[DllImport("gdi32.dll")]
|
[DllImport("gdi32.dll")]
|
||||||
private static extern IntPtr AddFontMemResourceEx(IntPtr pbFont, uint cbFont, IntPtr pdv, [In] ref uint pcFonts);
|
private static extern IntPtr AddFontMemResourceEx(IntPtr pbFont, uint cbFont, IntPtr pdv, [In] ref uint pcFonts);
|
||||||
|
|
||||||
@ -1856,5 +1858,21 @@ namespace Unity_Studio
|
|||||||
FMODreset();
|
FMODreset();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void showOriginalFileToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var args = $"/select, {selectasset.sourceFile.filePath}";
|
||||||
|
var pfi = new ProcessStartInfo("explorer.exe", args);
|
||||||
|
Process.Start(pfi);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void assetListView_MouseClick(object sender, MouseEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.Button == MouseButtons.Right)
|
||||||
|
{
|
||||||
|
selectasset = (AssetPreloadData)assetListView.Items[assetListView.SelectedIndices[0]];
|
||||||
|
contextMenuStrip1.Show(assetListView, e.X, e.Y);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user