public void Start(Action onStop) { OnStop = onStop; InitDisposeManager = new InitDisposeManager(); ThreadChanger = new ThreadChanger(InitDisposeManager); OnCreate(); if (MainWindow == null) { MainWindow = new MainWindow(); } MainWindow.DataContext = MainWindowVM; App.MainWindow = MainWindow; InitDisposeManager.Init(); // var myResourceDictionary = new ResourceDictionary(); // myResourceDictionary.Source = new Uri(@"/Strev.MoMock.Lib;View\UserControls\LightTheme.xaml", UriKind.RelativeOrAbsolute); // Application.Current.Resources.MergedDictionaries.Add(myResourceDictionary); MainWindow.Show(); }
public void Stop() { InitDisposeManager.Dispose(); OnStop?.Invoke(); }