public virtual void OnEnterPressed() { if (!show) { show = true; if (!hasLoadedList || reloadOnFocus) { CreateNewList(OnCreateChildList()); } if (emptyListListInfoDialog != null && items.Count == 0) { emptyListListInfoDialog.SetFocus(this); } else { Parent.SetFocus(this); } } else { if (items.Count != 0) { items [scrollPos + cursorPos].OnEnterPressed(); } } }
private void OnCompileDialogExit(QuestionDialog dialog) { if (dialog.IsPositiveSelected) { compileDialog.SetFocus(Parent); } else { programSelectDialog.SetFocus(this, OnSelectDialogExit); } }
private void OnCheckCompleted(ProgressDialog dialog) { if (!checkDialog.Dialog.Ok) { Parent.RemoveFocus(this); return; } if (newImage) { infoDialog = new ItemWithDialog <InfoDialog>(new InfoDialog("New image available. Download it from www.monobrick.dk or ftp://soborg.net")); infoDialog.SetFocus(this); } else { if (newFirmwareApp) { questionDialog.SetFocus(this, OnQuestionCompleted); } else { if (newAddin) { infoDialog = new ItemWithDialog <InfoDialog>(new InfoDialog("New Xamarin Add-in. Download it from www.monobrick.dk or ftp://soborg.net")); infoDialog.SetFocus(this); } else { infoDialog = new ItemWithDialog <InfoDialog>(new InfoDialog("No updates available")); infoDialog.SetFocus(this); } } } }
private void OnQuestionCompleted(QuestionDialog dialog) { if (dialog.IsPositiveSelected) { updateDialog.SetFocus(this, OnUpdateCompleted); } }
private void OnDone(Exception e) { if (!useEscToStop) { Parent.ResumeButtonEvents(); } if (e != null) { exceptionInfoDialog.SetFocus(Parent); } else { Parent.RemoveFocus(this); } }
public override void OnEnterPressed() { if (!hasFocus) { if (information == null) { dialog.SetFocus(this, OnDialogExit); } else { Parent.SetFocus(this); hasFocus = true; } } else { hasFocus = false; Parent.RemoveFocus(this); } }
public override void RemoveFocus(IChildItem item) { base.RemoveFocus(item); if (item is ItemWithDialog <QuestionDialog> ) { if (questionDialog.Dialog.IsPositiveSelected) { FirmwareSettings.GeneralSettings.ConnectToWiFiAtStartUp = true; FirmwareSettings.GeneralSettings.CheckForSwUpdatesAtStartUp = true; FirmwareSettings.Save(); } } else { if (this.Checked) { questionDialog.SetFocus(this); } } }
private void OnSelectDialogExit(SelectDialog <string> dialog) { if (!dialog.EscPressed) { switch (dialog.GetSelectionIndex()) { case 0: var startDialog = new ExecuteProgramDialog(this.programInformation, false, useEscToStop); startDialog.Start(Parent); break; case 1: if (!programInformation.IsAOTCompiled) { compileBeforeExecution.SetFocus(Parent, OnCompileInfoDialogExit); } else { var start = new ExecuteProgramDialog(this.programInformation, true, useEscToStop); start.Start(Parent); } break; case 2: if (programInformation.IsAOTCompiled) { aotQuestionDialog.SetFocus(Parent, OnCompileDialogExit); } else { compileDialog.SetFocus(Parent); } break; case 3: deleteQuestionDialog.SetFocus(Parent, OnDeleteDialogExit); break; } } }
public override void OnEnterPressed() { questionDialog.SetFocus(this, OnExit); }
public override void OnEnterPressed() { itemStep.Checked = this.Checked; dialogItem.SetFocus(this); }
public override void OnEnterPressed() { checkDialog.SetFocus(this, OnCheckCompleted); }
public override void OnEnterPressed() { programSelectDialog.SetFocus(this, OnSelectDialogExit); }