示例#1
0
        private void AcceptChanges()
        {
            fTempColumns.CopyTo(fOptions.IndividualListColumns);

            if (radSNP.Checked)
            {
                fOptions.DefNameFormat = NameFormat.nfFNP;
            }
            else if (radS_NP.Checked)
            {
                fOptions.DefNameFormat = NameFormat.nfF_NP;
            }
            else if (radS_N_P.Checked)
            {
                fOptions.DefNameFormat = NameFormat.nfF_N_P;
            }

            if (radDMY.Checked)
            {
                fOptions.DefDateFormat = DateFormat.dfDD_MM_YYYY;
            }
            else if (radYMD.Checked)
            {
                fOptions.DefDateFormat = DateFormat.dfYYYY_MM_DD;
            }

            fOptions.PlacesWithAddress = chkPlacesWithAddress.Checked;
            fOptions.ListHighlightUnparentedPersons = chkHighlightUnparented.Checked;
            fOptions.ListHighlightUnmarriedPersons  = chkHighlightUnmarried.Checked;
            fOptions.ShowDatesCalendar         = chkShowDatesCalendar.Checked;
            fOptions.ShowDatesSign             = chkShowDatesSigns.Checked;
            fOptions.Autosave                  = chkAutosave.Checked;
            fOptions.AutosaveInterval          = (int)numASMin.Value;
            fOptions.RemovableMediaWarning     = chkRemovableMediaWarning.Checked;
            fOptions.LoadRecentFiles           = chkLoadRecentFiles.Checked;
            fOptions.EmbeddedMediaPlayer       = chkEmbeddedMediaPlayer.Checked;
            fOptions.AllowMediaStoreReferences = chkAllowMediaDirectRefs.Checked;

            fOptions.ChartOptions.FamilyVisible     = chkSurname.Checked;
            fOptions.ChartOptions.NameVisible       = chkName.Checked;
            fOptions.ChartOptions.PatronymicVisible = chkPatronymic.Checked;
            fOptions.ChartOptions.DiffLines         = chkDiffLines.Checked;
            fOptions.ChartOptions.BirthDateVisible  = chkBirthDate.Checked;
            fOptions.ChartOptions.DeathDateVisible  = chkDeathDate.Checked;
            fOptions.ChartOptions.OnlyYears         = chkOnlyYears.Checked;
            fOptions.ChartOptions.Kinship           = chkKinship.Checked;
            fOptions.ChartOptions.SignsVisible      = chkSignsVisible.Checked;
            fOptions.ChartOptions.ChildlessExclude  = chkChildlessExclude.Checked;
            fOptions.ChartOptions.Decorative        = chkTreeDecorative.Checked;
            fOptions.ChartOptions.PortraitsVisible  = chkPortraitsVisible.Checked;
            fOptions.ChartOptions.DefaultPortraits  = chkDefaultPortraits.Checked;

            fOptions.ChartOptions.MaleColor      = UIHelper.ConvertColor(lblMaleColor.BackColor);
            fOptions.ChartOptions.FemaleColor    = UIHelper.ConvertColor(lblFemaleColor.BackColor);
            fOptions.ChartOptions.UnkSexColor    = UIHelper.ConvertColor(lblUnkSexColor.BackColor);
            fOptions.ChartOptions.UnHusbandColor = UIHelper.ConvertColor(lblUnHusbandColor.BackColor);
            fOptions.ChartOptions.UnWifeColor    = UIHelper.ConvertColor(lblUnWifeColor.BackColor);

            fOptions.Proxy.UseProxy = chkUseProxy.Checked;
            fOptions.Proxy.Server   = txtProxyServer.Text;
            fOptions.Proxy.Port     = txtProxyPort.Text;
            fOptions.Proxy.Login    = txtProxyLogin.Text;
            fOptions.Proxy.Password = txtProxyPass.Text;

            fOptions.PedigreeOptions.IncludeAttributes  = chkAttributes.Checked;
            fOptions.PedigreeOptions.IncludeNotes       = chkNotes.Checked;
            fOptions.PedigreeOptions.IncludeSources     = chkSources.Checked;
            fOptions.PedigreeOptions.IncludeGenerations = chkGenerations.Checked;

            if (radExcess.Checked)
            {
                fOptions.PedigreeOptions.Format = PedigreeFormat.Excess;
            }
            else if (radCompact.Checked)
            {
                fOptions.PedigreeOptions.Format = PedigreeFormat.Compact;
            }

            fOptions.ShowTips = chkShowOnStart.Checked;

            if (radFBNone.Checked)
            {
                fOptions.FileBackup = FileBackup.fbNone;
            }
            else if (radFBOnlyPrev.Checked)
            {
                fOptions.FileBackup = FileBackup.fbOnlyPrev;
            }
            else if (radFBEachRevision.Checked)
            {
                fOptions.FileBackup = FileBackup.fbEachRevision;
            }

            GKComboItem item = cmbLanguages.Items[cmbLanguages.SelectedIndex] as GKComboItem;

            if (item != null)
            {
                AppHost.Instance.LoadLanguage((int)item.Tag);
            }

            ancOptionsControl1.AcceptChanges();

            if (!chkExtendWomanSurnames.Checked)
            {
                fOptions.WomanSurnameFormat = WomanSurnameFormat.wsfNotExtend;
            }
            else
            {
                if (radMaiden_Married.Checked)
                {
                    fOptions.WomanSurnameFormat = WomanSurnameFormat.wsfMaiden_Married;
                }
                else if (radMarried_Maiden.Checked)
                {
                    fOptions.WomanSurnameFormat = WomanSurnameFormat.wsfMarried_Maiden;
                }
                else if (radMaiden.Checked)
                {
                    fOptions.WomanSurnameFormat = WomanSurnameFormat.wsfMaiden;
                }
                else if (radMarried.Checked)
                {
                    fOptions.WomanSurnameFormat = WomanSurnameFormat.wsfMarried;
                }
            }

            fOptions.Geocoder = cmbGeocoder.Text;

            DialogResult = DialogResult.OK;
        }
