Changeset 6696 for branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administrator/3.4/Views
- Timestamp:
- 09/01/11 17:41:25 (13 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administrator/3.4/Views
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administrator/3.4/Views/HiveAppointment.cs
r6688 r6696 38 38 39 39 [XmlIgnore] 40 public int Layer {40 public new int Layer { 41 41 get { return base.Layer; } 42 42 set { base.Layer = value; } … … 44 44 45 45 [XmlIgnore] 46 public string Group {46 public new string Group { 47 47 get { return base.Group; } 48 48 set { base.Group = value; } … … 50 50 51 51 [XmlAttribute("Locked")] 52 public bool Locked {52 public new bool Locked { 53 53 get { return base.Locked; } 54 54 set { base.Locked = value; } … … 56 56 57 57 [XmlIgnore] 58 public Color Color {58 public new Color Color { 59 59 get { return base.Color; } 60 60 set { base.Color = value; } … … 62 62 63 63 [XmlIgnore] 64 public Color TextColor {64 public new Color TextColor { 65 65 get { return base.TextColor; } 66 66 set { base.TextColor = value; } … … 68 68 69 69 [XmlIgnore] 70 public Color BorderColor {70 public new Color BorderColor { 71 71 get { return base.BorderColor; } 72 72 set { base.BorderColor = value; } … … 74 74 75 75 [XmlIgnore] 76 public bool DrawBorder {76 public new bool DrawBorder { 77 77 get { return base.DrawBorder; } 78 78 set { base.DrawBorder = value; } … … 80 80 81 81 [XmlAttribute("AllDayEvent")] 82 public bool AllDayEvent {82 public new bool AllDayEvent { 83 83 get { return base.AllDayEvent; } 84 84 set { base.AllDayEvent = value; Changed = true; } … … 86 86 87 87 [XmlAttribute("Recurring")] 88 public bool Recurring {88 public new bool Recurring { 89 89 get { return base.Recurring; } 90 90 set { base.Recurring = value; Changed = true; } … … 98 98 99 99 [XmlAttribute("EndDate")] 100 public DateTime EndDate {100 public new DateTime EndDate { 101 101 get { return base.EndDate; } 102 102 set { base.EndDate = value; Changed = true; } … … 104 104 105 105 [XmlAttribute("StartDate")] 106 public DateTime StartDate {106 public new DateTime StartDate { 107 107 get { return base.StartDate; } 108 108 set { base.StartDate = value; Changed = true; } … … 110 110 111 111 [XmlIgnore] 112 public int AppointmentId {112 public new int AppointmentId { 113 113 get { return base.AppointmentId; } 114 114 set { base.AppointmentId = value; } … … 116 116 117 117 [XmlElement("Subject")] 118 public string Subject {118 public new string Subject { 119 119 get { return base.Subject; } 120 120 set { base.Subject = value; } … … 122 122 123 123 [XmlIgnore] 124 public string Location {124 public new string Location { 125 125 get { return base.Location; } 126 126 set { base.Location = value; } … … 128 128 129 129 [XmlIgnore] 130 public string Note {130 public new string Note { 131 131 get { return base.Note; } 132 132 set { base.Note = value; } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administrator/3.4/Views/Recurrence.Designer.cs
r6688 r6696 33 33 this.dtpFromTime = new System.Windows.Forms.DateTimePicker(); 34 34 this.label6 = new System.Windows.Forms.Label(); 35 this.txtDays = new System.Windows.Forms.TextBox();36 this.label4 = new System.Windows.Forms.Label();37 this.label7 = new System.Windows.Forms.Label();38 35 this.btSaveRecurrence = new System.Windows.Forms.Button(); 39 36 this.btCancelRecurrence = new System.Windows.Forms.Button(); … … 130 127 this.label6.Text = "Start Date:"; 131 128 // 132 // txtDays133 //134 this.txtDays.Location = new System.Drawing.Point(160, 13);135 this.txtDays.Name = "txtDays";136 this.txtDays.Size = new System.Drawing.Size(30, 20);137 this.txtDays.TabIndex = 24;138 this.txtDays.Text = "1";139 this.txtDays.Visible = false;140 //141 // label4142 //143 this.label4.AutoSize = true;144 this.label4.Location = new System.Drawing.Point(120, 16);145 this.label4.Name = "label4";146 this.label4.Size = new System.Drawing.Size(34, 13);147 this.label4.TabIndex = 23;148 this.label4.Text = "Every";149 this.label4.Visible = false;150 //151 // label7152 //153 this.label7.AutoSize = true;154 this.label7.Location = new System.Drawing.Point(196, 16);155 this.label7.Name = "label7";156 this.label7.Size = new System.Drawing.Size(59, 13);157 this.label7.TabIndex = 25;158 this.label7.Text = "week(s) on";159 this.label7.Visible = false;160 //161 129 // btSaveRecurrence 162 130 // … … 181 149 // gbWeekly 182 150 // 183 this.gbWeekly.Controls.Add(this.label7);184 151 this.gbWeekly.Controls.Add(this.cbSunday); 185 this.gbWeekly.Controls.Add(this.txtDays);186 152 this.gbWeekly.Controls.Add(this.cbSaturday); 187 153 this.gbWeekly.Controls.Add(this.cbFriday); 188 154 this.gbWeekly.Controls.Add(this.cbThursday); 189 this.gbWeekly.Controls.Add(this.label4);190 155 this.gbWeekly.Controls.Add(this.cbWednesday); 191 156 this.gbWeekly.Controls.Add(this.cbTuesday); … … 292 257 293 258 private System.Windows.Forms.GroupBox gbAppointment; 294 private System.Windows.Forms.TextBox txtDays;295 private System.Windows.Forms.Label label4;296 259 private System.Windows.Forms.DateTimePicker dtpEnd; 297 260 private System.Windows.Forms.DateTimePicker dtpStart; 298 261 private System.Windows.Forms.Label label5; 299 262 private System.Windows.Forms.Label label6; 300 private System.Windows.Forms.Label label7;301 263 private System.Windows.Forms.Button btSaveRecurrence; 302 264 private System.Windows.Forms.Button btCancelRecurrence; -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administrator/3.4/Views/Recurrence.cs
r6688 r6696 26 26 namespace HeuristicLab.Clients.Hive.Administrator.Views { 27 27 28 public enum RecurrenceMode {29 Daily,30 Weekly31 }32 33 28 public partial class Recurrence : Form { 34 29 … … 44 39 45 40 private void btSaveRecurrence_Click(object sender, EventArgs e) { 46 DateTime dateFrom, dateTo; 47 RecurrenceMode mode = RecurrenceMode.Daily; 48 int incWeek = 0; 41 DateTime dateFrom, dateTo; 49 42 HashSet<DayOfWeek> days = new HashSet<DayOfWeek>(); 50 43 … … 52 45 53 46 //check if valid 54 if (InputIsValid()) { 55 //set entity 47 if (InputIsValid()) 48 { 49 dateFrom = DateTime.Parse(dtpStart.Text + " " + dtpFromTime.Text); 50 dateTo = DateTime.Parse(dtpEnd.Text + " " + dtpToTime.Text); 56 51 57 dateFrom = DateTime.Parse(dtpStart.Text + " " + dtpFromTime.Text); 58 dateTo = DateTime.Parse(dtpEnd.Text + " " + dtpToTime.Text); 52 RecurrentEvent recurrentEvent = new RecurrentEvent() 53 { 54 DateFrom = dateFrom, 55 DateTo = dateTo, 56 AllDay = chbade.Checked, 57 WeekDays = days 58 }; 59 59 60 if (int.TryParse(txtDays.Text, out incWeek)) 61 mode = RecurrenceMode.Weekly; 62 else 63 mode = RecurrenceMode.Daily; 64 65 RecurrentEvent recurrentEvent = new RecurrentEvent() { 66 DateFrom = dateFrom, 67 DateTo = dateTo, 68 AllDay = chbade.Checked, 69 WeekDays = days, 70 IncWeeks = incWeek, 71 }; 72 73 //fire delegate and close the dialog 74 dialogClosedDelegate(recurrentEvent); 75 this.Close(); 76 } else 77 MessageBox.Show("Incorrect date format", "Schedule Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 60 //fire delegate and close the dialog 61 dialogClosedDelegate(recurrentEvent); 62 this.Close(); 63 } 64 else 65 { 66 MessageBox.Show("Incorrect date format", "Schedule Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 67 } 78 68 } 79 69 … … 100 90 101 91 private bool InputIsValid() { 102 DateTime dateFrom, dateTo; 103 int i = 0; 92 DateTime dateFrom, dateTo; 104 93 105 94 dateFrom = DateTime.Parse(dtpStart.Text + " " + dtpFromTime.Text); 106 95 dateTo = DateTime.Parse(dtpEnd.Text + " " + dtpToTime.Text); 107 96 108 if (dateFrom < dateTo && dateFrom.TimeOfDay < dateTo.TimeOfDay && int.TryParse(txtDays.Text, out i))97 if (dateFrom < dateTo && dateFrom.TimeOfDay < dateTo.TimeOfDay) 109 98 return true; 110 99 else -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administrator/3.4/Views/RecurrentEvent.cs
r6688 r6696 27 27 public DateTime DateFrom { get; set; } 28 28 public DateTime DateTo { get; set; } 29 public bool AllDay { get; set; } 30 public int IncWeeks { get; set; } 29 public bool AllDay { get; set; } 31 30 public HashSet<DayOfWeek> WeekDays { get; set; } 32 31 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administrator/3.4/Views/ScheduleView.cs
r6688 r6696 189 189 190 190 public void DialogClosed(RecurrentEvent e) { 191 CreateDailyRecurrenceAppointments(e.DateFrom, e.DateTo, e.AllDay, e. IncWeeks, e.WeekDays);192 } 193 194 private void CreateDailyRecurrenceAppointments(DateTime dateFrom, DateTime dateTo, bool allDay, int incWeek,HashSet<DayOfWeek> daysOfWeek) {191 CreateDailyRecurrenceAppointments(e.DateFrom, e.DateTo, e.AllDay, e.WeekDays); 192 } 193 194 private void CreateDailyRecurrenceAppointments(DateTime dateFrom, DateTime dateTo, bool allDay, HashSet<DayOfWeek> daysOfWeek) { 195 195 DateTime incDate = dateFrom; 196 196 Guid guid = Guid.NewGuid();
Note: See TracChangeset
for help on using the changeset viewer.