Example #1
0
        /// <summary>
        /// Despite its name, this only adds a default ConvertConfigure for the Configure instance when there is none.
        /// </summary>
        /// <param name="configuration">The Configure instance to process.</param>
        public static void setConfiguration(Configure configuration)
        {
            Configure = configuration;

              if (Configure.ConvertConfigure == null) //In case old project files doesn't have a Convert Configuration
            Configure.ConvertConfigure = new ConvertConfigure();
        }
 private void InitializeConfiguration(Configure Configure)
 {
     this.newFileSuffixTextBox.Text = Configure.newfilesuffix;
       this.newFilePrefixTextBox.Text = Configure.newfileprefix;
       this.sourceOutputCheckBox.Checked = Configure.sourceOutputFolder;
       this.alwaysMergeCheckBox.Checked = Configure.alwaysMerge;
       this.projectIncludeFileListCheckBox.Checked = Configure.projectIncludeFileList;
       this.dumpInfoCheckBox.Checked = Configure.diagnoseMkvinfoDump;
       this.dumpChapterInfoCheckBox.Checked = Configure.diagnoseChapterinfoDump;
       this.noChapterCheckBox.Checked = Configure.noChapterOutput;
       if (Configure.splitModeTimeEnd)
     this.timeEndRadioButton.Checked = Configure.splitModeTimeEnd;
       else if (Configure.splitModeTimeStart)
     this.timeStartRadioButton.Checked = Configure.splitModeTimeStart;
 }
Example #3
0
        /// <summary>
        /// Deserializes and loads the configuration file defined in this method's parent class.
        /// </summary>
        public static void getConfiguration()
        {
            if (File.Exists(configFile))
              {
            XmlSerializer xmlRead = new XmlSerializer(typeof(Configure));

            using (FileStream fileStream = new FileStream(configFile, FileMode.Open))
            {
              Configure = (Configure)xmlRead.Deserialize(fileStream);
            }

            if (Configure.ConvertConfigure == null) //In case old config file doesn't have a Convert Configuration
              Configure.ConvertConfigure = new ConvertConfigure();
              }
              else
              {
            Initialize();
            writeConfiguration();
              }
        }
 /// <summary>
 /// Custom constructor - sets a Configure object initially
 /// </summary>
 /// <param name="configure"></param>
 public ProjectManager(Configure configure)
 {
     this.configuration = configure;
 }
Example #5
0
 /// <summary>
 /// Initializes a default Configure instance and loads it.
 /// </summary>
 public static void Initialize()
 {
     Configure = new Configure();
       Configure.ConvertConfigure = new ConvertConfigure();
 }