CameraEventArgs.cs
上传用户:chengzheng
上传日期:2013-08-05
资源大小:38k
文件大小:2k
- using System;
- namespace Cowburn.Imaging
- {
- /// <summary>
- /// Provides data for the Cowburn.Imaging.Camera.CaptureCompleted event.
- /// </summary>
- public class CameraEventArgs : EventArgs
- {
- private string m_path = string.Empty;
- private byte[] m_data = null;
- private int m_width = 0;
- private int m_height = 0;
- /// <summary>
- /// Initializes a new instance of the Cowburn.Imaging.CameraEventArgs class.
- /// </summary>
- /// <param name="path"></param>
- public CameraEventArgs(string path)
- {
- m_path = path;
- }
- /// <summary>
- /// Initializes a new instance of the Cowburn.Imaging.CameraEventArgs class.
- /// </summary>
- /// <param name="path">The full path to the captured image.</param>
- /// <param name="width">The width of the captured image.</param>
- /// <param name="height">The height of the captured image.</param>
- public CameraEventArgs(string path, int width, int height)
- {
- m_path = path;
- m_width = width;
- m_height = height;
- }
- /// <summary>
- /// Initializes a new instance of the Cowburn.Imaging.CameraEventArgs class.
- /// </summary>
- /// <param name="data">The byte array containing the image data.</param>
- public CameraEventArgs(byte[] data)
- {
- m_data = data;
- }
- /// <summary>
- /// Initializes a new instance of the Cowburn.Imaging.CameraEventArgs class.
- /// </summary>
- /// <param name="data">The byte array containing the image data.</param>
- /// <param name="width">The width of the captured image.</param>
- /// <param name="height">The height of the captured image.</param>
- public CameraEventArgs(byte[] data, int width, int height)
- {
- m_data = data;
- m_width = width;
- m_height = height;
- }
- /// <summary>
- /// The full path to the captured image.
- /// </summary>
- public string Path
- {
- get { return m_path;}
- }
- /// <summary>
- /// The width of the captured image.
- /// </summary>
- public int Width
- {
- get { return m_width; }
- }
- /// <summary>
- /// The height of the captured image.
- /// </summary>
- public int Height
- {
- get { return m_height; }
- }
- /// <summary>
- /// The byte array containing the image data.
- /// </summary>
- public byte[] Data
- {
- get { return m_data; }
- }
- }
- }