コード例 #1
0
ファイル: Form1.cs プロジェクト: Emperator122/QRemoteClient
 private async void CheckServers()
 {
     UpdateServersStripMenuItem.Enabled = false;
     ComboBoxRow[] rows = new ComboBoxRow[localIPCoboBox.Items.Count];
     localIPCoboBox.Items.CopyTo(rows, 0);
     foreach (ComboBoxRow item in rows)
     {
         string[] temp = item.ToString().Split(':');
         item.isAvailable = await Task.Factory.StartNew <bool>(
             () => SynchronousClient.CheckServer(temp[0], Convert.ToInt32(temp[1])), TaskCreationOptions.LongRunning);
     }
     UpdateServersStripMenuItem.Enabled = true;
 }
コード例 #2
0
 public ScreenViewer(int quality, string serverip, int serverport = 11000, int updateTimeout = 0)
 {
     InitializeComponent();
     client = new SynchronousClient();
     client.StartClient(screenPictureBox, quality, serverip, serverport, updateTimeout);
 }