internal void Setup( ServiceCommandExecution serviceCommandExecution ) { Service = serviceCommandExecution.Service ; _command = serviceCommandExecution.Command ; _xData = ElementUtil.GetData( _command ) ; if ( _xData == null ) { _title.Text = Service.Name ; _instructions.Visibility = System.Windows.Visibility.Visible ; ClearXForm(); if ( !string.IsNullOrEmpty( _command.Node ) && _command.Note != null ) { _instructions.Text = _command.Note.Value; } else { _instructions.Text = Properties.Resources.Constant_IncompleteData ; } } else { SetupXData( _xData ) ; } }
protected void DisplayQuestionaireInternal(Command command, Service service) { ServiceCommandExecution serviceCommandExecution = new ServiceCommandExecution(command, service); CommandExecute commandExecuteWindow; try { commandExecuteWindow = new CommandExecute(serviceCommandExecution); commandExecuteWindow.Show(); } catch (WindowExistsException e) { commandExecuteWindow = (CommandExecute)e.Control; commandExecuteWindow.Redisplay(serviceCommandExecution); } if (command.Status == Status.canceled) { EventInfo eventinfo = new EventInfo(string.Format(Resources.Event_CommandCancelled, service.Name)); Events.Instance.OnEvent(this, eventinfo); commandExecuteWindow.Close(); } }
public ServiceCommandExecution( Command command, Service service ) { _command = command ; _service = service ; }
public void DisplayQuestionaire(Command command, Service service) { App.InvokeSafe(App._dispatcherPriority, new DisplayCallback(DisplayQuestionaireInternal), command, service); }