Skip to content

Commit

Permalink
autofocus download button from history and back
Browse files Browse the repository at this point in the history
  • Loading branch information
setsumi committed Mar 13, 2022
1 parent 944898d commit 6ba4de6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/syosetuDownloader/HistoryWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ private void SelectCommand_Executed(object sender, ExecutedRoutedEventArgs e)
int from = item.Downloaded;
_parent.txtFrom.Text = (from > item.Total ? item.Total : from).ToString();
_parent.txtTo.Text = "";
//Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.ApplicationIdle, new Action(() => _parent.btnDownload.Focus()));
Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.ApplicationIdle, new Action(() => _parent.btnDownload.Focus()));
this.Close();
}

Expand Down
4 changes: 3 additions & 1 deletion src/syosetuDownloader/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public partial class MainWindow : Window
Shell32.Shell _shell;
string _exe_dir;
string _dl_dir;
readonly string _version = "2.4.0 plus 10";
readonly string _version = "2.4.0 plus 11";

public Util.GridViewTool.SortInfo sortInfo = new Util.GridViewTool.SortInfo();

Expand Down Expand Up @@ -151,6 +151,8 @@ public void GetFilenameFormat()
private static Action EmptyDelegate = delegate () { };
private void btnDownload_Click(object sender, RoutedEventArgs e)
{
btnHistory.Focus();

this._link = txtLink.Text;
this._start = txtFrom.Text;
this._end = txtTo.Text;
Expand Down

0 comments on commit 6ba4de6

Please sign in to comment.