Esempio n. 1
0
        private void LoadCommandLineOrLastFile()
        {
            var fileToOpen = Environment.GetCommandLineArgs().Skip(1).FirstOrDefault()
                             ?? (App.UserSettings.EditorOpenLastFile ? Settings.Default.LastOpenFile : null);

            if (string.IsNullOrWhiteSpace(fileToOpen) ||
                fileToOpen == "-n" ||
                !Editor.LoadFile(fileToOpen))
            {
                Editor.NewFile();
            }
        }
Esempio n. 2
0
        private void LoadCommandLineOrLastFile()
        {
            var fileToOpen = Environment.GetCommandLineArgs().Skip(1).FirstOrDefault()
                             ?? (App.UserSettings.EditorOpenLastFile ? Settings.Default.LastOpenFile : null);

            if (fileToOpen != "-n")
            {
                if (Editor.LoadFile(fileToOpen) == false)
                {
                    Editor.NewFile();
                }
            }
        }
Esempio n. 3
0
        // Commands

        private void ExecuteNewFile(object sender, ExecutedRoutedEventArgs ea) => Editor.NewFile();