예제 #1
0
        public TimeLineControl()
        {
            InitializeComponent();

            this.SetStyle(ControlStyles.ResizeRedraw, true);
            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);

            this.focuslessMouseWheelMessagingFilter = new UIUtils.FocuslessMouseWheelMessagingFilter(this);

            this.minMarkHeight = UI.UIUtils.Dpi.ScaleUp(25, 120);

            Func <int, int> makeEven = x => x % 2 != 0 ? (x + 1) : x;

            this.containersHeaderAreaHeight = makeEven(UI.UIUtils.Dpi.ScaleUp(12, 120));
            this.containerControlSize       = makeEven(UI.UIUtils.Dpi.ScaleUp(9, 120));

            contextMenu.Opened += delegate(object sender, EventArgs e)
            {
                Invalidate();
            };
            contextMenu.Closed += delegate(object sender, ToolStripDropDownClosedEventArgs e)
            {
                Invalidate();
            };
            this.Disposed += (sender, e) => focuslessMouseWheelMessagingFilter.Dispose();
        }
예제 #2
0
 public DoubleBufferedPanel()
 {
     InitializeComponent();
     SetStyle(
         ControlStyles.ResizeRedraw |
         ControlStyles.OptimizedDoubleBuffer |
         ControlStyles.AllPaintingInWmPaint |
         ControlStyles.Selectable, true);
     //DisplayPaintTime = true;
     this.Disposed += (s, e) => { if (focuslessMouseWheelMessagingFilter != null)
                                  {
                                      focuslessMouseWheelMessagingFilter.Dispose();
                                  }
     };
 }
예제 #3
0
        public TimeLineControl()
        {
            InitializeComponent();

            this.SetStyle(ControlStyles.ResizeRedraw, true);
            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);

            this.focuslessMouseWheelMessagingFilter = new UIUtils.FocuslessMouseWheelMessagingFilter(this);

            this.drawing = new ControlDrawing(new GraphicsResources(
                                                  "Tahoma", Font.Size, 6, System.Drawing.SystemColors.ButtonFace, new LogJoint.Drawing.Image(this.bookmarkPictureBox.Image)));

            this.datesSize = new Lazy <int>(() =>
            {
                using (LJD.Graphics g = new LJD.Graphics(this.CreateGraphics(), true))
                    return(drawing.MeasureDatesAreaHeight(g));
            });


            this.minMarkHeight = UI.UIUtils.Dpi.ScaleUp(25, 120);

            Func <int, int> makeEven = x => x % 2 != 0 ? (x + 1) : x;

            this.containersHeaderAreaHeight = makeEven(UI.UIUtils.Dpi.ScaleUp(12, 120));
            this.containerControlSize       = makeEven(UI.UIUtils.Dpi.ScaleUp(9, 120));

            contextMenu.Opened += delegate(object sender, EventArgs e)
            {
                Invalidate();
            };
            contextMenu.Closed += delegate(object sender, ToolStripDropDownClosedEventArgs e)
            {
                Invalidate();
            };
            this.Disposed += (sender, e) => focuslessMouseWheelMessagingFilter.Dispose();
        }