/// <summary> /// Opens the given file as the root node. /// </summary> /// <param name = "file">The file to open.</param> private void _Open(string file) { if (File.Exists(file)) { Root = new LaunchGroupViewModel(LaunchGroup.LoadFrom(file)); Settings.Default.CurrentFile = file; } else { Root = new LaunchGroupViewModel(new LaunchGroup()); } }
/// <summary> /// Creates a new root launch group. Prompts user to save if they have changes. /// </summary> private void _New() { if (_PromptForContinueIfRootIsChanged()) { Root = new LaunchGroupViewModel(new LaunchGroup()); Settings.Default.CurrentFile = null; } }