예제 #1
0
        /// <summary>
        /// Loads the settings.
        /// </summary>
        private void LoadSettings()
        {
            try
            {
                var    sr = new SettingsReader("FLV Extract", "settings.txt");
                string val;

                if ((val = sr.Load("ExtractVideo")) != null)
                {
                    chkVideo.Checked = (val != "0");
                }
                if ((val = sr.Load("ExtractTimeCodes")) != null)
                {
                    chkTimeCodes.Checked = (val != "0");
                }
                if ((val = sr.Load("ExtractAudio")) != null)
                {
                    chkAudio.Checked = (val != "0");
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
예제 #2
0
        private void LoadSettings()
        {
            SettingsReader sr = new SettingsReader("FLV Extract", "settings.txt");
            string         val;

            if ((val = sr.Load("ExtractVideo")) != null)
            {
                chkVideo.Checked = (val != "0");
            }
            if ((val = sr.Load("ExtractTimeCodes")) != null)
            {
                chkTimeCodes.Checked = (val != "0");
            }
            if ((val = sr.Load("ExtractAudio")) != null)
            {
                chkAudio.Checked = (val != "0");
            }
        }
예제 #3
0
        /// <summary>
        /// Loads the settings.
        /// </summary>
        private void LoadSettings()
        {
            try
            {
                var sr = new SettingsReader("FLV Extract", "settings.txt");
                string val;

                if ((val = sr.Load("ExtractVideo")) != null)
                {
                    chkVideo.Checked = (val != "0");
                }
                if ((val = sr.Load("ExtractTimeCodes")) != null)
                {
                    chkTimeCodes.Checked = (val != "0");
                }
                if ((val = sr.Load("ExtractAudio")) != null)
                {
                    chkAudio.Checked = (val != "0");
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
예제 #4
0
        private void LoadSettings()
        {
            SettingsReader sr = new SettingsReader("CUE Tools", "settings.txt");
            string         val;

            val = sr.Load("OutputPathGeneration");
            if (val != null)
            {
                try {
                    SelectedOutputPathGeneration = (OutputPathGeneration)Int32.Parse(val);
                }
                catch { }
            }

            val = sr.Load("OutputSubdirectory");
            if (val != null)
            {
                txtCreateSubdirectory.Text = val;
            }

            val = sr.Load("OutputFilenameSuffix");
            if (val != null)
            {
                txtAppendFilename.Text = val;
            }

            val = sr.Load("OutputCustomFormat");
            if (val != null)
            {
                txtCustomFormat.Text = val;
            }

            val = sr.Load("NoAudioOutput");
            if (val != null)
            {
                chkNoAudioOutput.Checked = (val != "0");
            }

            val = sr.Load("OutputAudioFormat");
            if (val != null)
            {
                try {
                    SelectedOutputAudioFormat = (OutputAudioFormat)Int32.Parse(val);
                }
                catch { }
            }

            val = sr.Load("CUEStyle");
            if (val != null)
            {
                try {
                    SelectedCUEStyle = (CUEStyle)Int32.Parse(val);
                }
                catch { }
            }

            val = sr.Load("KeepOriginalFilenames");
            if (val != null)
            {
                chkKeepOriginalFilenames.Checked = (val != "0");
            }

            val = sr.Load("SingleFilenameFormat");
            if (val != null)
            {
                txtSingleFilenameFormat.Text = val;
            }

            val = sr.Load("TrackFilenameFormat");
            if (val != null)
            {
                txtTrackFilenameFormat.Text = val;
            }

            val = sr.Load("RemoveSpecialCharacters");
            if (val != null)
            {
                chkRemoveSpecial.Checked = (val != "0");
            }

            val = sr.Load("SpecialCharactersExceptions");
            if (val != null)
            {
                txtSpecialExceptions.Text = val;
            }

            val = sr.Load("ReplaceSpaces");
            if (val != null)
            {
                chkReplaceSpaces.Checked = (val != "0");
            }

            val = sr.Load("WriteOffset");
            if (val != null)
            {
                if (!Int32.TryParse(val, out _writeOffset))
                {
                    _writeOffset = 0;
                }
            }

            val           = sr.Load("PreserveHTOA");
            _preserveHTOA = (val != null) ? (val != "0") : true;

            val = sr.Load("UsePregapForFirstTrackInSingleFile");
            _usePregapForFirstTrackInSingleFile = (val != null) ? (val != "0") : false;

            val = sr.Load("AutoCorrectFilenames");
            _autoCorrectFilenames = (val != null) ? (val != "0") : false;

            val = sr.Load("FLACCompressionLevel");
            if ((val == null) || !Int32.TryParse(val, out _flacCompressionLevel) ||
                (_flacCompressionLevel < 0) || (_flacCompressionLevel > 8))
            {
                _flacCompressionLevel = 5;
            }

            val         = sr.Load("FLACVerify");
            _flacVerify = (val != null) ? (val != "0") : false;

            val = sr.Load("WVCompressionMode");
            if ((val == null) || !Int32.TryParse(val, out _wvCompressionMode) ||
                (_wvCompressionMode < 0) || (_wvCompressionMode > 3))
            {
                _wvCompressionMode = 1;
            }

            val = sr.Load("WVExtraMode");
            if ((val == null) || !Int32.TryParse(val, out _wvExtraMode) ||
                (_wvExtraMode < 0) || (_wvExtraMode > 6))
            {
                _wvExtraMode = 0;
            }
        }