Exemple #1
0
        public override void GetBasicPropertyValues()
        {
            base.GetBasicPropertyValues();

            ResourceProperty propertyValue;
            int intValue;

            for (int i = 0; i < ListProperties.Count; i++)
            {
                propertyValue = ListProperties[i];
                switch (propertyValue.PropertyID)
                {
                case S1110Consts.PROPERTYID_ENABLEDISABLE:
                    IsEnabled = propertyValue.Value == "1";
                    break;

                case PRO_METHOD:
                    if (int.TryParse(propertyValue.Value, out intValue))
                    {
                        Method    = intValue;
                        StrMethod = intValue.ToString();
                        if (ListAllBasicInfos != null)
                        {
                            var info =
                                ListAllBasicInfos.FirstOrDefault(
                                    b =>
                                    b.InfoID == S1110Consts.SOURCEID_DOWNLOADMETHOD &&
                                    b.Value == Method.ToString());
                            if (info != null)
                            {
                                StrMethod =
                                    CurrentApp.GetLanguageInfo(
                                        string.Format("BID{0}{1}", S1110Consts.SOURCEID_DOWNLOADMETHOD, info.SortID.ToString("000")), info.Icon);
                            }
                        }
                    }
                    break;

                case PRO_VOICEID:
                    if (int.TryParse(propertyValue.Value, out intValue))
                    {
                        VoiceID = intValue;
                    }
                    break;

                case PRO_ADDRESS:
                    Address = propertyValue.Value;
                    break;

                case PRO_ROOTDIR:
                    RootDir = propertyValue.Value;
                    break;
                }
            }

            GetNameAndDescription();
        }
Exemple #2
0
        public override void GetBasicPropertyValues()
        {
            base.GetBasicPropertyValues();

            int intValue;
            ResourceProperty propertyValue;

            for (int i = 0; i < ListProperties.Count; i++)
            {
                propertyValue = ListProperties[i];
                switch (propertyValue.PropertyID)
                {
                //启动方式
                case PRO_STARTTYPE:
                    if (int.TryParse(propertyValue.Value, out intValue))
                    {
                        StartType    = intValue;
                        StrStartType = intValue.ToString();
                        if (ListAllBasicInfos != null)
                        {
                            var info =
                                ListAllBasicInfos.FirstOrDefault(
                                    b => b.InfoID == S1110Consts.SOURCEID_VOICECHANNEL_STARTTYPE && b.Value == intValue.ToString());
                            if (info != null)
                            {
                                StrStartType =
                                    CurrentApp.GetLanguageInfo(
                                        string.Format("BID{0}{1}", S1110Consts.SOURCEID_VOICECHANNEL_STARTTYPE, info.SortID.ToString("000")), info.Icon);
                            }
                        }
                    }
                    if (StartType == 1101 ||
                        StartType == 1102 ||
                        StartType == 1103 ||
                        StartType == 1107 ||
                        StartType == 1108 ||
                        StartType == 1113)
                    {
                        IsVoipChannel = true;
                    }
                    else
                    {
                        IsVoipChannel = false;
                    }
                    break;
                }
            }

            GetNameAndDescription();
        }
Exemple #3
0
        public override void GetNameAndDescription()
        {
            base.GetNameAndDescription();

            string name = string.Format("[{0}] {1}", ID, Number);

            if (ListAllBasicInfos != null)
            {
                BasicInfoData info =
                    ListAllBasicInfos.FirstOrDefault(b => b.InfoID == S1110Consts.SOURCEID_CONCURRENTNUMBER && b.Value == Number.ToString());
                if (info != null)
                {
                    name = string.Format("[{0}] {1}", ID,
                                         CurrentApp.GetLanguageInfo(string.Format("BID{0}{1}", S1110Consts.SOURCEID_CONCURRENTNUMBER, info.SortID.ToString("000")), info.Icon));
                }
            }

            Name        = name;
            Description = name;
        }
Exemple #4
0
        public override void GetNameAndDescription()
        {
            base.GetNameAndDescription();

            Name        = string.Format("[{0}] {1} {2}", ID, CTIType, DeviceName);
            Description = string.Format("{0}({1})", Name, ObjectID);

            if (ListAllBasicInfos == null)
            {
                return;
            }
            BasicInfoData info = ListAllBasicInfos.FirstOrDefault(b => b.InfoID == S1110Consts.SOURCEID_CTITYPE && b.Value == CTIType.ToString());

            if (info == null)
            {
                return;
            }
            Name        = string.Format("[{0}] {1} {2}", ID, CurrentApp.GetLanguageInfo(string.Format("BID{0}{1}", S1110Consts.SOURCEID_CTITYPE, CTIType.ToString("000")), info.Icon), DeviceName);
            Description = string.Format("{0}({1})", Name, ObjectID);
        }
