04 2020 档案

摘要:1. 104公约概况 使用tcp协议通信,标准tcp端口号是2404。服务端模拟软件可以使用gitbub上一个模拟器(IEC60870-5-104ServerSimulator.exe)。 2. 104公约数据结构 APCI Application Protocol Control Informat 阅读全文
posted @ 2020-04-26 20:01 灰主流 阅读(4377) 评论(0) 推荐(2) 编辑
摘要:<Window x:Class="WpfApp1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/200 阅读全文
posted @ 2020-04-21 11:06 灰主流 阅读(320) 评论(0) 推荐(0) 编辑
摘要:public partial class MainWindow : Window { private List<int> ShortTicks; private List<int> MiddleTicks; private List<int> LongTicks; private List<stri 阅读全文
posted @ 2020-04-19 20:15 灰主流 阅读(847) 评论(0) 推荐(0) 编辑
摘要:<UserControl x:Class="wpf刻度线.TickBar" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/20 阅读全文
posted @ 2020-04-19 20:10 灰主流 阅读(460) 评论(0) 推荐(0) 编辑
摘要:if (File.Exists(fileName)) { File.Delete(fileName); using (FileStream fs = new FileStream(fileName, FileMode.Create)) { StreamResourceInfo resource = 阅读全文
posted @ 2020-04-19 19:32 灰主流 阅读(447) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Data; using Excel= Microsoft.Office.Interop.Excel; namespace 读写excel { /// <summary> /// MainWindow.xaml 的交互逻辑 /// </summar 阅读全文
posted @ 2020-04-19 19:28 灰主流 阅读(368) 评论(0) 推荐(0) 编辑
摘要:当wpf里设置边框的时候,如果是dynamicResource的话,有时候会不显示。 1.window里定义颜色,这时候不显示 <Window.Resources> <Color x:Key="red" R="255" G="0" B="0" A="255" /> <Color x:Key="blu 阅读全文
posted @ 2020-04-19 19:26 灰主流 阅读(595) 评论(2) 推荐(0) 编辑
摘要:https://files.cnblogs.com/files/chlm/wpf%E5%BC%82%E6%AD%A5%E5%8A%A0%E8%BD%BD5w%E6%8E%A7%E4%BB%B6.rar 阅读全文
posted @ 2020-04-19 19:06 灰主流 阅读(398) 评论(0) 推荐(0) 编辑
摘要:/// <summary> /// 由结构体转换为byte数组 /// </summary> public static byte[] StructureToByte<T>(T structure) { int size = Marshal.SizeOf(typeof(T)); byte[] buf 阅读全文
posted @ 2020-04-19 19:03 灰主流 阅读(2187) 评论(0) 推荐(1) 编辑
摘要:using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Runtime.InteropServices; using System.Text; 阅读全文
posted @ 2020-04-18 20:30 灰主流 阅读(332) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; using System.Text; using Excel = Microsof 阅读全文
posted @ 2020-04-18 20:28 灰主流 阅读(1412) 评论(3) 推荐(0) 编辑
摘要:1.什么时候用到invoke和beginInvoke --当调度线程不是主线程的时候 2.invoke和beginInvoke效率差别 测试方法:使用线程更新图片内容,此时,调度线程和非调度线程不是同一个,要用到封送处理(invoke或beginInvoke) Task.Factory.StartN 阅读全文
posted @ 2020-04-18 20:21 灰主流 阅读(2703) 评论(1) 推荐(1) 编辑
摘要:using System; using System.Drawing; using System.Drawing.Imaging; using System.IO; using System.Reflection; using System.Runtime.InteropServices; usin 阅读全文
posted @ 2020-04-18 19:00 灰主流 阅读(369) 评论(0) 推荐(0) 编辑
摘要:1.截图关键代码 public class ScreenShotHelper : MarshalByRefObject, IScreenShotHelper { public byte[] GetImage() { var wid = Screen.PrimaryScreen.Bounds.Widt 阅读全文
posted @ 2020-04-18 18:17 灰主流 阅读(456) 评论(0) 推荐(0) 编辑
摘要:说明:源码引用于:https://github.com/mrjono1/FastExcel由于,源码不支持在excel中添加特殊符号,故做了改动。改动如下:cell.cs文件的 internal StringBuilder ToXmlString(SharedStrings sharedString 阅读全文
posted @ 2020-04-18 16:01 灰主流 阅读(366) 评论(0) 推荐(0) 编辑
摘要:using iTextSharp.text; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.T 阅读全文
posted @ 2020-04-18 15:57 灰主流 阅读(1928) 评论(0) 推荐(1) 编辑
摘要:Socket s = null; IPEndPoint ipe = new IPEndPoint(IPAddress.Parse("192.168.1.3"), 999); Socket tempSocket = new Socket(ipe.AddressFamily, SocketType.St 阅读全文
posted @ 2020-04-18 15:56 灰主流 阅读(138) 评论(0) 推荐(0) 编辑
摘要:IPEndPoint endPoint = new IPEndPoint(IPAddress.Any, 111); Socket s = new Socket(endPoint.Address.AddressFamily, SocketType.Dgram, ProtocolType.Udp); / 阅读全文
posted @ 2020-04-18 15:54 灰主流 阅读(753) 评论(0) 推荐(0) 编辑
摘要:关键代码 IntPtr notepadHandle =APPIntprt= _process.MainWindowHandle; int style = GetWindowLong(notepadHandle, GWL_STYLE); style = style & ~((int)WS_CAPTIO 阅读全文
posted @ 2020-04-18 15:50 灰主流 阅读(576) 评论(0) 推荐(0) 编辑
摘要:使用TCD.System.TouchInjection.dll using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using Sy 阅读全文
posted @ 2020-04-18 15:24 灰主流 阅读(810) 评论(0) 推荐(0) 编辑
摘要:<ec:PathListBox x:Name="numberPathListBox" IsHitTestVisible="False"> <ec:PathListBox.ItemTemplate> <DataTemplate> <TextBlock Foreground="White" Text=" 阅读全文
posted @ 2020-04-18 15:07 灰主流 阅读(775) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Reflection; using System.Runtime.InteropServices; using System.Windows.Controls; namespace 浏览器测试 { public class WebBrowserH 阅读全文
posted @ 2020-04-18 14:28 灰主流 阅读(720) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Diagnostics; using System.Management; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Sy 阅读全文
posted @ 2020-04-18 14:25 灰主流 阅读(2548) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp1 { class Prog 阅读全文
posted @ 2020-04-18 14:20 灰主流 阅读(726) 评论(0) 推荐(0) 编辑
摘要:using System; using System.IO; using System.Text; namespace Helper { public class EncodingHelper { public static Encoding GetType(FileStream fs) { byt 阅读全文
posted @ 2020-04-18 14:02 灰主流 阅读(970) 评论(0) 推荐(0) 编辑
摘要:var url = "http:/xxx"; var credential = "fooClientIdPassword:secret"; var userName = "xx"; var pwd = "xx"; var base64Credential = Convert.ToBase64Stri 阅读全文
posted @ 2020-04-18 00:11 灰主流 阅读(1812) 评论(0) 推荐(0) 编辑
摘要:DrawingVisual drawingVisual = new DrawingVisual(); DrawingContext dc = drawingVisual.RenderOpen(); dc.DrawLine(new Pen(Brushes.Red,2),new Point(0,0),n 阅读全文
posted @ 2020-04-17 18:04 灰主流 阅读(335) 评论(0) 推荐(0) 编辑
摘要:<Window x:Class="_temple.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/x 阅读全文
posted @ 2020-04-17 18:00 灰主流 阅读(961) 评论(0) 推荐(0) 编辑
摘要:using System.Collections.Generic; using System.Windows; using System.Windows.Controls.Primitives; using System.Windows.Input; namespace WpfApp25 { /// 阅读全文
posted @ 2020-04-17 17:57 灰主流 阅读(1417) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Runtime.InteropServices; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System. 阅读全文
posted @ 2020-04-17 17:42 灰主流 阅读(437) 评论(0) 推荐(0) 编辑
摘要:1. none <div style="background: url(2.jpg) 50% 50%/ auto auto no-repeat ; width: 1000px; height: 800px; border:1px solid blue;"/> 2. tile 填充 <div styl 阅读全文
posted @ 2020-04-17 17:37 灰主流 阅读(704) 评论(0) 推荐(0) 编辑
摘要:默认windows并发数是2,所以可以设置此数大一点 ServicePointManager.DefaultConnectionLimit = 20; 也可以使用abort释放http连接 using System; using System.Collections.Generic; using S 阅读全文
posted @ 2020-04-17 16:20 灰主流 阅读(2620) 评论(0) 推荐(0) 编辑
摘要:public class LogHelper { private static readonly ReaderWriterLockSlim LogWriteLock = new ReaderWriterLockSlim(); private static readonly string LogFil 阅读全文
posted @ 2020-04-17 15:01 灰主流 阅读(210) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示