示例#1
0
        public void SetSettings(ICleanUpSourceSettings settings)
        {
            Settings = settings;

            SettingsBinder.DataBindSetting <bool>(tagCheckGroupBox, "Checked", settings.Settings,
                                                  nameof(settings.UseTagCleaner));
        }
 private void SetupBindings()
 {
     SettingsBinder.DataBindSetting <bool>(backupCheckBox, "Checked", Settings,
                                           nameof(Settings.MakeBackups));
     SettingsBinder.DataBindSetting <bool>(preservePlaceHoldersCheckBox, "Checked", Settings,
                                           nameof(Settings.OverwriteSdlXliff));
     SettingsBinder.DataBindSetting <bool>(generateTargetCheckBox, "Checked", Settings,
                                           nameof(Settings.SaveTarget));
 }
示例#3
0
        public void SetSettings(ICleanUpConversionSettings settings, BatchTaskMode taskMode)
        {
            SettingsBinder.DataBindSetting <bool>(convCheckGroupBox, "Checked", settings.Settings,
                                                  nameof(settings.UseConversionSettings));

            SettingsBinder.DataBindSetting <bool>(useOnTranslatableCheckBox, "Checked", settings.Settings,
                                                  nameof(settings.ApplyToNonTranslatables));

            Settings  = settings;
            _taskMode = taskMode;
        }
示例#4
0
        public void SetSettings(ICleanUpSourceSettings settings)
        {
            Settings = settings;

            SettingsBinder.DataBindSetting <bool>(segmentLockerCheckGroupBox, "Checked", settings.Settings,
                                                  nameof(settings.UseSegmentLocker));
            SettingsBinder.DataBindSetting <bool>(contentCheckGroupBox, "Checked", settings.Settings,
                                                  nameof(settings.UseContentLocker));
            SettingsBinder.DataBindSetting <bool>(structureCheckGroupBox, "Checked", settings.Settings,
                                                  nameof(settings.UseStructureLocker));
        }
示例#5
0
        /// <summary>
        /// Calls Automatic task method for data binding
        /// </summary>
        /// <param name="settings"></param>
        public void SetSettings(GeneratorSettings settings)
        {
            _settings = settings;

            SettingsBinder.DataBindSetting <string>(tb_Prefix, "Text", _settings,
                                                    nameof(_settings.FileNamePrefix));
            SettingsBinder.DataBindSetting <decimal>(n_ColumnWidth, "Value", _settings,
                                                     nameof(_settings.ColumnWidth));
            SettingsBinder.DataBindSetting <bool>(cb_ExtractComments, "Checked", _settings,
                                                  nameof(_settings.ExtractComments));
        }
示例#6
0
        private void SetSettings(ContextSegmentLockerTaskSettings taskSettings)
        {
            // sets the UI element, i.e. the status dropdown list to the corresponding segment status value
            Settings = taskSettings;

            SettingsBinder.DataBindSetting <bool>(cb_paragraph, "Checked", Settings, nameof(Settings.ParagraphCheck));
            SettingsBinder.DataBindSetting <bool>(cb_link, "Checked", Settings, nameof(Settings.LinkCheck));
            SettingsBinder.DataBindSetting <bool>(cb_id, "Checked", Settings, nameof(Settings.IdCheck));
            SettingsBinder.DataBindSetting <bool>(cb_title, "Checked", Settings, nameof(Settings.TitleCheck));
            SettingsBinder.DataBindSetting <bool>(cb_note, "Checked", Settings, nameof(Settings.NoteCheck));
            SettingsBinder.DataBindSetting <bool>(cb_meta, "Checked", Settings, nameof(Settings.MetaCheck));
            SettingsBinder.DataBindSetting <bool>(cb_other, "Checked", Settings, nameof(Settings.OtherCheck));
            SettingsBinder.DataBindSetting <string>(tb_other_context, "Text", Settings, nameof(Settings.OtherTextbox));
            SettingsBinder.DataBindSetting <bool>(cb_clear_all_locked_segments, "Checked", Settings, nameof(Settings.ClearCheck));

            UpdateUi(taskSettings);
        }
        public void SetSettings(MyCustomBatchTaskSettings taskSettings)
        {
            // sets the UI element, i.e. the status dropdown list to the corresponding segment status value
            Settings = taskSettings;

            if (Settings.RegexPatterns == null)
            {
                Settings.RegexPatterns = new BindingList <RegExPattern>();
            }

            SettingsBinder.DataBindSetting <BindingList <RegExPattern> >(dgvRegEx, "DataSource", Settings, nameof(Settings.RegexPatterns));
            SettingsBinder.DataBindSetting <bool>(chkbxIncludeTagContent, "Checked", Settings, nameof(Settings.IncludeTagContent));

            dgvRegEx.DataSource = Settings.RegexPatterns;

            UpdateUI(taskSettings);
        }
        /// <summary>
        /// Calls Automatic task method for data binding
        /// </summary>
        /// <param name="settings"></param>
        public void SetSettings(GeneratorSettings settings)
        {
            _settings = settings;

            SettingsBinder.DataBindSetting <bool>(rb_ExcludeStatus, "Checked", _settings,
                                                  nameof(_settings.ExcludeStatus));
            SettingsBinder.DataBindSetting <bool>(rb_ExcludeCategory, "Checked", _settings,
                                                  nameof(_settings.ExclusionTypeCategory));
            SettingsBinder.DataBindSetting <bool>(cb_DontExportExact, "Checked", _settings,
                                                  nameof(_settings.DontExportExact));
            SettingsBinder.DataBindSetting <bool>(cb_DontExportContext, "Checked", _settings,
                                                  nameof(_settings.DontExportContext));
            SettingsBinder.DataBindSetting <bool>(cb_DontExportFuzzy, "Checked", _settings,
                                                  nameof(_settings.DontExportFuzzy));
            SettingsBinder.DataBindSetting <bool>(cb_DontExportNoMatch, "Checked", _settings,
                                                  nameof(_settings.DontExportNoMatch));
            UpdateUi(settings);
        }
 private void OnEnable()
 {
     settingsBinder = target as SettingsBinder;
 }
示例#10
0
 protected override void OnLoad(EventArgs e)
 {
     SettingsBinder.DataBindSetting <string>(textBox1, "Text", Settings, nameof(Settings.WordToReplace));
 }
示例#11
0
 protected override void OnLoad(EventArgs e)
 {
     SettingsBinder.DataBindSetting <bool>(copyToTargetRadioButton, "Checked", Settings, nameof(Settings.CopyToTarget));
     SettingsBinder.DataBindSetting <bool>(pseudoTranslateRadioButton, "Checked", Settings, nameof(Settings.PseudoTranslate));
 }
示例#12
0
 public Startup(IConfiguration configuration)
 {
     Configuration = configuration;
     SettingsBinder.Bind(configuration);
 }