posts - 102,comments - 0,views - 35459
08 2023 档案
把反编译切换为从数据模式
摘要:工具->选项->文本编辑器->C#->高级->取消勾选(支持导航到反编译) 阅读全文
posted @ 2023-08-28 10:27 阿霖找BUG 阅读(5) 评论(0) 推荐(0) 编辑
TCP连接
摘要:创建一个服务端 public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } private void Button_Click(object sender, RoutedEvent 阅读全文
posted @ 2023-08-28 09:55 阿霖找BUG 阅读(8) 评论(0) 推荐(0) 编辑
WPF中窗口控件的跨线程调用
摘要:在多线程里面,UI是不能直接跨线程使用的。 在WinForm中,我们要跨线程访问窗口控件,只需要设置属性CheckForIllegalCrossThreadCalls = false;即可。 在WPF中要设置Dispatcher属性。msg为要输出的内容 private delegate void 阅读全文
posted @ 2023-08-25 13:43 阿霖找BUG 阅读(307) 评论(0) 推荐(0) 编辑
WPF页面填充
摘要:在被填充区域加一个ContentControl控件并命名 <ContentControl x:Name="Page_Chart" /> 添加一个页面,在里面设计相应的内容 SystemChart chart = new SystemChart();//实例化页面 Page_Chart.Content 阅读全文
posted @ 2023-08-24 16:43 阿霖找BUG 阅读(42) 评论(0) 推荐(0) 编辑
WPF控件
摘要:拓展框Expander <Expander Name="a" Header="" Height="146" Width="225"> <WrapPanel Height="363" Margin="0,0,-2,0"> <TextBlock Text="运行代码:" Width="115" Hori 阅读全文
posted @ 2023-08-23 10:18 阿霖找BUG 阅读(28) 评论(0) 推荐(0) 编辑
清空listview
摘要:一行一行删除 for (int i = listView1.Items.Count - 1; i >= 0; i--) { ListViewItem item = listView1.Items[i]; listView1.Items.Remove(item); Console.WriteLine( 阅读全文
posted @ 2023-08-17 01:32 阿霖找BUG 阅读(28) 评论(0) 推荐(0) 编辑
System.ArgumentException:“不能在多处添加或插入项“2”。必须首先将其从当前位置移除或将其克隆。
摘要:ListViewItem item = new ListViewItem(); foreach (Person p in person1) { item.SubItems[0].Text = p.Id.ToString(); item.SubItems.Add(p.Name); item.SubIt 阅读全文
posted @ 2023-08-16 19:30 阿霖找BUG 阅读(172) 评论(0) 推荐(0) 编辑
序列化与反序列化
摘要:继承BinaryFormatter()类 [Serializable]//允许这个对象序列化 public class Person { public int Id { get; set; } public string Name { get; set; } public int Age { get 阅读全文
posted @ 2023-08-16 14:24 阿霖找BUG 阅读(6) 评论(0) 推荐(0) 编辑
控件
摘要:按钮变色 borderColor边框的颜色 MouseDownBackColor鼠标悬浮在按钮上时边款的颜色 MouseOverBackColor点击时的颜色 把窗体嵌套在窗体里面 先在页面画一个panel,再添加一个页面(form)设置无边框,大小和panel一样。 上图为panel2 上图为无边 阅读全文
posted @ 2023-08-16 14:20 阿霖找BUG 阅读(9) 评论(0) 推荐(0) 编辑
常量与变量的区别
摘要:常量是必须要有初始值,且不能改变, 用const来声明 变量可以没有初始值,且可以多次赋值。 先声明后赋值 是一个容器,作用在于可以起到一个临时数据 阅读全文
posted @ 2023-08-01 15:57 阿霖找BUG 阅读(5) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

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