예제 #1
0
파일: ConfigForm.cs 프로젝트: jcambray/work
 public ConfigForm(MainForm f)
 {
     InitializeComponent();
     //chargement des paramètres
     this.folders = Serialization.deserializeXML("folders.xml");
     this.files = new ArrayList();
     ImageList imgList = new ImageList();
     this.treeview.ImageList = imgList;
     this.treeViewFichiers.ImageList = imgList;
     imgList.Images.Add(System.Drawing.Image.FromFile(Environment.CurrentDirectory + @"/images/dossier_windows.png"));
     imgList.Images.Add(System.Drawing.Image.FromFile(Environment.CurrentDirectory + @"/images/fichier.jpg"));
     this.NUDInterval.Value = Convert.ToDecimal(ConfigurationManager.AppSettings["period"]);
     this.tbHour.Text = ConfigurationManager.AppSettings["heure"];
     this.tbMinutes.Text = ConfigurationManager.AppSettings["minute"];
     this.tbPath.Text = ConfigurationManager.AppSettings["path"];
     this.tbMDP.Text = ConfigurationManager.AppSettings["password"];
     Security sec = new Security();
     this.tbMDPAdmin.Text = sec.caesarToString(ConfigurationManager.AppSettings["passwordAdmin"],15);
     this.numericUpDown1.Value = Convert.ToDecimal(ConfigurationManager.AppSettings["nbSaves"]);
     this.tbFrom.Text = ConfigurationManager.AppSettings["from"];
     this.tbMDPFrom.Text = ConfigurationManager.AppSettings["MDPfrom"];
     this.tbSMTP.Text = ConfigurationManager.AppSettings["SMTP"];
     this.tbPort.Text = ConfigurationManager.AppSettings["port"];
     this.tbTo.Text = ConfigurationManager.AppSettings["to"];
     if (ConfigurationManager.AppSettings["SSL"] == "1")
     { this.cbSSL.Checked = true; }
     this.ancienInterval = this.NUDInterval.Value.ToString();
     this.toolTip1.ToolTipIcon = ToolTipIcon.Warning;
     this.form = f;
     this.populatetreeView();
     this.form.configFormThread.Abort();
 }
예제 #2
0
파일: ConfigForm.cs 프로젝트: jcambray/work
        public ConfigForm(MainForm f)
        {
            InitializeComponent();
            //chargement des paramètres
            this.folders = Serialization.deserializeXML("folders.xml");
            this.files   = new ArrayList();
            ImageList imgList = new ImageList();

            this.treeview.ImageList         = imgList;
            this.treeViewFichiers.ImageList = imgList;
            imgList.Images.Add(System.Drawing.Image.FromFile(Environment.CurrentDirectory + @"/images/dossier_windows.png"));
            imgList.Images.Add(System.Drawing.Image.FromFile(Environment.CurrentDirectory + @"/images/fichier.jpg"));
            this.NUDInterval.Value = Convert.ToDecimal(ConfigurationManager.AppSettings["period"]);
            this.tbHour.Text       = ConfigurationManager.AppSettings["heure"];
            this.tbMinutes.Text    = ConfigurationManager.AppSettings["minute"];
            this.tbPath.Text       = ConfigurationManager.AppSettings["path"];
            this.tbMDP.Text        = ConfigurationManager.AppSettings["password"];
            Security sec = new Security();

            this.tbMDPAdmin.Text      = sec.caesarToString(ConfigurationManager.AppSettings["passwordAdmin"], 15);
            this.numericUpDown1.Value = Convert.ToDecimal(ConfigurationManager.AppSettings["nbSaves"]);
            this.tbFrom.Text          = ConfigurationManager.AppSettings["from"];
            this.tbMDPFrom.Text       = ConfigurationManager.AppSettings["MDPfrom"];
            this.tbSMTP.Text          = ConfigurationManager.AppSettings["SMTP"];
            this.tbPort.Text          = ConfigurationManager.AppSettings["port"];
            this.tbTo.Text            = ConfigurationManager.AppSettings["to"];
            if (ConfigurationManager.AppSettings["SSL"] == "1")
            {
                this.cbSSL.Checked = true;
            }
            this.ancienInterval       = this.NUDInterval.Value.ToString();
            this.toolTip1.ToolTipIcon = ToolTipIcon.Warning;
            this.form = f;
            this.populatetreeView();
            this.form.configFormThread.Abort();
        }