Beispiel #1
0
 private void button_ok_Click(object sender, EventArgs e)
 {
     if (Crypt.CheckKeyFNameLen(textBox_fnamekey.Text))
     {
         SaveFromControls();
         SaveSetting.CreateSettings(o);
         this.DialogResult = DialogResult.OK;
     }
     else
     {
         this.DialogResult = DialogResult.None;
     }
 }
Beispiel #2
0
 private void FormSettings_Load(object sender, EventArgs e)
 {
     SshConnection.KillSSH();
     //TODO Заглушка: аутентификация только с клавы
     comboBox_use_auth_key.SelectedIndex = 0;
     if (File.Exists(SaveSetting.path_to_set_file))
     {
         SaveSetting.LoadSettings(ref o);
     }
     else
     {
         o.key_fname    = Crypt.default_key;//50;
         o.pwd_file_enc = Crypt.default_key;
         o.key_size     = "256";
         o.server       = "yuor-server.1gb.ru";
         o.base_dir     = "http/";
         o.user         = "******";
         //o.pwd = "password";
         SaveSetting.CreateSettings(o);
     }
     LoadToControls();
 }