public void ConnectApplication()
 {
     _connector             = ComUtilities.CreateObject <BCOM.ApplicationObjectConnector>("MicroStationDGN.ApplicationObjectConnector");
     _application           = _connector.Application;
     _application.Visible   = true;
     _isExternalApplication = false;
 }
Exemplo n.º 2
0
        private void FormMain_Load(object sender, EventArgs e)
        {
            buttonRozdziel.Text  = @"Rozdziel";
            textBoxFileName.Text = @"c:\321603_4000.dgn";

            _oMstn = new MicroStationDGN.Application();
        }
 public void SetApplication(object application)
 {
     _application = (BCOM.Application)application;
     if (_application.ActiveDesignFile != null)
     {
         _application.ActiveDesignFile.Close();
     }
     _isExternalApplication = true;
 }
        public void Dispose()
        {
            ComUtilities.ReleaseComObject(_designFile);
            _designFile = null;

            if (_isExternalApplication == false)
            {
                ComUtilities.ReleaseComObject(_application);
                _application = null;
            }

            ComUtilities.ReleaseComObject(_connector);
            _connector = null;
        }
 public void CreateApplication()
 {
     _application           = ComUtilities.CreateObject <BCOM.Application>("MicroStationDGN.Application");
     _application.Visible   = true;
     _isExternalApplication = false;
 }