mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-05-24 10:56:28 +00:00
Cemu Panel - Added feature to open dlc foler in explorer when clicking on the text box
This commit is contained in:
4
PCK-Studio/Features/CemuPanel.Designer.cs
generated
4
PCK-Studio/Features/CemuPanel.Designer.cs
generated
@@ -160,7 +160,6 @@
|
||||
this.GameDirectoryTextBox.CustomButton.UseSelectable = true;
|
||||
this.GameDirectoryTextBox.CustomButton.Visible = false;
|
||||
this.GameDirectoryTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.GameDirectoryTextBox.Enabled = false;
|
||||
this.GameDirectoryTextBox.Lines = new string[0];
|
||||
this.GameDirectoryTextBox.Location = new System.Drawing.Point(3, 3);
|
||||
this.GameDirectoryTextBox.MaxLength = 32767;
|
||||
@@ -181,6 +180,7 @@
|
||||
this.GameDirectoryTextBox.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.GameDirectoryTextBox.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
this.GameDirectoryTextBox.TextChanged += new System.EventHandler(this.GameDirectoryTextBox_TextChanged);
|
||||
this.GameDirectoryTextBox.Click += new System.EventHandler(this.GameDirectoryTextBox_Click);
|
||||
//
|
||||
// BrowseDirectoryBtn
|
||||
//
|
||||
@@ -213,6 +213,8 @@
|
||||
this.DLCTreeView.TabIndex = 13;
|
||||
this.DLCTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.DLCTreeView_AfterSelect);
|
||||
this.DLCTreeView.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.DLCTreeView_NodeMouseDoubleClick);
|
||||
this.DLCTreeView.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.DLCTreeView_KeyPress);
|
||||
this.DLCTreeView.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.DLCTreeView_PreviewKeyDown);
|
||||
//
|
||||
// DLCContextMenu
|
||||
//
|
||||
|
||||
@@ -47,17 +47,17 @@ namespace PckStudio.Features
|
||||
{
|
||||
try
|
||||
{
|
||||
var xml = new XmlDocument();
|
||||
xml.Load(settingsPath);
|
||||
GameDirectoryTextBox.Text = xml.SelectSingleNode("content").SelectSingleNode("mlc_path").InnerText;
|
||||
var xml = new XmlDocument();
|
||||
xml.Load(settingsPath);
|
||||
GameDirectoryTextBox.Text = xml.SelectSingleNode("content").SelectSingleNode("mlc_path").InnerText;
|
||||
GameDirectoryTextBox.ReadOnly = true;
|
||||
BrowseDirectoryBtn.Enabled = false;
|
||||
}
|
||||
BrowseDirectoryBtn.Enabled = false;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine(ex, category: $"{nameof(CemuPanel)}:{nameof(TryApplyCemuConfig)}");
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -295,5 +295,27 @@ namespace PckStudio.Features
|
||||
{
|
||||
ListDLCs();
|
||||
}
|
||||
|
||||
private void GameDirectoryTextBox_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (GameDirectoryTextBox.ReadOnly)
|
||||
{
|
||||
Process.Start(GetContentSubDirectory("WiiU", "DLC"));
|
||||
}
|
||||
}
|
||||
|
||||
private void DLCTreeView_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Enter && DLCTreeView.SelectedNode is not null)
|
||||
{
|
||||
openSkinPackToolStripMenuItem_Click(sender, EventArgs.Empty);
|
||||
}
|
||||
base.OnPreviewKeyDown(e);
|
||||
}
|
||||
|
||||
private void DLCTreeView_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user