Пример #1
0
        public void Dial()
        {
            currentlyCalling = dialString.ToString();
            dialString.Remove(0, dialString.Length);

            QsysPotsControllerEvent(this, new QsysEventsArgs(eQscEventIds.PotsControllerDialString, cName, false, 0, string.Empty, null));

            ComponentChangeString dialNumber = new ComponentChangeString();

            dialNumber.Params = new ComponentChangeParamsString();

            dialNumber.Params.Name = cName;

            ComponentSetValueString dialStringSetValue = new ComponentSetValueString();

            dialStringSetValue.Name  = "call_number";
            dialStringSetValue.Value = currentlyCalling;

            dialNumber.Params.Controls = new List <ComponentSetValueString>();
            dialNumber.Params.Controls.Add(dialStringSetValue);

            QsysProcessor.Enqueue(JsonConvert.SerializeObject(dialNumber, Formatting.None, new JsonSerializerSettings {
                NullValueHandling = NullValueHandling.Ignore
            }));

            ComponentChange dial = new ComponentChange();

            dial.Params = new ComponentChangeParams();

            dial.Params.Name = cName;

            ComponentSetValue dialSetValue = new ComponentSetValue();

            dialSetValue.Name  = "call_connect";
            dialSetValue.Value = 1;

            dial.Params.Controls = new List <ComponentSetValue>();
            dial.Params.Controls.Add(dialSetValue);

            QsysProcessor.Enqueue(JsonConvert.SerializeObject(dial, Formatting.None, new JsonSerializerSettings {
                NullValueHandling = NullValueHandling.Ignore
            }));
        }
Пример #2
0
        public void SetDialString(string _dialString)
        {
            ComponentChangeString cc = new ComponentChangeString()
            {
                Params = new ComponentChangeParamsString()
                {
                    Name = this.componentName
                }
            };
            ComponentSetValueString ccv = new ComponentSetValueString {
                Name = "call_number", Value = _dialString
            };

            cc.Params.Controls = new List <ComponentSetValueString>()
            {
                ccv
            };
            this.myCore.SendDebug(string.Format("Component {0} :: SetDialString - {1}", this.componentName));
            this.myCore.Enqueue(JsonConvert.SerializeObject(cc));
        }