Changeset 494


Ignore:
Timestamp:
11/10/2008 11:50:32 AM (6 years ago)
Author:
lowjoel
Message:

-Fixed a mistake in the UnusedIdsList? population when loading a task list. The ID should be postincremented rather than preincremented
-Implemented #53

Location:
branches/eraser6
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/Eraser/SettingsPanel.Designer.cs

    r469 r494  
    9595            // titleLbl 
    9696            //  
     97            resources.ApplyResources(this.titleLbl, "titleLbl"); 
    9798            this.errorProvider.SetIconAlignment(this.titleLbl, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("titleLbl.IconAlignment")))); 
    98             resources.ApplyResources(this.titleLbl, "titleLbl"); 
    9999            //  
    100100            // titleIcon 
     
    169169            resources.ApplyResources(this.erase, "erase"); 
    170170            this.errorProvider.SetIconAlignment(this.erase, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("erase.IconAlignment")))); 
    171             this.erase.Label = "Instellingen"; 
     171            this.erase.Label = "Erase settings"; 
    172172            this.erase.Name = "erase"; 
    173173            //  
     
    255255            resources.ApplyResources(this.scheduler, "scheduler"); 
    256256            this.errorProvider.SetIconAlignment(this.scheduler, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("scheduler.IconAlignment")))); 
    257             this.scheduler.Label = "Planner instellingen"; 
     257            this.scheduler.Label = "Scheduler settings"; 
    258258            this.scheduler.Name = "scheduler"; 
    259259            //  
  • branches/eraser6/Eraser/SettingsPanel.resx

    r469 r494  
    121121    <value>17, 17</value> 
    122122  </metadata> 
    123   <metadata name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 
    124     <value>Dutch</value> 
    125   </metadata> 
    126123  <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 
    127124    <value>True</value> 
     
    134131    <value>TopLeft</value> 
    135132  </data> 
    136   <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 
    137133  <data name="saveSettings.Location" type="System.Drawing.Point, System.Drawing"> 
    138134    <value>639, 27</value> 
     
    218214  </data> 
    219215  <data name="&gt;&gt;$this.Type" xml:space="preserve"> 
    220     <value>Eraser.BasePanel, Eraser, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</value> 
     216    <value>Eraser.BasePanel, Eraser, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null</value> 
    221217  </data> 
    222218  <data name="titleIcon.IconAlignment" type="System.Windows.Forms.ErrorIconAlignment, System.Windows.Forms"> 
     
    605601  </data> 
    606602  <data name="&gt;&gt;scheduler.Type" xml:space="preserve"> 
    607     <value>Eraser.LightGroup, Eraser, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</value> 
     603    <value>Eraser.LightGroup, Eraser, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null</value> 
    608604  </data> 
    609605  <data name="&gt;&gt;scheduler.Parent" xml:space="preserve"> 
     
    710706  </data> 
    711707  <data name="&gt;&gt;plugins.Type" xml:space="preserve"> 
    712     <value>Eraser.LightGroup, Eraser, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</value> 
     708    <value>Eraser.LightGroup, Eraser, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null</value> 
    713709  </data> 
    714710  <data name="&gt;&gt;plugins.Parent" xml:space="preserve"> 
     
    851847  </data> 
    852848  <data name="&gt;&gt;erase.Type" xml:space="preserve"> 
    853     <value>Eraser.LightGroup, Eraser, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</value> 
     849    <value>Eraser.LightGroup, Eraser, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null</value> 
    854850  </data> 
    855851  <data name="&gt;&gt;erase.Parent" xml:space="preserve"> 
     
    974970  </data> 
    975971  <data name="&gt;&gt;ui.Type" xml:space="preserve"> 
    976     <value>Eraser.LightGroup, Eraser, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</value> 
     972    <value>Eraser.LightGroup, Eraser, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null</value> 
    977973  </data> 
    978974  <data name="&gt;&gt;ui.Parent" xml:space="preserve"> 
     
    10041000  </data> 
    10051001  <data name="titleLbl.Size" type="System.Drawing.Size, System.Drawing"> 
    1006     <value>101, 32</value> 
     1002    <value>45, 13</value> 
    10071003  </data> 
    10081004  <data name="titleLbl.Text" xml:space="preserve"> 
  • branches/eraser6/Manager/DirectExecutor.cs

    r491 r494  
    5050 
    5151            thread.Start(); 
    52             Thread.Sleep(0); 
    5352        } 
    5453 
     
    156155        { 
    157156            RecurringSchedule schedule = (RecurringSchedule)task.Schedule; 
    158             if (schedule.NextRun < DateTime.Now && 
    159                 !ManagerLibrary.Instance.Settings.ExecuteMissedTasksImmediately) 
    160             { 
     157            if (schedule.MissedPreviousSchedule && 
     158                ManagerLibrary.Instance.Settings.ExecuteMissedTasksImmediately) 
    161159                //OK, we've missed the schedule and the user wants the thing 
    162                 //to follow up normally. 
    163                 throw new NotImplementedException(); 
    164             } 
     160                //to follow up immediately. 
     161                scheduledTasks.Add(DateTime.Now, task); 
    165162            else 
    166163                scheduledTasks.Add(schedule.NextRun, task); 
    167             schedulerInterrupt.Set(); 
    168164        } 
    169165 
     
    247243                        currentTask.executor = this; 
    248244                        while (id > nextId) 
    249                             unusedIds.Add(++nextId); 
     245                            unusedIds.Add(nextId++); 
    250246                        ++nextId; 
    251247 
  • branches/eraser6/Manager/Schedule.cs

    r435 r494  
    177177            weeklySchedule = (DaysOfWeek)info.GetValue("WeeklySchedule", typeof(DaysOfWeek)); 
    178178            monthlySchedule = (int)info.GetValue("MonthlySchedule", typeof(int)); 
     179 
     180            lastRun = (DateTime)info.GetDateTime("LastRun"); 
     181            nextRun = (DateTime)info.GetDateTime("NextRun"); 
    179182        } 
    180183 
     
    187190            info.AddValue("WeeklySchedule", weeklySchedule); 
    188191            info.AddValue("MonthlySchedule", monthlySchedule); 
     192            info.AddValue("LastRun", lastRun); 
     193            info.AddValue("NextRun", nextRun); 
    189194        } 
    190195        #endregion 
     
    332337 
    333338        /// <summary> 
    334         /// Based on the last run time and the current schedule, the next run time 
    335         /// will be computed. 
     339        /// Computes the next run time based on the last run time, the current 
     340        /// schedule, and the current time. The timestamp returned will be the next 
     341        /// time from now which fulfils the schedule. 
    336342        /// </summary> 
    337343        public DateTime NextRun 
     
    413419 
    414420        /// <summary> 
     421        /// Gets whether the previous run was missed. 
     422        /// </summary> 
     423        public bool MissedPreviousSchedule 
     424        { 
     425            get 
     426            { 
     427                return lastRun != DateTime.MinValue && NextRun != nextRun; 
     428            } 
     429        } 
     430 
     431        /// <summary> 
    415432        /// Returns true if the task can run on the given date. Applies only for 
    416433        /// weekly tasks. 
     
    433450        { 
    434451            this.lastRun = lastRun; 
     452            nextRun = NextRun; 
    435453        } 
    436454 
     
    442460 
    443461        private DateTime lastRun; 
     462        private DateTime nextRun; 
    444463    } 
    445464} 
Note: See TracChangeset for help on using the changeset viewer.