private void Form_OptionSelected(object sender, OptionSelectedEventArgs e) { if (e.Key == nameof(Model.PayloadType)) { if (e.Value == MessageTemplate.PayloadTypes_Binary) { FormAdapter.HideView(nameof(Model.TextPayload)); FormAdapter.ShowView(nameof(Model.BinaryPayload)); } else if (e.Value == MessageTemplate.PayloadTypes_Text) { FormAdapter.ShowView(nameof(Model.TextPayload)); FormAdapter.HideView(nameof(Model.BinaryPayload)); } else { FormAdapter.HideView(nameof(Model.TextPayload)); FormAdapter.HideView(nameof(Model.BinaryPayload)); } } if (e.Key == nameof(Model.Transport)) { if (e.Value == LagoVista.IoT.Simulator.Admin.Models.Simulator.Transport_RestHttp) { SetForREST(); } } }
public void OnOptionSelected(object sender, OptionSelectedEventArgs args) { if (args.ChosenOption == "Scoreboard") { ShowScoreboard(); } }
protected void OnOptionSelected(OptionSelectedEventArgs e) { if (OptionSelected != null) { OptionSelected(this, e); } }
public void OnOptionSelected(object sender, OptionSelectedEventArgs args) { if (args.ChosenOption == "Instructions") { ShowInstructions(); } }
public void OnOptionSelected(object sender, OptionSelectedEventArgs args) { if (args.ChosenOption == "Play") { PlayGame(); } }
public void OnOptionSelected(object sender, OptionSelectedEventArgs args) { if (args.ChosenOption == "Exit") { ExitProg(); } }
/** * Sends the selection event when a user selects an * option from the menu * * int currentIndex The current index of the option selected * * @return null * */ private void SendSelectionEvent(int currentIndex) { var eventArgs = new OptionSelectedEventArgs { Option = GetOptionFromIndex(currentIndex) }; OnOptionSelect(eventArgs); }
public string GetSelection() { _finished = false; while (!_finished) // Main loop { _display.Display(_options, _selectedOption); // Display the options. SwitchOnKey(); // Get key and choose what to do based on what was pressed. } var eventArgs = new OptionSelectedEventArgs(); // Call event with chosen option as argument eventArgs.ChosenOption = _options[_selectedOption]; OnOptionSelected(eventArgs); return(_options[_selectedOption]); }
private void Form_OptionSelected(object sender, OptionSelectedEventArgs e) { OptionSelected(e.Key, e.Value); FormAdapter.Refresh(); }
/** * Event method called when the selection option * is called * */ protected virtual void OnOptionSelect(OptionSelectedEventArgs e) { OptionSelect?.Invoke(this, e); }
public void NotifyOptionSelected(OptionSelectedEventArgs.Options selectedOption, int contextAddress) { OnOptionSelected(this, new OptionSelectedEventArgs { SelectedOption = selectedOption, ContextAddress = contextAddress }); }
private void Picker_OptionSelected(object sender, OptionSelectedEventArgs e) { Form.InvokeOptionSelected(e); }
private void QuestionControl_OptionSelected(object s, OptionSelectedEventArgs e) => ViewModel.OptionSelected(e.SelectedOption);