public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
        {
            List<VDCTerminalAbonentInfo> abonList = GetAbonentList(context);
            if (abonList == null) return null;

            VDCTerminalAbonentInfo[] abonListClone = new VDCTerminalAbonentInfo[abonList.Count+1];
            abonList.CopyTo(abonListClone, 1);

            return new StandardValuesCollection(abonListClone);
        }
Exemplo n.º 2
0
        public void InitializeData(VDCTerminalDeviceDesign device,
            List<VDCTerminalAbonentInfo> abonents,
            VDCTerminalAbonentInfo abonent, string directNumber)
        {
            base.InitializeData();
            List<VDCTerminalAbonentInfo> abnsTemp = new List<VDCTerminalAbonentInfo>();
            abnsTemp.Add(new VDCTerminalAbonentInfo { Name = emptyAbonent, Number1 = emptyAbonent });
            abnsTemp.AddRange(abonents);
            cbaAbonents.DataSource = abnsTemp;
            string abnNumber = abonent != null ? abonent.Number1 : !string.IsNullOrEmpty(directNumber) ? directNumber : emptyAbonent;
            tbeAbobentNumber.Text = abnNumber.Trim();
            cbaAbonents.SelectedValue = abnNumber;

            string incomingCall = device.IncomingCallOwner == null ? null : device.IncomingCallOwner.Number1;
            UpdateView(true, device.ConnectionState, device.StateDescription, device.ErrorDescription,
                incomingCall, device.Privacy, device.DND, device.PeopleConnect, device.PiP, device.AutoResponse);
        }