Beispiel #1
0
        private void Add_Button_Click(object sender, RoutedEventArgs e)
        {
            Beacon beacon = new Beacon();

            beacon.Title       = TB_Type.Text;
            beacon.Degree      = TB_Degree.Text;
            beacon.Radius      = TB_Radius.Text;
            beacon.Completion  = TB_Completion.Text;
            beacon.BeaconImage = new BitmapImage(new Uri(selectedImagePath));
            beacon.FamilyPath  = selectedFilePath;
            beacons.Add(beacon);
            listBox.Items.Refresh();

            File.WriteAllLines(SPEC_FILE_PATH, new string[] { JsonConvert.SerializeObject(beacons) });

            BTN_SelectFile.Content  = "Select File";
            BTN_SelectImage.Content = "Select Image";
            TB_Type.Clear();
            TB_Degree.Clear();
            TB_Radius.Clear();
            TB_Completion.Clear();
            selectedFilePath  = null;
            selectedImagePath = null;
        }
Beispiel #2
0
 private void SetRadius()
 {
     cont.CBorder.CornerRadius = new CornerRadius(TB_Radius.GetDouble());
 }