public TransformerFormViewModel(TransformerModel transformer, Action <TransformerFormData> onSubmit)
        {
            this.onSubmit = onSubmit;
            formData      = new TransformerFormData(transformer);

            HandleSubmitCommand = new MyICommand(HandleSubmit);
        }
Exemplo n.º 2
0
        private void UpdateNode(TransformerFormData formData)
        {
            if (formData.Index is null || formData.RegisterType is null)
            {
                Debug.Fail("Index or RegisterType in form is NULL");
                return;
            }
            ;

            SendMessageToScada(new ScadaCommandingEvent()
            {
                Index        = (uint)formData.Index,
                RegisterType = formData.RegisterType.Value,
                Milliseconds = 0,
                Value        = (uint)formData.Value
            });
        }
Exemplo n.º 3
0
        private void UpdateNode(TransformerFormData formData)
        {
            if (formData.Index is null || formData.RegisterType is null)
            {
                Debug.Fail("Index or RegisterType in form is NULL");
                return;
            }
            ;

            var endpoint = EndPointCreator.Instance().Get();
            var command  = new ScadaCommandingEvent()
            {
                Index        = (uint)formData.Index,
                RegisterType = formData.RegisterType.Value,
                Milliseconds = 0,
                Value        = (uint)formData.Value
            };

            endpoint.Publish(command).ConfigureAwait(false);
        }