/*
        public LoginWindow(SpreadsheetClientModel scm)
        {
            InitializeComponent();
            this.scm = scm;
        }
        */
        private void LoginButton_Click(object sender, EventArgs e)
        {
            int port = 0;
            int.TryParse(portTextBox.Text, out port);

            //scm.Connect(UsernameTextBox.Text, port, PasswordTextBox.Text);
            form1 = new Form1(this, UsernameTextBox.Text, port, PasswordTextBox.Text);
            form1.SSconnect(UsernameTextBox.Text, port, PasswordTextBox.Text);
        }
        private void PasswordTextBox_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == '\r')
            {
                int port = 0;
                int.TryParse(portTextBox.Text, out port);

                //scm.Connect(UsernameTextBox.Text, port, PasswordTextBox.Text);
                form1 = new Form1(this, UsernameTextBox.Text, port, PasswordTextBox.Text);
                form1.SSconnect(UsernameTextBox.Text, port, PasswordTextBox.Text);
            }
        }