Exemple #1
0
        public FrmMainScreen()
        {
            InitializeComponent();

            this.m_ClsIni             = new ClsIni("cfg.ini");
            this.m_Columnlist         = new List <string[]>();
            this.m_ColumnlistOutput   = new List <string[]>();
            this.m_Tablelist          = new List <string>();
            this.ShowClose            = true;
            this.m_CanChange          = false;
            this.m_SqlHelper          = new SQLHelper(m_ConnectionString);
            this.m_SqlHelperWhere     = new SQLHelper(m_ConnectionString);
            this.m_SqlHelperFrom      = new SQLHelper(m_ConnectionString);
            this.m_SqlHelperInnerJoin = new SQLHelper(m_ConnectionString);
            this.m_Datas      = new Hashtable();
            this.m_TableInfo  = new Hashtable();
            this.m_BS_Auswahl = new BindingSource();

            this.DBGRID_Auswahl.DataSource = this.m_BS_Auswahl;


            FuncGeneral.Start();
        }
Exemple #2
0
        internal bool MakeInstall()
        {
            try
            {
                ExtractFile("DEMONDataAssistant.MySQL.SHARE.7z", _iPath);
                ExtractFile("DEMONDataAssistant.MySQL.DATA.7z", _iPath);
                ExtractFile(
                    Distinguish64or32System() == "32"
                        ? "DEMONDataAssistant.MySQL.X86.7z"
                        : "DEMONDataAssistant.MySQL.X64.7z", _iPath);
                Stream sm = Assembly.GetExecutingAssembly().GetManifestResourceStream("DEMONDataAssistant.MySQL.my.ini");
                var    sr = new StreamReader(sm);
                var    sw = new StreamWriter(_iPath + "bin\\my.ini");
                sw.Write(sr.ReadToEnd());
                sw.Flush();
                sw.Close();
                sr.Close();
                var iINIControl = new ClsIni(_iPath + "bin\\my.ini");
                iINIControl.IniWriteValue("mysqld", "basedir", (_iPath).Replace("\\", "/"));
                iINIControl.IniWriteValue("mysqld", "datadir", (_iPath).Replace("\\", "/") + "data/");

                //添加防火墙例外

                //NetFwAddApps("DEMON TAOBAO MASTER", _iPath + "bin\\mysqld.exe");

                //安装服务
                //"\"d:\\my share\\myservice.exe\""
                //D:\xampp\mysql\bin\mysqld.exe --defaults-file=D:\xampp\mysql\bin\my.ini mysql
                //ClsService.InstallService("\"" + _iPath + "bin\\mysqld.exe\" --defaults-file=\"" + _iPath + "bin\\my.ini\"", "DEMONDataBase", "DEMON Studio Database");
            }
            catch (Exception)
            {
                return(false);
            }
            return(true);
        }