示例#1
0
 public OutlookMonthCalendar()
 {
     using (Graphics graphics = base.CreateGraphics())
     {
         this.m_scaleFactor.Width = graphics.DpiX / 96f;
         this.m_scaleFactor.Height = graphics.DpiY / 96f;
     }
     this.m_tooltipTimer.Enabled = false;
     this.m_tooltipTimer.Interval = this.m_tooltipDelay;
     this.m_tooltipTimer.Tick += new EventHandler(this.m_tooltipTimer_Tick);
     this.CalculateDays(this.m_monthCount);
     for (int i = 0; i < this.m_monthCount; i++)
     {
         this.m_rcMonths.Add(Rectangle.Empty);
         this.m_rcYears.Add(Rectangle.Empty);
     }
     this.CreateGdiObjects();
     this.InitMonthContextMenu();
     this.InitYearUpDown();
     base.Visible = true;
     base.Location = new Point(0, 0);
     base.Size = new Size(0xa4, 0x98);
     using (Graphics graphics2 = base.CreateGraphics())
     {
         this.m_layout.FontChange(graphics2, this.Font);
     }
     this.m_gradientBackColor = new GradientColor();
     this.m_gradientBackColor.PropertyChanged += new EventHandler(this.m_gradientBackColor_PropertyChanged);
     this.m_useGradient = false;
     this.m_titleVistaStyle = false;
     this.m_TouchNavigatorTool = new TouchNavigatorTool(this);
     this.m_TouchNavigatorTool.GestureDetected += new TouchNavigatorTool.GestureDetectedHandler(this.TouchNavigatorTool_GestureDetected);
 }
示例#2
0
        private void TouchNavigatorTool_GestureDetected(object sender, TouchNavigatorTool.GestureEventArgs e)
        {
            int months = this.m_calendarDimensions.Width * this.m_calendarDimensions.Height;
            switch (e.Gesture)
            {
                case TouchNavigatorTool.GestureType.Left:
                case TouchNavigatorTool.GestureType.Up:
                    this.Value = this.Value.AddMonths(months);
                    return;

                case TouchNavigatorTool.GestureType.Right:
                case TouchNavigatorTool.GestureType.Down:
                    this.Value = this.Value.AddMonths(-months);
                    return;
            }
        }
示例#3
0
 public GestureEventArgs(TouchNavigatorTool.GestureType aGesture)
 {
     this.m_Gesture = aGesture;
 }