示例#1
0
        private static NonActivatableForm CreateForm()
        {
            var newForm = new NonActivatableForm
            {
                StartPosition    = FormStartPosition.Manual,
                FormBorderStyle  = FormBorderStyle.FixedToolWindow,
                AutoValidate     = AutoValidate.Disable,
                CausesValidation = false,
                ControlBox       = false,
                MaximizeBox      = false,
                MinimizeBox      = false,
                ShowIcon         = false,
                ShowInTaskbar    = false,
                SizeGripStyle    = SizeGripStyle.Hide,
                AutoScaleMode    = AutoScaleMode.Font,
                AutoScroll       = false,
                AutoSize         = false,
                HelpButton       = false,
                TopLevel         = true,
                WindowState      = FormWindowState.Normal,
                ClientSize       = new Size(0, 0)
            };

            return(newForm);
        }
示例#2
0
        public Bar(Monitor monitor, IEnumerable<IFixedWidthWidget> leftAlignedWidgets, IEnumerable<IFixedWidthWidget> rightAlignedWidgets,
            IEnumerable<ISpanWidget> middleAlignedWidgets, int barHeight = 20, Font font = null, Color? backgroundColor = null)
        {
            this.monitor = monitor;
            this.leftAlignedWidgets = leftAlignedWidgets.ToArray();
            this.rightAlignedWidgets = rightAlignedWidgets.ToArray();
            this.middleAlignedWidgets = middleAlignedWidgets.ToArray();
            this.barHeight = barHeight;
            this.font = font ?? new Font("Lucida Console", 8);

            this.form = CreateForm();
            if (backgroundColor != null)
            {
                this.form.BackColor = backgroundColor.Value;
            }
        }
示例#3
0
        public Bar(Monitor monitor, IEnumerable <IFixedWidthWidget> leftAlignedWidgets, IEnumerable <IFixedWidthWidget> rightAlignedWidgets,
                   IEnumerable <ISpanWidget> middleAlignedWidgets, int barHeight = 20, Font font = null, Color?backgroundColor = null)
        {
            this.monitor              = monitor;
            this.leftAlignedWidgets   = leftAlignedWidgets.ToArray();
            this.rightAlignedWidgets  = rightAlignedWidgets.ToArray();
            this.middleAlignedWidgets = middleAlignedWidgets.ToArray();
            this.barHeight            = barHeight;
            this.font = font ?? new Font("Lucida Console", 8);

            this.form = CreateForm();
            if (backgroundColor != null)
            {
                this.form.BackColor = backgroundColor.Value;
            }
        }
示例#4
0
        private static NonActivatableForm CreateForm()
        {
            var newForm = new NonActivatableForm
                {
                    StartPosition = FormStartPosition.Manual,
                    FormBorderStyle = FormBorderStyle.FixedToolWindow,
                    AutoValidate = AutoValidate.Disable,
                    CausesValidation = false,
                    ControlBox = false,
                    MaximizeBox = false,
                    MinimizeBox = false,
                    ShowIcon = false,
                    ShowInTaskbar = false,
                    SizeGripStyle = SizeGripStyle.Hide,
                    AutoScaleMode = AutoScaleMode.Font,
                    AutoScroll = false,
                    AutoSize = false,
                    HelpButton = false,
                    TopLevel = true,
                    WindowState = FormWindowState.Normal,
                    ClientSize = new Size(0, 0)
                };

            return newForm;
        }