Example #1
0
        private void RecurrenceYearTest()
        {
            schedule1.TimeIncrement            = Gravitybox.Controls.Schedule.TimeIncrementConstants.Minute20;
            schedule1.AppointmentTimeIncrement = Gravitybox.Controls.Schedule.TimeIncrementConstants.Minute20;

            ScheduleDataset ds = new ScheduleDataset();

            schedule1.DataSource = ds;
            schedule1.Bind();

            Gravitybox.Objects.Recurrence r = new Recurrence();
            r.RecurrenceYear.DayInterval    = 2;
            r.RecurrenceYear.DayOrdinal     = RecurrenceOrdinalConstants.Last;
            r.RecurrenceYear.DayPosition    = RecurrenceOrdinalDayConstants.Thursday;
            r.RecurrenceYear.MonthInterval  = 5;
            r.RecurrenceYear.MonthOrdinal   = 6;
            r.RecurrenceYear.RecurrenceMode = RecurrenceSubTypeConstants.Ordinal;

            schedule1.RecurrenceCollection.Add(r);
            ds = (ScheduleDataset)schedule1.DataSource;


            //ds.RECURRENCE.

            string s = r.ToXML();

            r = new Recurrence();
            r.FromXML(s);
        }
Example #2
0
        private void XMLForm_Load(object sender, System.EventArgs e)
        {
            //Setup the screen
            schedule1.SetMinMaxDate(MINDATE, MINDATE.AddDays(DAYCOUNT - 1));
            schedule1.StartTime           = DateTime.Parse("8:00:00 AM");
            schedule1.DayLength           = 10;
            schedule1.TimeIncrement       = Gravitybox.Controls.Schedule.TimeIncrementConstants.Minute30;
            schedule1.AppointmentBar.Size = 10;
            lblDescription.Text           = "Press the buttons to save and load the appointments to/from an XML file.";

            Recurrence X = new Recurrence();
            string     S = X.ToXML();

            X.FromXML(S);
            System.Diagnostics.Debug.WriteLine(S);

            RandomAppointments();
        }