add (hardcoded) 'up' command with XButton1 ('back' mouse button)
This commit is contained in:
parent
be0c98c8ac
commit
686a47e426
@ -188,6 +188,16 @@ namespace UniversalEditor.Editors.FileSystem
|
||||
txtPath.Text = GetPath(CurrentFolder);
|
||||
}
|
||||
|
||||
protected override void OnMouseDown(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseDown(e);
|
||||
|
||||
if (e.Buttons == MouseButtons.XButton1)
|
||||
{
|
||||
GoUp();
|
||||
}
|
||||
}
|
||||
|
||||
private void tv_DragDropDataRequest(object sender, DragDropDataRequestEventArgs e)
|
||||
{
|
||||
if (tv.SelectedRows.Count == 0) return;
|
||||
@ -1004,17 +1014,23 @@ namespace UniversalEditor.Editors.FileSystem
|
||||
{
|
||||
if (e.Key == KeyboardKey.Back)
|
||||
{
|
||||
if (CurrentFolder == null)
|
||||
{
|
||||
(Application.Instance as UIApplication).PlaySystemSound(SystemSound.Beep);
|
||||
return;
|
||||
}
|
||||
|
||||
Folder parent = (CurrentFolder.Parent as Folder);
|
||||
CurrentFolder = parent;
|
||||
// FIXME: this should be a keyboard key binding in UWT Settings
|
||||
GoUp();
|
||||
}
|
||||
}
|
||||
|
||||
private void GoUp()
|
||||
{
|
||||
if (CurrentFolder == null)
|
||||
{
|
||||
(Application.Instance as UIApplication).PlaySystemSound(SystemSound.Beep);
|
||||
return;
|
||||
}
|
||||
|
||||
Folder parent = (CurrentFolder.Parent as Folder);
|
||||
CurrentFolder = parent;
|
||||
}
|
||||
|
||||
[EventHandler(nameof(tv), nameof(ListViewControl.BeforeContextMenu))]
|
||||
private void tv_BeforeContextMenu(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user