Exemple #1
0
 private void StopStartProgram(ProgramViewModel program, bool start)
 {
     ExceptionUtility.Try(() =>
     {
         string title = start ? StringLiterals.StartStationConfirmationTitle : StringLiterals.StopProgramConfirmationTitle;
         AlertUtility.ShowConfirmationAlert(title, StringLiterals.FormatStartStopProgramConfirmationMessage(start, program.Name, program.Id), (b) =>
         {
             if (b)
             {
                 StopStartProgramConfirmed(program, start);
             }
             else
             {
                 var cell = this._tableViewController.GetCell(program) as ProgramListTableViewCell;
                 if (cell != null)
                 {
                     program.Starting = false;
                     cell.LoadCellValues(program);
                 }
             }
         }, okButtonText: start?StringLiterals.Start: StringLiterals.Stop);
     });
 }
 private void StartButton_TouchUpInside(object sender, EventArgs e)
 {
     ExceptionUtility.Try(() =>
     {
         string title = _startPivot ? StringLiterals.StartStationConfirmationTitle : StringLiterals.StopProgramConfirmationTitle;
         AlertUtility.ShowConfirmationAlert(title, StringLiterals.FormatStartStopProgramConfirmationMessage(_startPivot, _programStart.Name, _programStart.Id), (b) =>
         {
             if (b)
             {
                 StopStartProgramConfirmed(_programStart, _startPivot);
             }
             else
             {
                 var cell = this.GetCell(_programStart) as ProgramListTableViewCell;
                 if (cell != null)
                 {
                     _programStart.Starting = false;
                     cell.LoadCellValues(_programStart);
                 }
             }
         }, okButtonText: _startPivot?StringLiterals.Start: StringLiterals.Stop);
     });
 }