Ejemplo n.º 1
0
 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();
         }
     }
 }
Ejemplo n.º 2
0
 private void OnCompileDialogExit(QuestionDialog dialog)
 {
     if (dialog.IsPositiveSelected)
     {
         compileDialog.SetFocus(Parent);
     }
     else
     {
         programSelectDialog.SetFocus(this, OnSelectDialogExit);
     }
 }
Ejemplo n.º 3
0
        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);
                    }
                }
            }
        }
Ejemplo n.º 4
0
 private void OnQuestionCompleted(QuestionDialog dialog)
 {
     if (dialog.IsPositiveSelected)
     {
         updateDialog.SetFocus(this, OnUpdateCompleted);
     }
 }
Ejemplo n.º 5
0
 private void OnDone(Exception e)
 {
     if (!useEscToStop)
     {
         Parent.ResumeButtonEvents();
     }
     if (e != null)
     {
         exceptionInfoDialog.SetFocus(Parent);
     }
     else
     {
         Parent.RemoveFocus(this);
     }
 }
Ejemplo n.º 6
0
 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);
     }
 }
Ejemplo n.º 7
0
 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);
         }
     }
 }
Ejemplo n.º 8
0
        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;
                }
            }
        }
Ejemplo n.º 9
0
 public override void OnEnterPressed()
 {
     questionDialog.SetFocus(this, OnExit);
 }
Ejemplo n.º 10
0
 public override void OnEnterPressed()
 {
     itemStep.Checked = this.Checked;
     dialogItem.SetFocus(this);
 }
Ejemplo n.º 11
0
 public override void OnEnterPressed()
 {
     checkDialog.SetFocus(this, OnCheckCompleted);
 }
Ejemplo n.º 12
0
 public override void OnEnterPressed()
 {
     programSelectDialog.SetFocus(this, OnSelectDialogExit);
 }