public void Take() { var rec = new ShareReceiver(Source, Data); ShareModule.Register(rec); HistoryModule.Insert(Source, Target, "share", rec); }
public void Notice() { var typ = Data["type"].As <string>(); var par = Data["parameter"].As <string>(); var str = typ == "share.file" ? $"已成功接收文件 {par}" : typ == "share.dir" ? $"已成功接收文件夹 {par}" : null; if (str == null) { Log.Info($"Unknown notice type: {typ}, parameter: {par}"); } else { _ = HistoryModule.Insert(Source, Target, "notice", str); } return; }
public void Image() { var buf = Data.GetArray <byte>(); HistoryModule.Insert(Source, Target, "image", buf); }
public void Text() { var txt = Data.GetValue <string>(); HistoryModule.Insert(Source, Target, "text", txt); }
public void Image() { var buf = Data.As <byte[]>(); _ = HistoryModule.Insert(Source, Target, "image", buf); }