Skip to content

Commit

Permalink
add minimize_to_tray option
Browse files Browse the repository at this point in the history
  • Loading branch information
skadefro committed May 13, 2024
1 parent d32f19a commit 578def7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions OpenRPA.Interfaces/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public class Config
public bool use_animate_mouse { get { return GetProperty(null, false); } set { SetProperty(null, value); } }
public TimeSpan use_postwait { get { return GetProperty(null, TimeSpan.Zero); } set { SetProperty(null, value); } }
public bool minimize { get { return GetProperty(null, true); } set { SetProperty(null, value); } }
public bool minimize_to_tray { get { return GetProperty(null, true); } set { SetProperty(null, value); } }
public bool recording_add_to_designer { get { return GetProperty(null, true); } set { SetProperty(null, value); } }
public TimeSpan reloadinterval { get { return GetProperty(null, TimeSpan.FromMinutes(5)); } set { SetProperty(null, value); } }
public TimeSpan move_animation_run_time { get { return GetProperty(null, TimeSpan.FromMilliseconds(500)); } set { SetProperty(null, value); } }
Expand Down Expand Up @@ -237,6 +238,7 @@ public void Save(string filename)
_ = use_animate_mouse;
_ = use_postwait;
_ = minimize;
_ = minimize_to_tray;
_ = recording_add_to_designer;
_ = reloadinterval;
_ = move_animation_run_time;
Expand Down
1 change: 1 addition & 0 deletions OpenRPA/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ private void Window_Closed(object sender, EventArgs e)
private void Window_StateChanged(object sender, EventArgs e)
{
Log.FunctionIndent("MainWindow", "Window_StateChanged");
if (!Config.local.minimize_to_tray) return;
if (WindowState == WindowState.Minimized)
{
Visibility = Visibility.Hidden;
Expand Down

0 comments on commit 578def7

Please sign in to comment.