Ejemplo n.º 1
0
 public static void Save(FTPSettings settings)
 {
     using (FileStream stream = File.Open(fileName, FileMode.Create))
     {
         XmlSerializer s = new XmlSerializer(typeof(FTPSettings));
         s.Serialize(stream, settings);
     }
 }
Ejemplo n.º 2
0
 public static void Save(FTPSettings settings)
 {
     using (FileStream stream = File.Open(fileName, FileMode.Create))
     {
         XmlSerializer s = new XmlSerializer(typeof(FTPSettings));
         s.Serialize(stream, settings);
     }
 }
Ejemplo n.º 3
0
 public PluginBody()
 {
     try
     {
         settings = SettingsManager.Load();
     }
     catch
     {
         settings = new FTPSettings();
     }
 }
Ejemplo n.º 4
0
        public FTPSettingsForm(FTPSettings settings)
        {
            InitializeComponent();

            if (settings == null)
                return;

            tServer.Text = settings.Server;
            tDirectory.Text = settings.Directory;
            tUrl.Text = settings.Url;
            tUser.Text = settings.Username;
            tPassword.Text = settings.Password;
        }
Ejemplo n.º 5
0
        public FTPSettingsForm(FTPSettings settings)
        {
            InitializeComponent();

            if (settings == null)
            {
                return;
            }

            tServer.Text    = settings.Server;
            tDirectory.Text = settings.Directory;
            tUrl.Text       = settings.Url;
            tUser.Text      = settings.Username;
            tPassword.Text  = settings.Password;
        }
Ejemplo n.º 6
0
        public void ShowSettings()
        {
            using (FTPSettingsForm fs = new FTPSettingsForm(settings))
            {
                if (fs.ShowDialog() == DialogResult.OK)
                {
                    settings = fs.GetSettings();

                    try
                    {
                        SettingsManager.Save(settings);
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show("Error while saving ftp settings!\r\n\r\n" + ex.Message, "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                }
            }
        }