示例#1
0
 public AbstractRenderer()
 {
     this.parent = null;
 }
示例#2
0
 public AbstractRenderer(Calendar.DayView parent)
 {
     this.parent = parent;
 }
        private void CreateDayView()
        {
            Calendar.DrawTool drawTool = new Calendar.DrawTool();

            this.m_DayView = new Calendar.DayView();
            drawTool.DayView = this.m_DayView;

            this.m_DayView.ActiveTool = drawTool;
            this.m_DayView.AllowInplaceEditing = true;
            this.m_DayView.AllowNew = true;
            this.m_DayView.AmPmDisplay = true;
            this.m_DayView.Anchor = (System.Windows.Forms.AnchorStyles.Bottom |
                                     System.Windows.Forms.AnchorStyles.Left |
                                     System.Windows.Forms.AnchorStyles.Right);
            this.m_DayView.AppHeightMode = Calendar.DayView.AppHeightDrawMode.TrueHeightAll;
            this.m_DayView.DaysToShow = 7;
            //this.m_dayView.Dock = System.Windows.Forms.DockStyle.Fill;
            this.m_DayView.DrawAllAppBorder = false;
            this.m_DayView.Font = new System.Drawing.Font("Tahoma", 8);
            this.m_DayView.Location = new System.Drawing.Point(0, 0);
            this.m_DayView.MinHalfHourApp = false;
            this.m_DayView.Name = "m_dayView";
            this.m_DayView.Renderer = m_renderer;
            this.m_DayView.SelectionEnd = new System.DateTime(((long)(0)));
            this.m_DayView.SelectionStart = new System.DateTime(((long)(0)));
            this.m_DayView.Size = new System.Drawing.Size(798, 328);
            this.m_DayView.StartDate = DateTime.Now;
            this.m_DayView.TabIndex = 0;
            this.m_DayView.Text = "m_dayView";
            this.m_DayView.WorkingHourEnd = 19;
            this.m_DayView.WorkingHourStart = 9;
            this.m_DayView.WorkingMinuteEnd = 0;
            this.m_DayView.WorkingMinuteStart = 0;

            // I want the hour height to always be 20 for now
            int hourHeight = 20;
            //this.m_DayView.SlotsPerHour = 4;
            this.m_DayView.SlotHeight = (hourHeight / this.m_DayView.SlotsPerHour);

            this.m_DayView.StartDate = DateTime.Now;
            this.m_DayView.NewAppointment += new Calendar.NewAppointmentEventHandler(this.OnDayViewNewAppointment);
            this.m_DayView.SelectionChanged += new Calendar.AppointmentEventHandler(this.OnDayViewSelectionChanged);
            this.m_DayView.ResolveAppointments += new Calendar.ResolveAppointmentsEventHandler(this.OnDayViewResolveAppointments);
            this.m_DayView.AppointmentMove += new Calendar.AppointmentEventHandler(this.OnDayViewAppointmentChanged);

            this.Controls.Add(m_DayView);
        }