Пример #1
0
        public OptionsForm()
        {
            InitializeComponent();

            nudMaxRecentFiles.Value       = Settings.Default.RecentFiles_MaxFiles;
            chbCheckForUpdates.Checked    = Settings.Default.CheckForUpdates;
            chbRememberArchives.Checked   = Settings.Default.RememberArchives;
            chbSortBSADirectories.Checked = Settings.Default.SortArchiveDirectories;
            chbRetrieveRealSize.Checked   = Settings.Default.RetrieveRealSize;

            cbEncodings.Items.AddRange(_encodings);
            cbEncodings.SelectedItem = Encoding.GetEncoding(Settings.Default.EncodingCodePage);

            chbIconsFileList.Checked   = Settings.Default.Icons.HasFlag(Enums.Icons.FileList);
            chbIconsFolderTree.Checked = Settings.Default.Icons.HasFlag(Enums.Icons.FolderTree);

            chbMatchLastWriteTime.Checked = Settings.Default.MatchLastWriteTime;
            chbReplaceGNFExt.Checked      = Settings.Default.ReplaceGNFExt;

            foreach (var path in Settings.Default.QuickExtractPaths)
            {
                var item = new ListViewItem(path.Name);
                item.SubItems.Add(path.Path);
                item.SubItems.Add(path.UseFolderPath ? "Yes" : "No");
                item.Tag = path;

                lvQuickExtract.Items.Add(item);
            }

            lvQuickExtract.EnableVisualStyles();
            lvPreviewing.EnableVisualStyles();

            nudMaxResolutionW.Value = Settings.Default.PreviewMaxResolution.Width;
            nudMaxResolutionH.Value = Settings.Default.PreviewMaxResolution.Height;

            foreach (ListViewItem item in lvPreviewing.Items)
            {
                item.Checked = Settings.Default.BuiltInPreviewing.Contains(item.Text);
            }

            cbAssociateFiles.Checked   = _fileAssociationInitialValue = FileAssociation.GetFileAssociationEnabled();
            cbShellIntegration.Checked = _shellIntegrationInitialValue = FileAssociation.GetShellIntegrationEnabled();
            cbShellIntegration.Enabled = cbAssociateFiles.Checked;
        }