public PrintingAndExportingViewModel(Action<ImageExportSettings> export) { this.export = export; var date = DateTime.Now; this.tasks = GetTasks(date); this.visibleTime = new DateRange(date.AddDays(-1), date.AddDays(11)); this.ganttAreas = new ObservableCollection<GanttArea>() { GanttArea.AllAreas, GanttArea.GridViewArea, GanttArea.TimeLineArea }; this.selectedArea = this.ganttAreas[0]; this.showHeaders = true; this.ExportCommand = new DelegateCommand(ExportCommandExecute); }
public PrintingAndExportingViewModel(Action <ImageExportSettings> export) { this.export = export; var date = DateTime.Now; this.tasks = GetTasks(date); this.visibleTime = new DateRange(date.AddDays(-1), date.AddDays(11)); this.ganttAreas = new ObservableCollection <GanttArea>() { GanttArea.AllAreas, GanttArea.GridViewArea, GanttArea.TimeLineArea }; this.selectedArea = this.ganttAreas[0]; this.showHeaders = true; this.ExportCommand = new DelegateCommand(ExportCommandExecute); }
/// <summary> /// Remove a GanttArea from AreasIncluded list /// </summary> /// <param name="type"></param> public void RemoveGanttArea(GanttArea area) { if (areas == null) { areas = InitializeAreas(); } string s = EnumHelper.ValueFromEnum(area); // check for exist if (!areasIncluded.Contains(s)) { return; } areasIncluded.Remove(s); areas.Remove(area); }
/// <summary> /// Add a new GanttArea to the AreasIncluded list /// </summary> /// <param name="type"></param> public void AddGanttArea(GanttArea area) { if (areas == null) { areas = InitializeAreas(); } string s = EnumHelper.ValueFromEnum(area); // check for duplicates if (areasIncluded.Contains(s)) { return; } areasIncluded.Add(s); areas.Add(area); }