摘要:
using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; public class ChatLinkListener : MonoBehaviour, IPointerClickHandler, IBeginDr 阅读全文
摘要:
平面坐标计算代码 /// 平面坐标系,通过三角函数求终点坐标 /// startPoint(x,y): 起点 /// angle: 角度 /// distance: 距离 /// <returns>终点坐标</returns> function calNewPointByAngle2(startPo 阅读全文
摘要:
后台运行 this.ShowInTaskbar = false;//不在任务栏中显示 this.Visibility = Visibility.Hidden;//不显示窗口 设置右下角托盘 //托盘小图标 NotifyIcon notifyIcon; void icon() { string pat 阅读全文
摘要:
1 1、格式化货币(跟系统的环境有关,中文系统默认格式化人民币,英文系统格式化美元) 2 string.Format("{0:C}",0.2) 结果为:¥0.20 (英文操作系统结果:$0.20) 3 默认格式化小数点后面保留两位小数,如果需要保留一位或者更多,可以指定位数 4 string.For 阅读全文
摘要:
#region 开机自启 /// <summary> /// 开机自启创建 /// </summary> /// <param name="exeName">程序名称</param> /// <returns></returns> public bool StartAutomaticallyCrea 阅读全文
摘要:
XMAL中<Window x:Class="WpfNoScreen.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/ 阅读全文
摘要:
按键 似乎有问题,并没有想象中那么灵敏 if (Application.platform == RuntimePlatform.Android&&Input.GetKeyDown(KeyCode.Escape)) { //返回键 } if (Application.platform == Runti 阅读全文
摘要:
UGUI切换层级 int allCount = this.transform.childCount;//获取当前容器中所有image的数量 _gob.transform.SetSiblingIndex(allCount-1);//count-1指把child物体_gob在当前子物体列表的顺序设置为最 阅读全文
摘要:
报错:尝试读取或写入受保护的内存。这通常指示其他内存已损坏 因为 waveSource是在主线程中生成的,但是waveSource.Dispose();是新建了一个线程调用的,所以此处问题,我是用以下方式解决的 private void Time_Elapsed(object sender, Ela 阅读全文
摘要:
Dispatcher.Invoke( new Action(delegate { textBox.Text+= msg; }) ); System.Windows.Application.Current.Dispatcher.Invoke(new System.Action(() => { IPri 阅读全文