/// <summary>
        /// Request an array of pointers for the controller type.
        /// </summary>
        /// <param name="controllerType">The controller type making the request for pointers.</param>
        /// <param name="controllingHand">The handedness of the controller making the request.</param>
        /// <param name="useSpecificType">Only register pointers with a specific type.</param>
        /// <returns></returns>
        protected virtual IMixedRealityPointer[] RequestPointers(SystemType controllerType, Handedness controllingHand, bool useSpecificType = false)
        {
            var pointers = new List <IMixedRealityPointer>();

            if (MixedRealityToolkit.HasActiveProfile &&
                MixedRealityToolkit.Instance.ActiveProfile.IsInputSystemEnabled &&
                MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.PointerProfile != null)
            {
                for (int i = 0; i < MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.PointerProfile.PointerOptions.Length; i++)
                {
                    var pointerProfile = MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.PointerProfile.PointerOptions[i];

                    if (((useSpecificType && pointerProfile.ControllerType.Type == controllerType.Type) || (!useSpecificType && pointerProfile.ControllerType.Type == null)) &&
                        (pointerProfile.Handedness == Handedness.Any || pointerProfile.Handedness == Handedness.Both || pointerProfile.Handedness == controllingHand))
                    {
                        var pointerObject = Object.Instantiate(pointerProfile.PointerPrefab);
                        var pointer       = pointerObject.GetComponent <IMixedRealityPointer>();
                        pointerObject.transform.SetParent(MixedRealityToolkit.Instance.MixedRealityPlayspace);

                        if (pointer != null)
                        {
                            pointers.Add(pointer);
                        }
                        else
                        {
                            Debug.LogWarning($"Failed to attach {pointerProfile.PointerPrefab.name} to {controllerType.Type.Name}.");
                        }
                    }
                }
            }

            return(pointers.Count == 0 ? null : pointers.ToArray());
        }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="dataProviderType"></param>
 /// <param name="dataProviderName"></param>
 /// <param name="priority"></param>
 /// <param name="runtimePlatform"></param>
 public ControllerDataProviderConfiguration(SystemType dataProviderType, string dataProviderName, uint priority, SupportedPlatforms runtimePlatform)
 {
     this.dataProviderType = dataProviderType;
     this.dataProviderName = dataProviderName;
     this.priority         = priority;
     this.runtimePlatform  = runtimePlatform;
 }
Exemple #3
0
        /// <summary>
        /// Generic copy (either from kernel or to kernel)
        /// Determines if the thing we are moving is an endpoint and copies it accordingly.
        /// </summary>
        public static Allocation *MoveData(SharedHeap fromHeap,
                                           SharedHeap toHeap,
                                           Process newOwner,
                                           Allocation *data)
        {
            if (data == null)
            {
                return(data);
            }

            if (!fromHeap.Validate(data))
            {
                throw new ArgumentException("Bad argument. Not visible");
            }

            // We can only transfer either into our out of the kernel's heap
            DebugStub.Assert(fromHeap == SharedHeap.KernelSharedHeap ||
                             toHeap == SharedHeap.KernelSharedHeap);

            if (SystemType.IsSubtype(data, EndpointCoreSystemType))
            {
                // we have an endpoint
                DeliveryImpl di = EndpointCore.AllocationEndpointDeliveryImpl(data);
                return(di.MoveEndpoint(fromHeap, toHeap, newOwner));
            }
            else
            {
                // we have a NON-endpoint
                // TODO FIX this!
                return(null); // MoveNonEndpoint(fromHeap, toHeap, newOwner, data);
            }
        }
Exemple #4
0
        private void Test(string line, bool isFolder, string fileName, SystemType systemType)
        {
            FileInfo t = new FileInfo(line, systemType);

            Assert.AreEqual(t.IsFolder, isFolder);
            Assert.AreEqual(t.FileName, fileName);
        }
 void Awake()
 {
     expBool = flrBool = false;
     systemType = SystemType.None;
     savedSystemType = SystemType.None;
     particleSystems = Resources.LoadAll("Explosions", typeof(GameObject));
     loadFlareSystems = Resources.LoadAll("Flares", typeof(GameObject));
     loadDirectionalSystems = Resources.LoadAll("Directional", typeof(GameObject));
     flareSystems = new List <FlareSystem>();
     directionalSystems = new List <FlareSystem>();
     foreach (Object obj in loadFlareSystems) {
         FlareSystem thisFlareSystem = new FlareSystem ();
         thisFlareSystem.name = obj.name;
         thisFlareSystem.particleObject = Instantiate (obj, Vector3.zero, Quaternion.identity) as GameObject;
         thisFlareSystem.particleSystems = thisFlareSystem.particleObject.GetComponentsInChildren<ParticleSystem>();
         thisFlareSystem.particleObject.SetActive (false);
         thisFlareSystem.toggleFlag = false;
         thisFlareSystem.particleObject.transform.parent = this.transform;
         flareSystems.Add (thisFlareSystem);
     }
     foreach (Object obj in loadDirectionalSystems) {
         FlareSystem thisFlareSystem = new FlareSystem ();
         thisFlareSystem.name = obj.name;
         thisFlareSystem.particleObject = Instantiate (obj, Vector3.zero, Quaternion.identity) as GameObject;
         thisFlareSystem.particleSystems = thisFlareSystem.particleObject.GetComponentsInChildren<ParticleSystem>();
         thisFlareSystem.particleObject.SetActive (false);
         thisFlareSystem.toggleFlag = false;
         thisFlareSystem.particleObject.transform.parent = this.transform;
         directionalSystems.Add (thisFlareSystem);
     }
 }
        protected string GenerateAgent(AgentType agentType, SystemType systemType)
        {
            var agentFactory = new AgentFactory();
            var agent        = agentFactory.CreateAgent(agentType, systemType);

            return(agent.ToString());
        }
        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="sType"> </param>
        /// <param name="loginPassword"> </param>
        /// <returns></returns>
        public static MResult ChangeLoginPassword(SystemType sType, LoginPasswordEntity loginPassword)
        {
            var result = new MResult();

            if (loginPassword != null &&
                !string.IsNullOrEmpty(loginPassword.email) &&
                !string.IsNullOrEmpty(loginPassword.emailkey) &&
                loginPassword.emailid > 0)
            {
                var    changeSuccess = false;
                string message;
                using (var bbHome = new BbHomeServiceClient())
                {
                    bbHome.Open();
                    int    mailId;
                    string mailKey;
                    if (bbHome.CheckPswKeyStatusByEmail(out mailId, out mailKey, out message, loginPassword.email))
                    {
                        changeSuccess = bbHome.ChangePassWordByEmail(out message, loginPassword.email, loginPassword.password);
                    }
                    bbHome.Close();
                }
                if (changeSuccess)
                {
                    result.status = MResultStatus.Success;
                }
                else
                {
                    result.status = MResultStatus.LogicError;
                    result.msg    = message;
                }
            }

            return(result);
        }
