摘要:
自定義TreeDataView 控件,百萬級別數據秒繪。 最近需要使用到數據展現,需要對數據折疊展現。網上找了許多控件,如:TreeListView,TreevDataGirdView等,但是都無法到達效果,而且加載百萬條數據時,繪制灰常的卡頓。 話不多說。先上效果圖 1 準備工作,創建兩個類,用戶
閱讀全文
posted @ 2020-12-02 15:34
永恒921
閱讀(329)
推薦(1)
摘要:
效果實現如下: 金屬儀表盤下載地址 https://pan.baidu.com/s/1xANmSkQYnLGzUJ_X8Dbg0w 提取碼:fi96
閱讀全文
posted @ 2018-11-13 10:34
永恒921
閱讀(8832)
推薦(0)
摘要:
WPF 程序使用 MediatR 1 修改App.xam 讓WPF應用啟動時不要直接實例化主窗口,而是通過DI獲取 刪除掉 StartupUri="Views\MainWindow.xaml" <Application x:Class="YourNamespace.App" xmlns="http:
閱讀全文
posted @ 2024-06-29 15:50
永恒921
閱讀(133)
推薦(1)
摘要:
1 添加服務類 WebServiceHost using System.ServiceModel; using System.ServiceModel.Web; using System.Web.Services.Protocols; [ServiceContract(Namespace = "ht
閱讀全文
posted @ 2024-03-07 18:14
永恒921
閱讀(42)
推薦(0)
摘要:
1 從NUGET添加組件“Swashbuckle.AspNetCore” 相關使用代碼 var builder = WebApplication.CreateBuilder(); builder.Services.AddControllers(); var app = builder.Build()
閱讀全文
posted @ 2024-03-07 17:37
永恒921
閱讀(722)
推薦(0)
摘要:
多線程等待 溫故而知新,好久沒有用到,突然忘記 方法一 CountDownEvent 類 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Thread
閱讀全文
posted @ 2022-11-15 09:09
永恒921
閱讀(32)
推薦(0)
摘要:
好久沒用都要忘記了,記錄下,溫故而知新。 1. 播放系統事件聲音 System.Media.SystemSounds.Asterisk.Play(); System.Media.SystemSounds.Beep.Play(); System.Media.SystemSounds.Exclamati
閱讀全文
posted @ 2021-11-29 14:32
永恒921
閱讀(3034)
推薦(0)
摘要:
winform datagridview 刷新數據不需要重新綁定以及添加COMBOX方法 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using Sys
閱讀全文
posted @ 2021-09-14 19:56
永恒921
閱讀(4657)
推薦(0)
摘要:
一個非常好用的windform界面布局設計控件“WeifenLuo.WinFormsUI.Docking” github上的開源代碼地址:https://github.com/dengwei1008/WinForms GitHub地址Demo:https://github.com/gdoujkzz/
閱讀全文
posted @ 2021-08-26 09:22
永恒921
閱讀(423)
推薦(0)
摘要:
【轉】Castle Windsor之組件注冊 注冊方式較多,大體有這么幾種,學習得比較粗淺,先記錄: 1、逐個注冊組件即對每個接口通過代碼指定其實現類,代碼: container.Register( Component.For<IMyService>() //接口 .ImplementedBy<My
閱讀全文
posted @ 2021-06-16 15:06
永恒921
閱讀(128)
推薦(0)
摘要:
XAML <UserControl x:Class="RpowerMonitor_MCS.UserControls.ProgressBarControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:
閱讀全文
posted @ 2021-05-26 14:12
永恒921
閱讀(314)
推薦(0)
摘要:
通常我們在程序中需要調用WebService時,都是通過“添加Web引用”,讓VS.NET環境來為我們生成服務代理,然后調用對應的Web服務。這樣是使工作簡單了,但是卻和提供Web服務的URL、方法名、參數綁定在一起了,這是VS.NET自動為我們生成Web服務代理的限制。如果哪一天發布Web服務的U
閱讀全文
posted @ 2021-05-24 15:16
永恒921
閱讀(890)
推薦(2)
摘要:
using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; using
閱讀全文
posted @ 2020-09-25 11:55
永恒921
閱讀(284)
推薦(0)
摘要:
/// <summary> /// 禁用窗體最大最小按鍵 /// </summary> internal static class WindowExtensions { [DllImport("user32.dll")] internal extern static int SetWindowLon
閱讀全文
posted @ 2020-09-22 15:10
永恒921
閱讀(436)
推薦(0)
摘要:
public class testDescrible { int _tt; [Description("123")] public int ttt { get { return _tt; } set { _tt = value; } } [Description("測試1")] public voi
閱讀全文
posted @ 2020-09-22 14:37
永恒921
閱讀(2348)
推薦(0)
摘要:
WPF 接收初始化 /// <summary> /// 初始化窗體句柄消息接收函數 /// </summary> private void InitailWinHand() { HwndSource hWndSource; WindowInteropHelper wih = new WindowIn
閱讀全文
posted @ 2020-09-22 12:29
永恒921
閱讀(970)
推薦(0)
摘要:
public static object GetElementFromPoint(System.Windows.Controls.ItemsControl itemsControl, Point point) { UIElement element = itemsControl.InputHitTe
閱讀全文
posted @ 2020-09-22 11:44
永恒921
閱讀(664)
推薦(0)
摘要:
/// <summary> /// 檢測IP地址是否合法 /// </summary> /// <param name="strJudgeString"></param> /// <returns></returns> public static bool JudgeIPFormat(string
閱讀全文
posted @ 2020-09-22 11:41
永恒921
閱讀(687)
推薦(0)
摘要:
/// <summary> /// 帶小數點數字匹配 /// </summary> /// <param name="input"></param> /// <returns></returns> public static bool IsNumber(string input) { string
閱讀全文
posted @ 2020-09-22 11:33
永恒921
閱讀(6307)
推薦(0)
摘要:
C#中實現文件拖放打開的方法 設置Form屬性 AllowDrop = True; 在Form事件中 private void Form1_DragDrop(object sender, DragEventArgs e) { string localFilePath = ((System.Array
閱讀全文
posted @ 2020-02-28 15:10
永恒921
閱讀(1164)
推薦(0)
摘要:
修改注冊表,雙擊文件直接打開 string strProject = "Exec"; string p_FileTypeName =".cdb";//文件后綴 string fileName = System.Windows.Forms.Application.ExecutablePath;// 獲
閱讀全文
posted @ 2020-02-28 15:04
永恒921
閱讀(1216)
推薦(0)