Example #1
0
        //Closing from syntax editor
        public void CloseDatasetFromSyntax(string datasetname)
        {
            IUnityContainer container  = LifetimeService.Instance.Container;
            IDataService    service    = container.Resolve <IDataService>();
            IUIController   controller = container.Resolve <IUIController>();

            //Get current filetype from loaded dataset. This is file extension and Filter
            DataSource targetds = controller.GetDocumentByName(datasetname);//06Nov2012

            if (targetds == null)
            {
                return;
            }

            service.Close(targetds);
            controller.closeTab();
        }