mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-18 13:57:43 +01:00
Tweaked
This commit is contained in:
parent
78912c1552
commit
332d0d0cf5
2 changed files with 4 additions and 4 deletions
|
|
@ -648,7 +648,6 @@ public partial class FileDialog
|
||||||
private void AddFileNameInSelection(string name, bool setLastSelection)
|
private void AddFileNameInSelection(string name, bool setLastSelection)
|
||||||
{
|
{
|
||||||
this.selectedFileNames.Add(name);
|
this.selectedFileNames.Add(name);
|
||||||
this.SelectionChanged(this, this.GetFilePathName());
|
|
||||||
if (this.selectedFileNames.Count == 1)
|
if (this.selectedFileNames.Count == 1)
|
||||||
{
|
{
|
||||||
this.fileNameBuffer = name;
|
this.fileNameBuffer = name;
|
||||||
|
|
@ -657,7 +656,7 @@ public partial class FileDialog
|
||||||
{
|
{
|
||||||
this.fileNameBuffer = $"{this.selectedFileNames.Count} files Selected";
|
this.fileNameBuffer = $"{this.selectedFileNames.Count} files Selected";
|
||||||
}
|
}
|
||||||
|
this.SelectionChanged(this, this.GetFilePathName());
|
||||||
if (setLastSelection)
|
if (setLastSelection)
|
||||||
{
|
{
|
||||||
this.lastSelectedFileName = name;
|
this.lastSelectedFileName = name;
|
||||||
|
|
|
||||||
|
|
@ -27,12 +27,13 @@ public class FileDialogManager
|
||||||
#pragma warning restore SA1401
|
#pragma warning restore SA1401
|
||||||
#pragma warning restore SA1201
|
#pragma warning restore SA1201
|
||||||
|
|
||||||
public event EventHandler<string>? SelectionChanged;
|
|
||||||
private FileDialog? dialog;
|
private FileDialog? dialog;
|
||||||
private Action<bool, string>? callback;
|
private Action<bool, string>? callback;
|
||||||
private Action<bool, List<string>>? multiCallback;
|
private Action<bool, List<string>>? multiCallback;
|
||||||
private string savedPath = ".";
|
private string savedPath = ".";
|
||||||
|
|
||||||
|
public event EventHandler<string>? SelectionChanged;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create a dialog which selects an already existing folder.
|
/// Create a dialog which selects an already existing folder.
|
||||||
|
|
@ -184,7 +185,7 @@ public class FileDialogManager
|
||||||
return this.dialog?.GetCurrentPath();
|
return this.dialog?.GetCurrentPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnSelectionChange(object sender, string path) => this.SelectionChanged(sender, path);
|
private void OnSelectionChange(object sender, string path) => this.SelectionChanged?.Invoke(sender, path);
|
||||||
|
|
||||||
private void SetDialog(
|
private void SetDialog(
|
||||||
string id,
|
string id,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue