/// The tab.\r
/// </param>\r
void GotoTab(OptionsTab tab);\r
+\r
+ /// <summary>\r
+ /// Refresh certain UI controls that can be updated outside preferences.\r
+ /// </summary>\r
+ void UpdateSettings();\r
}\r
}
\ No newline at end of file
/// <param name="action">\r
/// The action.\r
/// </param>\r
- void WhenDone(string action);\r
+ /// <param name="saveChange">\r
+ /// Save the change to the setting. Use false when updating UI.\r
+ /// </param>\r
+ void WhenDone(string action, bool saveChange);\r
\r
/// <summary>\r
/// The import.\r
/// <param name="action">action</param>\r
public void WhenDone(string action)\r
{\r
- this.QueueViewModel?.WhenDone(action);\r
+ this.QueueViewModel?.WhenDone(action, true);\r
}\r
\r
#endregion\r
/// </param>\r
private void UserSettingServiceSettingChanged(object sender, SettingChangedEventArgs e)\r
{\r
- if (e.Key == UserSettingConstants.ShowAdvancedTab)\r
+ switch (e.Key)\r
{\r
- this.NotifyOfPropertyChange(() => this.ShowAdvancedTab);\r
+ case UserSettingConstants.ShowAdvancedTab:\r
+ this.NotifyOfPropertyChange(() => this.ShowAdvancedTab);\r
+ break;\r
+\r
+ case UserSettingConstants.WhenCompleteAction:\r
+ this.QueueViewModel.WhenDone(this.userSettingService.GetUserSetting<string>(UserSettingConstants.WhenCompleteAction), false);\r
+ break;\r
}\r
+\r
}\r
\r
/// <summary>\r
using System.Globalization;\r
using System.IO;\r
using System.Linq;\r
- using System.Text;\r
using System.Windows;\r
\r
using Caliburn.Micro;\r
\r
// Use dvdnav\r
this.DisableLibdvdNav = userSettingService.GetUserSetting<bool>(UserSettingConstants.DisableLibDvdNav);\r
+\r
+ }\r
+\r
+ /// <summary>\r
+ /// Some settings can be changed outside of this window. This will refresh their UI controls.\r
+ /// </summary>\r
+ public void UpdateSettings()\r
+ {\r
+ this.WhenDone = userSettingService.GetUserSetting<string>("WhenCompleteAction");\r
}\r
\r
/// <summary>\r
/// The action.\r
/// </param>\r
public void WhenDone(string action)\r
+ {\r
+ this.WhenDone(action, true);\r
+ }\r
+\r
+ /// <summary>\r
+ /// Update the When Done Setting\r
+ /// </summary>\r
+ /// <param name="action">\r
+ /// The action.\r
+ /// </param>\r
+ /// <param name="saveChange">\r
+ /// Save the change to the setting. Use false when updating UI.\r
+ /// </param>\r
+ public void WhenDone(string action, bool saveChange)\r
{\r
this.WhenDoneAction = action;\r
- this.userSettingService.SetUserSetting(UserSettingConstants.WhenCompleteAction, action);\r
+\r
+ if (saveChange)\r
+ {\r
+ this.userSettingService.SetUserSetting(UserSettingConstants.WhenCompleteAction, action);\r
+ }\r
+\r
+ IOptionsViewModel ovm = IoC.Get<IOptionsViewModel>();\r
+ ovm.UpdateSettings();\r
}\r
\r
/// <summary>\r
\r
<MenuItem x:Name="doNothing"\r
cal:Message.Attach="[Event Click] = [Action WhenDone(doNothing.Header)]"\r
- Header="{x:Static Properties:ResourcesUI.QueueView_DoNothing}"\r
- IsCheckable="True"\r
- attachedProperties:MenuItemExtensions.GroupName="whenDone" />\r
- <MenuItem x:Name="shutdown"\r
- cal:Message.Attach="[Event Click] = [Action WhenDone(shutdown.Header)]"\r
- Header="{x:Static Properties:ResourcesUI.QueueView_Shutdown}"\r
- IsCheckable="True"\r
- attachedProperties:MenuItemExtensions.GroupName="whenDone" />\r
+ Header="{x:Static Properties:ResourcesUI.QueueView_DoNothing}" />\r
+ <MenuItem x:Name="shutdownSystem"\r
+ cal:Message.Attach="[Event Click] = [Action WhenDone(shutdownSystem.Header)]"\r
+ Header="{x:Static Properties:ResourcesUI.QueueView_Shutdown}" />\r
<MenuItem x:Name="suspend"\r
cal:Message.Attach="[Event Click] = [Action WhenDone(suspend.Header)]"\r
- Header="{x:Static Properties:ResourcesUI.QueueView_Suspend}"\r
- IsCheckable="True"\r
- attachedProperties:MenuItemExtensions.GroupName="whenDone" />\r
+ Header="{x:Static Properties:ResourcesUI.QueueView_Suspend}"/>\r
<MenuItem x:Name="hibernate"\r
cal:Message.Attach="[Event Click] = [Action WhenDone(hibernate.Header)]"\r
- Header="{x:Static Properties:ResourcesUI.QueueView_Hibernate}"\r
- IsCheckable="True"\r
- attachedProperties:MenuItemExtensions.GroupName="whenDone" />\r
+ Header="{x:Static Properties:ResourcesUI.QueueView_Hibernate}" />\r
<MenuItem x:Name="lock"\r
cal:Message.Attach="[Event Click] = [Action WhenDone(lock.Header)]"\r
- Header="{x:Static Properties:ResourcesUI.QueueView_LockSystem}"\r
- IsCheckable="True"\r
- attachedProperties:MenuItemExtensions.GroupName="whenDone" />\r
+ Header="{x:Static Properties:ResourcesUI.QueueView_LockSystem}" />\r
<MenuItem x:Name="logoff"\r
cal:Message.Attach="[Event Click] = [Action WhenDone(logoff.Header)]"\r
- Header="{x:Static Properties:ResourcesUI.QueueView_Logoff}"\r
- IsCheckable="True"\r
- attachedProperties:MenuItemExtensions.GroupName="whenDone" />\r
+ Header="{x:Static Properties:ResourcesUI.QueueView_Logoff}"/>\r
<MenuItem x:Name="quit"\r
cal:Message.Attach="[Event Click] = [Action WhenDone(quit.Header)]"\r
- Header="{x:Static Properties:ResourcesUI.QueueView_QuitHandBrake}"\r
- IsCheckable="True"\r
- attachedProperties:MenuItemExtensions.GroupName="whenDone" />\r
+ Header="{x:Static Properties:ResourcesUI.QueueView_QuitHandBrake}" />\r
</MenuItem>\r
</Menu>\r
</StatusBarItem>\r
\r
<MenuItem x:Name="doNothing"\r
cal:Message.Attach="[Event Click] = [Action WhenDone(doNothing.Header)]"\r
- Header="{x:Static Properties:ResourcesUI.QueueView_DoNothing}"\r
- IsCheckable="True"\r
- AttachedProperties:MenuItemExtensions.GroupName="whenDone" />\r
+ Header="{x:Static Properties:ResourcesUI.QueueView_DoNothing}" />\r
<MenuItem x:Name="shutdown"\r
cal:Message.Attach="[Event Click] = [Action WhenDone(shutdown.Header)]"\r
- Header="{x:Static Properties:ResourcesUI.QueueView_Shutdown}"\r
- IsCheckable="True"\r
- AttachedProperties:MenuItemExtensions.GroupName="whenDone" />\r
+ Header="{x:Static Properties:ResourcesUI.QueueView_Shutdown}" />\r
<MenuItem x:Name="suspend"\r
cal:Message.Attach="[Event Click] = [Action WhenDone(suspend.Header)]"\r
- Header="{x:Static Properties:ResourcesUI.QueueView_Suspend}"\r
- IsCheckable="True"\r
- AttachedProperties:MenuItemExtensions.GroupName="whenDone" />\r
+ Header="{x:Static Properties:ResourcesUI.QueueView_Suspend}" />\r
<MenuItem x:Name="hibernate"\r
cal:Message.Attach="[Event Click] = [Action WhenDone(hibernate.Header)]"\r
- Header="{x:Static Properties:ResourcesUI.QueueView_Hibernate}"\r
- IsCheckable="True"\r
- AttachedProperties:MenuItemExtensions.GroupName="whenDone" />\r
+ Header="{x:Static Properties:ResourcesUI.QueueView_Hibernate}"/>\r
<MenuItem x:Name="lock"\r
cal:Message.Attach="[Event Click] = [Action WhenDone(lock.Header)]"\r
- Header="{x:Static Properties:ResourcesUI.QueueView_LockSystem}"\r
- IsCheckable="True"\r
- AttachedProperties:MenuItemExtensions.GroupName="whenDone" />\r
+ Header="{x:Static Properties:ResourcesUI.QueueView_LockSystem}" />\r
<MenuItem x:Name="logoff"\r
cal:Message.Attach="[Event Click] = [Action WhenDone(logoff.Header)]"\r
- Header="{x:Static Properties:ResourcesUI.QueueView_Logoff}"\r
- IsCheckable="True"\r
- AttachedProperties:MenuItemExtensions.GroupName="whenDone" />\r
+ Header="{x:Static Properties:ResourcesUI.QueueView_Logoff}"/>\r
<MenuItem x:Name="quit"\r
cal:Message.Attach="[Event Click] = [Action WhenDone(quit.Header)]"\r
- Header="{x:Static Properties:ResourcesUI.QueueView_QuitHandBrake}"\r
- IsCheckable="True"\r
- AttachedProperties:MenuItemExtensions.GroupName="whenDone" />\r
+ Header="{x:Static Properties:ResourcesUI.QueueView_QuitHandBrake}"/>\r
</MenuItem>\r
</Menu>\r
\r