Пример #1
0
        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
        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
        private void aProposToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DescConfiguration desc = new DescConfiguration();

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