Changeset 6761 for branches/HeuristicLab.Hive-3.4/sources
- Timestamp:
- 09/14/11 14:06:53 (13 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources
- Files:
-
- 1 added
- 1 deleted
- 6 edited
- 1 copied
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administrator/3.3/HeuristicLab.Clients.Hive.Administrator-3.3.csproj
r6756 r6761 159 159 <DependentUpon>HiveAdministratorView.cs</DependentUpon> 160 160 </Compile> 161 <Compile Include=" Views\HiveAppointment.cs">161 <Compile Include="HiveAppointment.cs"> 162 162 <SubType>Code</SubType> 163 163 </Compile> 164 <Compile Include=" Views\MenuItems\AdministratorMenuItem.cs" />164 <Compile Include="MenuItems\AdministratorMenuItem.cs" /> 165 165 <Compile Include="Views\Recurrence.cs"> 166 166 <SubType>Form</SubType> … … 169 169 <DependentUpon>Recurrence.cs</DependentUpon> 170 170 </Compile> 171 <Compile Include=" Views\RecurrentEvent.cs" />171 <Compile Include="RecurrentEvent.cs" /> 172 172 <Compile Include="Views\ResourcesView.cs"> 173 173 <SubType>UserControl</SubType> … … 189 189 </Compile> 190 190 <Compile Include="HeuristicLabClientsHiveAdministratorPlugin.cs" /> 191 <Compile Include="Views\Common\UpdateControl.cs">192 <SubType>UserControl</SubType>193 </Compile>194 <Compile Include="Views\Common\UpdateControl.Designer.cs">195 <DependentUpon>UpdateControl.cs</DependentUpon>196 </Compile>197 191 <None Include="HeuristicLabClientsHiveAdministratorPlugin.cs.frame" /> 198 192 <Compile Include="Properties\AssemblyInfo.cs" /> … … 236 230 <DependentUpon>SlaveView.cs</DependentUpon> 237 231 </EmbeddedResource> 238 <EmbeddedResource Include="Views\Common\UpdateControl.resx">239 <DependentUpon>UpdateControl.cs</DependentUpon>240 </EmbeddedResource>241 232 </ItemGroup> 242 233 <ItemGroup> … … 245 236 <ItemGroup> 246 237 <None Include="Views\Images\network_center.ico" /> 247 </ItemGroup>248 <ItemGroup>249 <None Include="Views\Images\status_anim.gif" />250 238 </ItemGroup> 251 239 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.Designer.cs
r6756 r6761 20 20 #endregion 21 21 22 using HeuristicLab.Clients.Hive.Administrator.Views.Common; 22 23 23 namespace HeuristicLab.Clients.Hive.Administrator.Views { 24 24 partial class ResourcesView { … … 50 50 this.imageListSlaveGroups = new System.Windows.Forms.ImageList(this.components); 51 51 this.splitSlaves = new System.Windows.Forms.SplitContainer(); 52 this. updateSlaveGroup = new HeuristicLab.Clients.Hive.Administrator.Views.Common.UpdateControl();52 this.progressBar = new System.Windows.Forms.ProgressBar(); 53 53 this.btnSave = new System.Windows.Forms.Button(); 54 54 this.btnRemoveGroup = new System.Windows.Forms.Button(); … … 57 57 this.tabSlaveGroup = new System.Windows.Forms.TabControl(); 58 58 this.tabDetails = new System.Windows.Forms.TabPage(); 59 this.tabSchedule = new System.Windows.Forms.TabPage(); 60 this.btnRefresh = new System.Windows.Forms.Button(); 59 61 this.slaveView = new HeuristicLab.Clients.Hive.Administrator.Views.SlaveView(); 60 this.tabSchedule = new System.Windows.Forms.TabPage();61 this.updateScheduleControl = new HeuristicLab.Clients.Hive.Administrator.Views.Common.UpdateControl();62 62 this.scheduleView = new HeuristicLab.Clients.Hive.Administrator.Views.ScheduleView(); 63 this.progressBar = new System.Windows.Forms.ProgressBar();64 63 ((System.ComponentModel.ISupportInitialize)(this.splitSlaves)).BeginInit(); 65 64 this.splitSlaves.Panel1.SuspendLayout(); … … 87 86 // splitSlaves.Panel1 88 87 // 88 this.splitSlaves.Panel1.Controls.Add(this.btnRefresh); 89 89 this.splitSlaves.Panel1.Controls.Add(this.progressBar); 90 this.splitSlaves.Panel1.Controls.Add(this.updateSlaveGroup);91 90 this.splitSlaves.Panel1.Controls.Add(this.btnSave); 92 91 this.splitSlaves.Panel1.Controls.Add(this.btnRemoveGroup); … … 101 100 this.splitSlaves.TabIndex = 3; 102 101 // 103 // updateSlaveGroup104 // 105 this. updateSlaveGroup.Location = new System.Drawing.Point(94, 3);106 this. updateSlaveGroup.Name = "updateSlaveGroup";107 this. updateSlaveGroup.Size = new System.Drawing.Size(75, 24);108 this. updateSlaveGroup.TabIndex = 6;109 this. updateSlaveGroup.UpdateAction = null;102 // progressBar 103 // 104 this.progressBar.Location = new System.Drawing.Point(123, 4); 105 this.progressBar.Name = "progressBar"; 106 this.progressBar.Size = new System.Drawing.Size(123, 23); 107 this.progressBar.Style = System.Windows.Forms.ProgressBarStyle.Continuous; 108 this.progressBar.TabIndex = 7; 110 109 // 111 110 // btnSave 112 111 // 113 112 this.btnSave.Image = ((System.Drawing.Image)(resources.GetObject("btnSave.Image"))); 114 this.btnSave.Location = new System.Drawing.Point( 63, 3);113 this.btnSave.Location = new System.Drawing.Point(93, 3); 115 114 this.btnSave.Name = "btnSave"; 116 115 this.btnSave.Size = new System.Drawing.Size(24, 24); … … 122 121 // 123 122 this.btnRemoveGroup.Image = ((System.Drawing.Image)(resources.GetObject("btnRemoveGroup.Image"))); 124 this.btnRemoveGroup.Location = new System.Drawing.Point( 33, 3);123 this.btnRemoveGroup.Location = new System.Drawing.Point(63, 3); 125 124 this.btnRemoveGroup.Name = "btnRemoveGroup"; 126 125 this.btnRemoveGroup.Size = new System.Drawing.Size(24, 24); … … 132 131 // 133 132 this.btnAddGroup.Image = ((System.Drawing.Image)(resources.GetObject("btnAddGroup.Image"))); 134 this.btnAddGroup.Location = new System.Drawing.Point(3 , 3);133 this.btnAddGroup.Location = new System.Drawing.Point(33, 3); 135 134 this.btnAddGroup.Name = "btnAddGroup"; 136 135 this.btnAddGroup.Size = new System.Drawing.Size(24, 24); … … 184 183 this.tabDetails.UseVisualStyleBackColor = true; 185 184 // 186 // slaveView187 //188 this.slaveView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)189 | System.Windows.Forms.AnchorStyles.Right)));190 this.slaveView.Caption = "SlaveView";191 this.slaveView.Content = null;192 this.slaveView.Location = new System.Drawing.Point(7, 7);193 this.slaveView.Name = "slaveView";194 this.slaveView.ReadOnly = false;195 this.slaveView.Size = new System.Drawing.Size(564, 210);196 this.slaveView.TabIndex = 0;197 //198 185 // tabSchedule 199 186 // 200 this.tabSchedule.Controls.Add(this.updateScheduleControl);201 187 this.tabSchedule.Controls.Add(this.scheduleView); 202 188 this.tabSchedule.Location = new System.Drawing.Point(4, 22); … … 208 194 this.tabSchedule.UseVisualStyleBackColor = true; 209 195 // 210 // updateScheduleControl 211 // 212 this.updateScheduleControl.Location = new System.Drawing.Point(6, 6); 213 this.updateScheduleControl.Name = "updateScheduleControl"; 214 this.updateScheduleControl.Size = new System.Drawing.Size(75, 24); 215 this.updateScheduleControl.TabIndex = 5; 216 this.updateScheduleControl.UpdateAction = null; 196 // btnRefresh 197 // 198 this.btnRefresh.Image = ((System.Drawing.Image)(resources.GetObject("btnRefresh.Image"))); 199 this.btnRefresh.Location = new System.Drawing.Point(3, 3); 200 this.btnRefresh.Name = "btnRefresh"; 201 this.btnRefresh.Size = new System.Drawing.Size(24, 24); 202 this.btnRefresh.TabIndex = 8; 203 this.btnRefresh.UseVisualStyleBackColor = true; 204 this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click); 205 // 206 // slaveView 207 // 208 this.slaveView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 209 | System.Windows.Forms.AnchorStyles.Right))); 210 this.slaveView.Caption = "SlaveView"; 211 this.slaveView.Content = null; 212 this.slaveView.Location = new System.Drawing.Point(7, 7); 213 this.slaveView.Name = "slaveView"; 214 this.slaveView.ReadOnly = false; 215 this.slaveView.Size = new System.Drawing.Size(564, 210); 216 this.slaveView.TabIndex = 0; 217 217 // 218 218 // scheduleView … … 223 223 this.scheduleView.Caption = "ScheduleView"; 224 224 this.scheduleView.Content = null; 225 this.scheduleView.Location = new System.Drawing.Point(3, 36);225 this.scheduleView.Location = new System.Drawing.Point(3, 8); 226 226 this.scheduleView.Name = "scheduleView"; 227 227 this.scheduleView.ReadOnly = false; 228 this.scheduleView.Size = new System.Drawing.Size(568, 473);228 this.scheduleView.Size = new System.Drawing.Size(568, 501); 229 229 this.scheduleView.TabIndex = 0; 230 //231 // progressBar232 //233 this.progressBar.Location = new System.Drawing.Point(176, 3);234 this.progressBar.Name = "progressBar";235 this.progressBar.Size = new System.Drawing.Size(70, 23);236 this.progressBar.Style = System.Windows.Forms.ProgressBarStyle.Continuous;237 this.progressBar.TabIndex = 7;238 230 // 239 231 // ResourcesView … … 267 259 private System.Windows.Forms.ImageList imageListSlaveGroups; 268 260 private ScheduleView scheduleView; 269 private UpdateControl updateScheduleControl;270 261 private System.Windows.Forms.Button btnSave; 271 private UpdateControl updateSlaveGroup;272 262 private System.Windows.Forms.ProgressBar progressBar; 263 private System.Windows.Forms.Button btnRefresh; 273 264 } 274 265 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.cs
r6756 r6761 41 41 } 42 42 43 p rivate const string ungroupedGroupName = "UNGROUPED";43 public const string UngroupedGroupName = "UNGROUPED"; 44 44 private const int slaveImageIndex = 0; 45 45 private const int slaveGroupImageIndex = 1; … … 52 52 treeSlaveGroup.ImageList.Images.Add(HiveImageLibrary.Slave); 53 53 treeSlaveGroup.ImageList.Images.Add(HiveImageLibrary.SlaveGroup); 54 //TODO: remove updatecontrol and replace with a regular button55 updateScheduleControl.UpdateAction = new Action(UpdateSchedule);56 updateSlaveGroup.UpdateAction = new Action(UpdateResources);57 54 58 55 HiveAdminClient.Instance.Refreshing += new EventHandler(Instance_Refreshing); … … 86 83 stopProgressTask = true; 87 84 } 88 89 85 90 86 #region Register Content Events … … 110 106 111 107 //rebuild 112 TreeNode ungrp = new TreeNode( ungroupedGroupName);108 TreeNode ungrp = new TreeNode(UngroupedGroupName); 113 109 ungrp.ImageIndex = slaveGroupImageIndex; 114 110 ungrp.SelectedImageIndex = ungrp.ImageIndex; 115 111 var newGroup = new SlaveGroup(); 116 newGroup.Name = ungroupedGroupName;112 newGroup.Name = UngroupedGroupName; 117 113 newGroup.Id = Guid.NewGuid(); 118 114 newGroup.Description = "Contains slaves which are in no group"; … … 246 242 247 243 if (destNode.TreeView == newNode.TreeView) { 248 if (destNode.Text == ungroupedGroupName || (destNode.Parent != null && destNode.Parent.Text == ungroupedGroupName)) {244 if (destNode.Text == UngroupedGroupName || (destNode.Parent != null && destNode.Parent.Text == UngroupedGroupName)) { 249 245 MessageBox.Show(String.Format("You can't drag items to the {0} group.{1}This group only contains slaves which haven't yet been assigned to a real group.", 250 ungroupedGroupName, Environment.NewLine), "HeuristicLab Hive Administrator", MessageBoxButtons.OK, MessageBoxIcon.Information);246 UngroupedGroupName, Environment.NewLine), "HeuristicLab Hive Administrator", MessageBoxButtons.OK, MessageBoxIcon.Information); 251 247 return; 252 248 } … … 365 361 366 362 private void DisplayError(Exception ex) { 367 MessageBox.Show( "An error occured updating the schedule: " + Environment.NewLine + ex.ToString(), "HeuristicLab Hive Administrator");363 MessageBox.Show(string.Format("An error occured while updating: {0} {1}", Environment.NewLine, ex.Message), "HeuristicLab Hive Administrator", MessageBoxButtons.OK, MessageBoxIcon.Error); 368 364 } 369 365 … … 373 369 } 374 370 } 371 372 private void btnRefresh_Click(object sender, EventArgs e) { 373 UpdateResourcesAsync(); 374 } 375 375 } 376 376 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.resx
r6373 r6761 122 122 </metadata> 123 123 <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 124 <data name="btnRefresh.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytear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A0bG7nMoigMZ8bUNFZhfNPZMRcyopHMzFer2UA 178 +QoJchXFIDsTc8ZFITdgi3YnRr7Y4Jv8kUJu2eMN5Li/+1O+eSfXeHyB1eycT7l9a52fKW4AuyOWtJcd 179 kyN0bJfb4+fNR6L8uYUo7xer2blommxYyQ0oM1Ris34Him+XBwvaJGFhqwgd5odYoKMCkoiFVHcM30eJ 180 doUybjVIoXTp4iUrVJXCQtnJccAmyCUprNQYah7VY31jEXeCTbqKPwACEanLYflqZztwHF2mnnhXklIe 181 f3CaG8DGRtG1smU1J6aEkZiFMhHuve3lBuS1ivHM+hpCtnH+NiUaiJgVQxoEQsxuzregf9MN9qLwzmHB 182 pd4W1OoOIv1sFtLPZKFaXQftYDemwkyqZ4rmr/ga/2fhN/0cpIchJAs6AAAAAElFTkSuQmCC 183 </value> 184 </data> 124 185 <data name="btnSave.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> 125 186 <value> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ScheduleView.cs
r6756 r6761 305 305 306 306 private void btnSaveCal_Click(object sender, EventArgs e) { 307 List<Downtime> appointments = new List<Downtime>(); 308 foreach (HiveAppointment app in offlineTimes) { 309 if (app.Deleted && app.Id != Guid.Empty) { 310 HiveAdminClient.Delete(ToDowntime(app)); 311 } else if (app.Changed || app.Id == null || app.Id == Guid.Empty) { 312 Downtime dt = ToDowntime(app); 313 appointments.Add(dt); 314 } 315 } 316 foreach (Downtime dt in appointments) { 317 dt.Store(); 307 if (HiveAdminClient.Instance.DowntimeForResourceId == null || HiveAdminClient.Instance.DowntimeForResourceId == Guid.Empty) { 308 MessageBox.Show("You have to save the goup before you can save the schedule. ", "HeuristicLab Hive Administrator", MessageBoxButtons.OK, MessageBoxIcon.Stop); 309 } else { 310 List<Downtime> appointments = new List<Downtime>(); 311 foreach (HiveAppointment app in offlineTimes) { 312 if (app.Deleted && app.Id != Guid.Empty) { 313 HiveAdminClient.Delete(ToDowntime(app)); 314 } else if (app.Changed || app.Id == null || app.Id == Guid.Empty) { 315 Downtime dt = ToDowntime(app); 316 appointments.Add(dt); 317 } 318 } 319 foreach (Downtime dt in appointments) { 320 dt.Store(); 321 } 318 322 } 319 323 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.3/HiveAdminClient.cs
r6756 r6761 54 54 downtimes.Clear(); 55 55 } 56 OnDowntimesChanged();57 56 } 58 57 } … … 67 66 private void OnRefreshed() { 68 67 var handler = Refreshed; 69 if (handler != null) handler(this, EventArgs.Empty);70 }71 public event EventHandler DowntimesChanged;72 private void OnDowntimesChanged() {73 var handler = DowntimesChanged;74 68 if (handler != null) handler(this, EventArgs.Empty); 75 69 } … … 97 91 } 98 92 } 99 public void RefreshAsync(Action<Exception> exceptionCallback) {100 var call = new Func<Exception>(delegate() {101 try {102 Refresh();103 }104 catch (Exception ex) {105 return ex;106 }107 return null;108 });109 call.BeginInvoke(delegate(IAsyncResult result) {110 Exception ex = call.EndInvoke(result);111 if (ex != null) exceptionCallback(ex);112 }, null);113 }114 93 #endregion 115 94 … … 133 112 } 134 113 } 135 }136 public void RefreshCalendarAsync(Action<Exception> exceptionCallback) {137 var call = new Func<Exception>(delegate() {138 try {139 RefreshCalendar();140 }141 catch (Exception ex) {142 return ex;143 }144 return null;145 });146 call.BeginInvoke(delegate(IAsyncResult result) {147 Exception ex = call.EndInvoke(result);148 if (ex != null) exceptionCallback(ex);149 }, null);150 114 } 151 115 #endregion … … 175 139 } 176 140 } 177 public static void StoreAsync(Action<Exception> exceptionCallback, IHiveItem item, CancellationToken cancellationToken) {178 var call = new Func<Exception>(delegate() {179 try {180 Store(item, cancellationToken);181 }182 catch (Exception ex) {183 return ex;184 }185 return null;186 });187 call.BeginInvoke(delegate(IAsyncResult result) {188 Exception ex = call.EndInvoke(result);189 if (ex != null) exceptionCallback(ex);190 }, null);191 }192 141 #endregion 193 142 … … 209 158 downtimes.Clear(); 210 159 } 211 OnDowntimesChanged();212 160 } 213 161 }
Note: See TracChangeset
for help on using the changeset viewer.