/// <summary>
 /// A simple constructor that initializes the object with the given values.
 /// </summary>
 /// <param name="p_atgTagger">The tagger to use to tag mods with metadata.</param>
 /// <param name="p_modMod">The mod to be tagged.</param>
 /// <param name="p_setSettings">The application and user settings.</param>
 /// <param name="p_thmTheme">The current theme to use for the views.</param>
 public ModTaggerVM(AutoTagger p_atgTagger, IMod p_modMod, ISettings p_setSettings, Theme p_thmTheme)
 {
     ModTagger             = p_atgTagger;
     Mod                   = p_modMod;
     Settings              = p_setSettings;
     CurrentTheme          = p_thmTheme;
     m_mifCurrentTagOption = new ModInfo(Mod);
     ModInfoEditorVM       = new ModInfoEditorVM(m_mifCurrentTagOption, p_setSettings);
     ModInfoEditorVM.EditedModInfoVM.LoadInfoValues(p_modMod);
 }
Exemple #2
0
        /// <summary>
        /// A simple constructor that initializes the object with the given values.
        /// </summary>
        /// <param name="p_vmlScriptEditorVM">The <see cref="InstallScriptEditorVM"/> that encapsulates the data
        /// and operations for diaplying the <see cref="IScript"/> editor.</param>
        /// <param name="p_vmlInfoEditorVM">The <see cref="ModInfoEditorVM"/> that encapsulates the data
        /// and operations for diaplying the <see cref="IModInfo"/> editor.</param>
        /// <param name="p_prjModProject">The <see cref="Project"/> to edit.</param>
        /// <param name="p_srgScriptTypeRegistry">The <see cref="IScriptTypeRegistry"/> of available <see cref="IScriptType"/>s.</param>
        /// <param name="p_mpkModBuilder">he <see cref="ModPackager"/> to use to build mod files
        /// from <see cref="Project"/>s.</param>
        public ModPackagingFormVM(InstallScriptEditorVM p_vmlScriptEditorVM, ModInfoEditorVM p_vmlInfoEditorVM, Project p_prjModProject, IScriptTypeRegistry p_srgScriptTypeRegistry, ModPackager p_mpkModBuilder)
        {
            Errors   = new ErrorContainer();
            Warnings = new ErrorContainer();

            ScriptEditorVM      = p_vmlScriptEditorVM;
            InfoEditorVM        = p_vmlInfoEditorVM;
            IScriptTypeRegistry = p_srgScriptTypeRegistry;
            ModBuilder          = p_mpkModBuilder;

            ModProject = p_prjModProject ?? new Project(p_srgScriptTypeRegistry);

            SaveCommand  = new Command <string>("Save Project", "Save the project.", SaveProject, ModProject.IsDirty);
            OpenCommand  = new Command("Open Project", "Open a project.", OpenProject);
            NewCommand   = new Command("New Project", "Create a new project.", NewProject);
            BuildCommand = new Command <string>("Build Mod", "Builds the mod file.", BuildMod);
        }