07 2012 档案
摘要:网上有很多用C#调用cmd的方法,大致如下:private void ExecuteCmd(string command){Process p = new Process();p.StartInfo.FileName = "cmd.exe";p.StartInfo.UseShellExecute = false;p.StartInfo.RedirectStandardInput = true;p.StartInfo.RedirectStandardOutput = true;p.StartInfo.CreateNoWindow = true;p.Start();p.Stan
阅读全文
摘要:在WP7的picture hub中,选中一张图片,查看图片时,点击“…”菜单,点extras…时,会出现一个菜单(这个菜单中就是可以对选中的图片进行分享或者处理的应用列表)下面介绍如何实现这个一键分享功能:在你的应用程序中新建一个叫“Extras.xml”的XML文件,里面的内容如下:<?xml version="1.0" encoding="utf-8" ?><Extras> <PhotosExtrasApplication> <Enabled>true</Enabled> </Phot
阅读全文
摘要:public void CaptureScreen(object sender, EventArgs e){ WriteableBitmap bmp = new WriteableBitmap(480, 800); bmp.Render(App.Current.RootVisual, null); bmp.Invalidate(); MemoryStream stream = new MemoryStream(); bmp.SaveJpeg(stream, bmp.PixelWidth, bmp.PixelHeight, 0, 80); stream.Seek(0, SeekOri...
阅读全文
摘要:ImageBrush backImage = new ImageBrush(); backImage.ImageSource = new BitmapImage(new Uri("Images/register_btn.png", UriKind.Relative)); button1.Background = backImage;
阅读全文
浙公网安备 33010602011771号