コード例 #1
0
        public KmzMakerForm(PictureMetaData currentPicture, string currentDirectory, GetAllFilesDelegate getAllFilesDelegate)
            : this()
        {
            this.currentPicture      = currentPicture;
            this.getAllFilesDelegate = getAllFilesDelegate;

            if (currentPicture != null)
            {
                FileInfo fi = new FileInfo(currentPicture.Filename);
                this.txtKmzFile.Text = currentPicture.Filename.Substring(0, currentPicture.Filename.Length - fi.Extension.Length) + ".kmz";

                this.txtName.Text = currentPicture.IptcObjectName;
            }
            else
            {
                if (currentDirectory != "" && !currentDirectory.StartsWith("::"))
                {
                    DirectoryInfo di = new DirectoryInfo(currentDirectory);
                    this.txtKmzFile.Text = di.FullName + ".kmz";
                    this.txtName.Text    = di.Name;
                }

                this.radSelected.Checked = true;
                this.radOneFile.Enabled  = false;
            }

            this.chkOpen.Checked = Settings.Default.KmzOpenFile;
        }
コード例 #2
0
 public void RegisterEvents(DataChanged dataChanged,
                            DirectoryChanged directoryChanged,
                            DirectoryNameChanged directoryNameChanged,
                            NavigateFiles navigateFiles,
                            GetAllFilesDelegate ListAllCheckedFiles,
                            GetAllFilesDelegate ListSelectedDirectory)
 {
     foreach (IPictureDetailControllerBase p in this)
     {
         p.DataChangedEvent          += dataChanged;
         p.DirectoryChangedEvent     += directoryChanged;
         p.DirectoryNameChangedEvent += directoryNameChanged;
         p.NavigateFilesEvent        += navigateFiles;
         p.SetGetAllFilesDelegate(ListAllCheckedFiles, ListSelectedDirectory);
     }
 }
コード例 #3
0
 public void SetGetAllFilesDelegate(GetAllFilesDelegate getAllFilesDelegate, GetAllFilesDelegate getAllDirectoryDelegate)
 {
     this.getAllFilesDelegate     = getAllFilesDelegate;
     this.getAllDirectoryDelegate = getAllDirectoryDelegate;
 }