コード例 #1
0
        private void Defaults_Load(object sender, EventArgs e)
        {
            lbName.Text              = Snippet.GetPath();
            tbName.Text              = Snippet.DefaultChildName ?? string.Empty;
            tbCode.Text              = Snippet.GetDefaultChildCode() ?? string.Empty;
            rtf.Rtf                  = Snippet.GetDefaultChildRtf() ?? string.Empty;
            lblModifiedOn.Text       = $"Modified on: {Snippet.CodeLastModificationDate:yyyy-MM-dd HH:mm:ss}";
            cbExpand.Checked         = Snippet.Expanded;
            checkBoxCodeType.Checked = Snippet.DefaultChildCodeTypeEnabled;
            _defaultTypeComboBoxHelper.SetSelectedIndex(Snippet.DefaultChildCodeType);
            _typeComboBoxHelper.SetSelectedIndex(Snippet.CodeType);
            cbImportant.Checked   = Snippet.Important;
            cbAlarm.Checked       = Snippet.AlarmActive;
            cbWordWrap.Checked    = Snippet.Wordwrap;
            cbHtmlPreview.Checked = Snippet.HtmlPreview;
            cbDefaultType.SelectedIndexChanged += CbDefaultType_SelectedIndexChanged;

            if (Snippet.AlarmDate.HasValue)
            {
                datePicker.Value  = Snippet.AlarmDate.Value.Date;
                timeControl.Value = Snippet.AlarmDate.Value;
            }
            Keys _keys = Snippet.ShortCutKeys;

            cbControl.Checked = _keys.HasFlag(Keys.Control);
            cbAlt.Checked     = _keys.HasFlag(Keys.Alt);
            cbShift.Checked   = _keys.HasFlag(Keys.Shift);

            _keys = Snippet.ShortCutKeys & ~Keys.Control;
            _keys = _keys & ~Keys.Alt;
            _keys = _keys & ~Keys.Shift;
            _shortCutKeysComboHelper.SetSelectedIndex(_keys);
        }
コード例 #2
0
 private void FormSettings_Load(object sender, EventArgs e)
 {
     _ComboBoxHelper.SetSelectedIndex(Config.BackupMode);
     textBoxLocation.Text = Config.BackupLocation;
 }
コード例 #3
0
 private void FormSettings_Load(object sender, EventArgs e)
 {
     _ComboBoxHelper.SetSelectedIndex(Config.Theme);
     rbSortA.Checked = Config.SortMode == ESortMode.Alphabetic;
     rbSortB.Checked = Config.SortMode == ESortMode.AlphabeticGrouped;
 }