public void Execute(TemperatureSincro info)
        {
            Sincro s = new Sincro();

            s.User       = "******";
            s.Time       = DateTime.Now.Ticks;
            s.Type       = Sincro.TYPE_TEMPERATURE;
            s.Serialized = JsonConvert.SerializeObject(info);
            sqliteRepository.AddItem <Sincro>(s);
            Task.Run(() => sincroPendingUseCase.Execute());
        }
Exemplo n.º 2
0
        private bool Exec(Sincro t)
        {
            bool r = false;

            this.TareaComienza(t);
            if (_infoTarea)
            {
                this.TareaInforma(t.Doc);
                r = true;
            }
            return(r);
        }
Exemplo n.º 3
0
        public static TreeNode CrearNodoSincro(Sincro sinc)
        {
            TreeNode n0;
            TreeNode n00;

            n0       = new TreeNode();
            n0.Tag   = sinc;
            n0.Name  = sinc.Nombre;
            n0.Text  = sinc.Descripcion;
            n00      = new TreeNode();
            n00.Tag  = nodosOrdenacion.comandos;
            n00.Name = string.Format("{0}{1}", sinc.Nombre, "SINCCMDS");
            n00.Text = "Comandos";
            foreach (Comando cmd in sinc.Comandos)
            {
                n00.Nodes.Add(CrearNodoComando(cmd));
                n00.Expand();
            }
            n0.Nodes.Add(n00);
            return(n0);
        }
Exemplo n.º 4
0
        private void ReOrdenar(Sincro sinc, int posInicial, int desplazamiento)
        {
            _o.Acciones.RemoveAt(posInicial);
            _o.Acciones.Insert(posInicial + desplazamiento, sinc);
            BindingManagerBase bm = this.lSincro.BindingContext[_o.Acciones];
            CurrencyManager    cm = (CurrencyManager)bm;

            if (cm != null)
            {
                cm.Refresh();
            }
            TreeNode hijo;

            _n.Nodes.Clear();
            foreach (Sincro sncr in _o.Acciones)
            {
                hijo = GUIUtils.CrearNodoSincro(sncr);
                _n.Nodes.Add(hijo);
                _n.Expand();
            }
        }
Exemplo n.º 5
0
        public controlSincro(TreeNode n)
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();

            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //
            ToolTip tt = new ToolTip();

            tt.AutoPopDelay = 5000;
            tt.InitialDelay = 1000;
            tt.ReshowDelay  = 500;
            tt.ShowAlways   = true;
            tt.SetToolTip(this.txDesc, "Presiona 'Esc' para recuperar la descripción inicial");
            tt.SetToolTip(this.txComent, "Presiona 'Esc' para recuperar el comentario inicial");

            _nodo              = n;
            _sinc              = (Sincro)n.Tag;
            this.txDesc.Text   = descInicial = _sinc.Descripcion;
            this.txComent.Text = docInicial = _sinc.Doc;
        }