Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
RadioElement.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using System;
4 using Android.Content;
5 using Android.Views;
6 
7 namespace MonoDroid.Dialog
8 {
9  public class RadioElement : StringElement
10  {
11  public string Group;
12  internal int RadioIdx;
13 
14  public RadioElement(string caption, string group)
15  : base(caption)
16  {
17  Group = group;
18  }
19 
20  public RadioElement(string caption)
21  : base(caption)
22  {
23  }
24 
25  public override View GetView(Context context, View convertView, ViewGroup parent)
26  {
27  if (!(((RootElement)Parent.Parent)._group is RadioGroup))
28  throw new Exception("The RootElement's Group is null or is not a RadioGroup");
29 
30  return base.GetView(context, convertView, parent);
31  }
32 
33  public override string Summary()
34  {
35  return Caption;
36  }
37  }
38 }
override View GetView(Context context, View convertView, ViewGroup parent)
Overriden my most derived classes, creates a view that creates a View with the contents for display ...
Definition: RadioElement.cs:25
RadioElement(string caption)
Definition: RadioElement.cs:20
override string Summary()
Returns a summary of the value represented by this object, suitable for rendering as the result of a ...
Definition: RadioElement.cs:33
RadioElement(string caption, string group)
Definition: RadioElement.cs:14
Used by root elements to fetch information when they need to render a summary (Checkbox count or sele...
Definition: Group.cs:9
Captures the information about mutually exclusive elements in a RootElement
Definition: Group.cs:22