示例#1
0
 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
 public SaveViewer(Save save, MainForm mf)
 {
     InitializeComponent();
     this.nb = 0;
     this.s = save;
     save.setBgwk(this.backgroundWorker);
     this.backgroundWorker.RunWorkerAsync(s.getInfosCopie());
     this.lbAvancementSauvegarde.Text = "0";
     this.mainform = mf;
 }
示例#3
0
文件: Save.cs 项目: jcambray/work
 public Save(MainForm mf)
 {
     this.c = new Configuration();
     frm = mf;
     nextSave = initNextSave();
     this.infosCopie = new string[2];
     this.saveRoot = this.getSaveRoot();
     nextSave = initNextSave();
     tempsRestant = nextSave - DateTime.Now;
     if (nextSave.CompareTo(DateTime.Now) < 0)
     {
         reportDateSauvegarde();
     }
 }
示例#4
0
 public ReportSaveForm(MainForm mf, Save s)
 {
     InitializeComponent();
     //Construction de la liste déroulante
     this.label2.Text = "Le redémarrage de l'ordinateur est necessaire. Voulez-vous reporter la Sauvegarde ?";
     this.comboBox1.Items.Add("redémarrer maintenant");
     this.comboBox1.Items.Add("10 minutes");
     this.comboBox1.Items.Add("15 minutes");
     this.comboBox1.Items.Add("30 minutes");
     this.comboBox1.Items.Add("1 heure");
     this.comboBox1.Items.Add("2 heures");
     this.comboBox1.SelectedIndex = 0;
     this.m = mf;
     this.nxts = s.GetNextSave();
     this.lbCAR.Text = "30";
     this.i = 1;
     this.timer1.Start();
 }
示例#5
0
文件: Program.cs 项目: jcambray/work
        static void Main()
        {
            Thread.Sleep(1000);
            bool owned;
            Mutex m = new Mutex(true, Application.ProductName, out owned);
            if (owned)
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                    MainForm mf = new MainForm();
                    if (mf.launch)
                    { Application.Run(mf); }
                else
                    { Application.Exit(); }
                    m.ReleaseMutex();
            }
            else
            {
                MessageBox.Show("L'application est déja lancée", Application.ProductName);
            }
        }