Changeset 140
- Timestamp:
- 3/8/2008 5:47:58 AM (5 years ago)
- Location:
- branches/eraser6
- Files:
-
- 2 edited
-
Eraser/TaskPropertiesForm.cs (modified) (2 diffs)
-
Manager/Task.cs (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/Eraser/TaskPropertiesForm.cs
r139 r140 22 22 } 23 23 24 /// <summary> 25 /// Sets or retrieves the task object to be edited or being edited. 26 /// </summary> 27 public Task Task 28 { 29 get { return task; } 30 set { task = value; UpdateUIFromTask(); } 31 } 32 33 private void UpdateUIFromTask() 34 { 35 throw new NotImplementedException("UpdateUIFromTask not implemented."); 36 } 37 24 38 private void dataAdd_Click(object sender, EventArgs e) 25 39 { … … 29 43 { 30 44 Task.EraseTarget entry = form.GetTaskEntry(); 31 ListViewItem item = null; 32 if (entry is Task.FilesystemObject) 33 item = data.Items.Add((entry as Task.FilesystemObject).Path); 34 else if (entry is Task.FreeSpace) 35 item = data.Items.Add("Unused space on " + (entry as Task.FreeSpace).Drive); 36 else 37 throw new NotImplementedException("Unimplemented data erasure type."); 45 ListViewItem item = data.Items.Add(entry.UIText); 38 46 39 47 item.SubItems.Add(entry.Method.Name); -
branches/eraser6/Manager/Task.cs
r130 r140 13 13 /// Represents a generic target of erasure 14 14 /// </summary> 15 public class EraseTarget15 public abstract class EraseTarget 16 16 { 17 17 /// <summary> … … 23 23 get { return method; } 24 24 set { method = value; } 25 } 26 27 /// <summary> 28 /// Retrieves the text to display representing this task. 29 /// </summary> 30 public abstract string UIText 31 { 32 get; 25 33 } 26 34 … … 48 56 } 49 57 58 public override string UIText 59 { 60 get { return Path; } 61 } 62 50 63 private string path; 51 64 } … … 57 70 { 58 71 public string Drive; 72 73 public override string UIText 74 { 75 get { return string.Format("Unused disk space ({0})", Drive); } 76 } 59 77 } 60 78 … … 130 148 131 149 /// <summary> 132 /// The name for this task. This is just an opaque value for the user to recognize133 /// the task.150 /// The name for this task. This is just an opaque value for the user to 151 /// recognize the task. 134 152 /// </summary> 135 153 public string Name … … 148 166 } 149 167 168 /// <summary> 169 /// The schedule for running the task. 170 /// </summary> 171 public Schedule Schedule 172 { 173 get { return schedule; } 174 set { schedule = value; } 175 } 176 150 177 private uint id; 151 178 private string name; 179 private Schedule schedule = null; 152 180 private List<EraseTarget> entries = new List<EraseTarget>(); 153 181 }
Note: See TracChangeset
for help on using the changeset viewer.
