06 2012 档案

该文被密码保护。
posted @ 2012-06-27 18:02 要等闲阿 阅读(4) 评论(0) 推荐(0)
摘要:Silverlight中的独立存储有两种使用方式:1、文件方式,此方式使用IsolatedStorageFile类,此类包括两种子类: IsolatedStorageSettings.SiteSettings - 按站点保存的 key-value 字典表 IsolatedStorageSettings.ApplicationSettings - 按应用程序保存的 key-value 字典表 此类常用方法有:Add, Contains,Remove2、key-value方式,此方式使用IsolatedStorageSettings类,此类包括两种方法: IsolatedStorageFi... 阅读全文
posted @ 2012-06-27 15:35 要等闲阿 阅读(150) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2012-06-26 15:42 要等闲阿 阅读(13) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2012-06-26 13:21 要等闲阿 阅读(9) 评论(0) 推荐(0)
摘要:public bool isPareNull(TreeViewItem CurrItem) { bool boolPareNote = false; try { if (CurrItem.Parent != null) boolPareNote = true; } catch (Exception) { t... 阅读全文
posted @ 2012-06-26 11:07 要等闲阿 阅读(295) 评论(0) 推荐(0)
摘要:ComboBoxItem conboxitem = new ComboBoxItem(); conboxitem.Style = App.Current.Resources["ComboBoxItemStyle1"] as Style; conboxitem.Content = string.Format("{0}年", DateTime.Now.Year - i); conboxitem.Tag = DateTime.Now.Year - i; this.cboxYear... 阅读全文
posted @ 2012-06-26 11:01 要等闲阿 阅读(192) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2012-06-26 10:56 要等闲阿 阅读(1) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2012-06-26 10:33 要等闲阿 阅读(1) 评论(0) 推荐(0)
摘要:第一种方法:DateTime d = new DateTime(2009, 2, 8); System.Globalization.Calendar c = new System.Globalization.GregorianCalendar(); int daysInAugust = c.GetDaysInMonth(d.Year, d.Month); // 31 MessageBox.Show(daysInAugust.ToString());第二种方法:public int GetDays(int year, int m... 阅读全文
posted @ 2012-06-26 10:09 要等闲阿 阅读(542) 评论(1) 推荐(0)
摘要:方法public List<T> GetChildObjects<T>(DependencyObject obj, string name) where T : FrameworkElement { DependencyObject child = null; List<T> childList = new List<T>(); for (int i = 0; i <= VisualTreeHelper.GetChildrenCount(obj) - 1; i++) { ... 阅读全文
posted @ 2012-06-25 23:13 要等闲阿 阅读(423) 评论(0) 推荐(1)
摘要:public void dateToWord() { string TemplatePath = @"http://aaa.doc"; //定义引用模版的路径 //string TemplatePath = @"C:/1234.doc"; //定义引用模版的路径 object missingValue = System.Reflection.Missing.Value; //使用反射定义默认参数 dynamic wordApplication = AutomationFactory.Cr... 阅读全文
posted @ 2012-06-25 22:59 要等闲阿 阅读(2456) 评论(0) 推荐(1)
该文被密码保护。
posted @ 2012-06-25 22:51 要等闲阿 阅读(0) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2012-06-25 22:46 要等闲阿 阅读(2) 评论(0) 推荐(0)
摘要:this.sView.ScrollToHorizontalOffset(50);this.sView.ScrollToVerticalOffset(50);//内容的垂直偏移量 string vo = sView.VerticalOffset.ToString(); //内容的水平偏移量 string ho = sView.HorizontalOffset.ToString(); //内容的总垂直高度 string eh = sView.ExtentHeight.ToString();... 阅读全文
posted @ 2012-06-25 17:12 要等闲阿 阅读(207) 评论(0) 推荐(0)
摘要:<sdk:DataGrid.Columns> <sdk:DataGridTemplateColumn Header="故障地点" > <sdk:DataGridTemplateColumn.CellTemplate> <DataTemplate> <Button Content="{Binding 故障地点}" Tag="{Binding NoID}" Foreground="#FF006DFF"... 阅读全文
posted @ 2012-06-25 15:52 要等闲阿 阅读(295) 评论(0) 推荐(0)
摘要:public static string CaculateWeekDay(int y, int m, int d) //年月日换算成星期几 { if (m == 1) m = 13; if (m == 2) m = 14; int week = (d + 2 * m + 3 * (m + 1) / 5 + y + y / 4 - y / 100 + y / 400) % 7 + 1; string weekstr = ""; switch (week)... 阅读全文
posted @ 2012-06-25 15:37 要等闲阿 阅读(864) 评论(0) 推荐(0)
摘要:Button button2 = new Button { Width=30,Height=30, Content="HelloWorld", Background=new SolidColorBrush(Colors.Black) }; this.gdAA.Children.Add(button2); 阅读全文
posted @ 2012-06-25 15:23 要等闲阿 阅读(123) 评论(0) 推荐(0)
摘要:子窗体的cs文件:public partial class ChildWindow1 : ChildWindow { public ChildWindow1() { InitializeComponent(); } public void UrlMessage(string str) { switch(str) { case "提交": this.DialogResult = true; break; case "取消": this.DialogResult = false; break; } } }使用的时候... 阅读全文
posted @ 2012-06-25 14:20 要等闲阿 阅读(186) 评论(0) 推荐(0)
摘要:Application.Current.Host.Content.IsFullScreen = !Application.Current.Host.Content.IsFullScreen; 阅读全文
posted @ 2012-06-25 14:12 要等闲阿 阅读(115) 评论(0) 推荐(0)