Exemple #8
0
    void InitData()
    {
        _strengthenTankItemDic.Clear();
        List <int>      unlockUnits  = InstancePlayer.instance.model_User.unlockUnitsId;
        List <DataUnit> dataUnitList = new List <DataUnit>();

        dataUnitList.Clear();
        foreach (int id in unlockUnits)
        {
            DataUnit dataunit = DataManager.instance.dataUnitsGroup.GetUnit(id);
            dataUnitList.Add(dataunit);
        }
        TankDataManager tankManagetr = new TankDataManager();

        _unitDataList = tankManagetr.StrengthenSort(dataUnitList);

        if (_unitDataList.Count > 0)
        {
            _currentUnitData = _unitDataList[0];
            UpdataTankInfo(_currentUnitData);
            _units = InstancePlayer.instance.model_User.unlockUnits;
            _units.TryGetValue(_currentUnitData.id, out _modelUnit);

            _unitPart        = _modelUnit.GetDataParts();
            _currentUnitPart = _unitPart[0];
            _partType        = SystemType.HP;
            UpdataUnitPart(_currentUnitPart, _partType);
        }
    }
Exemple #9
0
        public static void DisplayDropDown(Rect position, IEnumerable <Type> types, Type selectedType, TypeGrouping grouping)
        {
            var menu = new GenericMenu();

            menu.AddItem(new GUIContent(None), selectedType == null, OnSelectedTypeName, null);
            menu.AddSeparator(string.Empty);

            foreach (var type in types)
            {
                var menuLabel = FormatGroupedTypeName(type, grouping);

                if (string.IsNullOrEmpty(menuLabel))
                {
                    continue;
                }

                var content = new GUIContent(menuLabel);
                menu.AddItem(content, type == selectedType, OnSelectedTypeName, type);
            }

            menu.DropDown(position);

            void OnSelectedTypeName(object typeRef)
            {
                SelectedType      = typeRef as Type;
                SelectedReference = SystemType.GetReference(SelectedType);
                EditorWindow.focusedWindow.SendEvent(EditorGUIUtility.CommandEvent(TypeReferenceUpdated));
            }
        }
Exemple #10
0
 public void ArrayLengthTest()
 {
     if (ArrayTest == null)
     {
         ArrayTest = new int[5];
     }
     Console.WriteLine(string.Format("Int array type {0}", ArrayTest.GetType().Name));
     Console.WriteLine(string.Format("Int array length {0}", ArrayTest.Length));
     if (ArrayTest2 == null)
     {
         ArrayTest2 = new TestEnum[10];
     }
     Console.WriteLine(string.Format("Enum array type {0}", ArrayTest2.GetType().Name));
     Console.WriteLine(string.Format("Enum array length {0}", ArrayTest2.Length));
     if (ReferenceTest1 == null)
     {
         ReferenceTest1 = new SystemType();
     }
     Console.WriteLine(string.Format("SystemType type {0}", ReferenceTest1.GetType().Name));
     Console.WriteLine(string.Format("SystemType va {0}", ReferenceTest1.value));
     if (ArrayTest3 == null)
     {
         ArrayTest3 = new TestEnum[15];
     }
     Console.WriteLine(string.Format("Enum array type {0}", ArrayTest3.GetType().Name));
     Console.WriteLine(string.Format("Enum array length {0}", ArrayTest3.Length));
 }
Exemple #11
0
 public SystemSettingType(string name, string description, SystemType systemType, string format)
 {
     Name        = name;
     Description = description;
     SystemType  = systemType;
     Format      = format;
 }
        /// <summary>
        /// Erzeugt eine neue Vermittlungsinstanz.
        /// </summary>
        /// <param name="profile">Das zugeordnete Geräteprofil.</param>
        internal LegacyHardware(P profile)
            : base(profile)
        {
            // Create the device configuration
            var settings = new Hashtable();

            // Fill the configuration
            foreach (var parameter in profile.Parameters)
            {
                if (!string.IsNullOrEmpty(parameter.Value))
                {
                    settings[parameter.Name] = parameter.Value;
                }
            }

            // Pre-set system type
            settings["Type"] = SystemType.ToString();

            // Find the primary aspect
            var aspect = profile.DeviceAspects.Find(a => string.IsNullOrEmpty(a.Aspekt));

            // Create the device
            LegacyDevice = (ILegacyDevice)Activator.CreateInstance(Type.GetType(aspect.Value, true), settings);

            // Start it
            LegacyDevice.SetVideoAudio(0, 0);
        }
        /// <summary>
        /// 构造函数
        /// </summary>
        public BaseWcfService()
        {
            var httpContext = HttpContext.Current;

            if (httpContext != null)
            {
                var args = httpContext.Request.Url.Segments;
                for (var i = 0; i < args.Length; i++)
                {
                    args[i] = ValidateUtility.CheckNull(args[i].Trim(new char[] { '/', '\\', ' ' })).ToString();
                }
                if (args.Length >= 8)
                {
                    SystemType = MCvHelper.To <SystemType>(args[3]);
                    Token      = MCvHelper.To <string>(args[4]);
                    Guid       = MCvHelper.To <string>(args[5]);
                    UserId     = MCvHelper.To <int>(args[6]);
                    Uid        = MCvHelper.To <string>(args[7]);
                }
                else
                {
                    MLogManager.Error(MLogGroup.WcfService.构造函数, "", "wcf 服务基类 构造函数初始化 ,uri参数错误");
                }
            }
        }
Exemple #14
0
        private void SetComponentHealth(SystemType system, int value)
        {
            if (!Alive)
            {
                return;
            }

            _vehicleHitPoints[(int)system] = value;

            if (system == SystemType.Vehicle)
            {
                SetHealthGroup(GetHealthGroup(system));
                if (value <= 0)
                {
                    Explode();
                }
            }
            else
            {
                int newValue = _vehicleHitPoints[(int)system];
                if (newValue < 0)
                {
                    SystemType coreComponent = GetCoreComponent();
                    SetComponentHealth(coreComponent, _vehicleHitPoints[(int)coreComponent] + newValue);
                    _vehicleHitPoints[(int)system] = 0;
                }
            }

            // Update UI
            if (SystemsPanel != null && system != SystemType.Vehicle)
            {
                SystemsPanel.SetSystemHealthGroup(system, GetHealthGroup(system), true);
            }
        }
Exemple #15
0
        private static string ConverTo(string number, SystemType system)
        {
            var allowedChars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";

            var length = system == SystemType.hex ? 4 : 3;

            var r = "";

            while (number.Any())
            {
                var start = number.Length - length;

                var part = number.Substring(start < 0 ? 0 : start);

                if (part.Length < length)
                {
                    part = string.Join("", new int[length - part.Length]) + part;
                }

                r      = allowedChars[ConvertToDec(part)] + r;
                number = number.Substring(0, start < 0 ? 0 : start);
            }

            return(r);
        }
Exemple #16
0
        private int GetHealthGroup(SystemType system)
        {
            int systemValue = (int)system;
            int healthGroupCount;
            int startHealth;

            if (system == SystemType.Vehicle)
            {
                healthGroupCount = _vehicleHealthGroups;
                startHealth      = _vehicleStartHitPoints[systemValue];
            }
            else
            {
                healthGroupCount = 5;
                startHealth      = _vehicleStartHitPoints[systemValue];
            }

            if (_vehicleHitPoints[systemValue] <= 0)
            {
                return(healthGroupCount - 1);
            }

            --healthGroupCount;
            int healthGroup = Mathf.CeilToInt(_vehicleHitPoints[systemValue] / (float)startHealth * healthGroupCount);

            return(healthGroupCount - healthGroup);
        }
        private static void OnSelectedTypeName(object userData)
        {
            selectedReference = SystemType.GetReference(userData as Type);
            var typeReferenceUpdatedEvent = EditorGUIUtility.CommandEvent("TypeReferenceUpdated");

            EditorWindow.focusedWindow.SendEvent(typeReferenceUpdatedEvent);
        }
