コード例 #1
0
        public bool InitializeConnection()
        {
            System.Diagnostics.Debug.WriteLine("InitializeConnection _CommonPath:" + CommonPath);
            if (string.IsNullOrEmpty(CommonPath))
            {
                return(false);
            }
            var configfile = Path.Combine(CommonPath, "CommonConfig.config");

            System.Diagnostics.Debug.WriteLine("InitializeConnection configfile:" + configfile);
            XDocument xdoc = XDocument.Load(configfile);
            var       url  = from lv1 in xdoc.Descendants("add")
                             where lv1.Attribute("key").Value == ServiceUrlKey
                             select lv1.Attribute("value").Value;

            _objRemoteHelper = new CRemoteHelper(url.ElementAt(0));
            ConnectionInfo _objConnection = _objRemoteHelper.CheckConnection();

            System.Diagnostics.Debug.WriteLine("InitializeConnection _objConnection.status:" + _objConnection.status);
            if (_objConnection.status == Status.Connected)
            {
                _mObjUdtHandler     = new UDTManagerHelper(_objRemoteHelper.GetUrl("UDTManager").sEndpointAddress);
                _mObjUdtDataHandler = new UDTDataManagerHelper(_objRemoteHelper.GetUrl("UDTDataManager").sEndpointAddress);
                UDTSESSIONID        = _mObjUdtHandler.Connect();
                System.Diagnostics.Debug.WriteLine("InitializeConnection UDTSESSIONID:" + UDTSESSIONID);
                UDTDATASESSIONID = _mObjUdtDataHandler.Connect();
                System.Diagnostics.Debug.WriteLine("InitializeConnection UDTDATASESSIONID:" + UDTDATASESSIONID);
                return(true);
            }

            return(false);
        }
コード例 #2
0
        public void RefreshUdt(string UdtName)
        {
            if (_mObjUdtHandler == null || _mObjUdtDataHandler == null)
            {
                Clear();
                _mObjUdtHandler     = new UDTManagerHelper(_objRemoteHelper.GetUrl("UDTManager").sEndpointAddress);
                _mObjUdtDataHandler = new UDTDataManagerHelper(_objRemoteHelper.GetUrl("UDTDataManager").sEndpointAddress);

                UDTSESSIONID     = _mObjUdtHandler.Connect();
                UDTDATASESSIONID = _mObjUdtDataHandler.Connect();
            }

            LoadUdt(UdtName);

            CurrentDataSet = GetUdtDataset(CurrentUdt);
        }
コード例 #3
0
ファイル: UDTProvider.cs プロジェクト: WASP3D/Soccer-App
        public void RefreshUdt(string UdtName)
        {
            if (_mObjUdtHandler == null || _mObjUdtDataHandler == null)
            {
                Clear();
                _mObjUdtHandler = new UDTManagerHelper(_objRemoteHelper.GetUrl("UDTManager").sEndpointAddress);
                _mObjUdtDataHandler = new UDTDataManagerHelper(_objRemoteHelper.GetUrl("UDTDataManager").sEndpointAddress);

                UDTSESSIONID = _mObjUdtHandler.Connect();
                UDTDATASESSIONID = _mObjUdtDataHandler.Connect();
            }

            LoadUdt(UdtName);

            CurrentDataSet = GetUdtDataset(CurrentUdt);
        }
コード例 #4
0
ファイル: UDTProvider.cs プロジェクト: WASP3D/Soccer-App
        public bool InitializeConnection()
        {
            System.Diagnostics.Debug.WriteLine("InitializeConnection _CommonPath:" + CommonPath);
            if (string.IsNullOrEmpty(CommonPath))
                return false;
            var configfile = Path.Combine(CommonPath, "CommonConfig.config");
            System.Diagnostics.Debug.WriteLine("InitializeConnection configfile:" + configfile);
            XDocument xdoc = XDocument.Load(configfile);
            var url = from lv1 in xdoc.Descendants("add")
                      where lv1.Attribute("key").Value == "LOCALMANAGERURL"
                      select lv1.Attribute("value").Value;
            _objRemoteHelper = new CRemoteHelper(url.ElementAt(0));
            ConnectionInfo _objConnection = _objRemoteHelper.CheckConnection();
            System.Diagnostics.Debug.WriteLine("InitializeConnection _objConnection.status:" + _objConnection.status);
            if (_objConnection.status == Status.Connected)
            {
                _mObjUdtHandler = new UDTManagerHelper(_objRemoteHelper.GetUrl("UDTManager").sEndpointAddress);
                _mObjUdtDataHandler = new UDTDataManagerHelper(_objRemoteHelper.GetUrl("UDTDataManager").sEndpointAddress);
                UDTSESSIONID = _mObjUdtHandler.Connect();
                System.Diagnostics.Debug.WriteLine("InitializeConnection UDTSESSIONID:" + UDTSESSIONID);
                UDTDATASESSIONID = _mObjUdtDataHandler.Connect();
                System.Diagnostics.Debug.WriteLine("InitializeConnection UDTDATASESSIONID:" + UDTDATASESSIONID);
                return true;
            }

            return false;
        }