private void MainWindow_Loaded(object sender, RoutedEventArgs _e) { //Util.UI.HelpButtonHelper.EnableHelpButton(this, () => //{ // try // { // Process.Start(App.Current.Resources["urlHelp"] as string); // } // catch (Exception e) // { // SGLogger<MainWindow>.Warn("can not open help url", e); // } //}); (DataContext as VMMainWindow).LoadAsync(() => { SGLogger <MainWindow> .Info("Loaded"); Dispatcher.Invoke(() => { if (Settings.Default.IsFirstLaunch) { new DialogContent.ContentDonate().Show(); } }); }); }
public AppDomain GetExtAppDomain() { Evidence evi = AppDomain.CurrentDomain.Evidence; AppDomainSetup ads = new AppDomainSetup() { ApplicationBase = AppDomain.CurrentDomain.BaseDirectory, DisallowBindingRedirects = false, DisallowCodeDownload = true, ConfigurationFile = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile }; var appDomain = AppDomain.CreateDomain("ad", evi, ads); var loadedAssembly = AppDomain.CurrentDomain.GetAssemblies(); foreach (var loaded in loadedAssembly) { try { appDomain.Load(loaded.GetName()); } catch (Exception ex) { SGLogger <AutumnBox_GUI_Calller> .Debug(ex); } } return(appDomain); }
public void PlayOk() { SGLogger <AutumnBox_GUI_Calller> .Info("Playing ok"); if (Settings.Default.NotifyOnFinish) { Sounds.OK.Play(); } }
public ContentConnectNetDevice() { InitializeComponent(); DataContext = new VMContentConnectNetDevice() { OnCloseCallback = () => { SGLogger <ContentConnectNetDevice> .Info("??"); Finish(); } }; }
private void MainWindow_Loaded(object sender, RoutedEventArgs _e) { ViewModel.LoadAsync(() => { SGLogger <MainWindow> .Info("Loaded"); Dispatcher.Invoke(() => { if (Settings.Default.IsFirstLaunch) { new DialogContent.ContentDonate().Show(); } }); }); }