public MainPage() { Victim = new Victim(); this.InitializeComponent(); Gender.Items.Add("Male"); Gender.Items.Add("Female"); Gender.Items.Add("N/A"); UrgencyLevel.Items.Add("Critical Condition"); UrgencyLevel.Items.Add("Urgent"); UrgencyLevel.Items.Add("By End of Day"); BleadingLevel.Items.Add("Internally"); BleadingLevel.Items.Add("Externally from core"); BleadingLevel.Items.Add("Externally from limbs"); BleadingLevel.Items.Add("Minor"); Name.TextChanged += Name_TextChanged; Gender.SelectionChanged += Gender_SelectionChanged; Age.SelectionChanged += Age_SelectionChanged; UrgencyLevel.SelectionChanged += UrgencyLevel_SelectionChanged; HasFood.Unchecked += HasFood_Unchecked; HasFood.Checked += HasFood_Checked; HasWater.Unchecked += HasWater_Unchecked; HasWater.Checked += HasWater_Checked; HasMedication.Checked += HasMedication_Checked; HasMedication.Unchecked += HasMedication_Unchecked; BleadingLevel.SelectionChanged += BleadingLevel_SelectionChanged; copybutton.Tapped += Copybutton_Tapped; }
public static string VictimEncode(Victim victim) { var plain = JsonConvert.SerializeObject(victim); var bytes = System.Text.Encoding.UTF8.GetBytes(plain); var encoded = System.Convert.ToBase64String(bytes); return encoded; }