示例#1
0
文件: InputBox.cs 项目: maestrodk/OST
        public InputBox(string title, string label, string value, OSTMain parent, Theme theme) // bool dark, Color darkPane, Color lightPane, Color controlDark, Color controlLight)
        {
            InitializeComponent();

            this.parent = parent;

            this.BackColor = theme.BackColor;
            this.ForeColor = theme.ForeColor;

            InputData.BackColor = theme.ControlBackColor;
            InputData.ForeColor = theme.ControlForeColor;

            DialogResult  = DialogResult.Cancel;
            StartPosition = FormStartPosition.CenterParent;

            Text = title;
            InputDataGroupBox.Text = label;
            Result = value;

            InputData.Text        = Result;
            InputOKButton.Enabled = (InputData.TextLength > 0);
        }
示例#2
0
        public ListViewLogger(ListView listView, Theme theme, OSTMain parentForm)
        {
            (parentForm as OSTMain).LogDebugMessage("ListViewLogger.ctor()");

            this.parentForm = parentForm;
            this.theme      = theme;

            listView.Scrollable  = true;
            listView.View        = View.Details;
            listView.HeaderStyle = ColumnHeaderStyle.None;
            listView.BorderStyle = BorderStyle.None;
            (listView.Parent as Panel).BorderStyle = BorderStyle.FixedSingle;

            // This disables the horizontal scroll bar.
            listView.Columns[0].Width = listView.Width - 4 - SystemInformation.VerticalScrollBarWidth;

            // Show item tooltips.
            listView.ShowItemToolTips = true;

            listView.ItemSelectionChanged += ItemSelectionChanged;
            this.listView = listView;
        }