摘要: 如图所示,QT自带的内建标准对话框QFontDialog、QColorDialog、QMessageBox。默认的文字全是英文的。QLineEdit和QTextEdit的右键菜单,默认的文字也全是英文的。 请问,如何可以把文字修改成中文或其他语言文字? 解决方案如下: 简体中文的解决思路是打开Qt安 阅读全文
posted @ 2019-10-08 10:18 搬砖的L先生 阅读(1727) 评论(0) 推荐(0)
摘要: <DataGrid Name="date_grid" Grid.Column="0" ItemsSource="{Binding PortinfoList}" RowHeaderWidth="0" CanUserAddRows="False" AutoGenerateColumns="False"> 阅读全文
posted @ 2019-09-25 14:51 搬砖的L先生 阅读(5020) 评论(0) 推荐(0)
摘要: 方法1:使用左移和右移 int转化为byte[]: public byte[] intToBytes(int value) { byte[] src = new byte[4]; src[3] = (byte)((value >> 24) & 0xFF); src[2] = (byte)((valu 阅读全文
posted @ 2019-09-19 10:03 搬砖的L先生 阅读(22620) 评论(0) 推荐(3)
摘要: string input = "Hello World!"; char[] values = input.ToCharArray(); foreach (char letter in values) { // Get the integral value of the character. int  阅读全文
posted @ 2019-09-17 18:54 搬砖的L先生 阅读(1501) 评论(0) 推荐(0)
摘要: 在WPF应用中,如果遇到多线程的需求时,如果引用WPF控件时会引发异常,异常内容:调用线程无法访问此对象,因为另一个线程拥有该对象。具体如下: 调用代码: ThreadcountThread= new Thread( new ThreadStart(Count)); countThread.Star 阅读全文
posted @ 2019-09-17 09:36 搬砖的L先生 阅读(3007) 评论(0) 推荐(0)
摘要: 两者区别是 Timer在非UI线程跑的,DispatcherTimer是在UI线程跑的, DispatcherTimer 可以直接更新UI Timer必须使用this.Dispatcher.BeginInvoke去更新UI private void DisPatcherTimerMethod() { 阅读全文
posted @ 2019-09-11 09:43 搬砖的L先生 阅读(1076) 评论(0) 推荐(0)
摘要: public Bitmap ChangeImgSize(Image bit, double Multiple) { Bitmap newBitmap = new Bitmap(Convert.ToInt32(bit.Width * Multiple), Convert.ToInt32(bit.Hei 阅读全文
posted @ 2019-08-20 16:40 搬砖的L先生 阅读(995) 评论(0) 推荐(0)
摘要: elementCanvas继承UserControl 声明属性: #region 缩放属性添加 float ratio = 1.0f; public float Ratio { set { ratio = value; Width = width; Height = height; } get => 阅读全文
posted @ 2019-08-16 11:42 搬砖的L先生 阅读(678) 评论(0) 推荐(0)
摘要: 一:申请方式: String ACTION_MANAGE_OVERLAY_PERMISSION = "android.settings.action.MANAGE_OVERLAY_PERMISSION"; Intent intent = new Intent(ACTION_MANAGE_OVERLA 阅读全文
posted @ 2019-08-15 15:12 搬砖的L先生 阅读(2335) 评论(0) 推荐(0)
摘要: public String GetDeviceMAC() { String strMacAddr = null; try { // 获得IpD地址 InetAddress ip = getLocalInetAddress(); byte[] b = NetworkInterface.getByIne 阅读全文
posted @ 2019-08-14 16:07 搬砖的L先生 阅读(1035) 评论(0) 推荐(0)