예제 #1
0
        public void Take()
        {
            var rec = new ShareReceiver(Source, Data);

            ShareModule.Register(rec);
            HistoryModule.Insert(Source, Target, "share", rec);
        }
예제 #2
0
        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;
        }
예제 #3
0
        public void Image()
        {
            var buf = Data.GetArray <byte>();

            HistoryModule.Insert(Source, Target, "image", buf);
        }
예제 #4
0
        public void Text()
        {
            var txt = Data.GetValue <string>();

            HistoryModule.Insert(Source, Target, "text", txt);
        }
예제 #5
0
        public void Image()
        {
            var buf = Data.As <byte[]>();

            _ = HistoryModule.Insert(Source, Target, "image", buf);
        }