public void Execute() { SaveCleanerSettings.Settings = SaveCleanerSettings.Load(); Application.Current.Styles.Add(new StyleInclude(new Uri("resm:Style?assembly=Regul")) { Source = new Uri("avares://Regul.SaveCleaner/Icons.axaml") }); Base.Views.Windows.MainViewModel viewModel = WindowsManager.MainWindow.GetDataContext <Base.Views.Windows.MainViewModel>(); ((AvaloniaList <IAvaloniaObject>)((MenuItem)viewModel.MenuItems[1]).Items).Add(new MenuItem { Command = Command.Create(ShowSaveCleaner) }.Bind <MenuItem>(MenuItem.HeaderProperty, new DynamicResourceExtension("TheSims3SaveCleaner"))); }
public void Release() { SaveCleanerSettings.Save(); }