Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/14/11 14:06:53 (13 years ago)
Author:
ascheibe
Message:

#1233 finished refactoring Hive Administrator UI

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  
    159159      <DependentUpon>HiveAdministratorView.cs</DependentUpon>
    160160    </Compile>
    161     <Compile Include="Views\HiveAppointment.cs">
     161    <Compile Include="HiveAppointment.cs">
    162162      <SubType>Code</SubType>
    163163    </Compile>
    164     <Compile Include="Views\MenuItems\AdministratorMenuItem.cs" />
     164    <Compile Include="MenuItems\AdministratorMenuItem.cs" />
    165165    <Compile Include="Views\Recurrence.cs">
    166166      <SubType>Form</SubType>
     
    169169      <DependentUpon>Recurrence.cs</DependentUpon>
    170170    </Compile>
    171     <Compile Include="Views\RecurrentEvent.cs" />
     171    <Compile Include="RecurrentEvent.cs" />
    172172    <Compile Include="Views\ResourcesView.cs">
    173173      <SubType>UserControl</SubType>
     
    189189    </Compile>
    190190    <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>
    197191    <None Include="HeuristicLabClientsHiveAdministratorPlugin.cs.frame" />
    198192    <Compile Include="Properties\AssemblyInfo.cs" />
     
    236230      <DependentUpon>SlaveView.cs</DependentUpon>
    237231    </EmbeddedResource>
    238     <EmbeddedResource Include="Views\Common\UpdateControl.resx">
    239       <DependentUpon>UpdateControl.cs</DependentUpon>
    240     </EmbeddedResource>
    241232  </ItemGroup>
    242233  <ItemGroup>
     
    245236  <ItemGroup>
    246237    <None Include="Views\Images\network_center.ico" />
    247   </ItemGroup>
    248   <ItemGroup>
    249     <None Include="Views\Images\status_anim.gif" />
    250238  </ItemGroup>
    251239  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.Designer.cs

    r6756 r6761  
    2020#endregion
    2121
    22 using HeuristicLab.Clients.Hive.Administrator.Views.Common;
     22
    2323namespace HeuristicLab.Clients.Hive.Administrator.Views {
    2424  partial class ResourcesView {
     
    5050      this.imageListSlaveGroups = new System.Windows.Forms.ImageList(this.components);
    5151      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();
    5353      this.btnSave = new System.Windows.Forms.Button();
    5454      this.btnRemoveGroup = new System.Windows.Forms.Button();
     
    5757      this.tabSlaveGroup = new System.Windows.Forms.TabControl();
    5858      this.tabDetails = new System.Windows.Forms.TabPage();
     59      this.tabSchedule = new System.Windows.Forms.TabPage();
     60      this.btnRefresh = new System.Windows.Forms.Button();
    5961      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();
    6262      this.scheduleView = new HeuristicLab.Clients.Hive.Administrator.Views.ScheduleView();
    63       this.progressBar = new System.Windows.Forms.ProgressBar();
    6463      ((System.ComponentModel.ISupportInitialize)(this.splitSlaves)).BeginInit();
    6564      this.splitSlaves.Panel1.SuspendLayout();
     
    8786      // splitSlaves.Panel1
    8887      //
     88      this.splitSlaves.Panel1.Controls.Add(this.btnRefresh);
    8989      this.splitSlaves.Panel1.Controls.Add(this.progressBar);
    90       this.splitSlaves.Panel1.Controls.Add(this.updateSlaveGroup);
    9190      this.splitSlaves.Panel1.Controls.Add(this.btnSave);
    9291      this.splitSlaves.Panel1.Controls.Add(this.btnRemoveGroup);
     
    101100      this.splitSlaves.TabIndex = 3;
    102101      //
    103       // updateSlaveGroup
    104       //
    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;
    110109      //
    111110      // btnSave
    112111      //
    113112      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);
    115114      this.btnSave.Name = "btnSave";
    116115      this.btnSave.Size = new System.Drawing.Size(24, 24);
     
    122121      //
    123122      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);
    125124      this.btnRemoveGroup.Name = "btnRemoveGroup";
    126125      this.btnRemoveGroup.Size = new System.Drawing.Size(24, 24);
     
    132131      //
    133132      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);
    135134      this.btnAddGroup.Name = "btnAddGroup";
    136135      this.btnAddGroup.Size = new System.Drawing.Size(24, 24);
     
    184183      this.tabDetails.UseVisualStyleBackColor = true;
    185184      //
    186       // slaveView
    187       //
    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       //
    198185      // tabSchedule
    199186      //
    200       this.tabSchedule.Controls.Add(this.updateScheduleControl);
    201187      this.tabSchedule.Controls.Add(this.scheduleView);
    202188      this.tabSchedule.Location = new System.Drawing.Point(4, 22);
     
    208194      this.tabSchedule.UseVisualStyleBackColor = true;
    209195      //
    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;
    217217      //
    218218      // scheduleView
     
    223223      this.scheduleView.Caption = "ScheduleView";
    224224      this.scheduleView.Content = null;
    225       this.scheduleView.Location = new System.Drawing.Point(3, 36);
     225      this.scheduleView.Location = new System.Drawing.Point(3, 8);
    226226      this.scheduleView.Name = "scheduleView";
    227227      this.scheduleView.ReadOnly = false;
    228       this.scheduleView.Size = new System.Drawing.Size(568, 473);
     228      this.scheduleView.Size = new System.Drawing.Size(568, 501);
    229229      this.scheduleView.TabIndex = 0;
    230       //
    231       // progressBar
    232       //
    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;
    238230      //
    239231      // ResourcesView
     
    267259    private System.Windows.Forms.ImageList imageListSlaveGroups;
    268260    private ScheduleView scheduleView;
    269     private UpdateControl updateScheduleControl;
    270261    private System.Windows.Forms.Button btnSave;
    271     private UpdateControl updateSlaveGroup;
    272262    private System.Windows.Forms.ProgressBar progressBar;
     263    private System.Windows.Forms.Button btnRefresh;
    273264  }
    274265}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.cs

    r6756 r6761  
    4141    }
    4242
    43     private const string ungroupedGroupName = "UNGROUPED";
     43    public const string UngroupedGroupName = "UNGROUPED";
    4444    private const int slaveImageIndex = 0;
    4545    private const int slaveGroupImageIndex = 1;
     
    5252      treeSlaveGroup.ImageList.Images.Add(HiveImageLibrary.Slave);
    5353      treeSlaveGroup.ImageList.Images.Add(HiveImageLibrary.SlaveGroup);
    54       //TODO: remove updatecontrol and replace with a regular button
    55       updateScheduleControl.UpdateAction = new Action(UpdateSchedule);
    56       updateSlaveGroup.UpdateAction = new Action(UpdateResources);
    5754
    5855      HiveAdminClient.Instance.Refreshing += new EventHandler(Instance_Refreshing);
     
    8683      stopProgressTask = true;
    8784    }
    88 
    8985
    9086    #region Register Content Events
     
    110106
    111107        //rebuild
    112         TreeNode ungrp = new TreeNode(ungroupedGroupName);
     108        TreeNode ungrp = new TreeNode(UngroupedGroupName);
    113109        ungrp.ImageIndex = slaveGroupImageIndex;
    114110        ungrp.SelectedImageIndex = ungrp.ImageIndex;
    115111        var newGroup = new SlaveGroup();
    116         newGroup.Name = ungroupedGroupName;
     112        newGroup.Name = UngroupedGroupName;
    117113        newGroup.Id = Guid.NewGuid();
    118114        newGroup.Description = "Contains slaves which are in no group";
     
    246242
    247243        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)) {
    249245            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);
    251247            return;
    252248          }
     
    365361
    366362    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);
    368364    }
    369365
     
    373369      }
    374370    }
     371
     372    private void btnRefresh_Click(object sender, EventArgs e) {
     373      UpdateResourcesAsync();
     374    }
    375375  }
    376376}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.resx

    r6373 r6761  
    122122  </metadata>
    123123  <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.bytearray.base64">
     125    <value>
     126        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
     127        DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
     128        bGUAAEjHnZZ3VFTXFofPvXd6oc0wAlKG3rvAANJ7k15FYZgZYCgDDjM0sSGiAhFFRJoiSFDEgNFQJFZE
     129        sRAUVLAHJAgoMRhFVCxvRtaLrqy89/Ly++Osb+2z97n77L3PWhcAkqcvl5cGSwGQyhPwgzyc6RGRUXTs
     130        AIABHmCAKQBMVka6X7B7CBDJy82FniFyAl8EAfB6WLwCcNPQM4BOB/+fpFnpfIHomAARm7M5GSwRF4g4
     131        JUuQLrbPipgalyxmGCVmvihBEcuJOWGRDT77LLKjmNmpPLaIxTmns1PZYu4V8bZMIUfEiK+ICzO5nCwR
     132        3xKxRoowlSviN+LYVA4zAwAUSWwXcFiJIjYRMYkfEuQi4uUA4EgJX3HcVyzgZAvEl3JJS8/hcxMSBXQd
     133        li7d1NqaQffkZKVwBALDACYrmcln013SUtOZvBwAFu/8WTLi2tJFRbY0tba0NDQzMv2qUP91829K3NtF
     134        ehn4uWcQrf+L7a/80hoAYMyJarPziy2uCoDOLQDI3fti0zgAgKSobx3Xv7oPTTwviQJBuo2xcVZWlhGX
     135        wzISF/QP/U+Hv6GvvmckPu6P8tBdOfFMYYqALq4bKy0lTcinZ6QzWRy64Z+H+B8H/nUeBkGceA6fwxNF
     136        hImmjMtLELWbx+YKuGk8Opf3n5r4D8P+pMW5FonS+BFQY4yA1HUqQH7tBygKESDR+8Vd/6NvvvgwIH55
     137        4SqTi3P/7zf9Z8Gl4iWDm/A5ziUohM4S8jMX98TPEqABAUgCKpAHykAd6ABDYAasgC1wBG7AG/iDEBAJ
     138        VgMWSASpgA+yQB7YBApBMdgJ9oBqUAcaQTNoBcdBJzgFzoNL4Bq4AW6D+2AUTIBnYBa8BgsQBGEhMkSB
     139        5CEVSBPSh8wgBmQPuUG+UBAUCcVCCRAPEkJ50GaoGCqDqqF6qBn6HjoJnYeuQIPQXWgMmoZ+h97BCEyC
     140        qbASrAUbwwzYCfaBQ+BVcAK8Bs6FC+AdcCXcAB+FO+Dz8DX4NjwKP4PnEIAQERqiihgiDMQF8UeikHiE
     141        j6xHipAKpAFpRbqRPuQmMorMIG9RGBQFRUcZomxRnqhQFAu1BrUeVYKqRh1GdaB6UTdRY6hZ1Ec0Ga2I
     142        1kfboL3QEegEdBa6EF2BbkK3oy+ib6Mn0K8xGAwNo42xwnhiIjFJmLWYEsw+TBvmHGYQM46Zw2Kx8lh9
     143        rB3WH8vECrCF2CrsUexZ7BB2AvsGR8Sp4Mxw7rgoHA+Xj6vAHcGdwQ3hJnELeCm8Jt4G749n43PwpfhG
     144        fDf+On4Cv0CQJmgT7AghhCTCJkIloZVwkfCA8JJIJKoRrYmBRC5xI7GSeIx4mThGfEuSIemRXEjRJCFp
     145        B+kQ6RzpLuklmUzWIjuSo8gC8g5yM/kC+RH5jQRFwkjCS4ItsUGiRqJDYkjiuSReUlPSSXK1ZK5kheQJ
     146        yeuSM1J4KS0pFymm1HqpGqmTUiNSc9IUaVNpf+lU6RLpI9JXpKdksDJaMm4ybJkCmYMyF2TGKQhFneJC
     147        YVE2UxopFykTVAxVm+pFTaIWU7+jDlBnZWVkl8mGyWbL1sielh2lITQtmhcthVZKO04bpr1borTEaQln
     148        yfYlrUuGlszLLZVzlOPIFcm1yd2WeydPl3eTT5bfJd8p/1ABpaCnEKiQpbBf4aLCzFLqUtulrKVFS48v
     149        vacIK+opBimuVTyo2K84p6Ss5KGUrlSldEFpRpmm7KicpFyufEZ5WoWiYq/CVSlXOavylC5Ld6Kn0Cvp
     150        vfRZVUVVT1Whar3qgOqCmrZaqFq+WpvaQ3WCOkM9Xr1cvUd9VkNFw08jT6NF454mXpOhmai5V7NPc15L
     151        Wytca6tWp9aUtpy2l3audov2Ax2yjoPOGp0GnVu6GF2GbrLuPt0berCehV6iXo3edX1Y31Kfq79Pf9AA
     152        bWBtwDNoMBgxJBk6GWYathiOGdGMfI3yjTqNnhtrGEcZ7zLuM/5oYmGSYtJoct9UxtTbNN+02/R3Mz0z
     153        llmN2S1zsrm7+QbzLvMXy/SXcZbtX3bHgmLhZ7HVosfig6WVJd+y1XLaSsMq1qrWaoRBZQQwShiXrdHW
     154        ztYbrE9Zv7WxtBHYHLf5zdbQNtn2iO3Ucu3lnOWNy8ft1OyYdvV2o/Z0+1j7A/ajDqoOTIcGh8eO6o5s
     155        xybHSSddpySno07PnU2c+c7tzvMuNi7rXM65Iq4erkWuA24ybqFu1W6P3NXcE9xb3Gc9LDzWepzzRHv6
     156        eO7yHPFS8mJ5NXvNelt5r/Pu9SH5BPtU+zz21fPl+3b7wX7efrv9HqzQXMFb0ekP/L38d/s/DNAOWBPw
     157        YyAmMCCwJvBJkGlQXlBfMCU4JvhI8OsQ55DSkPuhOqHC0J4wybDosOaw+XDX8LLw0QjjiHUR1yIVIrmR
     158        XVHYqLCopqi5lW4r96yciLaILoweXqW9KnvVldUKq1NWn46RjGHGnIhFx4bHHol9z/RnNjDn4rziauNm
     159        WS6svaxnbEd2OXuaY8cp40zG28WXxU8l2CXsTphOdEisSJzhunCruS+SPJPqkuaT/ZMPJX9KCU9pS8Wl
     160        xqae5Mnwknm9acpp2WmD6frphemja2zW7Fkzy/fhN2VAGasyugRU0c9Uv1BHuEU4lmmfWZP5Jiss60S2
     161        dDYvuz9HL2d7zmSue+63a1FrWWt78lTzNuWNrXNaV78eWh+3vmeD+oaCDRMbPTYe3kTYlLzpp3yT/LL8
     162        V5vDN3cXKBVsLBjf4rGlpVCikF84stV2a9021DbutoHt5turtn8sYhddLTYprih+X8IqufqN6TeV33za
     163        Eb9joNSydP9OzE7ezuFdDrsOl0mX5ZaN7/bb3VFOLy8qf7UnZs+VimUVdXsJe4V7Ryt9K7uqNKp2Vr2v
     164        Tqy+XeNc01arWLu9dn4fe9/Qfsf9rXVKdcV17w5wD9yp96jvaNBqqDiIOZh58EljWGPft4xvm5sUmoqb
     165        PhziHRo9HHS4t9mqufmI4pHSFrhF2DJ9NProje9cv+tqNWytb6O1FR8Dx4THnn4f+/3wcZ/jPScYJ1p/
     166        0Pyhtp3SXtQBdeR0zHYmdo52RXYNnvQ+2dNt293+o9GPh06pnqo5LXu69AzhTMGZT2dzz86dSz83cz7h
     167        /HhPTM/9CxEXbvUG9g5c9Ll4+ZL7pQt9Tn1nL9tdPnXF5srJq4yrndcsr3X0W/S3/2TxU/uA5UDHdavr
     168        XTesb3QPLh88M+QwdP6m681Lt7xuXbu94vbgcOjwnZHokdE77DtTd1PuvriXeW/h/sYH6AdFD6UeVjxS
     169        fNTws+7PbaOWo6fHXMf6Hwc/vj/OGn/2S8Yv7ycKnpCfVEyqTDZPmU2dmnafvvF05dOJZ+nPFmYKf5X+
     170        tfa5zvMffnP8rX82YnbiBf/Fp99LXsq/PPRq2aueuYC5R69TXy/MF72Rf3P4LeNt37vwd5MLWe+x7ys/
     171        6H7o/ujz8cGn1E+f/gUDmPP8usTo0wAAAAlwSFlzAAALDAAACwwBP0AiyAAAABl0RVh0U29mdHdhcmUA
     172        UGFpbnQuTkVUIHYzLjUuNUmK/OAAAAJiSURBVDhPnZNtSFNRHMbdzAgV/DC0bL4R5rSNEjOjiJkhUfpB
     173        Aikog74ERV+iIipymgvXbFZrW1NrFoQhQUr2phQxcK0XGWx+2JhGdrfWNmduM1N3r9vTPcNF0vVLFx4O
     174        h3Of33nO+f9PUtLSRwcHkunQEJ8OGzOZGXMq8/NjJqsMZuZ9NhMyrqKnX/HIr/Peu5KE55+RmR3JM419
     175        QLtRg/rHR1HVVQvprX243C+HjXKE6LD5iMqoBycg4usR9I++RN3zBsgmFFC4NLjiUKHJ0YYTn86h8k4N
     176        rBN2lNzcxg1weMaDxHx14gZq+w4hq2kD1sk34pjxVBzU7LgehxQoxdyAC0+b0WA6ie3qPWgf1GLU5cSY
     177        l0JOiyieKqFseSE34IDhMKSd+9FneQFmMSamF2Np/sA0bG7nMoigMZ8bUNFZhfNPZMRcyopHMzFer2UA
     178        +QoJchXFIDsTc8ZFITdgi3YnRr7Y4Jv8kUJu2eMN5Li/+1O+eSfXeHyB1eycT7l9a52fKW4AuyOWtJcd
     179        kyN0bJfb4+fNR6L8uYUo7xer2blommxYyQ0oM1Ris34Him+XBwvaJGFhqwgd5odYoKMCkoiFVHcM30eJ
     180        doUybjVIoXTp4iUrVJXCQtnJccAmyCUprNQYah7VY31jEXeCTbqKPwACEanLYflqZztwHF2mnnhXklIe
     181        f3CaG8DGRtG1smU1J6aEkZiFMhHuve3lBuS1ivHM+hpCtnH+NiUaiJgVQxoEQsxuzregf9MN9qLwzmHB
     182        pd4W1OoOIv1sFtLPZKFaXQftYDemwkyqZ4rmr/ga/2fhN/0cpIchJAs6AAAAAElFTkSuQmCC
     183</value>
     184  </data>
    124185  <data name="btnSave.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
    125186    <value>
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ScheduleView.cs

    r6756 r6761  
    305305
    306306    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        }
    318322      }
    319323    }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.3/HiveAdminClient.cs

    r6756 r6761  
    5454          downtimes.Clear();
    5555        }
    56         OnDowntimesChanged();
    5756      }
    5857    }
     
    6766    private void OnRefreshed() {
    6867      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;
    7468      if (handler != null) handler(this, EventArgs.Empty);
    7569    }
     
    9791      }
    9892    }
    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     }
    11493    #endregion
    11594
     
    133112        }
    134113      }
    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);
    150114    }
    151115    #endregion
     
    175139      }
    176140    }
    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     }
    192141    #endregion
    193142
     
    209158        downtimes.Clear();
    210159      }
    211       OnDowntimesChanged();
    212160    }
    213161  }
Note: See TracChangeset for help on using the changeset viewer.