示例#1
0
 public async Task AddNote(Note note) =>
 await _manager.AddData("Notes",
                        new NoteDb
 {
     Color  = GetStringFromColor(note.Color.Color),
     Id     = note.Id,
     Edited = note.Edited
 });
 private void AddHandlers()
 {
     Server.CommandMessageReceived += EventCommandMessageHandler;
     Server.ConnectMessageReceived += EventConnectMessageHandler;
     Server.RequestReceived        += EventRequestHandler;
     Server.TelemetryReceived      += EventTelemetryHandler;
     Server.ErrorMessageReceived   += EventErrHandler;
     Server.OrderReceived          += EventOrderHandler;
     //TODO валидатор
     ConnectMessageReceived += (o, args) => DbManager.AddDevice(args.ConnectMessage.Device);
     TelemetryReceived      += (o, args) => DbManager.AddData(args.TelemetryInfo);
 }
示例#3
0
 public async Task AddNote(Note note)
 {
     await _manager.AddData("Notes", note);
 }