Ejemplo n.º 1
0
 public SFtpLibrary()
 {
     try
     {
         SettingsClass.GetSettings();
     }
     catch
     {
     }
     passSFtp = SettingsClass.password;
     userSFtp = SettingsClass.user;
     urlSFtp  = SettingsClass.server;
 }
Ejemplo n.º 2
0
        public WindowSettings() :
            base(Gtk.WindowType.Toplevel)
        {
            this.Build();

            SettingsClass.GetSettings();
            TextBuffer b = textview3.Buffer;

            b.Text           = SettingsClass.user;
            textview3.Buffer = b;
            b                = textview4.Buffer;
            b.Text           = SettingsClass.password;
            textview4.Buffer = b;
            b                = textview5.Buffer;
            b.Text           = SettingsClass.server;
            textview5.Buffer = b;
        }
Ejemplo n.º 3
0
        protected void OnButton1Clicked(object sender, EventArgs e)
        {
            var user = textview3.Buffer.Text.Trim();
            var pass = textview4.Buffer.Text.Trim();
            var serv = textview5.Buffer.Text.Trim();

            if (String.IsNullOrEmpty(user) || String.IsNullOrEmpty(pass) || String.IsNullOrEmpty(serv))
            {
                MessageDialog d        = new MessageDialog(this, DialogFlags.Modal, MessageType.Error, ButtonsType.Close, "Не заполнены некоторые поля");
                ResponseType  response = (ResponseType)d.Run();
                if (response == ResponseType.Close)
                {
                    d.Destroy();
                }
            }
            try
            {
                SettingsClass.SetSetting(user, pass, serv);
                SettingsClass.GetSettings();
            }
            catch
            {
            }
        }