Exemple #18
0
 /// <summary>
 /// Checks if a system is enabled and the service type or validProfile is null, then displays warning message to the user
 /// </summary>
 /// <param name="service">name of service being tested</param>
 /// <param name="systemType">Selected implementation type for service</param>
 /// <param name="validProfile">true if profile scriptableobject property is not null, false otherwise</param>
 protected void CheckSystemConfiguration(string service, SystemType systemType, bool validProfile)
 {
     if (systemType?.Type == null || !validProfile)
     {
         EditorGUILayout.HelpBox($"{service} is enabled but will not be initialized because the System Type and/or Profile is not set.", MessageType.Warning);
     }
 }
Exemple #19
0
        internal ApiResult SaveAccessType(AccessType settting)
        {
            ApiResult apiResult = new ApiResult();

            try
            {
                if (!settting.IsValid())
                {
                    apiResult.SetFailuresAsStatusInResponseFields(settting.StatusDesc);
                    return(apiResult);
                }

                SystemType old = SystemType.QueryWithStoredProc("GetAccessTypeByID", settting.AccessTypeCode).FirstOrDefault();

                settting.Id = old != null ? old.Id : settting.Id;

                settting.Save();
                apiResult.SetSuccessAsStatusInResponseFields();
            }
            catch (Exception ex)
            {
                HandleError(nameof(AttachSystemAffectedToChangeRequest), "EXCEPTION", ex.Message);
                apiResult.SetFailuresAsStatusInResponseFields(ex.Message);
            }
            return(apiResult);
        }