示例#2
0
 private void AcceptColumnsList()
 {
     fTempColumns.CopyTo(fOptions.IndividualListColumns);
 }
示例#3
0
        private void AcceptChanges()
        {
            fTempColumns.CopyTo(fOptions.IndividualListColumns);

            if (radSNP.Checked)
            {
                fOptions.DefNameFormat = NameFormat.nfFNP;
            }
            else if (radS_NP.Checked)
            {
                fOptions.DefNameFormat = NameFormat.nfF_NP;
            }
            else if (radS_N_P.Checked)
            {
                fOptions.DefNameFormat = NameFormat.nfF_N_P;
            }

            if (radDMY.Checked)
            {
                fOptions.DefDateFormat = DateFormat.dfDD_MM_YYYY;
            }
            else if (radYMD.Checked)
            {
                fOptions.DefDateFormat = DateFormat.dfYYYY_MM_DD;
            }

            fOptions.PlacesWithAddress = chkPlacesWithAddress.Checked;
            fOptions.ListHighlightUnparentedPersons = chkHighlightUnparented.Checked;
            fOptions.ListHighlightUnmarriedPersons  = chkHighlightUnmarried.Checked;
            fOptions.ShowDatesCalendar         = chkShowDatesCalendar.Checked;
            fOptions.ShowDatesSign             = chkShowDatesSigns.Checked;
            fOptions.Autosave                  = chkAutosave.Checked;
            fOptions.AutosaveInterval          = (int)numASMin.Value;
            fOptions.RemovableMediaWarning     = chkRemovableMediaWarning.Checked;
            fOptions.LoadRecentFiles           = chkLoadRecentFiles.Checked;
            fOptions.EmbeddedMediaPlayer       = chkEmbeddedMediaPlayer.Checked;
            fOptions.AllowMediaStoreReferences = chkAllowMediaDirectRefs.Checked;
            fOptions.AutoCheckUpdates          = chkAutoCheckUpdates.Checked;

            fOptions.AllowMediaStoreRelativeReferences = chkAllowMediaStoreRelativeReferences.Checked;
            fOptions.MediaStoreDefault = (int)UIHelper.GetSelectedTag <MediaStoreType>(cmbMediaStoreDefault);
            fOptions.AllowDeleteMediaFileFromStgArc = chkAllowDeleteMediaFileFromStgArc.Checked;
            fOptions.AllowDeleteMediaFileFromRefs   = chkAllowDeleteMediaFileFromRefs.Checked;
            fOptions.DeleteMediaFileWithoutConfirm  = chkDeleteMediaFileWithoutConfirm.Checked;

            fOptions.TreeChartOptions.FamilyVisible      = chkSurname.Checked;
            fOptions.TreeChartOptions.NameVisible        = chkName.Checked;
            fOptions.TreeChartOptions.PatronymicVisible  = chkPatronymic.Checked;
            fOptions.TreeChartOptions.DiffLines          = chkDiffLines.Checked;
            fOptions.TreeChartOptions.BirthDateVisible   = chkBirthDate.Checked;
            fOptions.TreeChartOptions.DeathDateVisible   = chkDeathDate.Checked;
            fOptions.TreeChartOptions.OnlyYears          = chkOnlyYears.Checked;
            fOptions.TreeChartOptions.Kinship            = chkKinship.Checked;
            fOptions.TreeChartOptions.SignsVisible       = chkSignsVisible.Checked;
            fOptions.TreeChartOptions.ChildlessExclude   = chkChildlessExclude.Checked;
            fOptions.TreeChartOptions.Decorative         = chkTreeDecorative.Checked;
            fOptions.TreeChartOptions.PortraitsVisible   = chkPortraitsVisible.Checked;
            fOptions.TreeChartOptions.DefaultPortraits   = chkDefaultPortraits.Checked;
            fOptions.TreeChartOptions.InvertedTree       = chkInvertedTree.Checked;
            fOptions.TreeChartOptions.MarriagesDates     = chkMarriagesDates.Checked;
            fOptions.TreeChartOptions.ShowPlaces         = chkShowPlaces.Checked;
            fOptions.TreeChartOptions.HideUnknownSpouses = chkHideUnknownSpouses.Checked;

            fOptions.TreeChartOptions.Margins        = (int)numMargins.Value;
            fOptions.TreeChartOptions.BranchDistance = (int)numBranchDist.Value;
            fOptions.TreeChartOptions.LevelDistance  = (int)numGenDist.Value;
            fOptions.TreeChartOptions.SpouseDistance = (int)numSpouseDist.Value;

            fOptions.TreeChartOptions.MaleColor      = UIHelper.ConvertColor(lblMaleColor.BackColor);
            fOptions.TreeChartOptions.FemaleColor    = UIHelper.ConvertColor(lblFemaleColor.BackColor);
            fOptions.TreeChartOptions.UnkSexColor    = UIHelper.ConvertColor(lblUnkSexColor.BackColor);
            fOptions.TreeChartOptions.UnHusbandColor = UIHelper.ConvertColor(lblUnHusbandColor.BackColor);
            fOptions.TreeChartOptions.UnWifeColor    = UIHelper.ConvertColor(lblUnWifeColor.BackColor);

            fOptions.Proxy.UseProxy = chkUseProxy.Checked;
            fOptions.Proxy.Server   = txtProxyServer.Text;
            fOptions.Proxy.Port     = txtProxyPort.Text;
            fOptions.Proxy.Login    = txtProxyLogin.Text;
            fOptions.Proxy.Password = txtProxyPass.Text;

            fOptions.PedigreeOptions.IncludeAttributes  = chkAttributes.Checked;
            fOptions.PedigreeOptions.IncludeNotes       = chkNotes.Checked;
            fOptions.PedigreeOptions.IncludeSources     = chkSources.Checked;
            fOptions.PedigreeOptions.IncludeGenerations = chkGenerations.Checked;

            if (radExcess.Checked)
            {
                fOptions.PedigreeOptions.Format = PedigreeFormat.Excess;
            }
            else if (radCompact.Checked)
            {
                fOptions.PedigreeOptions.Format = PedigreeFormat.Compact;
            }

            fOptions.ShowTips = chkShowOnStart.Checked;

            if (radFBNone.Checked)
            {
                fOptions.FileBackup = FileBackup.fbNone;
            }
            else if (radFBOnlyPrev.Checked)
            {
                fOptions.FileBackup = FileBackup.fbOnlyPrev;
            }
            else if (radFBEachRevision.Checked)
            {
                fOptions.FileBackup = FileBackup.fbEachRevision;
            }

            var item = cmbLanguages.SelectedItem as ComboItem <int>;

            if (item != null)
            {
                AppHost.Instance.LoadLanguage((int)item.Tag);
            }

            ancOptionsControl1.AcceptChanges();

            if (!chkExtendWomanSurnames.Checked)
            {
                fOptions.WomanSurnameFormat = WomanSurnameFormat.wsfNotExtend;
            }
            else
            {
                if (radMaiden_Married.Checked)
                {
                    fOptions.WomanSurnameFormat = WomanSurnameFormat.wsfMaiden_Married;
                }
                else if (radMarried_Maiden.Checked)
                {
                    fOptions.WomanSurnameFormat = WomanSurnameFormat.wsfMarried_Maiden;
                }
                else if (radMaiden.Checked)
                {
                    fOptions.WomanSurnameFormat = WomanSurnameFormat.wsfMaiden;
                }
                else if (radMarried.Checked)
                {
                    fOptions.WomanSurnameFormat = WomanSurnameFormat.wsfMarried;
                }
            }

            fOptions.Geocoder = cmbGeocoder.Text;

            fOptions.AutoSortChildren = chkAutoSortChildren.Checked;
            fOptions.AutoSortSpouses  = chkAutoSortSpouses.Checked;
            fOptions.CheckTreeSize    = chkCheckTreeSize.Checked;
            fOptions.CharsetDetection = chkCharsetDetection.Checked;

            fOptions.FileBackupEachRevisionMaxCount = (int)numBackupRevisionsMaxCount.Value;
            fOptions.FirstCapitalLetterInNames      = chkFirstCapitalLetterInNames.Checked;
            fOptions.DialogClosingWarn = chkDialogClosingWarn.Checked;

            fOptions.TreeChartOptions.DepthLimit = (int)numDefaultDepth.Value;

            DialogResult = DialogResult.OK;
        }