/// <summary> /// Invoked by the worker thread to update item details. /// </summary> /// <param name="info">Item details.</param> internal void UpdateDetailsInternal(Utility.Tuple<ColumnType, string, object>[] info) { if (!isDirty) return; // File info foreach (Utility.Tuple<ColumnType, string, object> item in info) { switch (item.Item1) { case ColumnType.DateAccessed: mDateAccessed = (DateTime)item.Item3; break; case ColumnType.DateCreated: mDateCreated = (DateTime)item.Item3; break; case ColumnType.DateModified: mDateModified = (DateTime)item.Item3; break; case ColumnType.FileSize: mFileSize = (long)item.Item3; break; case ColumnType.FilePath: mFilePath = (string)item.Item3; break; case ColumnType.Dimensions: mDimensions = (Size)item.Item3; break; case ColumnType.Resolution: mResolution = (SizeF)item.Item3; break; case ColumnType.ImageDescription: mImageDescription = (string)item.Item3; break; case ColumnType.EquipmentModel: mEquipmentModel = (string)item.Item3; break; case ColumnType.DateTaken: mDateTaken = (DateTime)item.Item3; break; case ColumnType.Artist: mArtist = (string)item.Item3; break; case ColumnType.Copyright: mCopyright = (string)item.Item3; break; case ColumnType.ExposureTime: mExposureTime = (float)item.Item3; break; case ColumnType.FNumber: mFNumber = (float)item.Item3; break; case ColumnType.ISOSpeed: mISOSpeed = (ushort)item.Item3; break; case ColumnType.UserComment: mUserComment = (string)item.Item3; break; case ColumnType.Rating: mRating = (ushort)item.Item3; break; case ColumnType.Software: mSoftware = (string)item.Item3; break; case ColumnType.FocalLength: mFocalLength = (float)item.Item3; break; case ColumnType.Custom: string label = item.Item2; string value = (string)item.Item3; Guid columnID = Guid.Empty; foreach (ImageListView.ImageListViewColumnHeader column in mImageListView.Columns) { if (label == column.Text) columnID = column.Guid; } if (columnID == Guid.Empty) { ImageListView.ImageListViewColumnHeader column = new ImageListView.ImageListViewColumnHeader(ColumnType.Custom, label); columnID = column.Guid; } if (subItems.ContainsKey(columnID)) subItems[columnID] = value; else subItems.Add(columnID, value); break; default: throw new Exception("Unknown column type."); } } UpdateRating(); isDirty = false; }
/// <summary> /// Initializes a new instance of the ColumnClickEventArgs class. /// </summary> /// <param name="column">The column that is the target of this event.</param> /// <param name="location">The location of the mouse.</param> /// <param name="buttons">One of the System.Windows.Forms.MouseButtons values /// indicating which mouse button was pressed.</param> public ColumnClickEventArgs(ImageListView.ImageListViewColumnHeader column, Point location, MouseButtons buttons) { Column = column; Location = location; Buttons = buttons; }
/// <summary> /// Initializes a new instance of the ColumnHoverEventArgs class. /// </summary> /// <param name="column">The currently hovered column.</param> /// <param name="previousColumn">The previously hovered column.</param> public ColumnHoverEventArgs(ImageListView.ImageListViewColumnHeader column, ImageListView.ImageListViewColumnHeader previousColumn) { Column = column; PreviousColumn = previousColumn; }
/// <summary> /// Initializes a new instance of the ColumnEventArgs class. /// </summary> /// <param name="column">The column that is the target of this event.</param> public ColumnEventArgs(ImageListView.ImageListViewColumnHeader column) { Column = column; }