Exemple #20
0
 /// <summary>
 /// 设置字段的值
 /// </summary>
 /// <param name="type"></param>
 /// <param name="obj"></param>
 public void SetItemValue(SystemType type, string obj)
 {
     if (type == SystemType.附件)
     {
         label2.SendToBack();
         PermissionForm owner = null;
         Form           f     = this.FindForm();
         if (f != null && f is PermissionForm)
         {
             owner = f as PermissionForm;
         }
         string[] ss = obj.Split("|".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
         if (ss.Length > 1)
         {
             int id;
             if (int.TryParse(ss[0], out id) && id > 0)
             {
                 Attachment a = Commons.GetAttachmentForDownload(id);
                 ac.SetAttachment(a);
             }
         }
         ac.BringToFront();
     }
     else
     {
         ac.SendToBack();
         label2.Text = obj;
         label2.BringToFront();
     }
 }
Exemple #21
0
        static public Type FromEnum(SystemType ast)
        {
            switch (ast)
            {
            case SystemType.Bool: return(typeof(bool));

            case SystemType.Byte: return(typeof(byte));

            case SystemType.Char: return(typeof(char));

            case SystemType.DateTime: return(typeof(DateTime));

            case SystemType.Decimal: return(typeof(Decimal));

            case SystemType.Delegate: return(typeof(Delegate));

            case SystemType.Double: return(typeof(double));

            case SystemType.Guid: return(typeof(Guid));

            case SystemType.Int: return(typeof(int));

            case SystemType.Long: return(typeof(long));

            case SystemType.Object: return(typeof(Object));

            case SystemType.String: return(typeof(String));

            default:
                Debug.Assert(false);
                return(null);
            }
        }
Exemple #22
0
        static SystemUtils()
        {
            CurrentSystem = SystemType.Windows;

            Type type = Type.GetType("Mono.Runtime");

            if (type != null)
            {
                CurrentSystem = SystemType.Mono4Upper;

                MethodInfo displayName = type.GetMethod("GetDisplayName", BindingFlags.NonPublic | BindingFlags.Static);
                if (displayName != null)
                {
                    var name = displayName.Invoke(null, null).ToString();
                    Console.WriteLine("Current mono version = {0}", name);
                    if (name.Length > 1 && Char.IsDigit(name[0]) && int.Parse(name[0].ToString()) <= 3)
                    {
                        CurrentSystem = SystemType.Mono3Lower;
                    }
                    if (name.Length > 1 && Char.IsDigit(name[0]) && int.Parse(name[0].ToString()) >= 6)
                    {
                        CurrentSystem = SystemType.Mono6Upper;
                    }
                }
            }
        }
Exemple #23
0
        private static string GetEnumName(SystemType st)
        {
            switch (st.Code)
            {
            case SystemTypeCode.Int8:
                return("EnumI1");

            case SystemTypeCode.UInt8:
                return("EnumU1");

            case SystemTypeCode.Int16:
                return("EnumI2");

            case SystemTypeCode.UInt16:
                return("EnumU2");

            case SystemTypeCode.Int32:
                return("EnumI4");

            case SystemTypeCode.UInt32:
                return("EnumU4");

            case SystemTypeCode.Int64:
                return("EnumI8");

            case SystemTypeCode.UInt64:
                return("EnumU8");

            default:
                throw new ArgumentOutOfRangeException("st", "invalid enum value type");
            }
        }
        protected Agent(SystemType systemType, IEnumerable <string> agentComments, string revision = "")
        {
            AgentCommentsList = agentComments.ToList();
            var systemFactory = new SystemFactory();

            SystemDescription = systemFactory.CreateSystem(systemType, revision);
        }
Exemple #25
0
 /// <summary>
 /// A purchasable module.
 /// </summary>
 /// <param name="name">Module name.</param>
 /// <param name="cost">Cost in Codepoints</param>
 /// <param name="description">Module description</param>
 /// <param name="type">Module type.</param>
 public FutureModule(string name, int cost, string description, SystemType type)
 {
     Name        = name;
     Description = description;
     Type        = type;
     Cost        = cost;
 }
    public static bool TestConnection(SystemType SysType)
    {
        GetConnectionString(SysType);

        using (OracleConnection myConnection = new OracleConnection(strConn))
        {
            try
            {
                myConnection.Open();
                myConnection.Close();
                return(true);
            }
            catch (Exception err)
            {
                throw err;
                //myConnection.Close();
                //myConnection.Dispose();
                //return false;
            }
            finally
            {
                myConnection.Close();
                myConnection.Dispose();
            }
        }
    }
    private static String GetConnectionString(SystemType SysType)
    {
        switch (SysType)
        {
        case SystemType.MES:
            strConn = strMESConn;
            break;

        case SystemType.EPR:
            strConn = strERPConn;
            break;

        case SystemType.PLM:
            strConn = strPLMConn;
            break;

        case SystemType.RMA:
            strConn = strRMAConn;
            break;

        case SystemType.VALOR:
            strConn = strVALORConn;
            break;

        case SystemType.Other:
            strConn = strOtherConn;
            break;

        default:
            strConn = String.Empty;
            break;
        }
        return(strConn);
    }
 void Awake()
 {
     expBool                = flrBool = false;
     systemType             = SystemType.None;
     savedSystemType        = SystemType.None;
     particleSystems        = Resources.LoadAll("Explosions", typeof(GameObject));
     loadFlareSystems       = Resources.LoadAll("Flares", typeof(GameObject));
     loadDirectionalSystems = Resources.LoadAll("Directional", typeof(GameObject));
     flareSystems           = new List <FlareSystem>();
     directionalSystems     = new List <FlareSystem>();
     foreach (Object obj in loadFlareSystems)
     {
         FlareSystem thisFlareSystem = new FlareSystem();
         thisFlareSystem.name            = obj.name;
         thisFlareSystem.particleObject  = Instantiate(obj, Vector3.zero, Quaternion.identity) as GameObject;
         thisFlareSystem.particleSystems = thisFlareSystem.particleObject.GetComponentsInChildren <ParticleSystem>();
         thisFlareSystem.particleObject.SetActiveRecursively(false);
         thisFlareSystem.toggleFlag = false;
         thisFlareSystem.particleObject.transform.parent = this.transform;
         flareSystems.Add(thisFlareSystem);
     }
     foreach (Object obj in loadDirectionalSystems)
     {
         FlareSystem thisFlareSystem = new FlareSystem();
         thisFlareSystem.name            = obj.name;
         thisFlareSystem.particleObject  = Instantiate(obj, Vector3.zero, Quaternion.identity) as GameObject;
         thisFlareSystem.particleSystems = thisFlareSystem.particleObject.GetComponentsInChildren <ParticleSystem>();
         thisFlareSystem.particleObject.SetActiveRecursively(false);
         thisFlareSystem.toggleFlag = false;
         thisFlareSystem.particleObject.transform.parent = this.transform;
         directionalSystems.Add(thisFlareSystem);
     }
 }
        //取系统的功能模块
        public List <string> GetListBizLogModel(string systemCode)
        {
            List <string> getList = new List <string>()
            {
            };

            SystemType stType = SystemType.LMS;

            if (systemCode == "S010")            //运费
            {
                stType = SystemType.LIS;
            }
            List <BizLogModel> listBizLogModel = _operateLogServices.ShowBizLogInfomation(new BizLog()
            {
                SystemCode = stType
            });

            foreach (var bizLogModel in listBizLogModel)
            {
                if (bizLogModel.ModuleName == "BizLog日志系统")
                {
                    continue;
                }
                if (!getList.Contains(bizLogModel.ModuleName))
                {
                    getList.Add(bizLogModel.ModuleName);
                }
            }

            return(getList);
        }
Exemple #30
0
 private void DrawSystemSort(SystemSort sort, SystemType systemType)
 {
     GUILayoutExtension.HorizontalGroup(() =>
     {
         EditorGUILayout.LabelField(sort.typeName);
         MiscHelper.Btn("Up", 50, 35, () =>
         {
             sort.sort--;
             UpdateSystemSort();
         });
         MiscHelper.Btn("Down", 50, 35, () =>
         {
             sort.sort++;
             UpdateSystemSort();
         });
         MiscHelper.Btn("Del", 50, 35, () =>
         {
             sortAsset.GetSystemSorts(systemType).Remove(sort);
             UpdateSystemSort();
         });
         MiscHelper.Dropdown(systemType.ToString(), systemTyps, (int x) =>
         {
             SystemType newType = (SystemType)x;
             if (newType == systemType)
             {
                 return;
             }
             sortAsset.GetSystemSorts(systemType).Remove(sort);
             sortAsset.GetSystemSorts(newType).Add(sort);
             UpdateSystemSort();
         });
     });
 }
Exemple #31
0
        public static unsafe bool BindToService(
            ProcessHandle handle,
            SystemType impType,
            SystemType expType,
            char *contractChars,
            int contractLen,
            int startState,
            int index)
        {
            //convert contract to string
            if (contractLen == 0)
            {
                return(false);
            }
            Process process  = HandleTable.GetHandle(handle.id) as Process;
            string  contract = String.StringCTOR(contractChars, 0, contractLen);

            if (contract == null)
            {
                return(false);
            }

            return(Binder.BindToService(process,
                                        impType,
                                        expType,
                                        contract,
                                        startState,
                                        index));
        }
 public RequestContext(Guid requestId, DeviceTypes fromDevice, string fromIpAddress, string osVersion, SystemType system)
 {
     RequestId = requestId;
     FromDeviceType = fromDevice;
     FromIpAddress = fromIpAddress;
     OsVersion = osVersion;
     System = system;
 }
Exemple #33
0
      /// <summary>
      /// Primary Constructor (Set Queue)
      /// </summary>
      /// <param name="q">Queue Structure</param>
      internal QueueData(Data q)
      {
         _q = q;

         // determine system type based on the version field
         if (IsBigEndian(_q.Version))
         {
            _system = SystemType.PPC;
         }
      }
        public DataAccess(SystemType type)
        {
            SiteConfigurationElement connectionString = AppConfiguration.Current.GetConnectionString(type);
            if (connectionString == null) throw new System.Exception(string.Format("No connection string found for {0}", this.SystemType));

            this._Database = new Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase(connectionString.Value);
            //this._Database = DatabaseFactory.CreateDatabase(connectionString.Value);
            this._ExecutionTimeout = connectionString.ExecutionTimeout;
            this.SystemType = type;
        }
 public VoiceroidInfo(VoiceroidType Type, SystemType SystemType, string VoiceroidTitle, string SaveWindowTitle,
     UInt32 Interval, int EditBoxIndex,int PlayButtonIndex, int OpenSaveWindowIndex, int AddressToolbarIndex,
     int FileNameTextBoxIndex, int SaveButtonIndex)
 {
     this.Type = Type;
     this.SType = SystemType;
     this.VoiceroidTitle = VoiceroidTitle;
     this.SaveWindowTitle = SaveWindowTitle;
     this.Interval = Interval;
     this.EditBoxIndex = EditBoxIndex;
     this.PlayButtonIndex = PlayButtonIndex;
     this.OpenSaveWindowIndex = OpenSaveWindowIndex;
     this.AddressToolbarIndex = AddressToolbarIndex;
     this.FileNameTextBoxIndex = FileNameTextBoxIndex;
     this.SaveButtonIndex = SaveButtonIndex;
 }
        /// <summary>
        /// Creates a new LobSystem object and adds it to the Business Data 
        /// Connectivity Service.
        /// </summary>
        /// <param name="name"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        public static LobSystem CreateLobSystem(string name, SystemType type)
        {
            SPWeb web = SPContext.Current.Web;
            BdcService service = SPFarm.Local.Services.GetValue<BdcService>(String.Empty);
            SPServiceContext context = SPServiceContext.GetContext(web.Site);

            LobSystemCollection availableLobSystems = service.GetAdministrationMetadataCatalog(context).GetLobSystems("*");

            foreach (var lobSystem in availableLobSystems)
            {
                if (lobSystem.Name == name && lobSystem.SystemType == type)
                {
                    return lobSystem;
                }
            }

            // if no LobSystem was found, create a new one and return it
            return availableLobSystems.Create(name, true, type);
        }
Exemple #37
0
    static SystemUtils()
    {
      CurrentSystem = SystemType.Windows;

      Type type = Type.GetType("Mono.Runtime");
      if (type != null)
      {
        CurrentSystem = SystemType.Mono4Upper;

        MethodInfo displayName = type.GetMethod("GetDisplayName", BindingFlags.NonPublic | BindingFlags.Static);
        if (displayName != null)
        {
          var name = displayName.Invoke(null, null).ToString();
          //Console.WriteLine("Current mono version = {0}", name);
          if (name.Length > 1 && Char.IsDigit(name[0]) && int.Parse(name[0].ToString()) <= 3)
          {
            CurrentSystem = SystemType.Mono3Lower;
          }
        }
      }
    }
 public void SetRequestMetadata(DeviceTypes deviceType, SystemType systemType, string fromIpAddress)
 {
     FromIpAddress = fromIpAddress;
     DeviceType = deviceType;
     SystemType = systemType;
 }
        /// <summary>
        /// 向服务注册
        /// </summary>
        private bool RegisterToServer(SystemType sysType)
        {
            bool res = false;
            if (sysType == SystemType.Synchronized)
            {
                res = ((LCTServerMessageProxy)_proxy).Register(SERVER_FORM_NAME, out _serverVersion);
            }
            else if (sysType == SystemType.TestSystem)
            {
                //res = ((LCTServerProxyTest)_proxy).Register(SERVER_FORM_NAME, out _serverVersion);
            }
            if (!res)
            {
                _globalParams.IsDemoMode = true;
            }
            else
            {
                OnEquipmentChangeEvent(null, null);
            }

            CompletedStartUp();
            return res;
        }
        /// <summary>
        /// 订单支付
        /// </summary>
        /// <param name="sType"></param>
        /// <param name="userId"></param>
        /// <param name="uid"></param>
        /// <param name="oCode"></param>
        /// <param name="payId"></param>
        /// <returns></returns>
        public static MResult<string> OrderPayment(SystemType sType, int userId, string uid, string oCode, int payId)
        {
            var result = new MResult<string>();

            try
            {
                if (userId > 0 && !string.IsNullOrEmpty(oCode) && payId > 0)
                {
                    var orderDal = DALFactory.Order();
                    var baseDataDal = DALFactory.BaseData();
                    var memberDal = DALFactory.Member();

                    var memberInfo = memberDal.GetMemberInfo(userId);
                    #region 验证用户id
                    if (memberInfo == null || memberInfo.membNo <= 0)
                    {
                        result.status = Core.Enums.MResultStatus.LogicError;
                        result.msg = "用户不存在!";
                        return result;
                    }
                    #endregion

                    var orderInfo = orderDal.GetOrderInfo(oCode);
                    //订单编码正确
                    if (orderInfo != null && orderInfo.orderNo > 0)
                    {
                        #region 验证订单创建用户
                        if (orderInfo.userCode != memberInfo.userCode)
                        {
                            result.status = Core.Enums.MResultStatus.LogicError;
                            result.msg = "该订单不属于次用户!";
                            return result;
                        }
                        #endregion

                        #region 验正 订单状态
                        if (orderInfo.flowStatus < 0)
                        {
                            result.status = Core.Enums.MResultStatus.LogicError;
                            result.msg = "订单状态错误!";
                            return result;
                        }
                        #endregion

                        #region 验证 订单支付状态
                        if (orderInfo.payStatus != 0)
                        {
                            result.status = Core.Enums.MResultStatus.LogicError;
                            result.msg = "订单支付状态错误!";
                            return result;
                        }
                        #endregion

                        var payInfo = baseDataDal.GetPaymentInfo(payId);

                        #region 验证支付信息
                        if (payInfo == null)
                        {
                            result.status = Core.Enums.MResultStatus.LogicError;
                            result.msg = "支付方式错误!";
                            return result;
                        }
                        #endregion

                        var payCofnig = new PayConfigs()
                                            {
                                                OutTradeNo = string.Format("{0}-{1}", orderInfo.orderCode, orderInfo.userCode),
                                                OutUser = memberInfo.email,
                                                Subject = "母婴之家订单支付",
                                                RequestIdentity = string.Format("{0}_{1}", orderInfo.userCode, memberInfo.email),
                                                //TotalFee = MCvHelper.To(orderInfo.shouldPay, "0.00")
                                                //TODO: 测试支付的时候请取消注视
                                                TotalFee = MCvHelper.To("0.01", "0.00")
                                            };

                        switch (payInfo.intPayID)
                        {
                            #region 支付宝(手机)支付
                            case 20049:
                                {
                                    var paymentManage = new AlipayWapPayment(payCofnig);
                                    result.info = paymentManage.Init().CreateRequestUrl();
                                    result.status = Core.Enums.MResultStatus.Success;
                                    break;
                                }
                            #endregion

                            #region 默认值
                            default:
                                result.status = Core.Enums.MResultStatus.LogicError;
                                result.msg = "该支付方式wcf 不支持! 请联系客服!";
                                break;
                            #endregion
                        }

                    }
                    else
                    {
                        result.status = Core.Enums.MResultStatus.LogicError;
                        result.msg = "订单编码错误!";
                    }
                }
                else
                {
                    result.status = Core.Enums.MResultStatus.ParamsError;
                    result.msg = "参数错误!";
                }
            }
            catch (Exception)
            {
                result.status = Core.Enums.MResultStatus.ExceptionError;
                result.msg = "订单支付 执行出现异常!";
            }

            return result;
        }
Exemple #41
0
        /// <summary>
        /// ��ȡһ��Web.config�ڵ��ֵ
        /// </summary>
        /// <param name="strKey">�ڵ��key</param>
        /// <returns></returns>
        public static string Read(string strKey, SystemType type)
        {
            _oConfigReader = CreateReader(type);

            return _oConfigReader.Read(strKey);
        }
            internal void ResolveTypes(SdlParser parser)
            {
                Util.Log("URTComplexType.ResolveTypes "+Name+" _baseTypeName "+_baseTypeName+" IsSUDSType "+IsSUDSType);
                String baseTypeNS = null;
                String baseTypeAssemName = null;
                if(_baseTypeName != null)
                {
                    Util.Log("URTComplexType.ResolveTypes 1 ");
                    UrtType urtType = parser.IsURTExportedType(_baseTypeXmlNS, out baseTypeNS, out baseTypeAssemName);
                    if ((urtType == UrtType.Interop) && baseTypeNS.StartsWith("System"))
                    {
                        _baseType = new SystemType(_baseTypeName, baseTypeNS, baseTypeAssemName);
                    }
                    else
                    {
                        URTNamespace ns = parser.LookupNamespace(_baseTypeXmlNS);
                        if(ns == null)
                        {
                            throw new SUDSParserException(
                                String.Format(CoreChannel.GetResourceString("Remoting_Suds_CantResolveSchemaNS"),
                                              _baseTypeXmlNS));
                        }
                        _baseType = ns.LookupComplexType(_baseTypeName);
                        if(_baseType == null)
                        {
                            throw new SUDSParserException(
                                String.Format(CoreChannel.GetResourceString("Remoting_Suds_CantResolveTypeInNS"),
                                              _baseTypeName, _baseTypeXmlNS));
                        }
                    }
                }
                else if(IsSUDSType)
                {
                    Util.Log("URTComplexType.ResolveTypes 2 SUDSType "+ ((Enum)_sudsType).ToString());                  
                    if (_sudsType == SUDSType.ClientProxy)
                    {
                        Util.Log("URTComplexType.ResolveTypes 3 ");                     
                        _baseTypeName = "RemotingClientProxy";
                        _baseTypeXmlNS = SoapServices.CodeXmlNamespaceForClrTypeNamespace("System.Runtime.Remoting","System.Runtime.Remoting");
                        baseTypeNS = "System.Runtime.Remoting.Services";
                        baseTypeAssemName = "System.Runtime.Remoting";
                    }
                    else if (_sudsType == SUDSType.MarshalByRef)
                    {
                        Util.Log("URTComplexType.ResolveTypes 4 ");                                             
                        _baseTypeName = "MarshalByRefObject";
                        _baseTypeXmlNS = SoapServices.CodeXmlNamespaceForClrTypeNamespace("System", null);
                        baseTypeNS = "System";
                        baseTypeAssemName = null;
                    }
                    _baseType = new SystemType(_baseTypeName, baseTypeNS, baseTypeAssemName);
                }
                else
                {
                    Util.Log("URTComplexType.ResolveTypes 5 ");                                         
                    _baseType = new SystemType("Object", "System", null);
                }
                for(int i=0;i<_implIFaceNames.Count;i=i+2)
                {
                    String implIFaceName = (String) _implIFaceNames[i];
                    String implIFaceXmlNS = (String) _implIFaceNames[i+1];
                    String implIFaceNS, implIFaceAssemName;
                    BaseInterface iFace;


                    UrtType iType = parser.IsURTExportedType(implIFaceXmlNS, out implIFaceNS,
                                                         out implIFaceAssemName);

                    if ((iType == UrtType.UrtSystem) && implIFaceNS.StartsWith("System"))
                    {
                        iFace = new SystemInterface(implIFaceName, implIFaceNS);
                    }
                    else
                    {
                        URTNamespace ns = parser.LookupNamespace(implIFaceXmlNS);
                        if(ns == null)
                        {
                            throw new SUDSParserException(
                                String.Format(CoreChannel.GetResourceString("Remoting_Suds_CantResolveSchemaNS"),
                                              implIFaceXmlNS));
                        }
                        iFace = ns.LookupInterface(implIFaceName);
                        if(iFace == null)
                        {
                            throw new SUDSParserException(
                                String.Format(CoreChannel.GetResourceString("Remoting_Suds_CantResolveTypeInNS"),
                                              implIFaceName, implIFaceXmlNS));
                        }
                    }
                    _implIFaces.Add(iFace);
                }
                for(int i=0;i<_methods.Count;i++)
                    ((URTMethod) _methods[i]).ResolveTypes(parser);
            }
Exemple #43
0
 public void remove(SystemType systemType)
 {
     remove(getSystem(systemType));
     Logger.log(string.Format("Removed {0} system from SystemManager.", systemType));
 }
 public string GetTransactionPage(SystemType systemType)
 {
     Configuration.System system = this._SystemConfiguration.Systems[systemType];
     if (system == null) return string.Empty; else return this.GetConnectionStringValue(system.ConnectionStringSystemType);
 }
        public List<IDataProvider> ExecuteWithCarId(IEntryPoint entryPoint, Guid userId, string userName,
            string firstName, Guid requestId, string accountNumber, Guid contractId,
            long contractVersion, DeviceTypes fromDevice, string fromIpAddress, string osVersion, SystemType system,
            IEnumerable<RequestFieldDto> requestFieldsDtos, double packageCostPrice, double packageRecommendedPrice, bool hasConsent)
        {
            this.Info(() => "Form LACE Request Initialized for {0}, TimeStamp: {1}".FormatWith(requestId, DateTime.UtcNow));
            var request = FormLaceRequest(userId, userName, firstName, requestId, accountNumber, contractId,
                contractVersion, fromDevice, fromIpAddress, osVersion, system, requestFieldsDtos, packageCostPrice, packageRecommendedPrice,
                hasConsent);
            this.Info(() => "Form LACE Request Completed for {0}, TimeStamp: {1}".FormatWith(requestId, DateTime.UtcNow));

            if (request == null)
                throw new LightstoneAutoException(string.Format("Request cannot be built to Contract with Id {0}", contractId));

            this.Info(() => "EntryPoint Get LACE Response Initialized for {0}, TimeStamp: {1}".FormatWith(requestId, DateTime.UtcNow));
            var responses = entryPoint.GetResponsesForCarId(new[] {request});
            this.Info(() => "EntryPoint Get LACE Response Completed for {0}, TimeStamp: {1}".FormatWith(requestId, DateTime.UtcNow));

            return MapLaceResponses(responses, requestId).ToList();
        }
        private IPointToLaceRequest FormLaceRequest(Guid userId, string userName, string firstName, Guid requestId, string accountNumber,
            Guid contractId, long contractVersion, DeviceTypes fromDevice, string fromIpAddress, string osVersion, SystemType system,
            IEnumerable<RequestFieldDto> requestFieldsDtos, double packageCostPrice, double packageRecommendedPrice, bool hasConsent)
        {
            if (DataProviders == null)
                return null;

            var dataProviders = DataProviders;
            if (!hasConsent)
                dataProviders = DataProviders.Where(dp => !dp.RequiresConsent);

            dataProviders = dataProviders.Where(fld => fld.DataFields.Filter(x => x.IsSelected == true).Any());
            var laceProviders = new List<IAmDataProvider>();
            var fields = Mapper.Map<IEnumerable<RequestFieldDto>, IEnumerable<DataField>>(requestFieldsDtos);

            var user = new User(userId, userName, firstName);
            var requestTypes = new RequestTypeBuilder();

            foreach (var dataProvider in dataProviders.ToList())
            {
                //var selectedfields = dataProvider.RequestFields.Filter(x => x.IsSelected == true); // todo: Validate & compare to api request fields 
                var requestFields = Mapper.Map<IEnumerable<IDataField>, IEnumerable<IAmRequestField>>(fields);
                laceProviders.Add(new LaceDataProvider(dataProvider.Name, requestFields, dataProvider.CostOfSale, RecommendedSalePrice, user, Name,requestTypes));
            }

            var request = new LaceRequest(
                user,
                new Contract(contractVersion, accountNumber, contractId),
                new RequestPackage(laceProviders.ToArray(), Id, Name, (long) DisplayVersion, packageCostPrice, packageRecommendedPrice),
                new RequestContext(requestId, fromDevice, fromIpAddress, osVersion, system),
                DateTime.UtcNow);

            return request;
        }
Exemple #47
0
        // *********************************************************************
        //  LoadValuesFromConfigurationXml
        //
        /// <summary>
        /// Loads the forums configuration values.
        /// </summary>
        /// <param name="node">XmlNode of the configuration section to parse.</param>
        /// 
        // ***********************************************************************/
        internal void LoadValuesFromConfigurationXml()
        {
            XmlNode node = GetConfigSection("CommunityServer/Core");

            XmlAttributeCollection attributeCollection = node.Attributes;

            // Get the default language
            //

            XmlAttribute att = attributeCollection["defaultLanguage"];
            if(att != null)
                defaultLanguage =att.Value;
            else
                defaultLanguage = "en-US";

            att = attributeCollection["filesPath"];
            if(att != null)
                filesPath = att.Value;
            else
                filesPath = "/";

            att = attributeCollection["applicationKeyOverride"];
            if(att != null)
                applicationKeyOverride = att.Value;

            att = attributeCollection["disableThreading"];
            if(att != null)
                disableBackgroundThreads = bool.Parse(att.Value);

            att = attributeCollection["disableIndexing"];
            if(att != null)
                disableIndexing = bool.Parse(att.Value);

            att = attributeCollection["cacheFactor"];
            if(att != null)
                cacheFactor = Int32.Parse(att.Value);
            else
                cacheFactor = 5;

            att = attributeCollection["disableEmail"];
            if(att != null)
                disableEmail = bool.Parse(att.Value);

            att = attributeCollection["smtpServerConnectionLimit"];
            if(att != null)
                smtpServerConnectionLimit = short.Parse(att.Value);
            else
                smtpServerConnectionLimit = -1;

            att = attributeCollection["enableLatestVersionCheck"];
            if(att != null)
                enableLatestVersionCheck = bool.Parse(att.Value);

            att = attributeCollection["backwardsCompatiblePasswords"];
            if(att != null)
                backwardsCompatiblePasswords = bool.Parse(att.Value);

            att = attributeCollection["textEditorType"];
            if(att != null)
                textEditorType = att.Value;
            else
                textEditorType =  "CommunityServer.Controls.DefaultTextEditor,CommunityServer.Controls";

            att = attributeCollection["applicationOverride"];
            if(att != null)
                applicationOverride = att.Value;
            else
                applicationOverride = null;

            att = attributeCollection["systemType"];
            if(att != null)
                systemType =  (SystemType)Enum.Parse(typeof(SystemType),attributeCollection["systemType"].Value);
            else
                systemType = SystemType.Self;

            att = attributeCollection["wwwStatus"];
            if(att != null)
                _wwwStatus = (WWWStatus)Enum.Parse(typeof(WWWStatus),attributeCollection["wwwStatus"].Value);

            // ��ȡĬ�ϸ������淽ʽ
            //
            att = attributeCollection["AttachmentSaveMode"];
            if(att != null)
            {
                try
                {
                    attachmentSaveMode = (FileSaveMode)Enum.Parse(typeof(FileSaveMode), attributeCollection["AttachmentSaveMode"].Value);
                }
                catch{}
            }

            // ��ȡĬ�ϸ������淽ʽ
            //
            att = attributeCollection["AvatarSaveMode"];
            if(att != null)
            {
                try
                {
                    avatarSaveMode = (FileSaveMode)Enum.Parse(typeof(FileSaveMode), attributeCollection["AvatarSaveMode"].Value);
                }
                catch{}
            }

            // ��ȡ��������·��
            //
            att = attributeCollection["AttachmentsPath"];
            if(att != null)
                attachmentsPath = att.Value;

            // ��ȡͷ�񱣴�·��
            //
            att = attributeCollection["AvatarsPath"];
            if(att != null)
                avatarsPath = att.Value;

            att = attributeCollection["requireSSL"];
            if(att != null)
                requireSSL = bool.Parse(att.Value);

            XmlAttribute roles = attributeCollection["defaultRoles"];
            if(roles != null)
            {
                _defaultRoles = roles.Value.Split(';');
            }

            // Read child nodes
            //
            foreach (XmlNode child in node.ChildNodes)
            {

                if (child.Name == "providers")
                    GetProviders(child, providers);

                if(child.Name == "appLocation")
                    GetAppLocation(child);

                if (child.Name == "extensionModules")
                    GetProviders(child, extensions);

                if(child.Name == "roleConfiguration")
                    GetRoleConfiguration(child);

            }

            //if we do not have an application, create the default one
            if(app == null)
            {
                app = AppLocation.Default();
            }

            if(roleConfiguration == null)
            {
                roleConfiguration = new RolesConfiguration();
            }
        }
Exemple #48
0
 public SysPacket(string sender, string message, SystemType type)
 {
     this.type = PacketType.SYSTEM;
     this.sender = sender;
     this.message = message;
     this.sysType = type;
 }
Exemple #49
0
        /// <summary>
        /// �жϽڵ��Ƿ����
        /// </summary>
        /// <param name="strKey">�ڵ��key</param>
        /// <returns></returns>
        public static bool IsExist(string strKey, SystemType type)
        {
            _oConfigReader = CreateReader(type);

            return _oConfigReader.IsExist(strKey);
        }
Exemple #50
0
 public ISystem getSystem(SystemType type)
 {
     SystemNode current = _head;
     while (current != null)
     {
         if (current.system.systemType == type)
         {
             return current.system;
         }
         current = current.next;
     }
     return null;
 }
Exemple #51
0
 public bool exists(SystemType type)
 {
     return getSystem(type) != null;
 }
 public string GetConnectionStringValue(SystemType systemType)
 {
     SiteConfigurationElement element = this.GetConnectionString(systemType);
     if (element != null) return element.Value; else return string.Empty;
 }
Exemple #53
0
 private void InitSystem(SystemType type)
 {
     CurrentSystemType.Instance = new CurrentSystemType(type);
     PDMainPage.Main.InitLogin();
 }
 public SiteConfigurationElement GetConnectionString(SystemType systemType)
 {
     return this._SystemConfiguration.SystemConnections[Enum.GetName(typeof(SystemType), systemType) + this.ConfigurationName];
 }
Exemple #55
0
            internal void ResolveTypes(WsdlParser parser)
            {
                Util.Log("URTComplexType.ResolveTypes "+Name+" _baseTypeName "+_baseTypeName+" IsSUDSType "+IsSUDSType);
                String baseTypeNS = null;
                String baseTypeAssemName = null;
                if (IsArray())
                {
                    ResolveArray();
                    return;
                }

                if (IsSUDSType)
                {
                    // BaseType == null;
                    if (_sudsType == SUDSType.None)
                    {
                        if (_parser._bWrappedProxy)
                            _sudsType = SUDSType.ClientProxy;
                        else
                            _sudsType = SUDSType.MarshalByRef;
                    }
                }

                if (_baseTypeName != null)
                {
                    Util.Log("URTComplexType.ResolveTypes 1 ");
                    UrtType urtType = parser.IsURTExportedType(_baseTypeXmlNS, out baseTypeNS, out baseTypeAssemName);
                    if (urtType == UrtType.UrtSystem || baseTypeNS.StartsWith("System", StringComparison.Ordinal))
                    {
                        _baseType = new SystemType(_baseTypeName, _baseTypeXmlNS, baseTypeNS, baseTypeAssemName);
                    }
                    else
                    {
                        URTNamespace ns = parser.LookupNamespace(_baseTypeXmlNS);
                        if (ns == null)
                        {
                            throw new SUDSParserException(
                                                         String.Format(CultureInfo.CurrentCulture, CoreChannel.GetResourceString("Remoting_Suds_CantResolveSchemaNS"),
                                                                       _baseTypeXmlNS, _baseTypeName));
                        }
                        _baseType = ns.LookupComplexType(_baseTypeName);
                        if (_baseType == null)
                        {
                            _baseType = new SystemType(_baseTypeName, _baseTypeXmlNS, baseTypeNS, baseTypeAssemName);

                            /*
                            throw new SUDSParserException(
                                                         String.Format(CoreChannel.GetResourceString("Remoting_Suds_CantResolveTypeInNS"),
                                                                       _baseTypeName, _baseTypeXmlNS));
                                                                       */
                        }
                    }
                }
                // Top of inheritance hiearchy for a Wrapped proxy is RemotingClientProxy
                if (IsSUDSType)
                {
                    if (_parser._bWrappedProxy)
                    {

                        if (_baseTypeName == null || _baseType is SystemType)
                        {
                            _baseTypeName = "RemotingClientProxy";
                            //<STRIP>_baseTypeXmlNS = "http://schemas.microsoft.com/urt/NSAssem/System.Runtime.Remoting/System.Runtime.Remoting";</STRIP>
                            _baseTypeXmlNS = SoapServices.CodeXmlNamespaceForClrTypeNamespace("System.Runtime.Remoting","System.Runtime.Remoting");
                            baseTypeNS = "System.Runtime.Remoting.Services";
                            baseTypeAssemName = "System.Runtime.Remoting";
                            _baseType = new SystemType(_baseTypeName, _baseTypeXmlNS, baseTypeNS, baseTypeAssemName);
                        }
                    }
                    else if (_baseTypeName == null)
                    {                       
                        _baseTypeName = "MarshalByRefObject";
                        //<STRIP>_baseTypeXmlNS = "http://schemas.microsoft.com/urt/NS/System";</STRIP>
                        _baseTypeXmlNS = SoapServices.CodeXmlNamespaceForClrTypeNamespace("System", null);
                        baseTypeNS = "System";
                        baseTypeAssemName = null;
                        _baseType = new SystemType(_baseTypeName, _baseTypeXmlNS, baseTypeNS, baseTypeAssemName);                        
                    }                   
                }
                else if (_baseType == null)
                {
                    Util.Log("URTComplexType.ResolveTypes 5 ");                                         
                    _baseType = new SystemType("Object", SoapServices.CodeXmlNamespaceForClrTypeNamespace("System", null), "System", null);
                }
                for (int i=0;i<_implIFaceNames.Count;i=i+2)
                {
                    String implIFaceName = (String) _implIFaceNames[i];
                    String implIFaceXmlNS = (String) _implIFaceNames[i+1];
                    String implIFaceNS, implIFaceAssemName;
                    BaseInterface iFace;


                    UrtType iType = parser.IsURTExportedType(implIFaceXmlNS, out implIFaceNS,
                                                             out implIFaceAssemName);

                    if (iType == UrtType.UrtSystem)// && implIFaceNS.StartsWith("System", StringComparison.Ordinal))
                    {
                        iFace = new SystemInterface(implIFaceName, implIFaceXmlNS, implIFaceNS, parser, implIFaceAssemName);
                    }
                    else
                    {
                        URTNamespace ns = parser.LookupNamespace(implIFaceXmlNS);
                        if (ns == null)
                        {
                            throw new SUDSParserException(
                                                         String.Format(CultureInfo.CurrentCulture, CoreChannel.GetResourceString("Remoting_Suds_CantResolveSchemaNS"),
                                                                       implIFaceXmlNS, implIFaceName));
                        }
                        iFace = ns.LookupInterface(implIFaceName);
                        if (iFace == null)
                        {
                            throw new SUDSParserException(
                                                         String.Format(CultureInfo.CurrentCulture, CoreChannel.GetResourceString("Remoting_Suds_CantResolveTypeInNS"),
                                                                       implIFaceName, implIFaceXmlNS));
                        }
                    }
                    _implIFaces.Add(iFace);
                }
                for (int i=0;i<_methods.Count;i++)
                    ((URTMethod) _methods[i]).ResolveTypes(parser);
            }
Exemple #56
0
 public CurrentSystemType(SystemType type)
 {
     Type = type;
     SystemType = Convert.ToInt32(Type);
 }
Exemple #57
0
        /// <summary>
        /// ��ѯ���нڵ㼯��
        /// </summary>
        /// <returns></returns>
        public static Hashtable Query(SystemType type)
        {
            _oConfigReader = CreateReader(type);

            return _oConfigReader.Query();
        }
 void Update()
 {
     if (systemType != savedSystemType) {
         SetNoFlares ();
         savedSystemType = systemType;
     }
 }
        private void InitalizeServerProxy(SystemType sysType)
        {
            if (_proxy != null)
            {
                TerminateServerProxy();
            }
            if (sysType == SystemType.Synchronized)
            {
                Proxy = new LCTServerMessageProxy();
            }
            else if (sysType == SystemType.TestSystem)
            {
                //Proxy = new LCTServerProxyTest();
            }
            _proxy.Initalize();

            AttachServerEvent(_proxy);

            _globalParams.ServerProxy = _proxy;
        }
 void OnGUI()
 {
     GUILayout.BeginHorizontal ();
     if (GUILayout.Toggle (expBool, "Explosions")) {
         expBool = SetBool();
         systemType = SystemType.Explosions;
     }
     if (GUILayout.Toggle (flrBool, "Flares")) {
         flrBool = SetBool();
         systemType = SystemType.Flares;
     }
     if (GUILayout.Toggle (flmBool, "Flames")) {
         flmBool = SetBool();
         systemType = SystemType.Flames;
     }
     GUILayout.EndHorizontal ();
     GUILayout.Space (20);
     scrollPosition = GUILayout.BeginScrollView (scrollPosition, GUILayout.Width (250), GUILayout.Height (550));
     switch (systemType) {
         case SystemType.Explosions:
             foreach (UnityEngine.GameObject ps in particleSystems) {
                 if (GUILayout.Button (ps.name)) {
                     UnityEngine.GameObject go = Instantiate(ps, Vector3.zero, Quaternion.identity) as UnityEngine.GameObject;
                     Destroy(go, 10);
                 }
             }
         break;
         case SystemType.Flares:
             foreach (FlareSystem fs in flareSystems) {
                 fs.toggleFlag = GUILayout.Toggle (fs.toggleFlag, fs.name);
                 if (fs.toggleFlag != fs.savedToggleFlag) {
     #if UNITY_3_4 || UNITY_3_5
                     fs.particleObject.SetActiveRecursively (fs.toggleFlag);
     #else
                     fs.particleObject.SetActive (fs.toggleFlag);
     #endif
                     if (fs.toggleFlag) {
                         foreach (ParticleSystem pSys in fs.particleSystems) {
                             pSys.Clear ();
                             pSys.Play ();
                         }
                         fs.toggleFlag = SetFlareBool ();
                     }
                     fs.savedToggleFlag = fs.toggleFlag;
                 }
             }
         break;
         case SystemType.Flames:
             foreach (FlareSystem fs in directionalSystems) {
                 fs.toggleFlag = GUILayout.Toggle (fs.toggleFlag, fs.name);
                 if (fs.toggleFlag != fs.savedToggleFlag) {
     #if UNITY_3_4 || UNITY_3_5
                     fs.particleObject.SetActiveRecursively (fs.toggleFlag);
     #else
                     fs.particleObject.SetActive (fs.toggleFlag);
     #endif
                     if (fs.toggleFlag) {
                         foreach (ParticleSystem pSys in fs.particleSystems) {
                             pSys.Clear ();
                             pSys.Play ();
                         }
                         fs.toggleFlag = SetDirBool ();
                     }
                     fs.savedToggleFlag = fs.toggleFlag;
                 }
             }
         break;
     }
     GUILayout.EndScrollView ();
 }