Пример #1
0
        //private void helper_DatabaseScriptEvent(object sender, DatabaseScriptEventArgs e)
        //{
        //    if(e.IsNew)
        //    {
        //        lstStatus.Items.Insert(0,new ListViewItem(new string[]{e.SourceFile,e.Status,e.FullPath}));
        //    }
        //    else
        //    {
        //        for(int i=0;i<15;i++)
        //        {
        //            if(lstStatus.Items[i].SubItems[0].Text == e.SourceFile)
        //            {
        //                lstStatus.Items[i].SubItems[1].Text = e.Status;
        //                if(e.Status == "Object not in Db")
        //                {
        //                    lstStatus.Items[i].BackColor = Color.Orange;
        //                }
        //                break;
        //            }
        //        }
        //    }
        //}



        private void bgWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            if (e.Argument is ObjectScriptingConfigData)
            {
                ObjectScriptHelper helper = new ObjectScriptHelper(((ObjectScriptingConfigData)e.Argument).ConnData);
                helper.ProcessFullScripting(e.Argument as ObjectScriptingConfigData, sender as BackgroundWorker, e);
            }
        }
Пример #2
0
        private void bgScripting_DoWork(object sender, DoWorkEventArgs e)
        {
            ObjectScriptHelper scrHelper;

            if (e.Argument == null)
            {
                scrHelper = new ObjectScriptHelper(this.connData);
                scrHelper.ProcessScripts(sender as BackgroundWorker, e);
            }
            else
            {
                scrHelper = new ObjectScriptHelper(((ObjectScriptingConfigData)e.Argument).ConnData);
                scrHelper.ProcessFullScripting(e.Argument as ObjectScriptingConfigData, sender as BackgroundWorker, e);
            }
        }