Exemplo n.º 1
0
 public override void Run()
 {
     Workbench wb = Workbench.Instance;
     if (wb != null)
     {
         var ctl = new FdoDataStoreCtrl();
         wb.ShowContent(ctl, ViewRegion.Document);
     }
 }
        public override void Run()
        {
            Workbench wb = Workbench.Instance;
            TreeNode node = wb.ObjectExplorer.GetSelectedNode();
            if (node.Level == 1)
            {
                string name = node.Name;
                FdoConnectionManager mgr = ServiceManager.Instance.GetService<FdoConnectionManager>();
                FdoConnection conn = mgr.GetConnection(name);

                if (conn != null)
                {
                    var ctl = new FdoDataStoreCtrl(conn);
                    ctl.DataStoreChanged += delegate
                    {
                        mgr.RefreshConnection(name);
                    };
                    wb.ShowContent(ctl, ViewRegion.Document);
                }
            }
        }