コード例 #1
0
		public ScreenDialog (Input input) : base ()
		{
			this.input = input;
			this.text = input.Text;
			this.image = input.Image;
			if (input.InputType == InputType.Text)
				buttons.Add (Catalog.GetString("Ok"));
			if (input.InputType == InputType.MultipleChoice)
				foreach (string s in input.Choices)
					buttons.Add (s);
		}
コード例 #2
0
		/// <summary>
		/// Marks internally an input as requested, allowing the properties 
		/// of this InputManager to be updated.
		/// </summary>
		/// <param name="input">Input that has been requested to be shown.</param>
		public void HandleInputRequested(Input input)
		{
			// Is the input already tracked?
			// YES -> Increment the consecutive requests field.
			// NO -> Forget the last input and tracks this one.
			int objIndex = input.ObjIndex;
			if (objIndex == _lastInputObjIndex)
			{
				_consecutiveRequests++;
			}
			else
			{
				_lastInputObjIndex = objIndex;
				_consecutiveRequests = 1;
			}
		}
コード例 #3
0
		public GameDialogScreen(Input input)
		{
			this.messageBox = null;
			this.input = input;
		}
コード例 #4
0
		public GameDialogScreen(MessageBox messageBox)
		{
			this.messageBox = messageBox;
			this.input = null;
		}
コード例 #5
0
		public ScreenDialog(Input input)
		{
			this.messageBox = null;
			this.input = input;
		}
コード例 #6
0
		public ScreenDialog(MessageBox messageBox)
		{
			this.messageBox = messageBox;
			this.input = null;
		}
コード例 #7
0
		/// <summary>
		/// Raised when the fragment is destroyed, so free references to other UI elements.
		/// </summary>
		public override void OnDestroyView()
		{
			base.OnDestroyView();

			imageView = null;
			messageBox = null;
			input = null;
			editInput = null;
			btnView1 = null;
			btnView2 = null;
			btnInput = null;
			layoutDialog = null;
			layoutMultipleChoice = null;
			layoutInput = null;
			textDescription = null;
			ctrl = null;
		}
コード例 #8
0
		/// <summary>
		/// Navigates the app to the view that best fits an Input object.
		/// </summary>
		/// <param name="wherigoObj"></param>
		public void NavigateToView(Input wherigoObj)
		{
			NavigateCore(new Uri("/Views/InputPage.xaml?wid=" + wherigoObj.ObjIndex, UriKind.Relative), cancelIfAlreadyActive: true);
		}
コード例 #9
0
		/// <summary>
		/// Navigates the app to the view that best fits an Input object.
		/// </summary>
		/// <param name="wherigoObj"></param>
		public void NavigateToView(Input wherigoObj)
		{
			NavigateCore(new Uri("/Views/InputPage.xaml?wid=" + wherigoObj.ObjIndex, UriKind.Relative));
		}
コード例 #10
0
		/// <summary>
		/// Determines if an input is known to be looping.
		/// </summary>
		/// <param name="input"></param>
		/// <returns></returns>
		public bool IsLooping(Input input)
		{
			return input != null && input.ObjIndex == _lastInputObjIndex && _consecutiveRequests > MAX_IGNORED_CONSECUTIVE_REQUESTS;
		}
コード例 #11
0
		/// <summary>
		/// Navigates the app to the view that best fits an Input object.
		/// </summary>
		/// <param name="wherigoObj"></param>
		public void NavigateToView(Input wherigoObj)
		{
			App.Current.RootFrame.Navigate(new Uri("/Views/InputPage.xaml?wid=" + wherigoObj.ObjIndex, UriKind.Relative));
		}