Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2062 for trunk


Ignore:
Timestamp:
06/18/09 17:04:22 (15 years ago)
Author:
whackl
Message:

refactoring hive client console #663

Location:
trunk/sources
Files:
5 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Client.Console/3.2/HeuristicLab.Hive.Client.Console-3.2.csproj

    r2023 r2062  
    9999  </ItemGroup>
    100100  <ItemGroup>
    101     <Compile Include="EventLogEntryForm.cs">
    102       <SubType>Form</SubType>
    103     </Compile>
    104     <Compile Include="EventLogEntryForm.Designer.cs">
    105       <DependentUpon>EventLogEntryForm.cs</DependentUpon>
    106     </Compile>
    107101    <Compile Include="HiveClientConsole.cs">
    108102      <SubType>Form</SubType>
     
    113107    <Compile Include="HiveClientConsolePlugin.cs" />
    114108    <Compile Include="HiveClientConsoleApplication.cs" />
    115     <Compile Include="HiveEventEntry.cs" />
    116     <Compile Include="ListViewColumnSorterDate.cs" />
    117109    <Compile Include="LogFileReader.cs" />
    118110    <Compile Include="Properties\AssemblyInfo.cs" />
    119     <EmbeddedResource Include="EventLogEntryForm.resx">
    120       <DependentUpon>EventLogEntryForm.cs</DependentUpon>
    121       <SubType>Designer</SubType>
    122     </EmbeddedResource>
    123111    <EmbeddedResource Include="HiveClientConsole.resx">
    124112      <DependentUpon>HiveClientConsole.cs</DependentUpon>
  • trunk/sources/HeuristicLab.Hive.Client.Console/3.2/HiveClientConsole.Designer.cs

    r2023 r2062  
    4646    private void InitializeComponent() {
    4747        this.components = new System.ComponentModel.Container();
    48         Calendar.DrawTool drawTool2 = new Calendar.DrawTool();
     48        Calendar.DrawTool drawTool6 = new Calendar.DrawTool();
    4949        System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HiveClientConsole));
    5050        this.dvOnline = new Calendar.DayView();
     
    8282        this.txtLog = new System.Windows.Forms.TextBox();
    8383        this.tabPage2 = new System.Windows.Forms.TabPage();
     84        this.btnSaveCal = new System.Windows.Forms.Button();
    8485        this.pictureBox1 = new System.Windows.Forms.PictureBox();
    8586        this.groupBox1 = new System.Windows.Forms.GroupBox();
    86         this.btnSaveCal = new System.Windows.Forms.Button();
    8787        this.txttimeTo = new System.Windows.Forms.DateTimePicker();
    8888        this.txttimeFrom = new System.Windows.Forms.DateTimePicker();
     
    112112        // dvOnline
    113113        //
    114         drawTool2.DayView = this.dvOnline;
    115         this.dvOnline.ActiveTool = drawTool2;
     114        drawTool6.DayView = this.dvOnline;
     115        this.dvOnline.ActiveTool = drawTool6;
    116116        this.dvOnline.AmPmDisplay = false;
    117117        this.dvOnline.AppointmentDuration = Calendar.AppointmentSlotDuration.SixtyMinutes;
     
    137137        // tcClientConsole
    138138        //
    139         this.tcClientConsole.Appearance = System.Windows.Forms.TabAppearance.FlatButtons;
    140139        this.tcClientConsole.Controls.Add(this.tpConnection);
    141140        this.tcClientConsole.Controls.Add(this.tabPage2);
     
    257256        //
    258257        this.gbJobCommon.Controls.Add(this.lvJobDetail);
    259         this.gbJobCommon.Location = new System.Drawing.Point(8, 152);
     258        this.gbJobCommon.Location = new System.Drawing.Point(8, 139);
    260259        this.gbJobCommon.Name = "gbJobCommon";
    261         this.gbJobCommon.Size = new System.Drawing.Size(412, 252);
     260        this.gbJobCommon.Size = new System.Drawing.Size(269, 265);
    262261        this.gbJobCommon.TabIndex = 13;
    263262        this.gbJobCommon.TabStop = false;
     
    270269            this.chSince,
    271270            this.chProgress});
     271        this.lvJobDetail.Dock = System.Windows.Forms.DockStyle.Fill;
    272272        this.lvJobDetail.FullRowSelect = true;
    273273        this.lvJobDetail.GridLines = true;
    274         this.lvJobDetail.Location = new System.Drawing.Point(6, 14);
     274        this.lvJobDetail.Location = new System.Drawing.Point(3, 16);
    275275        this.lvJobDetail.Name = "lvJobDetail";
    276         this.lvJobDetail.Size = new System.Drawing.Size(398, 232);
     276        this.lvJobDetail.Size = new System.Drawing.Size(263, 246);
    277277        this.lvJobDetail.TabIndex = 0;
    278278        this.lvJobDetail.UseCompatibleStateImageBehavior = false;
     
    291291        //
    292292        this.chProgress.Text = "Progress";
    293         this.chProgress.Width = 200;
    294293        //
    295294        // gbCommon
     
    435434        //
    436435        this.gbEventLog.Controls.Add(this.txtLog);
    437         this.gbEventLog.Location = new System.Drawing.Point(426, 152);
     436        this.gbEventLog.Location = new System.Drawing.Point(283, 139);
    438437        this.gbEventLog.Name = "gbEventLog";
    439         this.gbEventLog.Size = new System.Drawing.Size(412, 252);
     438        this.gbEventLog.Size = new System.Drawing.Size(555, 265);
    440439        this.gbEventLog.TabIndex = 7;
    441440        this.gbEventLog.TabStop = false;
     
    444443        // txtLog
    445444        //
    446         this.txtLog.Location = new System.Drawing.Point(4, 14);
     445        this.txtLog.Location = new System.Drawing.Point(6, 14);
    447446        this.txtLog.Multiline = true;
    448447        this.txtLog.Name = "txtLog";
    449448        this.txtLog.ReadOnly = true;
    450449        this.txtLog.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
    451         this.txtLog.Size = new System.Drawing.Size(402, 232);
     450        this.txtLog.Size = new System.Drawing.Size(543, 248);
    452451        this.txtLog.TabIndex = 0;
    453452        //
     
    466465        this.tabPage2.Text = "Schedule";
    467466        this.tabPage2.UseVisualStyleBackColor = true;
     467        //
     468        // btnSaveCal
     469        //
     470        this.btnSaveCal.Location = new System.Drawing.Point(633, 138);
     471        this.btnSaveCal.Name = "btnSaveCal";
     472        this.btnSaveCal.Size = new System.Drawing.Size(199, 23);
     473        this.btnSaveCal.TabIndex = 41;
     474        this.btnSaveCal.Text = "Save calender";
     475        this.btnSaveCal.UseVisualStyleBackColor = true;
     476        this.btnSaveCal.Click += new System.EventHandler(this.btnSaveCal_Click);
    468477        //
    469478        // pictureBox1
     
    495504        this.groupBox1.TabStop = false;
    496505        //
    497         // btnSaveCal
    498         //
    499         this.btnSaveCal.Location = new System.Drawing.Point(633, 138);
    500         this.btnSaveCal.Name = "btnSaveCal";
    501         this.btnSaveCal.Size = new System.Drawing.Size(199, 23);
    502         this.btnSaveCal.TabIndex = 41;
    503         this.btnSaveCal.Text = "Save calender";
    504         this.btnSaveCal.UseVisualStyleBackColor = true;
    505         this.btnSaveCal.Click += new System.EventHandler(this.btnSaveCal_Click);
    506         //
    507506        // txttimeTo
    508507        //
     
    627626        this.Name = "HiveClientConsole";
    628627        this.Text = "Client Console (loading...)";
    629         this.Load += new System.EventHandler(this.HiveClientConsole_Load);
    630628        this.tcClientConsole.ResumeLayout(false);
    631629        this.tpConnection.ResumeLayout(false);
  • trunk/sources/HeuristicLab.Hive.Client.Console/3.2/HiveClientConsole.cs

    r2024 r2062  
    3939
    4040    #region Delegates
    41 
     41   
     42    //delegate to write text in the textbox from another process
    4243    public delegate void AppendTextDelegate(String message);
     44
     45    //delegate to remove text in the textbox from another process
    4346    public delegate void RemoveTextDelegate(int newLength, int maxChars);
     47
     48    //delegate fired, if a dialog is being closed
    4449    public delegate void OnDialogClosedDelegate(RecurrentEvent e);
    4550
     
    5257
    5358        private const string ENDPOINTADRESS = "net.tcp://127.0.0.1:8000/ClientConsole/ClientConsoleCommunicator";
    54         //private const string EVENTLOGNAME = "Hive Client";
    55 
    56         //private EventLog HiveClientEventLog;
     59
     60        //the logfilereader
    5761        private LogFileReader logFileReader;
    58         private ClientConsoleCommunicatorClient cccc;
     62
     63        //communication with the client
     64        private ClientConsoleCommunicatorClient clientCommunicator;
     65
     66        //the timer for refreshing the gui
    5967        private System.Windows.Forms.Timer refreshTimer;
    60         //private ListViewColumnSorterDate lvwColumnSorter;
    61 
     68
     69        //the list of appointments in the calender
    6270        [XmlArray("Appointments")]
    6371        [XmlArrayItem("Appointment", typeof(Appointment))]
     
    8088        }
    8189
    82         private void InitTestCalenderEntries()
    83         {
    84             DateTime date = DateTime.Now;
    85             while (date.Year == 2009)
    86             {
    87 
    88                 onlineTimes.Add(CreateAppointment(date.AddHours(1), date.AddHours(3), false));
    89                 date = date.AddDays(1);
    90             }
    91         }
    92 
    9390        #endregion
    9491
    9592        #region Methods
     93
     94        #region Client connection
     95
     96        private void ConnectToClient()
     97        {
     98            try
     99            {
     100                clientCommunicator = new ClientConsoleCommunicatorClient(WcfSettings.GetBinding(), new EndpointAddress(ENDPOINTADRESS));
     101                clientCommunicator.GetStatusInfosCompleted += new EventHandler<GetStatusInfosCompletedEventArgs>(clientCommunicator_GetStatusInfosCompleted);
     102                clientCommunicator.GetCurrentConnectionCompleted += new EventHandler<GetCurrentConnectionCompletedEventArgs>(clientCommunicator_GetCurrentConnectionCompleted);
     103                clientCommunicator.GetUptimeCalendarCompleted += new EventHandler<GetUptimeCalendarCompletedEventArgs>(clientCommunicator_GetUptimeCalendarCompleted);
     104                clientCommunicator.SetUptimeCalendarCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(clientCommunicator_SetUptimeCalendarCompleted);
     105            }
     106            catch (Exception)
     107            {
     108                refreshTimer.Stop();
     109                DialogResult res = MessageBox.Show("Connection Error, check if Hive Client is running!", "Connection Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     110                if (res == DialogResult.OK)
     111                    this.Close();
     112            }
     113        }
     114
     115        #endregion
     116
     117        #region Logging
    96118
    97119        private void InitLogFileReader()
     
    129151            }
    130152        }
     153
     154        private void AppendText(string message)
     155        {
     156            if (this.txtLog.InvokeRequired)
     157            {
     158                this.txtLog.Invoke(new
     159                  AppendTextDelegate(AppendText), new object[] { message });
     160            }
     161            else
     162            {
     163                this.txtLog.AppendText(message);
     164            }
     165        }
     166
     167        #endregion
     168
     169        #region Gui Refresh
    131170
    132171        private void InitTimer()
     
    142181            try
    143182            {
    144                 cccc.GetStatusInfosAsync();
     183                clientCommunicator.GetStatusInfosAsync();
    145184            }
    146185            catch (Exception ex)
    147186            {
    148187                refreshTimer.Stop();
    149                 DialogResult res = MessageBox.Show("Connection Error, check if Hive Client is running!", "Connection Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     188                DialogResult res = MessageBox.Show("Connection Error, check if Hive Client is running!" + ex.Message, "Connection Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    150189                if (res == DialogResult.OK)
    151190                    this.Close();
    152191            }
    153         }
    154 
    155         private void ConnectToClient()
    156         {
    157             try
    158             {
    159                 //changed by MB, 16.04.09
    160                 //cccc = new ClientConsoleCommunicatorClient(new NetTcpBinding(), new EndpointAddress(ENDPOINTADRESS));
    161                 cccc = new ClientConsoleCommunicatorClient(WcfSettings.GetBinding(), new EndpointAddress(ENDPOINTADRESS));
    162                 cccc.GetStatusInfosCompleted += new EventHandler<GetStatusInfosCompletedEventArgs>(cccc_GetStatusInfosCompleted);
    163                 cccc.GetCurrentConnectionCompleted += new EventHandler<GetCurrentConnectionCompletedEventArgs>(cccc_GetCurrentConnectionCompleted);
    164                 cccc.GetUptimeCalendarCompleted += new EventHandler<GetUptimeCalendarCompletedEventArgs>(cccc_GetUptimeCalendarCompleted);
    165                 cccc.SetUptimeCalendarCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(cccc_SetUptimeCalendarCompleted);
    166             }
    167             catch (Exception)
    168             {
    169                 refreshTimer.Stop();
    170                 DialogResult res = MessageBox.Show("Connection Error, check if Hive Client is running!", "Connection Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    171                 if (res == DialogResult.OK)
    172                     this.Close();
    173             }
    174         }
    175 
    176         void cccc_SetUptimeCalendarCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
    177         {
    178             if (e.Error == null)
    179             {
    180                 MessageBox.Show("Calendar successfully saved!", "Calender", MessageBoxButtons.OK, MessageBoxIcon.Information);
    181             }
    182             else
    183             {
    184                 MessageBox.Show("Error saving calender \n" + e.Error.ToString(), "Calender", MessageBoxButtons.OK, MessageBoxIcon.Error);
    185             }
    186         }
    187 
    188         void cccc_GetUptimeCalendarCompleted(object sender, GetUptimeCalendarCompletedEventArgs e)
    189         {
    190             if (e.Error == null)
    191             {
    192                 if (e.Result != null)
    193                 {
    194                     onlineTimes = e.Result.ToList<Appointment>();
    195                     onlineTimes.ForEach(a => a.BorderColor = Color.Red);
    196                 }
    197                 else
    198                 {
    199                     onlineTimes = new List<Appointment>();
    200                 }
    201             }
    202             //InitTestCalenderEntries();
    203192        }
    204193
     
    248237        }
    249238
     239        #region Events
     240
     241        private void refreshTimer_Tick(object sender, EventArgs e)
     242        {
     243            RefreshGui();
     244        }
     245
     246        #endregion
     247
     248
     249        #endregion
     250
     251        #region Calendar stuff
     252
    250253        private void InitCalender()
    251254        {
    252255            dvOnline.StartDate = DateTime.Now;
    253             dvOnline.OnNewAppointment += new EventHandler<NewAppointmentEventArgs>(DvOnline_OnNewAppointment);
    254             dvOnline.OnResolveAppointments += new EventHandler<ResolveAppointmentsEventArgs>(DvOnline_OnResolveAppointments);
     256            dvOnline.OnNewAppointment += new EventHandler<NewAppointmentEventArgs>(dvOnline_OnNewAppointment);
     257            dvOnline.OnResolveAppointments += new EventHandler<ResolveAppointmentsEventArgs>(dvOnline_OnResolveAppointments);
    255258
    256259            //get calender from client
    257             cccc.GetUptimeCalendarAsync();
    258         }
    259 
    260         private Appointment CreateAppointment(DateTime startDate, DateTime endDate, bool allDay)
    261         {
    262             Appointment App = new Appointment();
    263             App.StartDate = startDate;
    264             App.EndDate = endDate;
    265             App.AllDayEvent = allDay;
    266             App.BorderColor = Color.Red;
    267             App.Locked = true;
    268             App.Subject = "Online";
    269             App.Recurring = false;
    270             return App;
    271         }
    272 
    273         private Appointment CreateAppointment(DateTime startDate, DateTime endDate, bool allDay, bool recurring, Guid recurringId)
    274         {
    275             Appointment App = new Appointment();
    276             App.StartDate = startDate;
    277             App.EndDate = endDate;
    278             App.AllDayEvent = allDay;
    279             App.BorderColor = Color.Red;
    280             App.Locked = true;
    281             App.Subject = "Online";
    282             App.Recurring = recurring;
    283             App.RecurringId = recurringId;
    284             return App;
    285         }
    286 
    287         private void DeleteAppointment()
    288         {
    289             onlineTimes.Remove(dvOnline.SelectedAppointment);
    290         }
    291 
    292         private void DeleteRecurringAppointment(Guid recurringId)
    293         {
    294             onlineTimes.RemoveAll(a => a.RecurringId.ToString() == dvOnline.SelectedAppointment.RecurringId.ToString());
    295         }
    296 
    297         #endregion
    298 
    299         #region Events
    300 
    301         private void refreshTimer_Tick(object sender, EventArgs e)
    302         {
    303             RefreshGui();
    304         }
    305 
    306         private void cccc_GetCurrentConnectionCompleted(object sender, GetCurrentConnectionCompletedEventArgs e)
    307         {
    308             if (e.Error == null)
    309             {
    310                 ConnectionContainer curConnection = e.Result;
    311                 tbIPAdress.Text = curConnection.IPAdress;
    312                 tbPort.Text = curConnection.Port.ToString();
    313             }
    314             else
    315             {
    316                 refreshTimer.Stop();
    317                 DialogResult res = MessageBox.Show("Connection Error, check if Hive Client is running! - " + e.Error.Message, "Connection Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    318                 if (res == DialogResult.OK)
    319                     this.Close();
    320             }
    321         }
    322 
    323         private void cccc_GetStatusInfosCompleted(object sender, GetStatusInfosCompletedEventArgs e)
    324         {
    325 
    326             if (e.Error == null)
    327             {
    328                 StatusCommons sc = e.Result;
    329 
    330                 lbGuid.Text = sc.ClientGuid.ToString();
    331                 lbConnectionStatus.Text = sc.Status.ToString();
    332                 lbJobdone.Text = sc.JobsDone.ToString();
    333                 lbJobsAborted.Text = sc.JobsAborted.ToString();
    334                 lbJobsFetched.Text = sc.JobsFetched.ToString();
    335 
    336                 this.Text = "Client Console (" + sc.Status.ToString() + ")";
    337 
    338                 ListViewItem curJobStatusItem;
    339 
    340                 if (sc.Jobs != null)
    341                 {
    342                     lvJobDetail.Items.Clear();
    343                     double progress;
    344                     foreach (JobStatus curJob in sc.Jobs)
    345                     {
    346                         curJobStatusItem = new ListViewItem(curJob.JobId.ToString());
    347                         curJobStatusItem.SubItems.Add(curJob.Since.ToString());
    348                         progress = curJob.Progress * 100;
    349                         curJobStatusItem.SubItems.Add(progress.ToString());
    350                         lvJobDetail.Items.Add(curJobStatusItem);
    351                     }
    352                     lvJobDetail.Sort();
    353                 }
    354 
    355                 UpdateGraph(sc.Jobs);
    356 
    357                 if (sc.Status == NetworkEnumWcfConnState.Connected || sc.Status == NetworkEnumWcfConnState.Loggedin)
    358                 {
    359                     btConnect.Enabled = false;
    360                     btnDisconnect.Enabled = true;
    361                     lbCs.Text = sc.ConnectedSince.ToString();
    362                     cccc.GetCurrentConnectionAsync();
    363                 }
    364                 else if (sc.Status == NetworkEnumWcfConnState.Disconnected)
    365                 {
    366                     btConnect.Enabled = true;
    367                     btnDisconnect.Enabled = false;
    368                     lbCs.Text = String.Empty;
    369                 }
    370                 else if (sc.Status == NetworkEnumWcfConnState.Failed)
    371                 {
    372                     btConnect.Enabled = true;
    373                     btnDisconnect.Enabled = false;
    374                     lbCs.Text = String.Empty;
    375                 }
    376 
    377                 cccc.GetCurrentConnection();
    378             }
    379             else
    380             {
    381                 refreshTimer.Stop();
    382                 DialogResult res = MessageBox.Show("Connection Error, check if Hive Client is running! - " + e.Error.Message, "Connection Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    383                 if (res == DialogResult.OK)
    384                     this.Close();
    385             }
    386         }
    387 
    388         private void HiveClientConsole_Load(object sender, EventArgs e)
    389         {
    390             //nothing to do
    391         }
    392 
    393         private void AppendText(string message)
    394         {
    395             if (this.txtLog.InvokeRequired)
    396             {
    397                 this.txtLog.Invoke(new
    398                   AppendTextDelegate(AppendText), new object[] { message });
    399             }
    400             else
    401             {
    402                 this.txtLog.AppendText(message);
    403             }
    404         }
    405 
    406         private void btConnect_Click(object sender, EventArgs e)
    407         {
    408             IPAddress ipAdress;
    409             int port;
    410             ConnectionContainer cc = new ConnectionContainer();
    411             if (IPAddress.TryParse(tbIPAdress.Text, out ipAdress) && int.TryParse(tbPort.Text, out port))
    412             {
    413                 cc.IPAdress = tbIPAdress.Text;
    414                 cc.Port = port;
    415                 cccc.SetConnectionAsync(cc);
    416             }
    417             else
    418             {
    419                 MessageBox.Show("IP Adress and/or Port Error", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    420             }
    421         }
    422 
    423         private void btnDisconnect_Click(object sender, EventArgs e)
    424         {
    425             cccc.DisconnectAsync();
    426         }
    427 
    428         private void btn_clientShutdown_Click(object sender, EventArgs e)
    429         {
    430             DialogResult res = MessageBox.Show("Do you really want to shutdown the Hive Client?", "Hive Client Console", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
    431             if (res == DialogResult.Yes)
    432             {
    433                 logFileReader.Stop();
    434                 cccc.ShutdownClient();
    435                 this.Close();
    436             }
    437         }
    438 
    439         private void btbDelete_Click(object sender, EventArgs e)
    440         {
    441             Appointment selectedAppointment = dvOnline.SelectedAppointment;
    442             if (dvOnline.SelectedAppointment != null)
    443             {
    444                 if (!selectedAppointment.Recurring)
    445                     DeleteAppointment();
    446                 else
    447                 {
    448                     DialogResult res = MessageBox.Show("Delete all events in this series?", "Delete recurrences", MessageBoxButtons.YesNo);
    449                     if (res != DialogResult.Yes)
    450                         DeleteAppointment();
    451                     else
    452                         DeleteRecurringAppointment(selectedAppointment.RecurringId);
    453                 }
    454             }
    455             dvOnline.Invalidate();
    456         }
    457 
    458         private void chbade_CheckedChanged(object sender, EventArgs e)
    459         {
    460             txttimeFrom.Visible = !chbade.Checked;
    461             txttimeTo.Visible = !chbade.Checked;
    462         }
    463 
    464         private void dvOnline_OnSelectionChanged(object sender, EventArgs e)
    465         {
    466             //btCreate.Enabled = true;
    467             if (dvOnline.Selection == SelectionType.DateRange)
    468             {
    469                 dtpFrom.Text = dvOnline.SelectionStart.ToShortDateString();
    470                 dtpTo.Text = dvOnline.SelectionEnd.Date.ToShortDateString();
    471                 txttimeFrom.Text = dvOnline.SelectionStart.ToShortTimeString();
    472                 txttimeTo.Text = dvOnline.SelectionEnd.ToShortTimeString();
    473 
    474                 btCreate.Text = "Save";
    475             }
    476 
    477             if (dvOnline.Selection == SelectionType.Appointment)
    478             {
    479 
    480                 dtpFrom.Text = dvOnline.SelectedAppointment.StartDate.ToShortDateString();
    481                 dtpTo.Text = dvOnline.SelectedAppointment.EndDate.ToShortDateString();
    482                 txttimeFrom.Text = dvOnline.SelectedAppointment.StartDate.ToShortTimeString();
    483                 txttimeTo.Text = dvOnline.SelectedAppointment.EndDate.ToShortTimeString();
    484 
    485                 if (dvOnline.SelectedAppointment.Recurring)
    486                     //btCreate.Enabled = false;
    487                     //also change the caption of the save button
    488                     btCreate.Text = "Save changes";
    489             }
    490 
    491             if (dvOnline.Selection == SelectionType.None)
    492             {
    493                 //also change the caption of the save button
    494                 btCreate.Text = "Save";
    495             }
    496 
    497         }
    498 
    499         private void Connection_KeyPress(object sender, KeyPressEventArgs e)
    500         {
    501             if (e.KeyChar == (char)Keys.Return)
    502                 btConnect_Click(null, null);
    503         }
    504 
    505         private void mcOnline_DateChanged(object sender, DateRangeEventArgs e)
    506         {
    507             dvOnline.StartDate = mcOnline.SelectionStart;
     260            clientCommunicator.GetUptimeCalendarAsync();
    508261        }
    509262
     
    553306        }
    554307
     308        private Appointment CreateAppointment(DateTime startDate, DateTime endDate, bool allDay)
     309        {
     310            Appointment App = new Appointment();
     311            App.StartDate = startDate;
     312            App.EndDate = endDate;
     313            App.AllDayEvent = allDay;
     314            App.BorderColor = Color.Red;
     315            App.Locked = true;
     316            App.Subject = "Online";
     317            App.Recurring = false;
     318            return App;
     319        }
     320
     321        private Appointment CreateAppointment(DateTime startDate, DateTime endDate, bool allDay, bool recurring, Guid recurringId)
     322        {
     323            Appointment App = new Appointment();
     324            App.StartDate = startDate;
     325            App.EndDate = endDate;
     326            App.AllDayEvent = allDay;
     327            App.BorderColor = Color.Red;
     328            App.Locked = true;
     329            App.Subject = "Online";
     330            App.Recurring = recurring;
     331            App.RecurringId = recurringId;
     332            return App;
     333        }
     334
     335        private void DeleteAppointment()
     336        {
     337            onlineTimes.Remove(dvOnline.SelectedAppointment);
     338        }
     339
     340        private void DeleteRecurringAppointment(Guid recurringId)
     341        {
     342            onlineTimes.RemoveAll(a => a.RecurringId.ToString() == dvOnline.SelectedAppointment.RecurringId.ToString());
     343        }
     344
     345        private void ChangeRecurrenceAppointment(Guid recurringId)
     346        {
     347            int hourfrom = int.Parse(txttimeFrom.Text.Substring(0, txttimeFrom.Text.IndexOf(':')));
     348            int hourTo = int.Parse(txttimeTo.Text.Substring(0, txttimeTo.Text.IndexOf(':')));
     349            List<Appointment> recurringAppointments = onlineTimes.Where(appointment => appointment.RecurringId == recurringId).ToList();
     350            recurringAppointments.ForEach(appointment => appointment.StartDate = new DateTime(appointment.StartDate.Year, appointment.StartDate.Month, appointment.StartDate.Day, hourfrom, 0, 0));
     351            recurringAppointments.ForEach(appointment => appointment.EndDate = new DateTime(appointment.EndDate.Year, appointment.EndDate.Month, appointment.EndDate.Day, hourTo, 0, 0));
     352
     353            DeleteRecurringAppointment(recurringId);
     354            onlineTimes.AddRange(recurringAppointments);
     355        }
     356
     357        public void DialogClosed(RecurrentEvent e)
     358        {
     359            CreateDailyRecurrenceAppointments(e.DateFrom, e.DateTo, e.AllDay, e.IncWeeks, e.WeekDays);
     360        }
     361
     362        private void CreateDailyRecurrenceAppointments(DateTime dateFrom, DateTime dateTo, bool allDay, int incWeek, HashSet<DayOfWeek> daysOfWeek)
     363        {
     364            DateTime incDate = dateFrom;
     365            Guid guid = Guid.NewGuid();
     366
     367            while (incDate.Date <= dateTo.Date)
     368            {
     369                if (daysOfWeek.Contains(incDate.Date.DayOfWeek))
     370                    onlineTimes.Add(CreateAppointment(incDate, new DateTime(incDate.Year, incDate.Month, incDate.Day, dateTo.Hour, dateTo.Minute, 0), allDay, true, guid));
     371                incDate = incDate.AddDays(1);
     372            }
     373
     374            dvOnline.Invalidate();
     375        }
     376
     377        #region Calendar Events
     378
     379        private void btbDelete_Click(object sender, EventArgs e)
     380        {
     381            Appointment selectedAppointment = dvOnline.SelectedAppointment;
     382            if (dvOnline.SelectedAppointment != null)
     383            {
     384                if (!selectedAppointment.Recurring)
     385                    DeleteAppointment();
     386                else
     387                {
     388                    DialogResult res = MessageBox.Show("Delete all events in this series?", "Delete recurrences", MessageBoxButtons.YesNo);
     389                    if (res != DialogResult.Yes)
     390                        DeleteAppointment();
     391                    else
     392                        DeleteRecurringAppointment(selectedAppointment.RecurringId);
     393                }
     394            }
     395            dvOnline.Invalidate();
     396        }
     397
     398        private void chbade_CheckedChanged(object sender, EventArgs e)
     399        {
     400            txttimeFrom.Visible = !chbade.Checked;
     401            txttimeTo.Visible = !chbade.Checked;
     402        }
     403
     404        private void dvOnline_OnSelectionChanged(object sender, EventArgs e)
     405        {
     406            //btCreate.Enabled = true;
     407            if (dvOnline.Selection == SelectionType.DateRange)
     408            {
     409                dtpFrom.Text = dvOnline.SelectionStart.ToShortDateString();
     410                dtpTo.Text = dvOnline.SelectionEnd.Date.ToShortDateString();
     411                txttimeFrom.Text = dvOnline.SelectionStart.ToShortTimeString();
     412                txttimeTo.Text = dvOnline.SelectionEnd.ToShortTimeString();
     413
     414                btCreate.Text = "Save";
     415            }
     416
     417            if (dvOnline.Selection == SelectionType.Appointment)
     418            {
     419
     420                dtpFrom.Text = dvOnline.SelectedAppointment.StartDate.ToShortDateString();
     421                dtpTo.Text = dvOnline.SelectedAppointment.EndDate.ToShortDateString();
     422                txttimeFrom.Text = dvOnline.SelectedAppointment.StartDate.ToShortTimeString();
     423                txttimeTo.Text = dvOnline.SelectedAppointment.EndDate.ToShortTimeString();
     424
     425                if (dvOnline.SelectedAppointment.Recurring)
     426                    //btCreate.Enabled = false;
     427                    //also change the caption of the save button
     428                    btCreate.Text = "Save changes";
     429            }
     430
     431            if (dvOnline.Selection == SelectionType.None)
     432            {
     433                //also change the caption of the save button
     434                btCreate.Text = "Save";
     435            }
     436
     437        }
     438
     439        private void mcOnline_DateChanged(object sender, DateRangeEventArgs e)
     440        {
     441            dvOnline.StartDate = mcOnline.SelectionStart;
     442        }
     443
    555444        private void btCreate_Click(object sender, EventArgs e)
    556445        {
     
    584473        }
    585474
    586         private void ChangeRecurrenceAppointment(Guid recurringId)
    587         {
    588             int hourfrom = int.Parse(txttimeFrom.Text.Substring(0, txttimeFrom.Text.IndexOf(':')));
    589             int hourTo = int.Parse(txttimeTo.Text.Substring(0, txttimeTo.Text.IndexOf(':')));
    590             List<Appointment> recurringAppointments = onlineTimes.Where(appointment => appointment.RecurringId == recurringId).ToList();
    591             recurringAppointments.ForEach(appointment => appointment.StartDate = new DateTime(appointment.StartDate.Year, appointment.StartDate.Month, appointment.StartDate.Day, hourfrom, 0, 0));
    592             recurringAppointments.ForEach(appointment => appointment.EndDate = new DateTime(appointment.EndDate.Year, appointment.EndDate.Month, appointment.EndDate.Day, hourTo, 0, 0));
    593 
    594             DeleteRecurringAppointment(recurringId);
    595             onlineTimes.AddRange(recurringAppointments);
    596         }
    597 
    598         private void DvOnline_OnResolveAppointments(object sender, ResolveAppointmentsEventArgs e)
     475        private void btnRecurrence_Click(object sender, EventArgs e)
     476        {
     477            Recurrence recurrence = new Recurrence();
     478            recurrence.dialogClosedDelegate = new OnDialogClosedDelegate(this.DialogClosed);
     479            recurrence.Show();
     480        }
     481
     482        private void btnSaveCal_Click(object sender, EventArgs e)
     483        {
     484            clientCommunicator.SetUptimeCalendarAsync(onlineTimes.ToArray());
     485        }
     486
     487        private void dvOnline_OnResolveAppointments(object sender, ResolveAppointmentsEventArgs e)
    599488        {
    600489            List<Appointment> Apps = new List<Appointment>();
     
    607496        }
    608497
    609         private void DvOnline_OnNewAppointment(object sender, NewAppointmentEventArgs e)
     498        private void dvOnline_OnNewAppointment(object sender, NewAppointmentEventArgs e)
    610499        {
    611500            Appointment Appointment = new Appointment();
     
    617506        }
    618507
    619         private void btnRecurrence_Click(object sender, EventArgs e)
    620         {
    621             Recurrence recurrence = new Recurrence();
    622             recurrence.dialogClosedDelegate = new OnDialogClosedDelegate(this.DialogClosed);
    623             recurrence.Show();
    624         }
    625 
    626         public void DialogClosed(RecurrentEvent e)
    627         {
    628             CreateDailyRecurrenceAppointments(e.DateFrom, e.DateTo, e.AllDay, e.IncWeeks, e.WeekDays);
    629         }
    630 
    631         private void CreateDailyRecurrenceAppointments(DateTime dateFrom, DateTime dateTo, bool allDay, int incWeek, HashSet<DayOfWeek> daysOfWeek)
    632         {
    633             DateTime incDate = dateFrom;
    634             Guid guid = Guid.NewGuid();
    635 
    636             while (incDate.Date <= dateTo.Date)
    637             {
    638                 if (daysOfWeek.Contains(incDate.Date.DayOfWeek))
    639                     onlineTimes.Add(CreateAppointment(incDate, new DateTime(incDate.Year, incDate.Month, incDate.Day, dateTo.Hour, dateTo.Minute, 0), allDay, true, guid));
    640                 incDate = incDate.AddDays(1);
    641             }
    642 
    643             dvOnline.Invalidate();
    644         }
    645 
    646         private void btnSaveCal_Click(object sender, EventArgs e)
    647         {
    648             cccc.SetUptimeCalendarAsync(onlineTimes.ToArray());
     508        #endregion
     509
     510        #endregion
     511
     512        #region Client communicator events
     513
     514        void clientCommunicator_SetUptimeCalendarCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
     515        {
     516            if (e.Error == null)
     517            {
     518                MessageBox.Show("Calendar successfully saved!", "Calender", MessageBoxButtons.OK, MessageBoxIcon.Information);
     519            }
     520            else
     521            {
     522                MessageBox.Show("Error saving calender \n" + e.Error.ToString(), "Calender", MessageBoxButtons.OK, MessageBoxIcon.Error);
     523            }
     524        }
     525
     526        void clientCommunicator_GetUptimeCalendarCompleted(object sender, GetUptimeCalendarCompletedEventArgs e)
     527        {
     528            if (e.Error == null)
     529            {
     530                if (e.Result != null)
     531                {
     532                    onlineTimes = e.Result.ToList<Appointment>();
     533                    onlineTimes.ForEach(a => a.BorderColor = Color.Red);
     534                }
     535                else
     536                {
     537                    onlineTimes = new List<Appointment>();
     538                }
     539            }
     540            //InitTestCalenderEntries();
     541        }
     542
     543        private void clientCommunicator_GetCurrentConnectionCompleted(object sender, GetCurrentConnectionCompletedEventArgs e)
     544        {
     545            if (e.Error == null)
     546            {
     547                ConnectionContainer curConnection = e.Result;
     548                tbIPAdress.Text = curConnection.IPAdress;
     549                tbPort.Text = curConnection.Port.ToString();
     550            }
     551            else
     552            {
     553                refreshTimer.Stop();
     554                DialogResult res = MessageBox.Show("Connection Error, check if Hive Client is running! - " + e.Error.Message, "Connection Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     555                if (res == DialogResult.OK)
     556                    this.Close();
     557            }
     558        }
     559
     560        private void clientCommunicator_GetStatusInfosCompleted(object sender, GetStatusInfosCompletedEventArgs e)
     561        {
     562
     563            if (e.Error == null)
     564            {
     565                StatusCommons sc = e.Result;
     566
     567                lbGuid.Text = sc.ClientGuid.ToString();
     568                lbConnectionStatus.Text = sc.Status.ToString();
     569                lbJobdone.Text = sc.JobsDone.ToString();
     570                lbJobsAborted.Text = sc.JobsAborted.ToString();
     571                lbJobsFetched.Text = sc.JobsFetched.ToString();
     572
     573                this.Text = "Client Console (" + sc.Status.ToString() + ")";
     574
     575                ListViewItem curJobStatusItem;
     576
     577                if (sc.Jobs != null)
     578                {
     579                    lvJobDetail.Items.Clear();
     580                    double progress;
     581                    foreach (JobStatus curJob in sc.Jobs)
     582                    {
     583                        curJobStatusItem = new ListViewItem(curJob.JobId.ToString());
     584                        curJobStatusItem.SubItems.Add(curJob.Since.ToString());
     585                        progress = curJob.Progress * 100;
     586                        curJobStatusItem.SubItems.Add(progress.ToString());
     587                        lvJobDetail.Items.Add(curJobStatusItem);
     588                    }
     589                    lvJobDetail.Sort();
     590                }
     591
     592                UpdateGraph(sc.Jobs);
     593
     594                if (sc.Status == NetworkEnumWcfConnState.Connected || sc.Status == NetworkEnumWcfConnState.Loggedin)
     595                {
     596                    btConnect.Enabled = false;
     597                    btnDisconnect.Enabled = true;
     598                    lbCs.Text = sc.ConnectedSince.ToString();
     599                    clientCommunicator.GetCurrentConnectionAsync();
     600                }
     601                else if (sc.Status == NetworkEnumWcfConnState.Disconnected)
     602                {
     603                    btConnect.Enabled = true;
     604                    btnDisconnect.Enabled = false;
     605                    lbCs.Text = String.Empty;
     606                }
     607                else if (sc.Status == NetworkEnumWcfConnState.Failed)
     608                {
     609                    btConnect.Enabled = true;
     610                    btnDisconnect.Enabled = false;
     611                    lbCs.Text = String.Empty;
     612                }
     613
     614                clientCommunicator.GetCurrentConnection();
     615            }
     616            else
     617            {
     618                refreshTimer.Stop();
     619                DialogResult res = MessageBox.Show("Connection Error, check if Hive Client is running! - " + e.Error.Message, "Connection Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     620                if (res == DialogResult.OK)
     621                    this.Close();
     622            }
     623        }
     624
     625        #endregion
     626
     627        #endregion
     628
     629        #region GUI Events
     630
     631        private void btConnect_Click(object sender, EventArgs e)
     632        {
     633            IPAddress ipAdress;
     634            int port;
     635            ConnectionContainer cc = new ConnectionContainer();
     636            if (IPAddress.TryParse(tbIPAdress.Text, out ipAdress) && int.TryParse(tbPort.Text, out port))
     637            {
     638                cc.IPAdress = tbIPAdress.Text;
     639                cc.Port = port;
     640                clientCommunicator.SetConnectionAsync(cc);
     641            }
     642            else
     643            {
     644                MessageBox.Show("IP Adress and/or Port Error", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     645            }
     646        }
     647
     648        private void btnDisconnect_Click(object sender, EventArgs e)
     649        {
     650            clientCommunicator.DisconnectAsync();
     651        }
     652
     653        private void btn_clientShutdown_Click(object sender, EventArgs e)
     654        {
     655            DialogResult res = MessageBox.Show("Do you really want to shutdown the Hive Client?", "Hive Client Console", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
     656            if (res == DialogResult.Yes)
     657            {
     658                logFileReader.Stop();
     659                clientCommunicator.ShutdownClient();
     660                this.Close();
     661            }
     662        }
     663
     664        private void Connection_KeyPress(object sender, KeyPressEventArgs e)
     665        {
     666            if (e.KeyChar == (char)Keys.Return)
     667                btConnect_Click(null, null);
    649668        }
    650669
  • trunk/sources/HeuristicLab.Hive.Client.Console/3.2/HiveClientConsole.resx

    r2023 r2062  
    127127        ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABS
    128128        CgAAAk1TRnQBSQFMAgEBAgEAAQQBAAEEAQABEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA
    129         AwABEAMAAQEBAAEgBgABECoAAUMCAQF0AWYCCQHxAygB/wFiAgMB1AEgAgEBLCwAAUMCAQF0AWYCCQHx
    130         AygB/wFiAgMB1AEgAgEBLKQAAWACCgHyAZMBgQEoAf8BvwGBASgB/wG9AYEBKAH/AboBgQEoAf8BuAGB
    131         ASgB/wG2AYEBKAH/AVwBRQEoAf8BPQIBAWUcAAFgAgoB8gIoAaQB/wIoAdYB/wIoAdQB/wIoAdIB/wIo
    132         AdAB/wIoAc4B/wIoAWMB/wE9AgEBZZgAATIBLgEoAf8BxwGBASgB/wHDAYEBKAH/AbEBgQEoAf8BsQGB
    133         ASgB/wGxAYEBKAH/AbEBgQEoAf8BswGBASgB/wG2AYEBKAH/AbQBgQEoAf8BZAIFAeQUAAIoATMB/wIo
    134         AdwB/wIoAdkB/wIoAcoB/wIoAcoB/wIoAcoB/wIoAcoB/wIoAcsB/wIoAc4B/wIoAcwB/wFkAgUB5JAA
    135         AygB/wHLAYEBKAH/AbsBgQEoAf8BtgGBASgB/wG2AYEBKAH/Ae4B3AHEBf8BvgGBAUUB/wG2AYEBKAH/
    136         AbYBgQEoAf8BtgGBASgB/wG0AYEBKAH/AUkCAgGGDAADKAH/AigB4AH/AigB0gH/AigBzgH/AlUB1gH/
    137         AigBzgH/AigBzgH/AigBzgH/AisBzgH/AigBzgH/AigBzgH/AigBzAH/AUkCAgGGiAABLAIBAUIB0AGG
    138         ASgB/wHHAYEBKAH/AboBgQEoAf8BugGBASgB/wG6AYEBKAH/AdABnAF5Bf8BugGBASgB/wG6AYEBKAH/
    139         AboBgQEoAf8BugGBASgB/wG2AYEBKAH/AXwBVwEoAf8IAAEsAgEBQgIoAeQB/wIoAdwB/wIoAdIB/wKf
    140         Ae0F/wJuAd4B/wIoAdIB/wL0Af0F/wIrAdIB/wIoAdIB/wIoAc4B/wIoAYEB/4gAAygB/wHSAYkBKAH/
    141         Ab8BgQEoAf8BvwGBASgB/wG/AYEBKAH/Ab8BgQEoAf8B0wGfAXkF/wG/AYEBKAH/Ab8BgQEoAf8BvwGB
    142         ASgB/wG/AYEBKAH/Ab4BgQEoAf8BtgGBASgB/wE2AgEBVwQAAygB/wIoAeUB/wIoAdYB/wIoAdYN/wL1
    143         Af0J/wLiAfoB/wIoAdYB/wIoAdUB/wIoAc4B/wE2AgEBV4QAAXABWAEoAf8B1AGMASgB/wHEAYEBKAH/
    144         AcQBgQEoAf8BxAGBASgB/wHEAYEBKAH/AdcBpAF6Bf8BxAGBASgB/wHEAYEBKAH/AcQBgQEoAf8BxAGB
    145         ASgB/wHEAYEBKAH/AbgBgQEoAf8BZQIHAewEAAIoAXYB/wIoAegB/wIoAdoB/wIoAdoB/wIoAdoR/wLi
    146         AfoB/wIoAdoB/wIoAdoB/wIoAdoB/wIoAdAB/wFlAgcB7IQAAYEBbQEoAf8B1wGOASgB/wHJAYEBKAH/
    147         AckBgQEoAf8ByQGBASgB/wHJAYEBKAn/AckBgQEoAf8ByQGBASgB/wHJAYEBKAH/AckBgQEoAf8ByQGB
    148         ASgB/wG6AYEBKAH/AygB/wQAAigBgQH/AigB6QH/AigB3gH/AigB3gH/AigB3gH/AvQB/Q3/Am4B5wH/
    149         AigB3gH/AigB3gH/AigB3gH/AigB0gH/AygB/4QAAYABXgEoAf8B2QGRASgB/wHOAYMBKAH/Ac4BgwEo
    150         Af8BzgGDASgB/wHOAYMBKAH/Ac4BgwEoAf8B1wGcAVkB/wHOAYMBKAH/Ac4BgwEoAf8BzgGDASgB/wHO
    151         AYMBKAH/Ac4BgwEoAf8BvQGBASgB/wFaAhMB+QQAASgBLQF/Af8CKAHsAf8CKAHiAf8CKAHiAf8C9AH9
    152         Ff8CbgHqAf8CKAHiAf8CKAHiAf8CKAHUAf8BWgITAfmEAAErASkBKAH/AdsBlAEoAf8B0gGJASgB/wHS
    153         AYkBKAH/AdIBiQEoAf8B0gGJASgB/wHSAYkBKAH/AesBywGQAf8B0gGJASgB/wHSAYkBKAH/AdIBiQEo
    154         Af8B0gGJASgB/wHEAYEBKAH/Ab8BgQEoAf8BUQICAZsEAAIoASsB/wIoAe0B/wIoAeYB/wIoAeUB/wL9
    155         Af4F/wLiAfwB/wIoAeUJ/wKBAfEB/wIoAeUB/wIoAdoB/wIoAdYB/wFRAgIBm4QAAVgCAgGyAd4BmAEo
    156         Af8B2wGUASgB/wHXAY4BKAH/AdcBjgEoAf8B1wGOASgB/wH7AfYB6wX/AdcBjgEoAf8B1wGOASgB/wHX
    157         AY4BKAH/AdYBjQEoAf8BxAGBASgB/wGpAYEBKAH/CAABWAICAbIBKAEyAe8B/wIoAe0B/wIoAekB/wIo
    158         AekB/wLhAfwB/wIoAekB/wIoAekB/wIoAekB/wKBAfMB/wIoAekB/wIoAegB/wIoAdoB/wEoATABnQH/
    159         jAABYgFHASgB/wHdAZcBKAH/AdsBlAEoAf8B2wGUASgB/wHbAZQBKAH/AdsBlAEoAf8B3AGXAS4B/wHb
    160         AZQBKAH/AdsBlAEoAf8B1QGMASgB/wHJAYEBKAH/AdEBiAEoAf8BLAIhAfwMAAIoAVwB/wIoAe8B/wIo
    161         Ae0B/wIoAe0B/wIoAe0B/wIoAe0B/wIoAe0B/wIoAe0B/wIoAe0B/wIoAegB/wIoAd4B/wEoATsB4gH/
    162         ASwCIQH8jAABGQIBASEBkAF8ASgB/wHfAZkBKAH/AdsBlAEoAf8B2QGRASgB/wHYAZABKAH/AdgBkAEo
    163         Af8B0wGKASgB/wHQAYYBKAH/Ac4BgwEoAf8B2gGSASgB/wEzAS4BKAH/EAABGQIBASECKAGHAf8BKAEu
    164         AfEB/wIoAe0B/wIoAewB/wIoAesB/wIoAesB/wIoAeYB/wIoAeQB/wIoAeIB/wEoAUUB5gH/AigBMgH/
    165         lAABEgIBARYBTQE/ASgB/wHSAYkBKAH/AeIBnQEoAf8B2QGRASgB/wHXAY4BKAH/AdUBjAEoAf8B4QGb
    166         ASgB/wHOAYQBKAH/AUgCKAH+GAABEgIBARYCKAFMAf8BKAEuAdMB/wEoAT8B9AH/AigB7AH/AigB6QH/
    167         ASgBKQHoAf8BKAFHAfAB/wIoAcwB/wFIAigB/qAAAUYCAQF9AygB/wF5AWABKAH/AYEBeQEoAf8BWgFL
    168         ASgB/wFIAigB/gEUAgEBGiQAAUYCAQF9AygB/wIoAXwB/wIoAYEB/wIoAVwB/wFIAigB/gEUAgEBGv8A
     129        AwABEAMAAQEBAAEgBgABECoAAUMCAQF0AWYCCQHxAykB/wFiAgMB1AEgAgEBLCwAAUMCAQF0AWYCCQHx
     130        AykB/wFiAgMB1AEgAgEBLKQAAWACCgHyAZMBgQEpAf8BvwGBASkB/wG9AYEBKQH/AboBgQEpAf8BuAGB
     131        ASkB/wG2AYEBKQH/AV0BRgEpAf8BPQIBAWUcAAFgAgoB8gIpAaQB/wIpAdYB/wIpAdQB/wIpAdIB/wIp
     132        AdAB/wIpAc4B/wIpAWQB/wE9AgEBZZgAATMBLwEpAf8BxwGBASkB/wHDAYEBKQH/AbEBgQEpAf8BsQGB
     133        ASkB/wGxAYEBKQH/AbEBgQEpAf8BswGBASkB/wG2AYEBKQH/AbQBgQEpAf8BZAIFAeQUAAIpATQB/wIp
     134        AdwB/wIpAdkB/wIpAcoB/wIpAcoB/wIpAcoB/wIpAcoB/wIpAcsB/wIpAc4B/wIpAcwB/wFkAgUB5JAA
     135        AykB/wHLAYEBKQH/AbsBgQEpAf8BtgGBASkB/wG2AYEBKQH/Ae4B3AHEBf8BvgGBAUYB/wG2AYEBKQH/
     136        AbYBgQEpAf8BtgGBASkB/wG0AYEBKQH/AUkCAgGGDAADKQH/AikB4AH/AikB0gH/AikBzgH/AlYB1gH/
     137        AikBzgH/AikBzgH/AikBzgH/AiwBzgH/AikBzgH/AikBzgH/AikBzAH/AUkCAgGGiAABLAIBAUIB0AGG
     138        ASkB/wHHAYEBKQH/AboBgQEpAf8BugGBASkB/wG6AYEBKQH/AdABnAF6Bf8BugGBASkB/wG6AYEBKQH/
     139        AboBgQEpAf8BugGBASkB/wG2AYEBKQH/AX0BWAEpAf8IAAEsAgEBQgIpAeQB/wIpAdwB/wIpAdIB/wKf
     140        Ae0F/wJvAd4B/wIpAdIB/wL0Af0F/wIsAdIB/wIpAdIB/wIpAc4B/wIpAYEB/4gAAykB/wHSAYkBKQH/
     141        Ab8BgQEpAf8BvwGBASkB/wG/AYEBKQH/Ab8BgQEpAf8B0wGfAXoF/wG/AYEBKQH/Ab8BgQEpAf8BvwGB
     142        ASkB/wG/AYEBKQH/Ab4BgQEpAf8BtgGBASkB/wE2AgEBVwQAAykB/wIpAeUB/wIpAdYB/wIpAdYN/wL1
     143        Af0J/wLiAfoB/wIpAdYB/wIpAdUB/wIpAc4B/wE2AgEBV4QAAXEBWQEpAf8B1AGMASkB/wHEAYEBKQH/
     144        AcQBgQEpAf8BxAGBASkB/wHEAYEBKQH/AdcBpAF7Bf8BxAGBASkB/wHEAYEBKQH/AcQBgQEpAf8BxAGB
     145        ASkB/wHEAYEBKQH/AbgBgQEpAf8BZQIHAewEAAIpAXcB/wIpAegB/wIpAdoB/wIpAdoB/wIpAdoR/wLi
     146        AfoB/wIpAdoB/wIpAdoB/wIpAdoB/wIpAdAB/wFlAgcB7IQAAYEBbgEpAf8B1wGOASkB/wHJAYEBKQH/
     147        AckBgQEpAf8ByQGBASkB/wHJAYEBKQn/AckBgQEpAf8ByQGBASkB/wHJAYEBKQH/AckBgQEpAf8ByQGB
     148        ASkB/wG6AYEBKQH/AykB/wQAAikBgQH/AikB6QH/AikB3gH/AikB3gH/AikB3gH/AvQB/Q3/Am8B5wH/
     149        AikB3gH/AikB3gH/AikB3gH/AikB0gH/AykB/4QAAYEBXwEpAf8B2QGRASkB/wHOAYMBKQH/Ac4BgwEp
     150        Af8BzgGDASkB/wHOAYMBKQH/Ac4BgwEpAf8B1wGcAVoB/wHOAYMBKQH/Ac4BgwEpAf8BzgGDASkB/wHO
     151        AYMBKQH/Ac4BgwEpAf8BvQGBASkB/wFbAhMB+QQAASkBLgGAAf8CKQHsAf8CKQHiAf8CKQHiAf8C9AH9
     152        Ff8CbwHqAf8CKQHiAf8CKQHiAf8CKQHUAf8BWwITAfmEAAEsASoBKQH/AdsBlAEpAf8B0gGJASkB/wHS
     153        AYkBKQH/AdIBiQEpAf8B0gGJASkB/wHSAYkBKQH/AesBywGQAf8B0gGJASkB/wHSAYkBKQH/AdIBiQEp
     154        Af8B0gGJASkB/wHEAYEBKQH/Ab8BgQEpAf8BUQICAZsEAAIpASwB/wIpAe0B/wIpAeYB/wIpAeUB/wL9
     155        Af4F/wLiAfwB/wIpAeUJ/wKBAfEB/wIpAeUB/wIpAdoB/wIpAdYB/wFRAgIBm4QAAVgCAgGyAd4BmAEp
     156        Af8B2wGUASkB/wHXAY4BKQH/AdcBjgEpAf8B1wGOASkB/wH7AfYB6wX/AdcBjgEpAf8B1wGOASkB/wHX
     157        AY4BKQH/AdYBjQEpAf8BxAGBASkB/wGpAYEBKQH/CAABWAICAbIBKQEzAe8B/wIpAe0B/wIpAekB/wIp
     158        AekB/wLhAfwB/wIpAekB/wIpAekB/wIpAekB/wKBAfMB/wIpAekB/wIpAegB/wIpAdoB/wEpATEBnQH/
     159        jAABYwFIASkB/wHdAZcBKQH/AdsBlAEpAf8B2wGUASkB/wHbAZQBKQH/AdsBlAEpAf8B3AGXAS8B/wHb
     160        AZQBKQH/AdsBlAEpAf8B1QGMASkB/wHJAYEBKQH/AdEBiAEpAf8BLAIhAfwMAAIpAV0B/wIpAe8B/wIp
     161        Ae0B/wIpAe0B/wIpAe0B/wIpAe0B/wIpAe0B/wIpAe0B/wIpAe0B/wIpAegB/wIpAd4B/wEpATwB4gH/
     162        ASwCIQH8jAABGQIBASEBkAF9ASkB/wHfAZkBKQH/AdsBlAEpAf8B2QGRASkB/wHYAZABKQH/AdgBkAEp
     163        Af8B0wGKASkB/wHQAYYBKQH/Ac4BgwEpAf8B2gGSASkB/wE0AS8BKQH/EAABGQIBASECKQGHAf8BKQEv
     164        AfEB/wIpAe0B/wIpAewB/wIpAesB/wIpAesB/wIpAeYB/wIpAeQB/wIpAeIB/wEpAUYB5gH/AikBMwH/
     165        lAABEgIBARYBTgFAASkB/wHSAYkBKQH/AeIBnQEpAf8B2QGRASkB/wHXAY4BKQH/AdUBjAEpAf8B4QGb
     166        ASkB/wHOAYQBKQH/AUkCKQH+GAABEgIBARYCKQFNAf8BKQEvAdMB/wEpAUAB9AH/AikB7AH/AikB6QH/
     167        ASkBKgHoAf8BKQFIAfAB/wIpAcwB/wFJAikB/qAAAUYCAQF9AykB/wF6AWEBKQH/AYEBegEpAf8BWwFM
     168        ASkB/wFJAikB/gEUAgEBGiQAAUYCAQF9AykB/wIpAX0B/wIpAYEB/wIpAV0B/wFJAikB/gEUAgEBGv8A
    169169        kQABQgFNAT4HAAE+AwABKAMAAUADAAEQAwABAQEAAQEFAAGAFwAD/wEAAfwBHwH8AR8EAAHwAQcB8AEH
    170170        BAAB4AEDAeABAwQAAcABAQHAAQEEAAGAAQEBgAEBBAABgAEAAYAFAAGAAQABgAUAAYABAAGABQABgAEA
  • trunk/sources/HeuristicLab.Hive.Client.Console/3.2/LogFileReader.cs

    r1930 r2062  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System;
    223using System.Collections.Generic;
    324using System.Linq;
    425using System.Text;
    526using System.IO;
     27using System.Diagnostics;
    628
    729namespace HeuristicLab.Hive.Client.Console {
     
    5476
    5577    public void StartMonitoring() {
    56       fileSystemWatcher.Changed += new FileSystemEventHandler(TargetFile_Changed);
     78        fileSystemWatcher.Changed += new FileSystemEventHandler(TargetFile_Changed);
     79      fileSystemWatcher.Renamed += new RenamedEventHandler(TargetFile_Renamed);
    5780      fileSystemWatcher.EnableRaisingEvents = true;
     81    }
     82
     83    public void TargetFile_Renamed(object source, FileSystemEventArgs e)
     84    {
     85        Stop();
     86        Start();
    5887    }
    5988
  • trunk/sources/HeuristicLab.Hive.Client.Console/3.2/Recurrence.cs

    r1530 r2062  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System;
    223using System.Collections.Generic;
    324using System.Windows.Forms;
  • trunk/sources/HeuristicLab.Hive.Client.Console/3.2/RecurrentEvent.cs

    r1530 r2062  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System;
    223using System.Collections.Generic;
    324
  • trunk/sources/HeuristicLab.Tracing/3.2/HeuristicLab.Hive.log4net.xml

    r1959 r2062  
    66    <rollingStyle value="Size" />
    77    <maxSizeRollBackups value="10" />
    8     <maximumFileSize value="100KB" />
     8    <maximumFileSize value="10KB" />
    99    <staticLogFileName value="true" />
    1010    <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
Note: See TracChangeset for help on using the changeset viewer.