Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6943


Ignore:
Timestamp:
10/31/11 23:58:52 (11 years ago)
Author:
ascheibe
Message:

#1233 fixed a small bug in the Job Manager and the Administrator UI

Location:
branches/HeuristicLab.Hive-3.4/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/Recurrence.cs

    r6696 r6943  
    3939
    4040    private void btSaveRecurrence_Click(object sender, EventArgs e) {
    41       DateTime dateFrom, dateTo;           
     41      DateTime dateFrom, dateTo;
    4242      HashSet<DayOfWeek> days = new HashSet<DayOfWeek>();
    4343
     
    4545
    4646      //check if valid
    47       if (InputIsValid())
    48       {   
    49           dateFrom = DateTime.Parse(dtpStart.Text + " " + dtpFromTime.Text);
    50           dateTo = DateTime.Parse(dtpEnd.Text + " " + dtpToTime.Text);
     47      if (InputIsValid()) {
     48        dateFrom = DateTime.Parse(dtpStart.Text + " " + dtpFromTime.Text);
     49        dateTo = DateTime.Parse(dtpEnd.Text + " " + dtpToTime.Text);
    5150
    52           RecurrentEvent recurrentEvent = new RecurrentEvent()
    53           {
    54               DateFrom = dateFrom,
    55               DateTo = dateTo,
    56               AllDay = chbade.Checked,
    57               WeekDays = days             
    58           };
     51        RecurrentEvent recurrentEvent = new RecurrentEvent() {
     52          DateFrom = dateFrom,
     53          DateTo = dateTo,
     54          AllDay = chbade.Checked,
     55          WeekDays = days
     56        };
    5957
    60           //fire delegate and close the dialog
    61           dialogClosedDelegate(recurrentEvent);
    62           this.Close();
    63       }
    64       else
    65       {
    66           MessageBox.Show("Incorrect date format", "Schedule Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     58        //fire delegate and close the dialog
     59        dialogClosedDelegate(recurrentEvent);
     60        this.Close();
     61      } else {
     62        MessageBox.Show("Incorrect date format", "Schedule Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    6763      }
    6864    }
     
    9086
    9187    private bool InputIsValid() {
    92       DateTime dateFrom, dateTo;     
     88      DateTime dateFrom, dateTo;
    9389
    9490      dateFrom = DateTime.Parse(dtpStart.Text + " " + dtpFromTime.Text);
    9591      dateTo = DateTime.Parse(dtpEnd.Text + " " + dtpToTime.Text);
    9692
    97       if (dateFrom < dateTo && dateFrom.TimeOfDay < dateTo.TimeOfDay)
     93      if (chbade.Checked && dateFrom < dateTo) {
    9894        return true;
    99       else
    100         return false;
     95      }
     96
     97      if (!chbade.Checked && dateFrom < dateTo && dateFrom.TimeOfDay < dateTo.TimeOfDay) {
     98        return true;
     99      }
     100
     101      return false;
    101102    }
    102103  }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.3/TreeView/ItemTreeView.cs

    r6834 r6943  
    183183        var item = sender as T;
    184184        TreeNode node = GetNodeByItem(item);
    185         if (node != null)
     185        if (node != null && node.Text != item.ToString())
    186186          node.Text = item.ToString();
    187187      }
Note: See TracChangeset for help on using the changeset viewer.