using DataEntity;
|
using DataEntity.Share;
|
using DataRWDAL;
|
using DataRWDalDrive.DB;
|
using HxEnum;
|
using MySqlX.XDevAPI.Common;
|
using Newtonsoft.Json.Linq;
|
using System;
|
using System.Collections.Generic;
|
using System.Collections.ObjectModel;
|
using System.IO;
|
using System.Linq;
|
using System.Windows;
|
using System.Windows.Media.Media3D;
|
using XCommon.Log;
|
using XImagingXhandler.XDAL;
|
|
namespace XHandler.Class.DataEx
|
{
|
public enum PickMode
|
{
|
Choice,
|
Puncture,
|
Aspirate
|
}
|
|
public enum CoatingMode
|
{
|
HuiMode,
|
ZMode
|
}
|
|
public enum PickPosition
|
{
|
/// <summary>
|
/// 皿底部
|
/// </summary>
|
DishBottom,
|
/// <summary>
|
/// 菌表面
|
/// </summary>
|
BacterialSurface,
|
|
}
|
|
public class DataModule
|
{
|
|
private static DataModule _instance;
|
public static DataModule getInstance()
|
{
|
if (_instance == null)
|
{
|
_instance = new DataModule();
|
return _instance;
|
}
|
return _instance;
|
}
|
|
/// <summary>
|
/// 获取机械臂信息
|
/// </summary>
|
private List<DeviceArm> deviceArms;
|
public List<DeviceArm> GetDeviceArm(bool bRefresh = false, bool insert = true)
|
{
|
if (bRefresh)
|
{
|
deviceArms = DeviceArmDB.GetDeviceArmFromdb(Shared.SoftwareInformation.software_information_id);
|
if (insert)
|
{
|
DeviceArm da = new DeviceArm();
|
da.head_type = Properties.Resources.strPlsSelect;
|
da.device_arm_name = Properties.Resources.strPlsSelect;
|
da.arm_type = -1;
|
deviceArms.Insert(0, da);
|
}
|
}
|
else
|
{
|
if (deviceArms == null)
|
{
|
deviceArms = DeviceArmDB.GetDeviceArmFromdb(Shared.SoftwareInformation.software_information_id);
|
if (insert)
|
{
|
DeviceArm da = new DeviceArm();
|
da.head_type = Properties.Resources.strPlsSelect;
|
da.device_arm_name = Properties.Resources.strPlsSelect;
|
da.arm_type = -1;
|
deviceArms.Insert(0, da);
|
}
|
}
|
}
|
return deviceArms;
|
}
|
|
public List<DeviceArm> GetDeviceArmWithAll()
|
{
|
List<DeviceArm> result = null;
|
//if (deviceArms == null)
|
//{
|
deviceArms = DeviceArmDB.GetDeviceArmFromdb(Shared.SoftwareInformation.software_information_id);
|
result = deviceArms.Where(x => x.arm_type.Equals(1)).ToList();
|
DeviceArm da = new DeviceArm();
|
da.head_type = Properties.Resources.strAllArm;
|
da.device_arm_name = Properties.Resources.strAllArm;
|
da.arm_type = -1;
|
result.Insert(0, da);
|
//}
|
return result;
|
}
|
|
private ObservableCollection<LiquidType> liquidTypes;
|
public ObservableCollection<LiquidType> GetLiquidTypes(bool bRefresh = false, bool insert = true)
|
{
|
if (bRefresh)
|
{
|
liquidTypes = LiquidTypeDB.GetLiquidTypeFromdb(2);
|
if (insert)
|
{
|
LiquidType lt = new LiquidType();
|
lt.liquid_type_id = string.Empty;
|
lt.liquid_type_name = Properties.Resources.strLiquidType;
|
liquidTypes.Insert(0, lt);
|
}
|
}
|
else
|
{
|
if (liquidTypes == null)
|
{
|
liquidTypes = LiquidTypeDB.GetLiquidTypeFromdb(2);
|
if (insert)
|
{
|
LiquidType lt = new LiquidType();
|
lt.liquid_type_id = string.Empty;
|
lt.liquid_type_name = Properties.Resources.strPlsSelectType;
|
liquidTypes.Insert(0, lt);
|
}
|
}
|
}
|
return liquidTypes;
|
}
|
|
#region 获取液体范围类型
|
private ObservableCollection<LiquidRange> liquidRanges;
|
public ObservableCollection<LiquidRange> GetLiquidRanges(bool bRefresh = false, bool insert = true)
|
{
|
if (bRefresh)
|
{
|
liquidRanges = LiquidRangeDB.GetLiquidRangeFromdb();
|
if (insert)
|
{
|
LiquidRange lr = new LiquidRange();
|
lr.liquid_range_id = "-1";
|
lr.liquid_range_name = Properties.Resources.strPlsSelectRage;
|
liquidRanges.Insert(0, lr);
|
}
|
}
|
else
|
{
|
if (liquidRanges == null)
|
{
|
liquidRanges = LiquidRangeDB.GetLiquidRangeFromdb();
|
if (insert)
|
{
|
LiquidRange lr = new LiquidRange();
|
lr.liquid_range_id = "-1";
|
lr.liquid_range_name = Properties.Resources.strPlsSelectRage;
|
liquidRanges.Insert(0, lr);
|
}
|
}
|
}
|
return liquidRanges;
|
}
|
#endregion
|
|
private ObservableCollection<LabwareType> labwareTypes;
|
public ObservableCollection<LabwareType> GetLabwareTypes(bool bRefresh = false, bool insert = true)
|
{
|
if (bRefresh)
|
{
|
labwareTypes = LabwareTypeDB.GetLabwareTypeFromdb(1);
|
//if (insert)
|
//{
|
// LabwareType type = new LabwareType();
|
// type.labwaretype_name = Properties.Resources.strAllType;
|
// labwareTypes.Insert(0, type);
|
//}
|
}
|
else
|
{
|
if (labwareTypes == null)
|
{
|
labwareTypes = LabwareTypeDB.GetLabwareTypeFromdb(1);
|
//if (insert)
|
//{
|
// LabwareType type = new LabwareType();
|
// type.labwaretype_name = Properties.Resources.strAllType;
|
// labwareTypes.Insert(0, type);
|
//}
|
}
|
}
|
return labwareTypes;
|
}
|
|
private ObservableCollection<Labware> labwares;
|
public ObservableCollection<Labware> GetLabwares(bool bRefresh = false)
|
{
|
if (bRefresh)
|
labwares = DataRWDAL.LabwareDB.GetLabware(2);
|
else
|
{
|
if (labwares == null)
|
{
|
labwares = DataRWDAL.LabwareDB.GetLabware(2);
|
}
|
}
|
if(labwares!=null)
|
{
|
foreach(Labware l in labwares)
|
{
|
if(l.labware_type_id.Equals("4"))
|
{
|
l.labwareWellInfoList = DataRWDAL.LabwareDB.GetSpecialLabwareWellInfo(l.labware_id);
|
}
|
}
|
}
|
|
return labwares;
|
}
|
|
private ObservableCollection<Labware> tipsLabwares;
|
public ObservableCollection<Labware> GetTipsLabwares(bool bRefresh = false, bool insert = true)
|
{
|
if (bRefresh)
|
{
|
tipsLabwares = DataRWDAL.LabwareDB.GetTipLabwareFromdb();
|
if (insert)
|
{
|
Labware lb = new Labware();
|
lb.labware_name = Properties.Resources.strPleaseSelect;
|
tipsLabwares.Insert(0, lb);
|
}
|
}
|
else
|
{
|
if (tipsLabwares == null)
|
{
|
tipsLabwares = DataRWDAL.LabwareDB.GetTipLabwareFromdb();
|
if (insert)
|
{
|
Labware lb = new Labware();
|
lb.labware_name = Properties.Resources.strPleaseSelect;
|
tipsLabwares.Insert(0, lb);
|
}
|
}
|
}
|
return tipsLabwares;
|
}
|
|
/// <summary>
|
/// 获取台面点位
|
/// </summary>
|
private List<Lattice> lattices;
|
public List<Lattice> GetLattices(bool bExcludeTrash = false, bool bRefresh = false)
|
{
|
TabletopTemplate tabletopTemplate = TabletopTemplateDB.GetCurrentAppTabletopTemplateCollectionFromdb(); //增加台面模板判断
|
if (tabletopTemplate == null)
|
{
|
if (bRefresh)
|
lattices = DataRWDAL.LatticeDB.GetLatticeDataFromdb(Shared.SoftwareInformation.software_device_number);
|
else
|
{
|
if (lattices == null)
|
{
|
lattices = DataRWDAL.LatticeDB.GetLatticeDataFromdb(Shared.SoftwareInformation.software_device_number);
|
}
|
}
|
|
|
}
|
else
|
{
|
if (bRefresh)
|
lattices = DataRWDAL.LatticeDB.GetLatticeDataByTabletopTemplateFromdb(tabletopTemplate.tabletopid);
|
else
|
{
|
if (lattices == null)
|
{
|
lattices = DataRWDAL.LatticeDB.GetLatticeDataByTabletopTemplateFromdb(tabletopTemplate.tabletopid);
|
}
|
}
|
}
|
|
if (bExcludeTrash)
|
{
|
var selLattices = lattices.Where(it => it.is_trash == EnumManagement.GetEnumValue(IsTrashEnum.No));
|
if (selLattices.Any())
|
{
|
lattices = selLattices.ToList();
|
}
|
}
|
|
return lattices;
|
}
|
|
private ObservableCollection<Method> methods;
|
public ObservableCollection<Method> GetMethod()
|
{
|
if (methods == null)
|
{
|
methods = new ObservableCollection<Method>();
|
ObservableCollection<Method> list = MethodDB.GetMethodFromdb();
|
foreach (var item in list)
|
{
|
if (item.method_group_id != EnumManagement.GetEnumValue(MethodGroupEnum.None))
|
methods.Add(item);
|
}
|
}
|
|
return methods;
|
}
|
|
/// <summary>
|
/// 获取菌的信息
|
/// </summary>
|
private ObservableCollection<Bacteria> bacterias;
|
public ObservableCollection<Bacteria> GetBacterias(bool bRefresh = false)
|
{
|
if (bRefresh)
|
bacterias = BacteriaDB.GetBacteriaListFromdb(2);
|
else
|
{
|
if (bacterias == null)
|
{
|
bacterias = BacteriaDB.GetBacteriaListFromdb(2);
|
}
|
}
|
return bacterias;
|
}
|
|
/// <summary>
|
/// 获取挑菌方式
|
/// </summary>
|
private ObservableCollection<DropdownName> choiceModeList;
|
public ObservableCollection<DropdownName> GetChoiceMode(string softwareDeviceNumber)
|
{
|
if (choiceModeList == null)
|
{
|
choiceModeList = new ObservableCollection<DropdownName>();
|
choiceModeList.Add(new DropdownName()
|
{
|
dropdown_id = EnumManagement.GetEnumValue(ChoiceModeEnum.SigleSelectMode).ToString(),
|
dropdown_name = Properties.Resources.strSingleSelect
|
});
|
}
|
|
return choiceModeList;
|
}
|
|
#region 获取加液、取液位置类型
|
public ObservableCollection<DropdownName> GetDispensePositionType()
|
{
|
ObservableCollection<DropdownName> positionTypeList = new ObservableCollection<DropdownName>();
|
positionTypeList.Add(new DropdownName()
|
{
|
dropdown_id = EnumManagement.GetEnumValue(MixPositionEnum.Liquid).ToString(),
|
dropdown_name = EnumManagement.GetEnumDescription(MixPositionEnum.Liquid)
|
});
|
positionTypeList.Add(new DropdownName()
|
{
|
dropdown_id = EnumManagement.GetEnumValue(MixPositionEnum.Top).ToString(),
|
dropdown_name = EnumManagement.GetEnumDescription(MixPositionEnum.Top)
|
});
|
|
positionTypeList.Add(new DropdownName()
|
{
|
dropdown_id = EnumManagement.GetEnumValue(MixPositionEnum.Bottom).ToString(),
|
dropdown_name = EnumManagement.GetEnumDescription(MixPositionEnum.Bottom)
|
});
|
|
return positionTypeList;
|
}
|
#endregion
|
|
/// <summary>
|
/// 获取涂布方式
|
/// </summary>
|
private ObservableCollection<DropdownName> coatingModeList;
|
public ObservableCollection<DropdownName> GetCoatingMode()
|
{
|
if (coatingModeList == null)
|
{
|
coatingModeList = new ObservableCollection<DropdownName>();
|
|
#region 回字型
|
coatingModeList.Add(new DropdownName()
|
{
|
dropdown_id = EnumManagement.GetEnumValue(CoatingModeEnum.HuiziMode).ToString(),
|
dropdown_name = Properties.Resources.strHuiziMode
|
});
|
#endregion
|
|
#region Z字型
|
coatingModeList.Add(new DropdownName()
|
{
|
dropdown_id = EnumManagement.GetEnumValue(CoatingModeEnum.ZMode).ToString(),
|
dropdown_name = Properties.Resources.strZMode
|
});
|
#endregion
|
|
#region 上下移动
|
coatingModeList.Add(new DropdownName()
|
{
|
dropdown_id = EnumManagement.GetEnumValue(CoatingModeEnum.UpDownMode).ToString(),
|
dropdown_name = Properties.Resources.strUpDownMode
|
});
|
#endregion
|
|
#region 吸放液
|
coatingModeList.Add(new DropdownName()
|
{
|
dropdown_id = EnumManagement.GetEnumValue(CoatingModeEnum.AspirateDispenseMode).ToString(),
|
dropdown_name = Properties.Resources.strAspirateDispense
|
});
|
#endregion
|
|
#region 放液
|
coatingModeList.Add(new DropdownName()
|
{
|
dropdown_id = EnumManagement.GetEnumValue(CoatingModeEnum.DispenseMode).ToString(),
|
dropdown_name = Properties.Resources.strDispense
|
});
|
#endregion
|
}
|
|
return coatingModeList;
|
}
|
|
private ObservableCollection<string> pickPositionList;
|
public ObservableCollection<string> GetPickPosition()
|
{
|
if (pickPositionList == null)
|
{
|
pickPositionList = new ObservableCollection<string>();
|
pickPositionList.Add(Properties.Resources.strDishBottom);
|
pickPositionList.Add(Properties.Resources.strBacteriaSurface);
|
}
|
|
return pickPositionList;
|
}
|
|
private ObservableCollection<string> coatingPositionList;
|
public ObservableCollection<string> GetCoatingPosition()
|
{
|
if (coatingPositionList == null)
|
{
|
coatingPositionList = new ObservableCollection<string>();
|
coatingPositionList.Add(Properties.Resources.strDishBottom);
|
}
|
|
return coatingPositionList;
|
}
|
|
private ObservableCollection<string> divisionList;
|
public ObservableCollection<string> GetDivisionList()
|
{
|
if (divisionList == null)
|
{
|
divisionList = new ObservableCollection<string>();
|
divisionList.Add("1" + Properties.Resources.strDivision);
|
divisionList.Add("2" + Properties.Resources.strDivision);
|
divisionList.Add("3" + Properties.Resources.strDivision);
|
divisionList.Add("4" + Properties.Resources.strDivision);
|
}
|
|
return divisionList;
|
}
|
|
private ObservableCollection<string> specsDiameterList;
|
public ObservableCollection<string> GetSpecsDiameterList()
|
{
|
if (specsDiameterList == null)
|
{
|
specsDiameterList = new ObservableCollection<string>();
|
specsDiameterList.Add("35 mm");
|
specsDiameterList.Add("55 mm");
|
specsDiameterList.Add("60 mm");
|
specsDiameterList.Add("65 mm");
|
specsDiameterList.Add("70 mm");
|
specsDiameterList.Add("90 mm");
|
specsDiameterList.Add("100 mm");
|
specsDiameterList.Add("120 mm");
|
specsDiameterList.Add("150 mm");
|
specsDiameterList.Add("180 mm");
|
specsDiameterList.Add("200 mm");
|
}
|
|
return specsDiameterList;
|
}
|
|
private ObservableCollection<string> specsHeightList;
|
public ObservableCollection<string> GetSpecsHeightList()
|
{
|
if (specsHeightList == null)
|
{
|
specsHeightList = new ObservableCollection<string>();
|
specsHeightList.Add("9 mm");
|
specsHeightList.Add("10 mm");
|
specsHeightList.Add("15 mm");
|
specsHeightList.Add("20 mm");
|
}
|
|
return specsHeightList;
|
}
|
|
private ObservableCollection<BacteriaCoordinateEx> pickBacteriaCoordinationList = new ObservableCollection<BacteriaCoordinateEx>();
|
/// <summary>
|
/// 获取拍照json文件里的数据
|
/// </summary>
|
/// <param name="jsonFile"></param>
|
/// <returns></returns>
|
public ObservableCollection<BacteriaCoordinateEx> GetBacteriaCoordinateList(string jsonFile = "")
|
{
|
if (string.IsNullOrEmpty(jsonFile))
|
return pickBacteriaCoordinationList;
|
if (!File.Exists(jsonFile))
|
{
|
return pickBacteriaCoordinationList;
|
}
|
try
|
{
|
pickBacteriaCoordinationList.Clear();
|
string jsonData = File.ReadAllText(jsonFile);
|
jsonData = jsonData.Replace("#!HxSEP!#", "");
|
|
JObject job = JObject.Parse(jsonData);
|
JArray jArray = (JArray)job["germlist"];
|
|
foreach (JToken jt in jArray)
|
{
|
BacteriaCoordinate bacteriaCoordinate = new BacteriaCoordinate();
|
bacteriaCoordinate.bacteriacoordinate_id = jt["index"].ToString();
|
string coordinate3D = string.Empty;
|
string coordinate3Dx = jt["coordinate3D"]["x"].ToString();
|
string coordinate3Dy = jt["coordinate3D"]["y"].ToString();
|
string coordinate3Dz = jt["coordinate3D"]["z"].ToString();
|
coordinate3D = jt["coordinate3D"]["x"].ToString() + "," + jt["coordinate3D"]["y"].ToString() + "," + jt["coordinate3D"]["z"].ToString();
|
bacteriaCoordinate.coordinate_machine = coordinate3D;
|
string coordinatePixel = string.Empty;
|
string pixelx = jt["coordinatePixel"]["x"].ToString();
|
string pixely = jt["coordinatePixel"]["y"].ToString();
|
coordinatePixel = jt["coordinatePixel"]["x"].ToString() + "," + jt["coordinatePixel"]["y"].ToString();
|
bacteriaCoordinate.coordinate_pixel = coordinatePixel;
|
|
BacteriaCoordinateEx ex = new BacteriaCoordinateEx(bacteriaCoordinate);
|
ex.diameter = jt["diameterSize"].ToString();
|
double pixelX = double.Parse(pixelx);
|
double pixelY = double.Parse(pixely);
|
ex.pixelPoint = new Point(pixelX, pixelY);
|
|
double p3DX = double.Parse(coordinate3Dx);
|
double p3DY = double.Parse(coordinate3Dy);
|
double p3DZ = double.Parse(coordinate3Dz);
|
ex.machinePoint = new Point3D(p3DX, p3DY, p3DZ);
|
pickBacteriaCoordinationList.Add(ex);
|
}
|
}
|
catch (Exception ex)
|
{
|
LoggerHelper.ErrorLog("ERROR:", ex);
|
}
|
|
return pickBacteriaCoordinationList;
|
}
|
|
/// <summary>
|
/// 未检测到时的处理方法
|
/// </summary>
|
private ObservableCollection<string> undetectProcessList;
|
public ObservableCollection<string> GetUndetectProcessList()
|
{
|
if (undetectProcessList == null)
|
{
|
undetectProcessList = new ObservableCollection<string>();
|
undetectProcessList.Add(Properties.Resources.strFailedContinue);
|
undetectProcessList.Add(Properties.Resources.strContinueFromBottom);
|
undetectProcessList.Add(Properties.Resources.strContinueFromTop);
|
//undetectProcessList.Add(Properties.Resources.strAuto);
|
undetectProcessList.Add(Properties.Resources.strShowWindows);
|
undetectProcessList.Add(Properties.Resources.strCurrentPos);
|
}
|
return undetectProcessList;
|
}
|
|
/// <summary>
|
/// 液面跟随方式
|
/// </summary>
|
private ObservableCollection<string> liquidFollowTypeList;
|
public ObservableCollection<string> GetLiquidFollowTypeList()
|
{
|
if (liquidFollowTypeList == null)
|
{
|
liquidFollowTypeList = new ObservableCollection<string>();
|
liquidFollowTypeList.Add(Properties.Resources.strPleaseSelect);
|
liquidFollowTypeList.Add(Properties.Resources.strSpeedAndPointDis);
|
liquidFollowTypeList.Add(Properties.Resources.strLiquidFaceArea);
|
}
|
return liquidFollowTypeList;
|
}
|
|
/// <summary>
|
/// 吸液堵塞处理方式
|
/// </summary>
|
private ObservableCollection<string> AspirateBlockDealTypeList;
|
public ObservableCollection<string> GetAspirateBlockDealTypeList()
|
{
|
if (AspirateBlockDealTypeList == null)
|
{
|
AspirateBlockDealTypeList = new ObservableCollection<string>();
|
AspirateBlockDealTypeList.Add(Properties.Resources.strAspirateBlockDeal0);
|
AspirateBlockDealTypeList.Add(Properties.Resources.strAspirateBlockDeal1);
|
AspirateBlockDealTypeList.Add(Properties.Resources.strAspirateBlockDeal2);
|
AspirateBlockDealTypeList.Add(Properties.Resources.strAspirateBlockDeal3);
|
AspirateBlockDealTypeList.Add(Properties.Resources.strAspirateBlockDeal4);
|
AspirateBlockDealTypeList.Add(Properties.Resources.strShowWindows);
|
}
|
return AspirateBlockDealTypeList;
|
}
|
|
/// <summary>
|
/// 排液堵塞处理方式
|
/// </summary>
|
private ObservableCollection<string> DispenseBlockDealTypeList;
|
public ObservableCollection<string> GetDispenseBlockDealTypeList()
|
{
|
if (DispenseBlockDealTypeList == null)
|
{
|
DispenseBlockDealTypeList = new ObservableCollection<string>();
|
DispenseBlockDealTypeList.Add(Properties.Resources.strDispenseBlockDeal0);
|
DispenseBlockDealTypeList.Add(Properties.Resources.strAspirateBlockDeal3);
|
DispenseBlockDealTypeList.Add(Properties.Resources.strAspirateBlockDeal4);
|
DispenseBlockDealTypeList.Add(Properties.Resources.strShowWindows);
|
}
|
return DispenseBlockDealTypeList;
|
}
|
|
/// <summary>
|
/// 吸空处理方式
|
/// </summary>
|
private ObservableCollection<string> AspirateAirDealTypeList;
|
public ObservableCollection<string> GetAspirateAirDealTypeList()
|
{
|
if (AspirateAirDealTypeList == null)
|
{
|
AspirateAirDealTypeList = new ObservableCollection<string>();
|
AspirateAirDealTypeList.Add(Properties.Resources.strAspirateAirDeal0);
|
AspirateAirDealTypeList.Add(Properties.Resources.strAspirateAirDeal1);
|
AspirateAirDealTypeList.Add(Properties.Resources.strAspirateBlockDeal3);
|
AspirateAirDealTypeList.Add(Properties.Resources.strAspirateBlockDeal4);
|
}
|
return AspirateAirDealTypeList;
|
}
|
|
#region 稀释方向
|
/// <summary>
|
/// 稀释方向
|
/// </summary>
|
private ObservableCollection<DropdownName> dilutionDirectionList;
|
public ObservableCollection<DropdownName> GetDilutionDirectionList()
|
{
|
if (dilutionDirectionList == null)
|
{
|
dilutionDirectionList = new ObservableCollection<DropdownName>();
|
|
#region 从左到右
|
dilutionDirectionList.Add(new DropdownName()
|
{
|
dropdown_id = EnumManagement.GetEnumValue(DilutionDirectionEnum.LeftToRight).ToString(),
|
dropdown_name = Properties.Resources.strLeftToRight
|
});
|
#endregion
|
|
#region 从上到下
|
dilutionDirectionList.Add(new DropdownName()
|
{
|
dropdown_id = EnumManagement.GetEnumValue(DilutionDirectionEnum.UpToDown).ToString(),
|
dropdown_name = Properties.Resources.strUpToDown
|
});
|
#endregion
|
|
#region 从下到上
|
dilutionDirectionList.Add(new DropdownName()
|
{
|
dropdown_id = EnumManagement.GetEnumValue(DilutionDirectionEnum.DownToUp).ToString(),
|
dropdown_name = Properties.Resources.strDownToUp
|
});
|
#endregion
|
|
}
|
|
return dilutionDirectionList;
|
}
|
#endregion
|
|
#region 更换Tip
|
/// <summary>
|
/// 更换Tip
|
/// </summary>
|
private ObservableCollection<DropdownName> changeTipList;
|
public ObservableCollection<DropdownName> GetChangeTipList()
|
{
|
if (changeTipList == null)
|
{
|
changeTipList = new ObservableCollection<DropdownName>();
|
|
#region 不更换
|
changeTipList.Add(new DropdownName()
|
{
|
dropdown_id = EnumManagement.GetEnumValue(ChangeTipEnum.NoChange).ToString(),
|
dropdown_name = Properties.Resources.strNoChangeTip
|
});
|
#endregion
|
|
#region 更换
|
changeTipList.Add(new DropdownName()
|
{
|
dropdown_id = EnumManagement.GetEnumValue(ChangeTipEnum.Change).ToString(),
|
dropdown_name = Properties.Resources.strChangeTip
|
});
|
#endregion
|
}
|
|
return changeTipList;
|
}
|
#endregion
|
}
|
}
|