Esempio n. 1
0
        public void onMachineDownLine(LYLUserMachineInfo machine)
        {
            var findmachine = myMachines.FirstOrDefault(o => o.machineId == machine.machineId);

            if (findmachine != null)
            {
                this.myMachines.Remove(findmachine);
                this.OnPropertyChanged(nameof(this.myMachines));
            }
        }
Esempio n. 2
0
        public void onMachineOnLine(websocketMsgTemp <LYLUserMachineInfo> data)
        {
            LYLUserMachineInfo machine = data.content;
            var findmachine            = myMachines.FirstOrDefault(o => o.machineId == machine.machineId);

            if (findmachine == null)
            {
                this.myMachines.Add(machine);
            }
            else
            {
                findmachine.machinePwd  = machine.machinePwd;
                findmachine.machineName = machine.machineName;
            }
            this.OnPropertyChanged(nameof(this.myMachines));
        }