예제 #1
0
        private void _SendText()
        {
            var str = uiInputBox.Text.TrimEnd(new char[] { '\0', '\r', '\n', '\t', ' ' });

            if (str.Length < 1)
            {
                return;
            }
            uiInputBox.Text = string.Empty;
            PostModule.Text(_profile.Id, str);
            ProfileModule.SetRecent(_profile);
        }
예제 #2
0
        private void _PushImage()
        {
            var ofd = new OpenFileDialog()
            {
                Filter = "位图文件|*.bmp;*.png;*.jpg"
            };

            if (ofd.ShowDialog() != true)
            {
                return;
            }
            try
            {
                var buf = CacheModule.ImageZoom(ofd.FileName);
                PostModule.Image(_profile.Id, buf);
                ProfileModule.SetRecent(_profile);
            }
            catch (Exception ex)
            {
                Log.Error(ex);
                Entrance.ShowError("发送图片失败", ex);
            }
        }