原创 一個簡單的IP地址輸入控件
一個模仿Windows的IP地址分段輸入控件框 - .cs namespace IPBox { /// <summary> /// MainWindow.xaml 的交互邏輯 /// </summary
原创 WPF中一個ListBox實例
<ListBox Height="208" Name="lbStudent" Width="305" HorizontalAlignment="Left" SelectedItem="{Binding SelectedList}"
原创 silverlight連接SQL Server數據庫
1.和sqlite基本相同,只是連接語句略有差別 using System.Data; using System.Data.SqlClient; using System.Web.Configuration; /// <summ
原创 WPF中一個比較完整的樹形結構和右鍵菜單
1.xaml中的代碼 <UserControl x:Class="UserManagerMgr.Views.UserTreeView" xmlns="http://schemas.microsoft.co
原创 WPF中一個簡單的數據的保存和讀取
1.按行保存數據 private void SaveFile() { List<string> fileList = new List<string>();
原创 WPF中動態加載數據
<!--動態生成一組按鈕--> <StackPanel> <ItemsControl ItemsSource="{Binding Picture}"> <ItemsControl.ItemsPanel>
原创 WPF CM框架下點擊不同的按鈕切換到不同的界面
1.View中加入控件 <UserControl x:Class="WinTab.View.TabControl" xmlns="http://schemas.microsoft.com/winfx/20
原创 正則表達式
//正則表達式判斷RTSP://開頭 System.Text.RegularExpressions.Regex check = new System.Text.RegularExpressions.Regex(@"^(rtsp
原创 轉換器 Convert 示例 WPF
1.cs //using System.Windows.Data; public class IntToStringlimitConverter : IValueConverter { public o
原创 MFC小知識庫
改變static控件的值 CStatic m_show; //.h文件中聲明一個public變量 void CMFCApplication1Dlg::DoDataExchange(CDataExchange
原创 silverlight連接SQLite數據庫,增刪改查
1,在web程序中添加新建項-啓用了silverlight的wcf服務,命名爲ServiceSQLite using System.Data; using System.Collections.Generic; using Sys
原创 冒泡算法
一個簡單的冒泡算法 for (int i = 0; i < sortArray.Length; i++) { for (int j = i + 1; j < sortArray.Length; j++) { if (sortA
原创 WPF用流的方式上傳/顯示/下載圖片文件(保存在數據庫)
1.xaml <Window x:Class="WpfUploadDispalyIMG.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml
原创 C# 生成一個隨機數
Random random = new Random(); number = random.Next(1, 101);//生成1,100的隨機數
原创 silverlight 窗口跳轉 全屏
//獲取當前Silverlighthot對象 Content contentObj = Application.Current.Host.Content;//using System.Windows.Interop; //修改