private void CreateDayView() { m_DayView = new TDLDayView(new UIExtension.TaskIcon(m_HwndParent), new UIExtension.TaskRecurrences(m_HwndParent), DPIScaling.Scale(5)); m_DayView.NewAppointment += new Calendar.NewAppointmentEventHandler(OnDayViewNewAppointment); m_DayView.SelectionChanged += new Calendar.AppointmentEventHandler(OnDayViewSelectionChanged); m_DayView.AppointmentMove += new Calendar.AppointmentEventHandler(OnDayViewAppointmentChanged); m_DayView.WeekChange += new Calendar.WeekChangeEventHandler(OnDayViewWeekChanged); m_DayView.MouseWheel += new MouseEventHandler(OnDayViewMouseWheel); m_DayView.MouseDoubleClick += new MouseEventHandler(OnDayViewMouseDoubleClick); // Performing icon editing from a 'MouseUp' or 'MouseClick' event // causes the edit icon dialog to fail to correctly get focus but // counter-intuitively it works from 'MouseDown' m_DayView.MouseDown += new MouseEventHandler(OnDayViewMouseClick); m_DayView.StartDate = DateTime.Now; m_DayView.SetFont(FontName, 8); m_WeekLabel.StartDate = m_DayView.StartDate; if (VisualStyleRenderer.IsSupported) { m_DayView.BorderStyle = BorderStyle.FixedSingle; } else { m_DayView.BorderStyle = BorderStyle.Fixed3D; } Controls.Add(m_DayView); }
private void CreateDayView() { m_DayView = new TDLDayView(m_TaskIcons, DPIScaling.Scale(5)); m_DayView.NewAppointment += new Calendar.NewAppointmentEventHandler(OnDayViewNewAppointment); m_DayView.SelectionChanged += new Calendar.AppointmentEventHandler(OnDayViewSelectionChanged); m_DayView.AppointmentMove += new Calendar.AppointmentEventHandler(OnDayViewAppointmentChanged); m_DayView.WeekChange += new Calendar.WeekChangeEventHandler(OnDayViewWeekChanged); m_DayView.MouseWheel += new MouseEventHandler(OnDayViewMouseWheel); // Performing icon editing from a 'MouseUp' or 'MouseClick' event // causes the edit icon dialog to fail to correctly get focus but // counter-intuitively it works from 'MouseDown' m_DayView.MouseDown += new MouseEventHandler(OnDayViewMouseClick); m_DayView.StartDate = DateTime.Now; m_DayView.SetFont(FontName, 8); Controls.Add(m_DayView); }