예제 #1
0
        private void frmSample18_Load(object sender, System.EventArgs e)
        {
            DateTime toDayPlus3  = DateTime.Today.AddDays(3);
            DateTime toDayMinus3 = DateTime.Today.AddDays(-3);
            DateTime now         = DateTime.Now;


            cbStart.Validator = new DevAge.ComponentModel.Validator.ValidatorTypeConverter(typeof(DateTime));
            cbStart.Value     = new DateTime(toDayMinus3.Year, toDayMinus3.Month, toDayMinus3.Day, 8, 0, 0);
            cbEnd.Validator   = new DevAge.ComponentModel.Validator.ValidatorTypeConverter(typeof(DateTime));
            cbEnd.Value       = new DateTime(toDayPlus3.Year, toDayPlus3.Month, toDayPlus3.Day, 18, 0, 0);

            listEditor1.ItemType = typeof(SourceGrid.Planning.AppointmentBase);

            SourceGrid.Planning.IAppointment appointment1 = new SourceGrid.Planning.AppointmentBase("Dentist",
                                                                                                    new DateTime(now.Year, now.Month, now.Day, 9, 0, 0),
                                                                                                    new DateTime(now.Year, now.Month, now.Day, 11, 30, 0));
            SourceGrid.Planning.IAppointment appointment2 = new SourceGrid.Planning.AppointmentBase("Appointment 1",
                                                                                                    new DateTime(now.Year, now.Month, now.Day, 16, 0, 0),
                                                                                                    new DateTime(now.Year, now.Month, now.Day, 16, 45, 0));
            planningGrid1.Appointments.Add(appointment1);
            planningGrid1.Appointments.Add(appointment2);

            listEditor1.List = new ArrayList(planningGrid1.Appointments);
            listEditor1.LoadList();

            LoadPlanning();
        }
예제 #2
0
 private void VisualizeForm_Load(object sender, EventArgs e)
 {
     SourceGrid.Planning.IAppointment appointment1 = new SourceGrid.Planning.AppointmentBase("Dentist",
                                                                                             new DateTime(now.Year, now.Month, now.Day, 9, 0, 0),
                                                                                             new DateTime(now.Year, now.Month, now.Day, 11, 30, 0));
     SourceGrid.Planning.IAppointment appointment2 = new SourceGrid.Planning.AppointmentBase("Appointment 1",
                                                                                             new DateTime(now.Year, now.Month, now.Day, 16, 0, 0),
                                                                                             new DateTime(now.Year, now.Month, now.Day, 16, 45, 0));
     planningGrid1.Appointments.Add(appointment1);
     planningGrid1.Appointments.Add(appointment2);
     LoadPlanning();
 }
예제 #3
0
		private void frmSample18_Load(object sender, System.EventArgs e)
		{
			DateTime toDayPlus3 = DateTime.Today.AddDays(3);
			DateTime toDayMinus3 = DateTime.Today.AddDays(-3);
			DateTime now = DateTime.Now;


			cbStart.Validator = new DevAge.ComponentModel.Validator.ValidatorTypeConverter(typeof(DateTime));
            cbStart.Value = new DateTime(toDayMinus3.Year, toDayMinus3.Month, toDayMinus3.Day, 8, 0, 0);
			cbEnd.Validator = new DevAge.ComponentModel.Validator.ValidatorTypeConverter(typeof(DateTime));
            cbEnd.Value = new DateTime(toDayPlus3.Year, toDayPlus3.Month, toDayPlus3.Day, 18, 0, 0);

			listEditor1.ItemType = typeof(SourceGrid.Planning.AppointmentBase);

            SourceGrid.Planning.IAppointment appointment1 = new SourceGrid.Planning.AppointmentBase("Dentist",
                                    new DateTime(now.Year, now.Month, now.Day, 9, 0, 0),
                                    new DateTime(now.Year, now.Month, now.Day, 11, 30, 0));
            SourceGrid.Planning.IAppointment appointment2 = new SourceGrid.Planning.AppointmentBase("Appointment 1",
                                    new DateTime(now.Year, now.Month, now.Day, 16, 0, 0),
                                    new DateTime(now.Year, now.Month, now.Day, 16, 45, 0));
			planningGrid1.Appointments.Add( appointment1 );
			planningGrid1.Appointments.Add( appointment2 );

			listEditor1.List = new ArrayList(planningGrid1.Appointments);
			listEditor1.LoadList();

			LoadPlanning();
		}