Пример #1
0
 private void addPanelToolStripMenuItem_Click(object sender, EventArgs e)
 {
     UploadSettingsConfigSection section = (UploadSettingsConfigSection)configuration.GetSection("UploadSettings");
     if (section != null) {
         UploadElement uploadElement = new UploadElement { UploadType = "NAS", Color = 0, Active = false };
         section.UploadSettings.Add(uploadElement);
         Panels.Controls.Add(new PanelConfig(uploadElement, configuration));
     }
 }
        public void Remove(UploadElement element)
        {
            int index = base.BaseIndexOf(element);

            if (index >= 0)
            {
                base.BaseRemoveAt(index);
            }
        }
Пример #3
0
        private void addPanelToolStripMenuItem_Click(object sender, EventArgs e)
        {
            UploadSettingsConfigSection section = (UploadSettingsConfigSection)configuration.GetSection("UploadSettings");

            if (section != null)
            {
                UploadElement uploadElement = new UploadElement {
                    UploadType = "NAS", Color = 0, Active = false
                };
                section.UploadSettings.Add(uploadElement);
                Panels.Controls.Add(new PanelConfig(uploadElement, configuration));
            }
        }
Пример #4
0
        public PanelConfig(UploadElement element, Configuration configuration)
        {
            InitializeComponent();

            Element = element;
            Configuration = configuration;

            Active.Checked = element.Active;
            Color.BackColor = System.Drawing.Color.FromArgb(element.Color);
            Color.Text = Color.BackColor.Name;
            UploadType.Text = element.UploadType;
            Description.Text = element.Description;
            Dock = DockStyle.Top;
        }
Пример #5
0
        public PanelConfig(UploadElement element, Configuration configuration)
        {
            InitializeComponent();

            Element       = element;
            Configuration = configuration;

            Active.Checked   = element.Active;
            Color.BackColor  = System.Drawing.Color.FromArgb(element.Color);
            Color.Text       = Color.BackColor.Name;
            UploadType.Text  = element.UploadType;
            Description.Text = element.Description;
            Dock             = DockStyle.Top;
        }
 public void Remove(UploadElement element)
 {
     int index = base.BaseIndexOf(element);
     if (index >= 0)
         base.BaseRemoveAt(index);
 }
 public void Add(UploadElement element)
 {
     base.BaseAdd(element);
 }
 public void Add(UploadElement element)
 {
     base.BaseAdd(element);
 }