예제 #1
0
파일: Home.cs 프로젝트: Nyura95/automateDRH
        private bool CheckAllPath(string @params)
        {
            string key = "";

            //
            // parseWorker.CancelAsync();
            foreach (SettingsProperty currentProperty in Properties.Settings.Default.Properties)
            {
                if (currentProperty.Name.Contains(@params))
                {
                    SettingsProperty property = new SettingsProperty(currentProperty.Name);
                    if (!Dossier.CheckIsValid((string)Properties.Settings.Default[property.Name]))
                    {
                        key = property.Name;
                    }
                }
            }

            if (key != "")
            {
                DescConfiguration desc     = new DescConfiguration();
                SettingsProperty  property = new SettingsProperty(key);
                MessageBox.Show(desc.ErreurPath(property.Name), "Erreur !", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return(false);
            }
            return(true);
        }
예제 #2
0
        public FormParam()
        {
            InitializeComponent();
            this.FormBorderStyle              = FormBorderStyle.FixedSingle;
            this.MaximizeBox                  = false;
            this.MinimizeBox                  = false;
            this.Text                         = ConfigurationManager.AppSettings["NameConfig"];
            listparam.ColumnCount             = 3;
            listparam.Columns[0].Name         = "Key";
            listparam.Columns[0].Width        = 100;
            listparam.Columns[0].ReadOnly     = true;
            listparam.Columns[1].Name         = "Description";
            listparam.Columns[1].Width        = 200;
            listparam.Columns[1].ReadOnly     = true;
            listparam.Columns[2].Name         = "Value";
            listparam.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            listparam.Columns[2].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            listparam.AllowUserToAddRows      = false;



            foreach (SettingsProperty currentProperty in Properties.Settings.Default.Properties)
            {
                Type              type   = typeof(DescConfiguration);
                MethodInfo        method = type.GetMethod(currentProperty.Name);
                DescConfiguration c      = new DescConfiguration();
                string            result = (string)method.Invoke(c, null);
                string[]          row    = new string[] { currentProperty.Name, result, Properties.Settings.Default[currentProperty.Name].ToString() };
                listparam.Rows.Add(row);
            }
        }
예제 #3
0
파일: Home.cs 프로젝트: Nyura95/automateDRH
        private bool CheckMysql()
        {
            MysqlDll Mysql = new MysqlDll(Properties.Settings.Default.hostmysql, Properties.Settings.Default.usermysql,
                                          Properties.Settings.Default.mdpmysql, Properties.Settings.Default.database);

            if (!Mysql.isConnect())
            {
                DescConfiguration desc = new DescConfiguration();
                MessageBox.Show(desc.ConnectMySQLFail(), "Erreur !", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            return(Mysql.isConnect());
        }
예제 #4
0
파일: Home.cs 프로젝트: Nyura95/automateDRH
        private void aProposToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DescConfiguration desc = new DescConfiguration();

            MessageBox.Show(desc.APropos(), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }