上一页 1 2 3 4 5 6 ··· 11 下一页
摘要: 原因:点__class__时,漏写了后面两个下划线 if data.__class.__base__ is not Optional: AttributeError: 'WhereOptional' object has no attribute '_Optional__class' 正确: if 阅读全文
posted @ 2020-06-06 02:39 德丽莎·阿波卡利斯 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 原因:内嵌装饰函数没有返回结果 def match_error(func): """2020-06-06 00:29:05 根据数据选择分支""" def _match_error(self, *args, **kwargs): return self.match(lambda x: self, l 阅读全文
posted @ 2020-06-06 02:23 德丽莎·阿波卡利斯 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 原因:new方法没有返回实例,导致创建实例结果为None @staticmethod def __new__(cls, *args, **kwargs): """抽象类""" # 2020-06-05 20:40:13 if cls is __class__: # 2020-06-06 00:57: 阅读全文
posted @ 2020-06-06 02:21 德丽莎·阿波卡利斯 阅读(316) 评论(0) 推荐(0) 编辑
摘要: 1. 画矩形边 public static void DrawRoundRectangle(this Graphics graphics, Pen pen, RectangleF rectangle, float radiusX, float radiusY = 0) { if (radiusY = 阅读全文
posted @ 2019-11-29 15:16 德丽莎·阿波卡利斯 阅读(2562) 评论(0) 推荐(0) 编辑
摘要: 1. 淡入淡出 /// <summary> /// 淡入显示图像 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void button1_Click(object sende 阅读全文
posted @ 2019-11-29 14:52 德丽莎·阿波卡利斯 阅读(860) 评论(0) 推荐(0) 编辑
摘要: 1.图像旋转 private void button1_Click(object sender, EventArgs e) { //以任意角度旋转显示图像 Graphics g = this.panel1.CreateGraphics(); float MyAngle = 0;//旋转的角度 whi 阅读全文
posted @ 2019-11-21 15:57 德丽莎·阿波卡利斯 阅读(691) 评论(0) 推荐(0) 编辑
摘要: app.config 文件操作 public class AppSettingHelper { /// <summary> /// 写入值 /// </summary> /// <param name="key"></param> /// <param name="value"></param> p 阅读全文
posted @ 2019-11-21 15:30 德丽莎·阿波卡利斯 阅读(641) 评论(0) 推荐(0) 编辑
摘要: 在我们的程序和WindowAPI打交道时,特别是在处理鼠标键盘消息时,LPARAM 和 WPARAM 参数会经常出现。 在Win32 API中,LPARAM 和 WPARAM 都是32位,所以在数据类型上没有什么本质的区别。 但是对于不同的WinAPI,LPARAM 与 WPARAM 参数被承载者不 阅读全文
posted @ 2019-11-10 17:33 德丽莎·阿波卡利斯 阅读(360) 评论(0) 推荐(0) 编辑
摘要: 本文链接:https://blog.csdn.net/wletv/article/details/6874530 int lPort; unsafe { // Assign the address of number to a pointer: // int* p= &lPort; fixed (i 阅读全文
posted @ 2019-11-10 11:42 德丽莎·阿波卡利斯 阅读(634) 评论(0) 推荐(0) 编辑
摘要: 不能直接调用Math.Round方法的,这可和Java的不一样哦 Math.Round这个函数的解释是将值按指定的小数位数舍入,并不就是四舍五入。 这种舍入有时称为就近舍入或四舍六入五成双 C# code Math.Round(0.4) //result:0 Math.Round(0.6) //re 阅读全文
posted @ 2019-10-14 17:02 德丽莎·阿波卡利斯 阅读(232) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 11 下一页