Beispiel #1
0
        void Open()
        {
            var openDlg = new OpenFileDialog {
                Filter           = DotNetAssemblyOrModuleFilter,
                RestoreDirectory = true,
                Multiselect      = true,
            };

            if (openDlg.ShowDialog() != true)
            {
                return;
            }
            OpenDocumentsHelper.OpenDocuments(documentTreeView, appWindow.MainWindow, openDlg.FileNames);
        }
Beispiel #2
0
        void HandleAppArgs(IAppCommandLineArgs appArgs)
        {
            if (appArgs.Activate && appWindow.MainWindow.WindowState == WindowState.Minimized)
            {
                WindowUtils.SetState(appWindow.MainWindow, WindowState.Normal);
            }

            var decompiler = GetDecompiler(appArgs.Language);

            if (decompiler != null)
            {
                decompilerService.Value.Decompiler = decompiler;
            }

            if (appArgs.FullScreen != null)
            {
                appWindow.MainWindow.IsFullScreen = appArgs.FullScreen.Value;
            }

            if (appArgs.NewTab)
            {
                documentTabService.Value.OpenEmptyTab();
            }

            var files = appArgs.Filenames.ToArray();

            if (files.Length > 0)
            {
                OpenDocumentsHelper.OpenDocuments(documentTabService.Value.DocumentTreeView, appWindow.MainWindow, files, false);
            }

            // The files were lazily added to the treeview. Make sure they've been added to the TV
            // before we process the remaining command line args.
            if (files.Length > 0)
            {
                Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() => HandleAppArgs2(appArgs)));
            }
            else
            {
                HandleAppArgs2(appArgs);
            }
        }