Exemplo n.º 1
0
 public ClientLogin()
 {
     InitializeComponent();
     string[] args = Environment.GetCommandLineArgs();
     if (args.Length == 2)
     {
         string    ClientName = args[1];
         ClientGUI client     = new ClientGUI(ClientName);
         client.Show();
         Hide();
     }
     else if (args.Length >= 3)
     {
         string   ClientName = args[1];
         bool     b; bool.TryParse(args[2], out b);
         string[] files;
         if (b)
         {
             files = args.Skip(3).ToArray();
             ClientGUI client = new ClientGUI(ClientName, b, files);
             client.Show();
         }
         else
         {
             ClientGUI client = new ClientGUI(ClientName);
             client.Show();
         }
         this.Hide();
     }
 }
Exemplo n.º 2
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     if (!txtClient.Text.Equals(""))
     {
         ClientGUI Client = new ClientGUI(txtClient.Text);
         Client.Show();
         Hide();
     }
     else
     {
         MessageBox.Show("Please specify client name", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }