You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

289 lines
7.5 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/////////////////////////////////////////////////////////////////
//
// (C) Copyright 2013, Kenneth, Inc.
// All rights reserved. Confidential. Except as pursuant
// to a written agreement with Kenneth, this software may
// not be used or distributed. This software may be covered
// by one or more patents.
//
// 本软件为 ** 公司开发版权所有违者必究23810511@qq.com
//
/////////////////////////////////////////////////////////////////
using System;
using System.Collections.Generic;
using System.Data;
using System.Reflection;
using System.ComponentModel;
using System.Collections.ObjectModel;
using System.Runtime.CompilerServices;
using System.Windows.Shapes;
using System.Windows.Media.Imaging;
namespace GummingCommon
{
/// <summary>
/// Testphotos
/// </summary>
[Serializable]
public class TestphotosEntity: ICloneable, INotifyPropertyChanged
{
/// <summary>
///
/// </summary>
public string RecId { get; set; }
/// <summary>
/// PhotoCode
/// </summary>
public string PhotoCode { get; set; }
/// <summary>
/// PhotoName
/// </summary>
public string PhotoName { get; set; }
/// <summary>
/// ReferenceId
/// </summary>
public string ReferenceId { get; set; }
/// <summary>
/// ReferenceType
/// </summary>
public string ReferenceType { get; set; }
/// <summary>
/// ParentFolder
/// </summary>
public string ParentFolder { get; set; }
/// <summary>
/// SourceFileName
/// </summary>
public string SourceFileName { get; set; }
/// <summary>
/// SaveAsFileName
/// </summary>
public string SaveAsFileName { get; set; }
/// <summary>
/// FileType
/// </summary>
public string FileType { get; set; }
/// <summary>
/// FileSize
/// </summary>
public int? FileSize { get; set; }
/// <summary>
/// PhotoIndex
/// </summary>
public int? PhotoIndex { get; set; }
/// <summary>
/// CutLeft
/// </summary>
public int? CutLeft { get; set; }
/// <summary>
/// CutTop
/// </summary>
public int? CutTop { get; set; }
/// <summary>
/// Width
/// </summary>
public int? Width { get; set; }
/// <summary>
/// Height
/// </summary>
public int? Height { get; set; }
/// <summary>
/// RegionStart
/// </summary>
public decimal? RegionStart { get; set; }
/// <summary>
/// RegionEnd
/// </summary>
public decimal? RegionEnd { get; set; }
/// <summary>
/// WindowStart
/// </summary>
public decimal? WindowStart { get; set; }
/// <summary>
/// WidnowWidth
/// </summary>
public decimal? WidnowWidth { get; set; }
/// <summary>
/// PageType
/// </summary>
public string TestTpType { get; set; }
/// <summary>
/// PageType
/// </summary>
public string TestTpTypeDisplayer { get; set; }
/// <summary>
/// SelectedColor
/// </summary>
public decimal? SelectedColor { get; set; }
/// <summary>
///
/// </summary>
public string CreateBy { get; set; }
/// <summary>
///
/// </summary>
public DateTime? CreateTime { get; set; }
/// <summary>
///
/// </summary>
public string ModifyBy { get; set; }
/// <summary>
///
/// </summary>
public DateTime? ModifyTime { get; set; }
/// <summary>
///
/// </summary>
public int? IsActive { get; set; }
public object Clone()
{
TestphotosEntity obj = new TestphotosEntity();
Type t = this.GetType();
PropertyInfo[] properties = t.GetProperties();
foreach (PropertyInfo pi in properties)
{
if (pi.CanWrite)
{
object value = pi.GetValue(this, null);
if (obj.GetType().GetProperty(pi.Name) != null)
{
pi.SetValue(obj, value, null);
}
}
}
return obj;
}
private bool _CheckStatus = false;
public bool CheckStatus
{
get { return _CheckStatus; }
set
{
_CheckStatus = value;
OnPropertyChanged("CheckStatus");
}
}
private ObservableCollection<TestphotosEntity> _children = new ObservableCollection<TestphotosEntity>();
public ObservableCollection<TestphotosEntity> Children
{
get { return _children; }
}
#region INotifyPropertyChanged Members
public event PropertyChangedEventHandler PropertyChanged = delegate { };
private void OnPropertyChanged(string propertyName)
{
PropertyChangedEventHandler handler = this.PropertyChanged;
if (handler != null)
{
handler(this, new PropertyChangedEventArgs(propertyName));
}
}
#endregion
}
[Serializable]
public partial class TestphotosEntityExtension : TestphotosEntity, INotifyPropertyChanged
{
public string CreateByDisplayer { get; set; }
public string ModifyByDisplayer { get; set; }
public string CaptureDisplayName
{
get
{
return string.Format("拍摄图{0}", PhotoIndex);
}
}
private bool _CaptureChecked = false;
public bool CaptureChecked
{
get { return _CaptureChecked; }
set
{
_CaptureChecked = value;
OnPropertyChanged("CaptureChecked");
}
}
private byte[] _CaptureImage;
public byte[] CaptureImage
{
get
{
return _CaptureImage;
}
set
{
_CaptureImage = value;
OnPropertyChanged();
}
}
private byte[] _CaptureImageMerged;
public byte[] CaptureImageMerged
{
get
{
return _CaptureImageMerged;
}
set
{
_CaptureImageMerged = value;
OnPropertyChanged();
}
}
private BitmapImage _CaptureMergeImage;
public BitmapImage CaptureMergeImage
{
get
{
return _CaptureMergeImage;
}
set
{
_CaptureMergeImage = value;
OnPropertyChanged();
}
}
public string IrData { get; set; }
protected void OnPropertyChanged(PropertyInfo[] propertyNames)
{
PropertyChangedEventHandler handler = PropertyChanged;
if (handler != null)
{
foreach (var s in propertyNames)
handler(this, new PropertyChangedEventArgs(s.Name));
}
}
protected void OnPropertyChanged([CallerMemberName] string propertyName = "")
{
PropertyChangedEventHandler handler = PropertyChanged;
if (handler != null)
handler(this, new PropertyChangedEventArgs(propertyName));
}
public event PropertyChangedEventHandler PropertyChanged;
}
[Serializable]
public class TestphotosLogEntityExtension : TestphotosEntityExtension
{
public string LogId { get; set; }
public DateTime? OperTime { get; set; }
public string OperUser { get; set; }
public string OperType { get; set; }
public string OperInfo { get; set; }
public string OperUserDisplayer { get; set; }
}
}