/// <summary> /// Processes the default path arguments /// </summary> private void LoadCommandsFile() { this.commands = new Commands(); String filename = Path.Combine(PathHelper.AppDir, "FirstRun.ldb"); Object obj = ObjectSerializer.Deserialize(filename, this.commands); this.commands = (Commands)obj; }
/// <summary> /// Checks if we should process the commands /// </summary> public static Boolean ShouldProcessCommands() { Commands commands = new Commands(); String filename = Path.Combine(PathHelper.AppDir, "FirstRun.ldb"); //----------------------------- // Create FirstRun.ldb //----------------------------- //int i = 1; //commands.Entries.Add(new Command(i++, "MOVE", @"$(UserAppDir)\;$(UserAppDir).old\")); //commands.Entries.Add(new Command(i++, "CREATE", @"$(UserAppDir)\Library\")); //commands.Entries.Add(new Command(i++, "CREATE", @"$(UserAppDir)\Plugins\")); //commands.Entries.Add(new Command(i++, "CREATE", @"$(UserAppDir)\Projects\")); //commands.Entries.Add(new Command(i++, "COPY", @"$(AppDir)\Settings\Languages\;$(UserAppDir)\Settings\Languages\")); //commands.Entries.Add(new Command(i++, "COPY", @"$(AppDir)\Snippets\;$(UserAppDir)\Snippets\")); //commands.Entries.Add(new Command(i++, "COPY", @"$(AppDir)\Templates\;$(UserAppDir)\Templates\")); //commands.Entries.Add(new Command(i++, "COPY", @"$(AppDir)\Settings\Themes\;$(UserAppDir)\Settings\Themes\")); //commands.LatestCommand = i; //ObjectSerializer.Serialize(filename, commands); //----------------------------- if (File.Exists(filename)) { commands = (Commands)ObjectSerializer.Deserialize(filename, commands); if (commands.LatestCommand > Globals.Settings.LatestCommand) { return(true); } else { return(false); } } else { return(false); } }