Example #1
0
        public override void Run()
        {
            TaskManager        mgr  = ServiceManager.Instance.GetService <TaskManager>();
            string             name = Workbench.Instance.ObjectExplorer.GetSelectedNode().Name;
            EtlProcess         proc = mgr.GetTask(name);
            FdoBulkCopy        bcp  = proc as FdoBulkCopy;
            CancelEventHandler ch   = new CancelEventHandler(OnBeforeExecuteBulkCopy);

            if (bcp != null)
            {
                bcp.BeforeExecute += ch;
            }

            if (proc != null)
            {
                IFdoSpecializedEtlProcess spec = proc as IFdoSpecializedEtlProcess;
                if (spec != null)
                {
                    EtlProcessCtl ctl = new EtlProcessCtl(spec);
                    Workbench.Instance.ShowContent(ctl, ViewRegion.Dialog);
                    if (bcp != null)
                    {
                        bcp.BeforeExecute -= ch;
                    }
                }
                else
                {
                    MessageService.ShowError(ResourceService.GetString("ERR_CANNOT_EXECUTE_UNSPECIALIZED_ETL_PROCESS"));
                }
            }
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="EtlBackgroundRunner"/> class.
 /// </summary>
 /// <param name="proc">The proc.</param>
 public EtlBackgroundRunner(IFdoSpecializedEtlProcess proc)
 {
     _proc = proc;
     _proc.FeatureProcessed += delegate(object sender, FeatureCountEventArgs e)
     {
         this.FeatureProcessed(sender, e);
     };
     _proc.ProcessMessage += delegate(object sender, MessageEventArgs e)
     {
         this.ProcessMessage(sender, e);
     };
 }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EtlBackgroundRunner"/> class.
 /// </summary>
 /// <param name="proc">The proc.</param>
 public EtlBackgroundRunner(IFdoSpecializedEtlProcess proc)
 {
     _proc = proc;
     _proc.FeatureProcessed += delegate(object sender, FeatureCountEventArgs e)
     {
         this.FeatureProcessed(sender, e);
     };
     _proc.ProcessMessage += delegate(object sender, MessageEventArgs e)
     {
         this.ProcessMessage(sender, e);
     };
 }
Example #4
0
 internal void UpdateConnectionReferences(string oldName, string newName)
 {
     foreach (string name in _taskDict.Keys)
     {
         var proc = _taskDict[name];
         if (typeof(IFdoSpecializedEtlProcess).IsAssignableFrom(proc.GetType()))
         {
             IFdoSpecializedEtlProcess fp = (IFdoSpecializedEtlProcess)proc;
             fp.UpdateConnectionReferences(oldName, newName);
         }
     }
 }
Example #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EtlProcessCtl"/> class.
 /// </summary>
 /// <param name="proc">The proc.</param>
 public EtlProcessCtl(IFdoSpecializedEtlProcess proc)
     : this()
 {
     _runner = new EtlBackgroundRunner(proc);
     _runner.ProcessMessage += new MessageEventHandler(OnMessageSent);
 }
Example #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EtlProcessCtl"/> class.
 /// </summary>
 /// <param name="proc">The proc.</param>
 public EtlProcessCtl(IFdoSpecializedEtlProcess proc)
     : this()
 {
     _runner = new EtlBackgroundRunner(proc);
     _runner.ProcessMessage += new MessageEventHandler(OnMessageSent);
 }