Beispiel #1
0
 public override ExecuteResult Properties(TotalCommanderWindow window, ref string link)
 {
     using (var form = new AccountForm(accountName, accountManager.GetAccountInfo(accountName)))
     {
         if (form.ShowDialog() == DialogResult.OK && accountManager.Exists(accountName))
         {
             accountManager.Save(accountName, form.AccountInfo);
         }
     }
     return(ExecuteResult.OK);
 }
Beispiel #2
0
 public override bool CreateFolder()
 {
     using (var form = new AccountForm(accountName))
     {
         if (form.ShowDialog() != DialogResult.OK)
         {
             return(false);
         }
         if (form.AccountName.Equals(RS.NewAccount, StringComparison.CurrentCultureIgnoreCase) ||
             form.AccountName.Equals(RS.Settings, StringComparison.CurrentCultureIgnoreCase))
         {
             return(false);
         }
         if (accountManager.Exists(form.AccountName) &&
             Context.Request.MessageBox(string.Format(RS.ReplaceAccount, form.AccountName), MessageBoxButtons.YesNo) == false)
         {
             return(false);
         }
         accountManager.Save(form.AccountName, form.AccountInfo);
         return(true);
     }
 }