/// <summary>
 /// 计算结果。
 /// </summary>
 /// <param name="convertType">转换类型。</param>
 /// <param name="all">记录总条数。</param>
 /// <param name="calculated">已计算条数。</param>
 /// <param name="success">成功条数。</param>
 /// <param name="failed">失败条数。</param>
 /// <returns></returns>
 public static string ConvertResult(GEOConvertType convertType, int all, int calculated, int success, int failed)
 {
     return(string.Format(rm.GetString("ConvertResult"), GEODataTables.GetDescription(new GEOConvertType(), (int)convertType), all, calculated, success, failed));
 }
 /// <summary>
 /// 已保存数据。
 /// </summary>
 /// <param name="dataSourceType">数据源类型。</param>
 /// <param name="Count">记录数量。</param>
 /// <param name="dataType">数据类型</param>
 /// <returns></returns>
 public static string DataSaved(GEODataSourceType dataSourceType, int Count, GEODataType dataType)
 {
     return(string.Format(rm.GetString("DataSaved"), Count, GEODataTables.GetDescription(new GEODataType(), (int)dataType), GEODataTables.GetDescription(new GEODataSourceType(), (int)dataSourceType)));
 }
Beispiel #3
0
        public SettingsForm()
        {
            InitializeComponent();

            #region Multi-language
            this.Text = rm.GetString("Settings");
            TitleLabel.Text = rm.GetString("SettingTitle");

            GeneralTabPage.Text = rm.GetString("General");
            DataTabPage.Text = rm.GetString("Data");
            DataColorTabPage.Text = rm.GetString("Appearance");

            LanguageLabel.Text = rm.GetString("Language");
            BtnToolTip.SetToolTip(LanguageComboBox, rm.GetString("SetAppLanguage"));
            WorkFolderLabel.Text = rm.GetString("WorkFolder");
            BtnToolTip.SetToolTip(WorkFolderBtn, rm.GetString("SelectWorkFolder"));
            BtnToolTip.SetToolTip(OpenWorkFolder, rm.GetString("OpenWorkFolder"));
            DataFileNameLabel.Text = rm.GetString("DataFileName");
            DBNameLabel.Text = rm.GetString("DBName");
            DefaultEllipseTypeLabel.Text = rm.GetString("DefaultEllipse");
            BtnToolTip.SetToolTip(DefaultEllipseTypeComboBox, rm.GetString("DefaultEllipseAddingRow"));
            DefaultZoneTypeLabel.Text = rm.GetString("DefaultZoneType");
            BtnToolTip.SetToolTip(DefaultZoneTypeComboBox, rm.GetString("DefaultZoneTypeAddingRow"));

            SwitchAfterGaussTransferCheckBox.Text = rm.GetString("SwitchAfterGaussTransfer");
            ClearExistingRecordData2FileCheckBox.Text = rm.GetString("ClearExistingRecordData2File");
            ClearExistingRecordData2DBCheckBox.Text = rm.GetString("ClearExistingRecordData2DB");
            ClearExistingRecordDB2FileCheckBox.Text = rm.GetString("ClearExistingRecordDB2File");
            ClearExistingRecordFile2DBCheckBox.Text = rm.GetString("ClearExistingRecordFile2DB");

            DefaultCellColorLabel.Text = rm.GetString("DefaultCellColor");
            SelectedColorLabel.Text = rm.GetString("SelectedColor");
            ErrorColorLabel.Text = rm.GetString("ErrorColor");
            CorrectColorLabel.Text = rm.GetString("CorrectColor");
            DirtyColorLabel.Text = rm.GetString("DirtyColor");
            CalculatedColorLabel.Text = rm.GetString("CalculatedColor");

            ConfirmBtn.Text = rm.GetString("Save");
            CancelBtn.Text = rm.GetString("Cancel");
            ResetBtn.Text = rm.GetString("ResetDefault");
            BtnToolTip.SetToolTip(ConfirmBtn, rm.GetString("SaveBtnRequireRestart"));
            BtnToolTip.SetToolTip(CancelBtn, rm.GetString("AbortChange"));
            BtnToolTip.SetToolTip(ResetBtn, rm.GetString("ResetDefaultRequireStart"));
            #endregion

            //通用
            LanguageComboBox.DataSource = GEODataTables.GetLangType();
            LanguageComboBox.DisplayMember = nameof(GEOLang);
            LanguageComboBox.ValueMember = "Name";
            LanguageComboBox.DataBindings.Add(nameof(ComboBox.SelectedValue), S, nameof(S.Language));

            WorkFolderTextBox.DataBindings.Add(nameof(TextBox.Text), S, nameof(S.WorkFolder));
            DataFileNameTextBox.DataBindings.Add(nameof(TextBox.Text), S, nameof(S.DataFileName));
            DBNameTextBox.DataBindings.Add(nameof(TextBox.Text), S, nameof(S.DBName));

            DefaultEllipseTypeComboBox.DataSource = GEODataTables.GetEllipseType();
            DefaultEllipseTypeComboBox.DisplayMember = nameof(GEOEllipseType);
            DefaultEllipseTypeComboBox.ValueMember = "Value";
            DefaultEllipseTypeComboBox.DataBindings.Add(nameof(ComboBox.SelectedValue), S, nameof(S.DefaultEllipseType));

            DefaultZoneTypeComboBox.DataSource = GEODataTables.GetZoneType();
            DefaultZoneTypeComboBox.DisplayMember = nameof(GEOZoneType);
            DefaultZoneTypeComboBox.ValueMember = "Value";
            DefaultZoneTypeComboBox.DataBindings.Add(nameof(ComboBox.SelectedValue), S, nameof(S.DefaultZoneType));

            SwitchAfterGaussTransferCheckBox.DataBindings.Add(nameof(CheckBox.Checked), S, nameof(S.SwitchAfterGaussTransfer));

            //数据 
            ClearExistingRecordData2FileCheckBox.DataBindings.Add(nameof(CheckBox.Checked), S, nameof(S.ClearExistingRecordData2File));
            ClearExistingRecordData2DBCheckBox.DataBindings.Add(nameof(CheckBox.Checked), S, nameof(S.ClearExistingRecordData2DB));
            ClearExistingRecordDB2FileCheckBox.DataBindings.Add(nameof(CheckBox.Checked), S, nameof(S.ClearExistingRecordDB2File));
            ClearExistingRecordFile2DBCheckBox.DataBindings.Add(nameof(CheckBox.Checked), S, nameof(S.ClearExistingRecordFile2DB));

            //外观
            DefaultCellColorBtn.DataBindings.Add(nameof(Button.BackColor),S,nameof(S.DefaultCellColor));
            SelectedColorBtn.DataBindings.Add(nameof(Button.BackColor), S, nameof(S.SelectedColor));
            ErrorColorBtn.DataBindings.Add(nameof(Button.BackColor), S, nameof(S.ErrorColor));
            CorrectColorBtn.DataBindings.Add(nameof(Button.BackColor), S, nameof(S.CorrectColor));
            DirtyColorBtn.DataBindings.Add(nameof(Button.BackColor), S, nameof(S.DirtyColor));
            CalculatedColorBtn.DataBindings.Add(nameof(Button.BackColor), S, nameof(S.CalculatedColor));
        }