コード例 #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
        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();
        }
コード例 #4
0
        public void Image()
        {
            var buf = Data.GetArray <byte>();

            HistoryModule.Insert(Source, Target, "image", buf);
        }
コード例 #5
0
        public void Text()
        {
            var txt = Data.GetValue <string>();

            HistoryModule.Insert(Source, Target, "text", txt);
        }
コード例 #6
0
        public void Image()
        {
            var buf = Data.As <byte[]>();

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