コード例 #1
0
ファイル: ClientForm.cs プロジェクト: shayanc/Inputshare
 private void OnDisconnect()
 {
     if (this.InvokeRequired)
     {
         this.Invoke(new Action(() => { OnDisconnect(); }));
         return;
     }
     ConnectButton.Text    = "Connect";
     ConnectButton.Enabled = true;
     IpcDisconnectedPanel.Hide();
     DisconnectedPanel.Show();
     ConnectedPanel.Hide();
 }
コード例 #2
0
ファイル: ClientForm.cs プロジェクト: shayanc/Inputshare
        private void OnConnect()
        {
            if (this.InvokeRequired)
            {
                this.Invoke(new Action(() => { OnConnect(); }));
                return;
            }


            IpcDisconnectedPanel.Hide();
            ConnectedPanel.Show();
            DisconnectedPanel.Hide();
        }
コード例 #3
0
ファイル: ClientForm.cs プロジェクト: shayanc/Inputshare
        private void ClientForm_Load(object sender, EventArgs e)
        {
            this.MaximizeBox = false;
            SetIpcStatusLabelText("Checking if service is\nrunning...");
            if (!IsProcessRunning())
            {
                MessageBox.Show("Error: Inputshareservice is not running. exiting");
                Exit();
                return;
            }

            SetIpcStatusLabelText("Connecting to IPC...");
            DisconnectedPanel.Hide();
            IpcDisconnectedPanel.Show();
            IpcDisconnectedPanel.BringToFront();
            ConnectedPanel.Visible = false;

            Task.Run(new Action(() => { IpcConnect(); }));
            ClientNameTextBox.Text = Environment.MachineName;
        }