예제 #1
0
        private void extButtonFont_Click(object sender, EventArgs e)
        {
            Font   f       = FontHelpers.FontSelection(this.FindForm(), displayfont ?? this.Font);
            string setting = FontHelpers.GetFontSettingString(f);

            //System.Diagnostics.Debug.WriteLine($"Organics Font selected {setting}");
            PutSetting("font", setting);
            displayfont = f;
            DrawBodyInfo();
        }
예제 #2
0
        public override void Init()
        {
            ctrlset = GetSettingAsCtrlSet <CtrlList>(DefaultSetting);

            extCheckBoxWordWrap.Checked = GetSetting("wordwrap", false);
            extCheckBoxWordWrap.Click  += wordWrapToolStripMenuItem_Click;

            dataGridView.MakeDoubleBuffered();
            dataGridView.AutoSizeRowsMode          = DataGridViewAutoSizeRowsMode.DisplayedCells; // NEW! appears to work https://msdn.microsoft.com/en-us/library/74b2wakt(v=vs.110).aspx
            dataGridView.DefaultCellStyle.Padding  = new System.Windows.Forms.Padding(0, 1, 0, 1);
            dataGridView.DefaultCellStyle.WrapMode = extCheckBoxWordWrap.Checked ? DataGridViewTriState.True : DataGridViewTriState.False;

            discoveryform.OnNewUIEvent    += Discoveryform_OnNewUIEvent;
            discoveryform.OnHistoryChange += Discoveryform_OnHistoryChange;
            discoveryform.OnNewEntry      += Discoveryform_OnNewEntry;

            var enumlisttt = new Enum[] { EDTx.UserControlOrganics_extCheckBoxShowIncomplete_ToolTip, EDTx.UserControlOrganics_extButtonShowControl_ToolTip, EDTx.UserControlOrganics_extButtonFont_ToolTip, EDTx.UserControlOrganics_extCheckBoxWordWrap_ToolTip };

            BaseUtils.Translator.Instance.TranslateTooltip(toolTip, enumlisttt, this);
            rollUpPanelTop.SetToolTip(toolTip);

            displayfont = FontHelpers.GetFont(GetSetting("font", ""), null);

            extDateTimePickerStartDate.Value = GetSetting(dbStartDate, new DateTime(2014, 12, 14));
            var startchecked = extDateTimePickerStartDate.Checked = GetSetting(dbStartDateOn, false);

            extDateTimePickerEndDate.Value = GetSetting(dbEndDate, new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day));
            var endchecked = extDateTimePickerEndDate.Checked = GetSetting(dbEndDateOn, false);

            extDateTimePickerStartDate.ValueChanged += DateTimePicker_ValueChangedStart;
            extDateTimePickerEndDate.ValueChanged   += DateTimePicker_ValueChangedEnd;

            rollUpPanelTop.PinState           = GetSetting("PinState", true);
            extCheckBoxShowIncomplete.Checked = GetSetting("ShowIncomplete", true);
            extCheckBoxShowIncomplete.Click  += ExtCheckBoxShowIncomplete_Click;

            labelValue.Text = "";       // as its set to <code>
        }