yanchao891012 / wpf_wechat Goto Github PK
View Code? Open in Web Editor NEW模仿微信
模仿微信
BindableRichTextBox 这个类的OnDucumentChanged方法
我采用[PartCreationPolicy(CreationPolicy.NonShared)] 不共享还是有问题
0x00::Login -> ScanQrcode -> CheckScan
return : redirect_url
0x01::code exam [c#]
public object LoginCheck() { if(this.string_0 != null) { string[] strArray = new string[6]; strArray[0] = this.string_7; strArray[1] = this.string_0; strArray[2] = "&tip=0&r="; TimeSpan span =(TimeSpan)(DateTime.Now.ToUniversalTime() - new DateTime(0x7b2, 1, 1)); long totalMilliseconds =(long) span.TotalMilliseconds; strArray[3] = totalMilliseconds.ToString(); strArray[4] = "&_="; span =(TimeSpan)(DateTime.Now.ToUniversalTime() - new DateTime(0x7b2, 1, 1)); strArray[5] =((long) span.TotalMilliseconds).ToString(); byte[] bytes = this.httpService_0.SendGetRequest(string.Concat(strArray)); string str2 = Encoding.UTF8.GetString(bytes); if(str2.Contains("=201")) { string s = str2.Split(new string[] { "'" }, StringSplitOptions.None)[1].Split(new char[] { ',' })[1]; byte[] buffer = Convert.FromBase64String(s); MemoryStream stream = new MemoryStream(buffer, 0, buffer.Length); stream.Write(buffer, 0, buffer.Length); return Image.FromStream(stream); } if(str2.Contains("=200")) { string str3 = str2.Split(new string[] { "\"" }, StringSplitOptions.None)[1]; string domain = CheckData.Getdomain(str3); if(domain.IndexOf("wx2.qq.com") > -1) { this.string_1 = "https://wx2.qq.com/"; this.string_2 = "https://wx2.qq.com"; this.string_4 = "https://file2.wx.qq.com"; this.string_3 = "https://webpush2.weixin.qq.com"; return str3; } if(domain.IndexOf("qq.com") > -1) { this.string_2 = "https://wx.qq.com"; this.string_4 = "https://file.wx.qq.com"; this.string_3 = "https://webpush.weixin.qq.com"; return str3; } if(domain.IndexOf("web1.wechat.com") > -1) { this.string_2 = "https://web.wechat.com"; this.string_4 = "https://file1.wechat.com"; this.string_3 = "https://webpush1.wechat.com"; return str3; } if(domain.IndexOf("web2.wechat.com") > -1) { this.string_2 = "https://web.wechat.com"; this.string_4 = "https://file2.wechat.com"; this.string_3 = "https://webpush2.wechat.com"; return str3; } if(domain.IndexOf("wechat.com") > -1) { this.string_2 = "https://web.wechat.com"; this.string_4 = "https://file.wechat.com"; this.string_3 = "https://webpush.wechat.com"; return str3; } if(domain.IndexOf("web1.wechatapp.com") > -1) { this.string_2 = "https://web.wechatapp.com"; this.string_4 = "https://file1.wechatapp.com"; this.string_3 = "https://webpush1.wechatapp.com"; return str3; } this.string_2 = "https://web.wechatapp.com"; this.string_4 = "https://file.wechatapp.com"; this.string_3 = "https://webpush.wechatapp.com"; return str3; } } return null; }
扫码登录时出现错误。扫码完成后,获取头像异常。此函数报错。
public static ImageSource MemoryToImageSource(MemoryStream ms) { return (ImageSource)(new ImageSourceConverter()).ConvertFrom(ms); }
增加函数
` public static ImageSource MemoryStreamToImageSource(MemoryStream ms)
{
BitmapImage bi = new BitmapImage();
bi.BeginInit();
bi.CreateOptions = BitmapCreateOptions.IgnoreColorProfile;
bi.StreamSource = ms;
bi.EndInit();
return bi ;
}`
继续运行,在绑定头像的地方又报异常,“必须在与 DependencyObject 相同的线程上创建 DependencySource。”
github大神们问下一下,消息的右键菜单要怎么实现
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.