예제 #1
0
        private void ReadXmlConfig()
        {
            XmlConfig XCfg = new XmlConfig();

            XCfg.Load(GetXmlCfgFileName());
            SPSource.SelectedFolder      = XCfg.GetString("SourcePath", SPSource.SelectedFolder);
            SPDestination.SelectedFolder = XCfg.GetString("DestinationPath", SPDestination.SelectedFolder);
            TBForepart.Text                 = XCfg.GetString("Forepart", TBForepart.Text);
            TBExifFilename.Text             = XCfg.GetString("ExifFilename", TBExifFilename.Text);
            TBNoExifFilename.Text           = XCfg.GetString("NoExifFilename", TBNoExifFilename.Text);
            CBCreateDaySubDirectory.Checked = XCfg.GetBool("CreateDaySubDirectory", true);
            ChLBExtensions.SetItemChecked(0, XCfg.GetBool("ExtensionsJPG", true));
            ChLBExtensions.SetItemChecked(1, XCfg.GetBool("ExtensionsJPEG", true));
            ChLBExtensions.SetItemChecked(2, XCfg.GetBool("ExtensionsNAR", true));
            CBIgnoreSubfolder.Checked = XCfg.GetBool("IgnoreSubfolder", true);

            // exif list box
            XCfg.GetListBox("PreferedExifDateTimeTag", ref LBExifDates);
            if (LBExifDates.Items.Count <= 0) // pokud by se z XML nic nenacetlo, tak nahraju defaultni hodnoty
            {
                SetLBExifDateTags();
            }

            // [vt] 01-2010
            CBShowErrorLog.Checked = XCfg.GetBool("CBShowErrorLog", true);

            // 07-2011
            TBDupSubFolder.Text      = XCfg.GetString("DupSubFolder", TBDupSubFolder.Text);
            CBMoveMode.Checked       = XCfg.GetBool("MoveMode", CBMoveMode.Checked);
            CBMoveDuplicates.Checked = XCfg.GetBool("MoveDuplicates", CBMoveDuplicates.Checked);

            // eventy po nahrani konfigurace
            CBMoveDuplicates_CheckedChanged(null, null);
        }