Пример #1
0
		protected override void OnStartup(StartupEventArgs e)
		{
			base.OnStartup(e);
	        var initial = e.Args.Length > 0 ? e.Args[0] : null;
            _mainWindow = new MainDisplay(initial);
            _mainWindow.Show();
		}
Пример #2
0
        /// <summary>
        /// Raises the <see cref="E:System.Windows.Application.Startup"/> event.
        /// </summary>
        /// <param name="e">A <see cref="T:System.Windows.StartupEventArgs"/> that contains the event data.</param>
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            if (e.Args.Length > 0)
            {
                var mainWindow = new CSharpComicViewer.WPF.MainDisplay(e.Args[0]);
                mainWindow.Show();
            }
            else
            {
                var mainWindow = new CSharpComicViewer.WPF.MainDisplay(null);
                mainWindow.Show();
            }
        }