Ejemplo n.º 1
0
        private void iniMvc()
        {
            //_connView = (IConnectionView)this;
            this._sdeUserInfo = new SdeUserInfo();
            this._userInfoController = new UserInfoController(_sdeUserInfo, this);
            this._connSde = new SdeConnection(this._sdeUserInfo);
            this._connectionController = new SdeConnectionController(this._connSde, this);
            this._connectionController.DoWork += new com.g1.arcgis.ChangedEventHandler(_connectionController_DoWork);
            //FrmMainRibbonExtensible fr = new FrmMainRibbonExtensible();

            //_mainSwitch = (IMainSwitch)fr;
        }
Ejemplo n.º 2
0
 void IUserInfoController.SetModel(ISdeUserInfo userInfo)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 3
0
 public SdeConnection(ISdeUserInfo sdeUser)
 {
     //_workspace = null;
     _sdeUser = sdeUser;
     _sqlUser = sdeUser.GetSqlUserInfo();
 }
Ejemplo n.º 4
0
 public UserInfoController(ISdeUserInfo userInfo, IConnectionView connView)
 {
     this._sdeUserInfo = userInfo;
     this._connectionView = connView;
 }
Ejemplo n.º 5
0
        IWorkspace ISdeConnectionInfo.CreateSdeWorkspace(ISdeUserInfo sdeUserInfo)
        {
            try
            {
                UtilitiesBox.StartService(sdeUserInfo.Sde_service, 3000);
                //UtilitiesBox.StartService("MSSQLSERVER", 3000);
                WorkspaceManagement wspm = new WorkspaceManagement();
                _workspace = wspm.CreateWorkspaceSDE(sdeUserInfo.ServerSde, sdeUserInfo.Instance, sdeUserInfo.Db, sdeUserInfo.Version, sdeUserInfo.UserName, sdeUserInfo.Pass);
                _environment = String.Format("Database Connections/Connection to {0}.sde", sdeUserInfo.ServerSde);
                _workspaceName = wspm.CreateConnectionFile(sdeUserInfo.Server, sdeUserInfo.Instance, sdeUserInfo.UserName, sdeUserInfo.Pass, sdeUserInfo.Db, sdeUserInfo.Version,TnSystemTempPath.ConnectionFileFullPath);
                //MessageBox.Show("line 44 SdeConnection, path=" + _workspaceName.PathName);
                return _workspace;
                //IWorkspace wsp = wspm.CreateWorkspaceSDE("froxtal-pc", "5152", "sde", "sde.DEFAULT", "sde", "arcsde");
                //if (wsp != null)
                //{
                //    TnConnectionInfo.CallMe.SetSDEWorkspace(wsp);
                //    _connectionOk = true;
                //}
                //else
                //{
                //    _connectionOk = false;
                //}

            }
            catch (Exception ex) { MessageBox.Show(ex.ToString());}

            return _workspace;
        }