摘要://输出double[]文件 FileStream fs = new FileStream("D:\\DrawEnergy.txt", FileMode.Create); StreamWriter sw = new StreamWriter(fs); for (int i = 0; i < 1865
阅读全文
摘要:图像旋转 using (Bitmap bitmap = new Bitmap((int)this.img.ActualWidth, (int)this.img.ActualHeight)) { Graphics g = Graphics.FromImage(bitmap); for (int i =
阅读全文
摘要:直接在xaml的cs页面添加上这个方法就ok了。 /// <summary> /// 鼠标拖拽界面 /// </summary> /// <param name="e"></param> protected override void OnMouseLeftButtonDown(MouseButto
阅读全文
摘要:/// <summary> /// 清空文件 /// </summary> /// <param name="strPath"></param> /// <returns></returns> public bool DeleteDir(string strPath) { try { strPath
阅读全文
摘要:1.右击UI层的文件夹选择属性 2.在应用程序/资源/图标和清单 中将ico文件传入,保存 3.再次生成文件,界面上的软件就有图标了。
阅读全文
摘要:1. 两数之和 题目: 给定一个整数数组 nums 和一个整数目标值 target,请你在该数组中找出 和为目标值 target 的那 两个 整数,并返回它们的数组下标。 你可以假设每种输入只会对应一个答案。但是,数组中同一个元素在答案里不能重复出现。 你可以按任意顺序返回答案。 预期: 输入:nu
阅读全文
摘要:预想结果:value为空时,页面不显示时间(空白) / value不为空时,显示时间 写sql语句时,用 DateValue= null 即可。 比如: update 表 set DateValue= null where ID = '01’ 这样,在数据库中时显示NULL,而页面获取到数据后显示空
阅读全文
摘要:1.尽量避免 if (btnNow.Content == "零点") 此类写法。 可以 if (btnNow.Content.ToString().Contains("零点"))
阅读全文