void App_Startup(object sender, StartupEventArgs e) { var mainWindow = new MainWindow(); if (e.Args.Any()) { MainFormLogic mainFormLogic = new MainFormLogic(); mainFormLogic.HandleNewDestination(mainWindow, e.Args[0]); } mainWindow.Show(); }
private void HandleDragDrop(object sender, DragEventArgs e) { e.Handled = true; var file = DragDrop.GetDroppedFiles(sender, e).FirstOrDefault(); if (file == null) { MessageBox.Show("Sorry, not sure what to do with this type of file.", "Oops"); } else { mainFormLogic.HandleNewDestination(this, file); } }