簡體   English   中英

使用C#在移動應用程序中保存對話框

[英]Save Dialog in Mobile Application using C#

這是我的代碼

     SaveFileDialog dialog = new SaveFileDialog();
      if (dialog.ShowDialog() == DialogResult.OK)
      {
         aspectRatioPictureBox1.Photo.Save(dialog.FileName,
          System.Drawing.Imaging.ImageFormat.Bmp);
      }
      dialog.Dispose();

我想使用用戶指定的名稱將文件默認保存在mypictures文件夾中

為什么要使用SaveFileDialog 提示用戶提供要保存的文件名,然后使用該文件MyPictures文件保存到MyPictures特殊文件夾中。

Environment.SpecialFolder special = Environment.SpecialFolder.MyPictures;
string MyPicturesLocation = Environment.GetFolderPath(special);

//prompt the user for file-name and save it to MyPicturesLocation here.

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM