using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace DataAnalysisControl.Core
{
///
/// Context类,用于组件与外部交互,
///
public static class CONTEXT
{
static IDataAnalysisControlContext _innerContext = new DefaultContext();
public static void SetContext(IDataAnalysisControlContext context)
{
_innerContext = context;
}
public static void WriteLog(Exception ex)
{
_innerContext.Write(ex,"");
}
public static void WriteLog(Exception ex, string log)
{
_innerContext.Write(ex,"数据分析控件日志:" + log);
}
public static void WriteLog(string log)
{
_innerContext.Write(log);
}
///
/// 获取腔体的列表。
///
///
public static Dictionary GetChamberList()
{
return _innerContext.GetChamberList();
}
///
/// 获取运行程序的腔体列表,用于按工艺程序查找数据时的过滤条件。
///
///
public static Dictionary GetRecipeChamberList()
{
return _innerContext.GetRecipeChamberList();
}
public static string GetDBConnString()
{
return _innerContext.GetDBConnString();
}
}
}