private void button2_Click(object sender, RoutedEventArgs e)
        {
            connection.CloseConnection();

            string serverAdress = connection.serverAdress;
            string password = connection.password;
            connection = new ServerConenction(serverAdress, password, this);
        }
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            int tier = RenderCapability.Tier;
            ComboBoxItem server = (ComboBoxItem)comboBox1.SelectedItem;

            string serverAdress = (string)server.Content;
            if (serverAdress == "bobbaitalia.net")
                serverAdress = "216.245.197.154";
            string password = textBox2.Text;
            connection = new ServerConenction(serverAdress, password, this);

            this.currentServer.Text = serverAdress;
            this.comboBox1.Visibility = System.Windows.Visibility.Hidden;
            //this.textBox1.Visibility = System.Windows.Visibility.Hidden;
            this.textBox2.Visibility = System.Windows.Visibility.Hidden;
            this.button1.Visibility = System.Windows.Visibility.Hidden;
            this.canvas1.Width = Application.Current.MainWindow.Width;
        }