Esempio n. 1
0
 private void ftpSettingsApplyButton_Click(object sender, EventArgs e)
 {
     if (localDirTextbox.Text != String.Empty && ftpServerAddrTextBox.Text != String.Empty && usernameTextBox.Text != String.Empty && passwordTextBox.Text != String.Empty)
     {
         ftpSettingsApplyButton.Enabled    = false;
         fileSystemWatcher1.Path           = localDirTextbox.Text;
         connectButton.Enabled             = true;
         ConfigurationMgr.localDirToSync   = localDirTextbox.Text;
         ConfigurationMgr.ftpServerAddress = ftpServerAddrTextBox.Text;
         ConfigurationMgr.ftpUsername      = usernameTextBox.Text;
         ConfigurationMgr.ftpPassword      = passwordTextBox.Text;
         ConfigurationMgr.secureMode       = ftpsCheckbox.Checked;
         ConfigurationMgr.saveSettings();
     }
 }
Esempio n. 2
0
 public FileSynchro()
 {
     InitializeComponent();
     connectButton.Enabled = false;
     ConfigurationMgr.loadSettings();
     localDirTextbox.Text      = ConfigurationMgr.localDirToSync;
     ftpServerAddrTextBox.Text = ConfigurationMgr.ftpServerAddress;
     usernameTextBox.Text      = ConfigurationMgr.ftpUsername;
     passwordTextBox.Text      = ConfigurationMgr.ftpPassword;
     ftpsCheckbox.Checked      = ConfigurationMgr.secureMode;
     if (ConfigurationMgr.settingsLoaded)
     {
         ftpSettingsApplyButton.Enabled = false;
     }
 }