public ItemList (string title, Font font, bool reloadListOnFocus, string emptyListInfo) { this.title = title; this.font = font; this.reloadOnFocus = reloadListOnFocus; emptyListListInfoDialog = new ItemWithDialog<InfoDialog>(new InfoDialog(emptyListInfo)); }
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); } } } }
public ProgramItem (ProgramInformation programInformation, bool useEscToStop) : base(programInformation.Name) { this.programInformation = programInformation; this.useEscToStop = useEscToStop; programSelectDialog = new ItemWithDialog<SelectDialog<string>>( new SelectDialog<string> (selectArray, "Options", true)); aotQuestionDialog = new ItemWithDialog<QuestionDialog> (new QuestionDialog ("Progran already compiled. Recompile?", "AOT recompile")); compileDialog = new ItemWithDialog<StepDialog>(new StepDialog ("Compiling", new List<IStep> (){ new StepContainer (CompileProgram, "compiling program", "Failed to compile")})); deleteQuestionDialog = new ItemWithDialog<QuestionDialog> (new QuestionDialog ("Are you sure?", "Delete")); deleteDialog = new ItemWithDialog<ProgressDialog> (new ProgressDialog ("", new StepContainer (DeleteProgram, "Deleting ", "Error deleting program"))); }
public ItemWithUpdateDialog () : base("Check for update") { checkDialog = new ItemWithDialog<ProgressDialog>(new ProgressDialog("Updates", new StepContainer(CheckForUpdate,"Checking server", "Failed to check for Updates"))); questionDialog = new ItemWithDialog<QuestionDialog>( new QuestionDialog ("New firmware available. Update?", "New Fiwmware")); updateDialog = new ItemWithDialog<StepDialog> ( new StepDialog ("Updating", new List<IStep> { new StepContainer (UpdateHelper.DownloadFirmware, "Downloading...", "Failed to download files"), new StepContainer (UpdateHelper.UpdateBootFile, "Updating system", "Failed to update boot file") } ) ); }
public ItemWithCheckBoxStep (string text, bool checkedAtStart, string stepTitle, CheckBoxStep step, Action<bool> OnCheckedChanged) : base(text, checkedAtStart, OnCheckedChanged) { this.itemStep = step; dialogItem = new ItemWithDialog<ProgressDialog>(new ProgressDialog(stepTitle, itemStep)); }
public ItemWithBrickInfo () : base("Brick information") { dialog = new ItemWithDialog<ProgressDialog>(new ProgressDialog("Getting Info", new StepContainer(LoadSettings, "Loading", "Failed to load info"))); }