Exemple #5
0
        public override void GetNameAndDescription()
        {
            base.GetNameAndDescription();

            Name        = string.Format("[{0}] [{1}]", ID, CTIType);
            Description = string.Format("{0} {1}", Name, ObjectID);
            if (TypeParam != null)
            {
                Name = string.Format("[{0}] [{1}]", ID,
                                     CurrentApp.GetLanguageInfo(string.Format("OBJ{0}", ObjectType), TypeParam.Description));
                Description = string.Format("{0} {1}", Name, ObjectID);
                if (ListAllBasicInfos != null)
                {
                    BasicInfoData info =
                        ListAllBasicInfos.FirstOrDefault(b => b.InfoID == S1110Consts.SOURCEID_CTITYPE && b.Value == CTIType.ToString());
                    if (info != null)
                    {
                        Name = string.Format("[{0}] {1}", ID,
                                             CurrentApp.GetLanguageInfo(string.Format("BID{0}{1}", S1110Consts.SOURCEID_CTITYPE, info.SortID.ToString("000")), info.Icon));
                        Description = string.Format("{0} {1}", Name, ObjectID);
                    }
                }
            }
        }
Exemple #6
0
        public override void GetBasicPropertyValues()
        {
            base.GetBasicPropertyValues();

            ResourceProperty propertyValue;
            int intValue;

            for (int i = 0; i < ListProperties.Count; i++)
            {
                propertyValue = ListProperties[i];
                switch (propertyValue.PropertyID)
                {
                case PRO_CTITYPE:
                    if (int.TryParse(propertyValue.Value, out intValue))
                    {
                        CTIType = intValue;

                        StrCTIType = CTIType.ToString();
                        if (ListAllBasicInfos != null)
                        {
                            var info =
                                ListAllBasicInfos.FirstOrDefault(
                                    b => b.InfoID == S1110Consts.SOURCEID_CTITYPE && b.Value == CTIType.ToString());
                            if (info != null)
                            {
                                StrCTIType =
                                    CurrentApp.GetLanguageInfo(
                                        string.Format("BID{0}{1}", S1110Consts.SOURCEID_CTITYPE, info.SortID.ToString("000")), info.Icon);
                            }
                        }
                    }
                    break;

                case PRO_DEVICETYPE:
                    if (int.TryParse(propertyValue.Value, out intValue))
                    {
                        DeviceType = intValue;

                        StrDeviceType = DeviceType.ToString();
                        if (ListAllBasicInfos != null)
                        {
                            var info =
                                ListAllBasicInfos.FirstOrDefault(
                                    b => b.InfoID == S1110Consts.SOURCEID_PBX_DEVICETYPE && b.Value == DeviceType.ToString());
                            if (info != null)
                            {
                                StrDeviceType =
                                    CurrentApp.GetLanguageInfo(
                                        string.Format("BID{0}{1}", S1110Consts.SOURCEID_PBX_DEVICETYPE, info.SortID.ToString("000")), info.Icon);
                            }
                        }
                    }
                    break;

                case PRO_MONITORMODE:
                    if (int.TryParse(propertyValue.Value, out intValue))
                    {
                        MonitorMode = intValue;

                        StrMonitorMode = MonitorMode.ToString();
                        if (ListAllBasicInfos != null)
                        {
                            var info =
                                ListAllBasicInfos.FirstOrDefault(
                                    b => b.InfoID == S1110Consts.SOURCEID_PBX_MONITORMODE && b.Value == MonitorMode.ToString());
                            if (info != null)
                            {
                                StrMonitorMode =
                                    CurrentApp.GetLanguageInfo(
                                        string.Format("BID{0}{1}", S1110Consts.SOURCEID_PBX_MONITORMODE, info.SortID.ToString("000")), info.Icon);
                            }
                        }
                    }
                    break;

                case PRO_DEVICENAME:
                    DeviceName = propertyValue.Value;
                    break;
                }
            }

            GetNameAndDescription();
        }
Exemple #7
0
        public override void GetBasicPropertyValues()
        {
            base.GetBasicPropertyValues();

            ResourceProperty propertyValue;
            int intValue;

            for (int i = 0; i < ListProperties.Count; i++)
            {
                propertyValue = ListProperties[i];
                switch (propertyValue.PropertyID)
                {
                case PRO_TYPE:
                    if (int.TryParse(propertyValue.Value, out intValue))
                    {
                        DeviceType = intValue;

                        StrDeviceType = intValue.ToString();
                        if (ListAllBasicInfos != null)
                        {
                            var info =
                                ListAllBasicInfos.FirstOrDefault(
                                    b => b.InfoID == S1110Consts.SOURCEID_STORAGE_DEVICETYPE && b.Value == intValue.ToString());
                            if (info != null)
                            {
                                StrDeviceType =
                                    CurrentApp.GetLanguageInfo(
                                        string.Format("BID{0}{1}", S1110Consts.SOURCEID_STORAGE_DEVICETYPE, info.SortID.ToString("000")), info.Icon);
                            }
                        }
                    }
                    break;

                case PRO_SERVERID:
                    if (int.TryParse(propertyValue.Value, out intValue))
                    {
                        ServerID = intValue;
                        if (DeviceType == 1)
                        {
                            ServerID = -1;
                        }
                        if (ListAllObjects != null)
                        {
                            var machine =
                                ListAllObjects.FirstOrDefault(
                                    m => m.ObjectType == S1110Consts.RESOURCE_MACHINE && m.ID == ServerID) as
                                MachineObject;
                            if (machine != null)
                            {
                                HostAddress = machine.HostAddress;
                            }
                        }
                    }
                    break;

                case PRO_ROOTDIR:
                    RootDir = propertyValue.Value;
                    break;
                }
            }

            GetNameAndDescription();
        }