Exemple #1
0
        public static void Main()
        {
            SAPPTcpClient app = new SAPPTcpClient();

            app.InitializeComponent();
            app.Run();
        }
Exemple #2
0
        private void Window_client_ContentRendered(object sender, EventArgs e)
        {
            SAPPTcpClient.logger.Info("Finished rendering content for SAPPRemoteUI");

            if (theme_p.SelectedItem is ColorDataList)
            {
                if (((ColorDataList)this.theme_p.SelectedItem).ColorMetadata == "REC")
                {
                    SetTheme(((ColorDataList)this.theme_p.SelectedItem).ColorName);
                }
                else if (((ColorDataList)this.theme_p.SelectedItem).ColorMetadata != "SEP")
                {
                    string cdata = ((ColorDataList)this.theme_p.SelectedItem).ColorMetadata;
                    Color  cx    = (Color)System.Windows.Media.ColorConverter.ConvertFromString(cdata);
                    SetTheme(cx);
                }
            }
            this.grid_loading.Visibility = Visibility.Hidden;

            if (SAPPTcpClient.ISettings.AutoConnect == true)
            {
                SAPPTcpClient.Connect(textBox_ip_port.Text);
            }

            textBox_password.Password = SAPPTcpClient.ISettings.Password;
        }
Exemple #3
0
        private void MenuItemClick(MenuItem mi)
        {
            try
            {
                string cmd     = mi.Tag.ToString().Replace("%index", SelectedPD.Index.ToString()).Replace("%name", SelectedPD.Name);
                string outText = Json.GenerateString(new Command(cmd));

                SAPPTcpClient.Send(SAPPTcpClient.clientSocket, outText);
            }
            catch (Exception ex) { SAPPTcpClient.logger.Error(ex, ex.Message); }
        }
Exemple #4
0
 private void Window_client_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     try
     {
         SAPPTcpClient.Disconnect();
     }
     catch (Exception ex)
     {
         SAPPTcpClient.logger.Error(ex, ex.Message);
     }
 }
Exemple #5
0
 private void TextBox_command_KeyUp(object sender, KeyEventArgs e)
 {
     try
     {
         string outText = "";
         if (e.Key == Key.Enter)
         {
             outText = Json.GenerateString(new Command(textBox_command.Text));
             SAPPTcpClient.Send(SAPPTcpClient.clientSocket, outText);
             textBox_command.Text = "";
         }
     }
     catch (Exception ex)
     {
         SAPPTcpClient.Disconnect();
         if (e.Key == Key.Enter)
         {
             textBox_command.Text = "";
         }
         SAPPTcpClient.logger.Error(ex, ex.Message);
     }
 }
Exemple #6
0
 private void Button_refresh_Click(object sender, RoutedEventArgs e)
 {
     SAPPTcpClient.SendQUERY();
 }
Exemple #7
0
 private void Button_disconnect_Click(object sender, RoutedEventArgs e)
 {
     SAPPTcpClient.Disconnect();
 }
Exemple #8
0
 private void Button_connect_Click(object sender, RoutedEventArgs e)
 {
     SAPPTcpClient.Connect(textBox_ip_port.Text);
 }
Exemple #9
0
 private void Updater_Tick(object sender, EventArgs e)
 {
     SAPPTcpClient.SendQUERY_STATS();
 }