コード例 #1
0
ファイル: ItemList.cs プロジェクト: tudor-olariu/monoev3
		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));
		}
コード例 #2
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);
					} 
				}
			}		
		}
コード例 #3
0
		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")));
		}
コード例 #4
0
		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")
					}
				)
			);
		}
コード例 #5
0
		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));
		}
コード例 #6
0
		public ItemWithBrickInfo () : base("Brick information")
		{
			dialog = new ItemWithDialog<ProgressDialog>(new ProgressDialog("Getting Info", new StepContainer(LoadSettings, "Loading", "Failed to load info")));
		}