X3

RedSky

导航

上一页 1 2 3 4 5 6 7 8 ··· 10 下一页

2022年10月7日 #

C# Bitmap操作

摘要: 1.透明图片“瘦身” public Bitmap Slim(Bitmap bitmap) { int x = bitmap.Width, y = bitmap.Height, m = -1, n = -1; for (int i = 0; i < bitmap.Width; i++) { for ( 阅读全文

posted @ 2022-10-07 15:59 HotSky 阅读(237) 评论(0) 推荐(0)

2022年8月12日 #

WPF 限制或释放鼠标在窗体内移动

摘要: 123 public class User32 { public struct RECT { public int LeftTopX; public int LeftTopY; public int RightBottomX; public int RightBottomY; public RECT 阅读全文

posted @ 2022-08-12 13:58 HotSky 阅读(165) 评论(0) 推荐(0)

2022年7月21日 #

IOS发布ipa包

摘要: 用苹果电脑打开控制台; 先执行检查: xcrun altool --validate-app -f [ipa文件名] -t ios -u [账号] -p [专用密码] 检查无误后执行: xcrun altool --upload-app -f [ipa文件名] -t ios -u [账号] -p [ 阅读全文

posted @ 2022-07-21 17:05 HotSky 阅读(91) 评论(0) 推荐(0)

2022年6月22日 #

C#解决XML反序列化空格值被忽略的问题

摘要: 解决办法:将XmlReaderSettings的值CheckCharacters = false 如下: using (StreamReader sr = new StreamReader(xmlfilePath)) { var setting = new XmlReaderSettings { C 阅读全文

posted @ 2022-06-22 18:00 HotSky 阅读(452) 评论(0) 推荐(0)

2022年5月26日 #

c#跨线程等待

摘要: 1. ManualResetEvent,AutoResetEvent WaitOne() 当前线程进入等待状态; Reset() 表示需要等待; Set() 表示等待结束,执行WaitOne()后面代码; 区别: 当有多个线程调用WaitOne()时, AutoResetEvent 执行Set()后 阅读全文

posted @ 2022-05-26 11:45 HotSky 阅读(635) 评论(0) 推荐(0)

2022年4月15日 #

Android WebView禁用系统键盘

摘要: 参考:在webView中阻止键盘 | 经验摘录 (1r1g.com) 在父布局中添加: android:descendantFocusability="blocksDescendants" 设置WebView的这两个属性: android:focusable="false" android:focu 阅读全文

posted @ 2022-04-15 17:57 HotSky 阅读(762) 评论(0) 推荐(0)

2022年4月7日 #

Xml序列化和反序列化

摘要: public class XMLHelper { public static string Serialize<T>(T entity, Encoding encoding = null) { StringBuilder sb = new StringBuilder(); XmlSerializer 阅读全文

posted @ 2022-04-07 15:49 HotSky 阅读(50) 评论(0) 推荐(0)

2022年4月1日 #

WPF ImageControl描边图片

摘要: 1 [TemplatePart(Name = "PART_Highlight", Type = typeof(Image))] 2 public class ImageControl : Control 3 { 4 Image HighLightImage = null; 5 6 public bo 阅读全文

posted @ 2022-04-01 16:56 HotSky 阅读(150) 评论(0) 推荐(0)

Bitmap透明图片描边

摘要: 1 public static byte[] ToArray(this Bitmap bitmap) 2 { 3 var lockbits = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height), ImageLockMod 阅读全文

posted @ 2022-04-01 16:53 HotSky 阅读(190) 评论(0) 推荐(0)

2022年3月22日 #

WPF 可缩放ScrollView(方式二)

摘要: 方式一 增加了缩放Maximun、Minimun和Value值,以及可供监听缩放变化的ValueChanged事件。 public class ScaleScrollView : ScrollViewer { readonly List<object> ValueChangedEvents = ne 阅读全文

posted @ 2022-03-22 15:47 HotSky 阅读(462) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 8 ··· 10 下一页