コード例 #1
0
ファイル: App.xaml.cs プロジェクト: Boddlnagg/WordsLive
        protected override void OnStartup(StartupEventArgs e)
        {
            //System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("en-US");
            //System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");

            SingleInstance si = new SingleInstance(appGuid);
            si.ArgsRecieved += (args) => (this.MainWindow as MainWindow).HandleCommandLineArgs(args);
            si.Run(() =>
            {
                var win = new MainWindow();
                win.Loaded += (sender, args) => win.HandleCommandLineArgs(e.Args);
                win.Show();
                return this.MainWindow;
            }, e.Args);
        }
コード例 #2
0
ファイル: Controller.cs プロジェクト: SolidStumbler/WordsLive
		private void Init()
		{
			Application.Current.DispatcherUnhandledException += DispatcherUnhandledException;
			window = (MainWindow)Application.Current.MainWindow;
			SystemEvents.DisplaySettingsChanged += HandleDisplaySettingsChanged;
			DisplaySettingsChanged += (sender, args) => UpdatePresentationAreaFromSettings();

			LoadTypes(Assembly.GetAssembly(typeof(Media))); // WordsLive.Core.dll
			LoadTypes(Assembly.GetExecutingAssembly()); // WordsLive.exe
			LoadTypes(Assembly.GetAssembly(typeof(WordsLive.Presentation.Wpf.WpfPresentationWindow))); // WordsLive.Presentation.Wpf.dll

			WordsLive.Utils.ImageLoader.Manager.Instance.LoadingImage = new System.Windows.Media.Imaging.BitmapImage(new Uri("/WordsLive;component/Artwork/LoadingAnimation.png", UriKind.Relative));

			UpgradeSettings();
		}