using CommonFunc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace XGL.UControl
{
///
/// UCMix.xaml 的交互逻辑
///
public partial class UCMixR : UserControl
{
public UCMixR()
{
InitializeComponent();
}
#region 缓存区域缓存数量
///
/// 缓存区域缓存数量
///
public string TotalNum
{
get
{
return (string)GetValue(TotalNumProperty);
}
set
{
SetValue(TotalNumProperty, value);
}
}
public static DependencyProperty TotalNumProperty =
DependencyProperty.Register("TotalNum", typeof(string), typeof(UCMixR), new PropertyMetadata("", new PropertyChangedCallback(TotalNumPropertyChanged))); //属性默认值
private static void TotalNumPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
try
{
var control = d as UCMixR;
control.txtTotal.Text = e.NewValue.ToString();
}
catch (Exception ex)
{
MethodInfo method = (MethodInfo)MethodBase.GetCurrentMethod();
Common.Log.Error(method.DeclaringType.FullName + "-" + method.Name + "\r\n" + ex.Message + "\r\n" + ex.StackTrace);
}
}
#endregion
#region 产品型号
///
/// 产品型号
///
public string ProdDesc
{
get
{
return (string)GetValue(ProdDescProperty);
}
set
{
SetValue(ProdDescProperty, value);
}
}
public static DependencyProperty ProdDescProperty =
DependencyProperty.Register("ProdDesc", typeof(string), typeof(UCMixR), new PropertyMetadata("", new PropertyChangedCallback(ProdDescPropertyChanged))); //属性默认值
private static void ProdDescPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
try
{
var control = d as UCMixR;
control.lblProd1.Content = e.NewValue.ToString();
}
catch (Exception ex)
{
MethodInfo method = (MethodInfo)MethodBase.GetCurrentMethod();
Common.Log.Error(method.DeclaringType.FullName + "-" + method.Name + "\r\n" + ex.Message + "\r\n" + ex.StackTrace);
}
}
#endregion
#region 产品型号2
///
/// 产品型号
///
public string ProdDesc2
{
get
{
return (string)GetValue(ProdDesc2Property);
}
set
{
SetValue(ProdDesc2Property, value);
}
}
public static DependencyProperty ProdDesc2Property =
DependencyProperty.Register("ProdDesc", typeof(string), typeof(UCMixR), new PropertyMetadata("", new PropertyChangedCallback(ProdDesc2PropertyChanged))); //属性默认值
private static void ProdDesc2PropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
try
{
var control = d as UCMixR;
control.lblProd2.Content = e.NewValue.ToString();
}
catch (Exception ex)
{
MethodInfo method = (MethodInfo)MethodBase.GetCurrentMethod();
Common.Log.Error(method.DeclaringType.FullName + "-" + method.Name + "\r\n" + ex.Message + "\r\n" + ex.StackTrace);
}
}
#endregion
}
}