Exemple #1
0
 public void Load(string path)
 {
     if (!File.Exists(path))
     {
         return;
     }
     lock (waveables) {
         foreach (var data in File.ReadAllLines(path))
         {
             if (data.StartsWith("LocalWaveable"))
             {
                 waveables.Add(LocalWaveable.Load(data));
             }
         }
     }
 }
Exemple #2
0
        private void RegisterDeviceButton_Click(object sender, RoutedEventArgs e)
        {
            if (DeviceListComboBox.SelectedIndex == -1)
            {
                MessageBox.Show("장치를 선택하지 않은것으로 보입니다.");
                return;
            }

            var device = LocalWaveable.FindDeviceByData(friendlyName: DeviceListComboBox.Text);

            if (device == null)
            {
                MessageBox.Show("선택한 장치가 현재는 없는것 같습니다");
                return;
            }
            var waveable = new LocalWaveable(device.ID, device.FriendlyName);

            sharer.RegisterWaveable(waveable);
            sharer.Save("waveables.txt");
        }