Esempio n. 1
0
 private void loadServerData()
 {
     serverData           = new firedumpdbDataSet.mysql_serversDataTable();
     mysql_serversAdapter = new firedumpdbDataSetTableAdapters.mysql_serversTableAdapter();
     mysql_serversAdapter.Fill(serverData);
     cmbServers.DataSource    = serverData;
     cmbServers.DisplayMember = "name";
     cmbServers.ValueMember   = "id";
     if (cmbServers.Items.Count > 0)
     {
         cmbServers.SelectedIndex = 0;
     }
 }
Esempio n. 2
0
 private void loadComboBoxServers()
 {
     serverData           = new firedumpdbDataSet.mysql_serversDataTable();
     mysql_serversAdapter = new firedumpdbDataSetTableAdapters.mysql_serversTableAdapter();
     mysql_serversAdapter.Fill(serverData);
     cmbServers.DataSource    = serverData;
     cmbServers.DisplayMember = "name";
     cmbServers.ValueMember   = "id";
     if (cmbServers.Items.Count > 0)
     {
         cmbServers.SelectedIndex = 0;
         //backgroundWorker1.RunWorkerAsync();
         fillDatabaseCmb(null, null);
     }
 }
Esempio n. 3
0
        internal void Start()
        {
            List <string> tables   = utils.StringUtils.extractTableListFromString(schedulesRow.tables);
            string        database = schedulesRow.database;

            firedumpdbDataSetTableAdapters.mysql_serversTableAdapter serveradapter = new firedumpdbDataSetTableAdapters.mysql_serversTableAdapter();
            firedumpdbDataSet.mysql_serversDataTable servertable = new firedumpdbDataSet.mysql_serversDataTable();
            serveradapter.FillById(servertable, schedulesRow.server_id);


            if (servertable?.Count > 0)
            {
                //File.AppendAllText(@"servicelog.txt", "COUNT:"+servertable.Count+",");
                server = servertable[0];
            }
            else
            {
                //File.AppendAllText(@"servicelog.txt", "COUNT:" + "EMPTY" + ",");
                return;
            }

            DumpCredentialsConfig dumpConfig = new DumpCredentialsConfig();

            dumpConfig.database = database;
            dumpConfig.username = server.username;
            dumpConfig.password = server.password;
            dumpConfig.host     = server.host;
            dumpConfig.port     = (int)server.port;
            if (tables.Count > 0)
            {
                dumpConfig.excludeTables = tables.ToArray();
            }

            mysqldumpAdapter                   = new MySqlDumpAdapter();
            mysqldumpAdapter.Cancelled        += OnCancelled;
            mysqldumpAdapter.Completed        += OnCompleted;
            mysqldumpAdapter.CompressProgress += oncompressprogress;
            mysqldumpAdapter.CompressStart    += oncompstart;
            mysqldumpAdapter.Error            += onerror;
            mysqldumpAdapter.InitDumpTables   += oninitdumptables;
            mysqldumpAdapter.Progress         += onprogress;
            mysqldumpAdapter.TableRowCount    += ontablerowcount;
            mysqldumpAdapter.TableStartDump   += ontablestartdump;

            //File.AppendAllText(@"servicelog.txt", "STARTDUMP");
            mysqldumpAdapter.startDump(dumpConfig);
        }