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; }
private void _Click(object sender, RoutedEventArgs e) { var tag = (e.OriginalSource as Button)?.Tag as string; if (tag == null) { return; } if (tag == "text") { _SendText(); } else if (tag == "image") { _PushImage(); } else if (tag == "clean") { HistoryModule.Clear(_profile.Id); } uiInputBox.Focus(); }
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); }