Beispiel #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            PathSettings.localPath  = @"C:\Users\radek\Documents\";
            PathSettings.remotePath = @"/home/radek/Pliki/";
            ConnectionSettings connection = new ConnectionSettings();

            connection.Ip = ipTextBox.Text;
            int  n;
            bool isNumeric = int.TryParse(portTextBox.Text, out n);

            connection.Port     = portTextBox.Text;
            connection.Username = "******";
            connection.Password = "******";

            if (!isNumeric)
            {
                var result = System.Windows.Forms.MessageBox.Show("Błąd", "Niepoprawny format portu", System.Windows.Forms.MessageBoxButtons.OK);
            }
            else
            {
                CustomController controller = new CustomController(connector = new Connector(connection, customProgressBar));
                controller.processDownloads();
            }


            //    statusLabel.Text = connector.getConnectionStatus();
//
            //    listOfFiles = connector.sendCommand();
            //    Thread thr = new Thread(new ThreadStart(connector.downloadFile));
            //   thr.Start();
        }