Exemplo n.º 1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            this.ShutdownMode = ShutdownMode.OnLastWindowClose;

            string fileToOpen = Environment.GetCommandLineArgs().FirstOrDefault(s => File.Exists(s) && Path.GetExtension(s) != ".exe");

            MyMarkdownEditor.Windows.MainWindow.MainWindow mainWindow = new MainWindow(fileToOpen);
            mainWindow.Show();
        }
 private void NewWindow_OnExecuted(object sender, ExecutedRoutedEventArgs e)
 {
     MainWindow mainWindow = new MainWindow();
     mainWindow.Show();
 }