Beispiel #1
0
 private void button2_Click(object sender, EventArgs e)
 {
     Form mInit = new Devices();
     mInit.ShowDialog();
     if (mInit.DialogResult != System.Windows.Forms.DialogResult.Cancel)
     {
         if (Program.fDev.Count > 0)
         {
             Form dRemote = new Form3();
             dRemote.ShowDialog();
         }
     }
 }
Beispiel #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     //Program.fDev = Program.mySonyLib.Locator.findDevices(null);
     List<string> fDevices = Program.mySonyLib.Locator.locateDevices();
     //Program.fDev = Program.mySonyLib.Locator.locateDevices();
     if (fDevices.Count > 0)
     {
         foreach (string doc in fDevices)
         {
             SonyAPI_Lib.SonyDevice nDev = new SonyAPI_Lib.SonyDevice();
             nDev.DocumentURL = doc;
             nDev.buildFromDocument(new Uri(nDev.DocumentURL));
             Program.fDev.Add(nDev);
         }
         Form dRemote = new Form3();
         dRemote.ShowDialog();
     }
     else
     {
         MessageBox.Show("No Devices were found!", "No Devices", MessageBoxButtons.OK);
     }
 }