public void RegisterRunStaffingChart(FrameworkElement el) { _staffingCalculatorArgs = new Dictionary <string, object> { { "contentView", el }, { "getAgents", new System.Func <IEnumerable <IAgent> >(() => _attendances) }, { "getViewRange", new System.Func <DateRange>(() => new DateRange(SelectionTimeRange.Start.Date.AddDays(-1), SelectionTimeRange.End.Date.AddDays(1))) }, { "schedule", _schedule }, { "Invoker", this }, { "WhenReady", new Action <IServiceQueueContainer, Action <string> >((c, switchView) => { _switchView = switchView; _serviceQueueContainer = c; }) }, { "WhenCurrentQueueSelected", new Action <IServiceQueueStatistic>(q => { if (q == null) { return; } SelectedServiceQueue = q.ToString(); //NotifyOfPropertyChange(()=> AssignmentTypes); new Thread(() => { var days = _dateIndexer.Count; for (var i = 0; i < days; i++) { SumOfDailyPlanningServiceLevel(q, i); } NotifyOfPropertyChange(() => StatisticItems); }).Start(); }) } }; _staffingCalculatorService = Container.Resolve <IStaffingCalculatorService>(_staffingCalculatorArgs); _autoReset.Set(); }
public StaffingChartPresenter(IStaffingCalculatorModel staffingCalculatorModel, IEntityFactory entityFactory, Schedule schedule, IStaffingCalculatorService service) { _schedule = schedule; _staffingService = service; _staffingCalculatorModel = staffingCalculatorModel; _entityFactory = entityFactory; }
public void RegisterRunStaffingChart(FrameworkElement el) { //var scheduleCellCapacity = Convert.ToInt32(_schedule.GetLength().TotalDays + Keys.TailDayAmount) * 96; _staffingCalculatorArgs = new Dictionary<string, object> { {"contentView", el}, {"getAgents", new Func<IEnumerable<IAgent>>(() => _attendances)}, {"getViewRange", new Func<DateRange>(() => new DateRange(GetWatchPoint(), ScreenEnd))}, {"schedule", _schedule}, {"Invoker", this} }; _buildStaffingChart = () => { if (_staffingCalculatorService != null) return; _staffingCalculatorService = Container.Resolve<IStaffingCalculatorService>(_staffingCalculatorArgs); }; }
public void RegisterRunStaffingChart(FrameworkElement el) { //var scheduleCellCapacity = Convert.ToInt32(_schedule.GetLength().TotalDays + Keys.TailDayAmount) * 96; _staffingCalculatorArgs = new Dictionary <string, object> { { "contentView", el }, { "getAgents", new Func <IEnumerable <IAgent> >(() => _attendances) }, { "getViewRange", new Func <DateRange>(() => new DateRange(GetWatchPoint(), ScreenEnd)) }, { "schedule", _schedule }, { "Invoker", this } }; _buildStaffingChart = () => { if (_staffingCalculatorService != null) { return; } _staffingCalculatorService = Container.Resolve <IStaffingCalculatorService>(_staffingCalculatorArgs); }; }
public void RegisterRunStaffingChart(FrameworkElement el) { _staffingCalculatorArgs = new Dictionary<string, object> { {"contentView", el}, {"getAgents", new System.Func<IEnumerable<IAgent>>(() => _attendances)}, {"getViewRange", new System.Func<DateRange>(() => new DateRange(SelectionTimeRange.Start.Date.AddDays(-1), SelectionTimeRange.End.Date.AddDays(1)))}, {"schedule", _schedule}, {"Invoker", this}, {"WhenReady", new Action<IServiceQueueContainer, Action<string>>((c, switchView)=> { _switchView = switchView; _serviceQueueContainer = c; })}, {"WhenCurrentQueueSelected", new Action<IServiceQueueStatistic>(q=> { if( q== null) return; SelectedServiceQueue = q.ToString(); //NotifyOfPropertyChange(()=> AssignmentTypes); new Thread(() => { var days = _dateIndexer.Count; for (var i = 0; i < days; i++) SumOfDailyPlanningServiceLevel(q,i); NotifyOfPropertyChange(() => StatisticItems); }).Start(); })} }; _staffingCalculatorService = Container.Resolve<IStaffingCalculatorService>(_staffingCalculatorArgs); _autoReset.Set(); }