• 大小: 0.5M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-07
  • 语言: 其他
  • 标签: 其他  

资源简介

相册.rar

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PhotoAlbumApplication;
using System.Windows.Forms;

namespace MyAlbumData
{
    public static class AlbumController
    {
        public static bool OpenAlbumDialog(string path)
        {
            using (OpenFileDialog dlg = new OpenFileDialog())
            {
                dlg.title = “Open Album“;
                dlg.Filter = “Album Files(*.abm)|*.abm|All files(*.*)|*.*“;
                dlg.InitialDirectory = AlbumManager.DefaultPath;
                dlg.RestoreDirectory = true;
                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    path = dlg.FileName;
                    return true;
                }
            }
            return false;
        }

        public static bool SaveAlbumDialog(string path)
        {
            using (SaveFileDialog dlg = new SaveFileDialog())
            {
                dlg.title = “Save Album“;
                dlg.DefaultExt = “abm“;
                dlg.Filter = “Album files(*.abm)|*.abm|All files(*.*)|*.*“;

                dlg.InitialDirectory = AlbumManager.DefaultPath;
                dlg.RestoreDirectory = true;
                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    path = dlg.FileName;
                    return true;
                }
                return false;
            }
        }

        public static DialogResult AskForSave(AlbumManager manager)
        {
            if (manager.Album.HasChanged)
            {
                string msg;
                if (manager.FullName == null)
                    msg = “Do you wish to save your changes?“;
                else
                    msg = “Do you wish to save your changes to “ + manager.ShortName + “?“;
                DialogResult result = MessageBox.Show(msg “Save Changes?“ MessageBoxButtons.YesNoCancel MessageBoxIcon.Question);
                return result;
            }
            return DialogResult.No;
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       2117  2011-05-17 22:13  相册\MyAlbumData\AlbumController.cs

     文件      16896  2011-05-17 22:13  相册\MyAlbumData\bin\Debug\MyAlbumData.exe

     文件      44544  2011-05-17 22:13  相册\MyAlbumData\bin\Debug\MyAlbumData.pdb

     文件      14328  2011-05-17 22:13  相册\MyAlbumData\bin\Debug\MyAlbumData.vshost.exe

     文件        490  2011-05-17 22:13  相册\MyAlbumData\bin\Debug\MyAlbumData.vshost.exe.manifest

     文件      20480  2011-05-17 22:13  相册\MyAlbumData\bin\Debug\MyPhotoControls.dll

     文件      36352  2011-05-17 22:13  相册\MyAlbumData\bin\Debug\MyPhotoControls.pdb

     文件      13824  2011-05-17 22:13  相册\MyAlbumData\bin\Debug\PhotoAlbumApplication.exe

     文件      44544  2011-05-17 22:13  相册\MyAlbumData\bin\Debug\PhotoAlbumApplication.pdb

     文件      10063  2011-05-17 22:13  相册\MyAlbumData\DataForm.cs

     文件       5115  2011-05-17 22:13  相册\MyAlbumData\DataForm.Designer.cs

     文件       5814  2011-05-17 22:13  相册\MyAlbumData\DataForm.resx

     文件       4254  2011-05-17 22:13  相册\MyAlbumData\MyAlbumData.csproj

     文件       3018  2011-05-17 22:13  相册\MyAlbumData\obj\Debug\MyAlbumData.csproj.FileListAbsolute.txt

     文件        850  2011-05-17 22:13  相册\MyAlbumData\obj\Debug\MyAlbumData.csproj.GenerateResource.Cache

     文件        180  2011-05-17 22:13  相册\MyAlbumData\obj\Debug\MyAlbumData.DataForm.resources

     文件      16896  2011-05-17 22:13  相册\MyAlbumData\obj\Debug\MyAlbumData.exe

     文件      44544  2011-05-17 22:13  相册\MyAlbumData\obj\Debug\MyAlbumData.pdb

     文件        180  2011-05-17 22:13  相册\MyAlbumData\obj\Debug\MyAlbumData.Properties.Resources.resources

     文件       7146  2011-05-17 22:13  相册\MyAlbumData\obj\Debug\ResolveAssemblyReference.cache

     文件        495  2011-05-17 22:13  相册\MyAlbumData\Program.cs

     文件       1378  2011-05-17 22:13  相册\MyAlbumData\Properties\AssemblyInfo.cs

     文件       2872  2011-05-17 22:13  相册\MyAlbumData\Properties\Resources.Designer.cs

     文件       5612  2011-05-17 22:13  相册\MyAlbumData\Properties\Resources.resx

     文件       1096  2011-05-17 22:13  相册\MyAlbumData\Properties\Settings.Designer.cs

     文件        249  2011-05-17 22:13  相册\MyAlbumData\Properties\Settings.settings

     文件       2119  2011-05-17 22:13  相册\MyAlbumEditor\AlbumController.cs

     文件      16384  2011-05-17 22:13  相册\MyAlbumEditor\bin\Debug\MyAlbumEditor.exe

     文件      34304  2011-05-17 22:13  相册\MyAlbumEditor\bin\Debug\MyAlbumEditor.pdb

     文件      14328  2011-05-17 22:13  相册\MyAlbumEditor\bin\Debug\MyAlbumEditor.vshost.exe

............此处省略196个文件信息

评论

共有 条评论