Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/17/11 15:10:50 (13 years ago)
Author:
ascheibe
Message:

#1233

  • Slave UI now uses tab pages
  • balloon tips are displayed on receiving new jobs
Location:
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.4
Files:
9 added
3 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.4/HeuristicLab.Clients.Hive.Slave.Views-3.4.csproj

    r6033 r6225  
    123123  </ItemGroup>
    124124  <ItemGroup>
     125    <Compile Include="AboutView.cs">
     126      <SubType>UserControl</SubType>
     127    </Compile>
     128    <Compile Include="AboutView.Designer.cs">
     129      <DependentUpon>AboutView.cs</DependentUpon>
     130    </Compile>
     131    <Compile Include="LogView.cs">
     132      <SubType>UserControl</SubType>
     133    </Compile>
     134    <Compile Include="LogView.Designer.cs">
     135      <DependentUpon>LogView.cs</DependentUpon>
     136    </Compile>
    125137    <Compile Include="Properties\Resources.Designer.cs">
    126138      <AutoGen>True</AutoGen>
     
    128140      <DependentUpon>Resources.resx</DependentUpon>
    129141    </Compile>
    130     <Compile Include="SlaveAboutDialog.cs">
    131       <SubType>Form</SubType>
    132     </Compile>
    133     <Compile Include="SlaveAboutDialog.Designer.cs">
    134       <DependentUpon>SlaveAboutDialog.cs</DependentUpon>
     142    <Compile Include="Properties\Settings.Designer.cs">
     143      <AutoGen>True</AutoGen>
     144      <DesignTimeSharedInput>True</DesignTimeSharedInput>
     145      <DependentUpon>Settings.settings</DependentUpon>
    135146    </Compile>
    136147    <Compile Include="SlaveItem.cs" />
     148    <None Include="app.config" />
    137149    <None Include="Properties\AssemblyInfo.cs.frame" />
    138150    <None Include="HeuristicLabClientsHiveSlaveViewsPlugin.cs.frame" />
     
    145157    <Compile Include="HeuristicLabClientsHiveSlaveViewsPlugin.cs" />
    146158    <Compile Include="Properties\AssemblyInfo.cs" />
     159    <None Include="Properties\Settings.settings">
     160      <Generator>PublicSettingsSingleFileGenerator</Generator>
     161      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
     162    </None>
    147163  </ItemGroup>
    148164  <ItemGroup>
     
    156172  </ItemGroup>
    157173  <ItemGroup>
     174    <EmbeddedResource Include="AboutView.resx">
     175      <DependentUpon>AboutView.cs</DependentUpon>
     176    </EmbeddedResource>
     177    <EmbeddedResource Include="LogView.resx">
     178      <DependentUpon>LogView.cs</DependentUpon>
     179    </EmbeddedResource>
    158180    <EmbeddedResource Include="Properties\Resources.resx">
    159181      <Generator>ResXFileCodeGenerator</Generator>
    160182      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
    161     </EmbeddedResource>
    162     <EmbeddedResource Include="SlaveAboutDialog.resx">
    163       <DependentUpon>SlaveAboutDialog.cs</DependentUpon>
    164183    </EmbeddedResource>
    165184    <EmbeddedResource Include="SlaveView.resx">
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.4/SlaveItem.cs

    r6107 r6225  
    135135    }
    136136
     137    private int lastJobsFetched = 0;
     138
    137139    public event EventHandler<EventArgs<StatusCommons>> SlaveStatusChanged;
     140    public void OnUserVisibleMessageFired(string msg) {
     141      var handler = UserVisibleMessageFired;
     142      if (handler != null) handler(this, new EventArgs<string>(msg));
     143    }
     144
     145    public event EventHandler<EventArgs<string>> UserVisibleMessageFired;
    138146    public void OnStatusChanged(StatusCommons status) {
    139147      var handler = SlaveStatusChanged;
    140148      if (handler != null) handler(this, new EventArgs<StatusCommons>(status));
     149
     150      int diff = status.JobsFetched - lastJobsFetched;
     151      lastJobsFetched = status.JobsFetched;
     152      if (diff > 0) {
     153        OnUserVisibleMessageFired(string.Format("HeuristicLab Hive received {0} new jobs!", diff));
     154      }
    141155    }
    142156
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.4/SlaveView.Designer.cs

    r5826 r6225  
    4545    /// </summary>
    4646    private void InitializeComponent() {
    47       System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
    48       System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
    49       System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
    50       this.txtLog = new System.Windows.Forms.TextBox();
     47      System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea6 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
     48      System.Windows.Forms.DataVisualization.Charting.Legend legend6 = new System.Windows.Forms.DataVisualization.Charting.Legend();
     49      System.Windows.Forms.DataVisualization.Charting.Series series6 = new System.Windows.Forms.DataVisualization.Charting.Series();
    5150      this.btnPauseAll = new System.Windows.Forms.Button();
    5251      this.btnStopAll = new System.Windows.Forms.Button();
    5352      this.btnRestart = new System.Windows.Forms.Button();
    5453      this.btnSleep = new System.Windows.Forms.Button();
    55       this.btnAbout = new System.Windows.Forms.Button();
    5654      this.jobChart = new System.Windows.Forms.DataVisualization.Charting.Chart();
    5755      this.btnRestartService = new System.Windows.Forms.Button();
     
    5957      this.SuspendLayout();
    6058      //
    61       // txtLog
    62       //
    63       this.txtLog.BackColor = System.Drawing.Color.White;
    64       this.txtLog.Location = new System.Drawing.Point(3, 184);
    65       this.txtLog.Multiline = true;
    66       this.txtLog.Name = "txtLog";
    67       this.txtLog.ReadOnly = true;
    68       this.txtLog.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
    69       this.txtLog.Size = new System.Drawing.Size(584, 239);
    70       this.txtLog.TabIndex = 1;
    71       //
    7259      // btnPauseAll
    7360      //
     61      this.btnPauseAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    7462      this.btnPauseAll.Location = new System.Drawing.Point(476, 3);
    7563      this.btnPauseAll.Name = "btnPauseAll";
     
    8270      // btnStopAll
    8371      //
     72      this.btnStopAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    8473      this.btnStopAll.Location = new System.Drawing.Point(476, 32);
    8574      this.btnStopAll.Name = "btnStopAll";
     
    9281      // btnRestart
    9382      //
     83      this.btnRestart.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    9484      this.btnRestart.Location = new System.Drawing.Point(476, 90);
    9585      this.btnRestart.Name = "btnRestart";
     
    10292      // btnSleep
    10393      //
     94      this.btnSleep.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    10495      this.btnSleep.Location = new System.Drawing.Point(476, 61);
    10596      this.btnSleep.Name = "btnSleep";
     
    110101      this.btnSleep.Click += new System.EventHandler(this.btnSleep_Click);
    111102      //
    112       // btnAbout
    113       //
    114       this.btnAbout.Location = new System.Drawing.Point(476, 149);
    115       this.btnAbout.Name = "btnAbout";
    116       this.btnAbout.Size = new System.Drawing.Size(111, 28);
    117       this.btnAbout.TabIndex = 6;
    118       this.btnAbout.Text = "About Hive";
    119       this.btnAbout.UseVisualStyleBackColor = true;
    120       this.btnAbout.Click += new System.EventHandler(this.btnAbout_Click);
    121       //
    122103      // jobChart
    123104      //
    124       chartArea1.Name = "ChartArea1";
    125       this.jobChart.ChartAreas.Add(chartArea1);
    126       legend1.Name = "Legend1";
    127       this.jobChart.Legends.Add(legend1);
     105      chartArea6.Name = "ChartArea1";
     106      this.jobChart.ChartAreas.Add(chartArea6);
     107      legend6.Name = "Legend1";
     108      this.jobChart.Legends.Add(legend6);
    128109      this.jobChart.Location = new System.Drawing.Point(3, 3);
    129110      this.jobChart.Name = "jobChart";
    130       series1.ChartArea = "ChartArea1";
    131       series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Doughnut;
    132       series1.Legend = "Legend1";
    133       series1.Name = "Series1";
    134       this.jobChart.Series.Add(series1);
     111      series6.ChartArea = "ChartArea1";
     112      series6.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Doughnut;
     113      series6.Legend = "Legend1";
     114      series6.Name = "Series1";
     115      this.jobChart.Series.Add(series6);
    135116      this.jobChart.Size = new System.Drawing.Size(293, 174);
    136117      this.jobChart.TabIndex = 7;
     
    138119      // btnRestartService
    139120      //
     121      this.btnRestartService.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    140122      this.btnRestartService.Location = new System.Drawing.Point(476, 119);
    141123      this.btnRestartService.Name = "btnRestartService";
     
    152134      this.Controls.Add(this.btnRestartService);
    153135      this.Controls.Add(this.jobChart);
    154       this.Controls.Add(this.btnAbout);
    155136      this.Controls.Add(this.btnSleep);
    156137      this.Controls.Add(this.btnRestart);
    157138      this.Controls.Add(this.btnStopAll);
    158139      this.Controls.Add(this.btnPauseAll);
    159       this.Controls.Add(this.txtLog);
    160140      this.Name = "SlaveView";
    161141      this.Size = new System.Drawing.Size(590, 426);
    162142      ((System.ComponentModel.ISupportInitialize)(this.jobChart)).EndInit();
    163143      this.ResumeLayout(false);
    164       this.PerformLayout();
    165144
    166145    }
     
    168147    #endregion
    169148
    170     private System.Windows.Forms.TextBox txtLog;
    171149    private System.Windows.Forms.Button btnPauseAll;
    172150    private System.Windows.Forms.Button btnStopAll;
    173151    private System.Windows.Forms.Button btnRestart;
    174152    private System.Windows.Forms.Button btnSleep;
    175     private System.Windows.Forms.Button btnAbout;
    176153    private System.Windows.Forms.DataVisualization.Charting.Chart jobChart;
    177154    private System.Windows.Forms.Button btnRestartService;
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.4/SlaveView.cs

    r6203 r6225  
    5858    #region Register Content Events
    5959    protected override void DeregisterContentEvents() {
    60       Content.SlaveMessageLogged -= new System.EventHandler<EventArgs<string>>(Content_SlaveMessageLogged);
    6160      Content.SlaveShutdown -= new System.EventHandler(Content_SlaveShutdown);
    6261      Content.SlaveStatusChanged -= new System.EventHandler<EventArgs<StatusCommons>>(Content_SlaveStatusChanged);
     
    6867      base.RegisterContentEvents();
    6968
    70       Content.SlaveMessageLogged += new System.EventHandler<EventArgs<string>>(Content_SlaveMessageLogged);
    7169      Content.SlaveShutdown += new System.EventHandler(Content_SlaveShutdown);
    7270      Content.SlaveStatusChanged += new System.EventHandler<EventArgs<StatusCommons>>(Content_SlaveStatusChanged);
     
    110108
    111109    void Content_SlaveShutdown(object sender, System.EventArgs e) {
    112       txtLog.AppendText("Slave did shutdown" + Environment.NewLine);
    113110      Task.Factory.StartNew(Connector);
    114     }
    115 
    116     void Content_SlaveMessageLogged(object sender, EventArgs<string> e) {
    117       txtLog.AppendText(e.Value + Environment.NewLine);
    118111    }
    119112    #endregion
     
    168161    }
    169162
    170     private void btnAbout_Click(object sender, System.EventArgs e) {
    171       SlaveAboutDialog diag = new SlaveAboutDialog();
    172       diag.ShowDialog();
    173     }
    174 
    175163    private void btnRestartService_Click(object sender, EventArgs e) {
    176164      if (CheckRunAsAdmin()) {
Note: See TracChangeset for help on using the changeset viewer.