1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace DataAnalysisControl.Core
- {
- /// <summary>
- /// Context类,用于组件与外部交互,
- /// </summary>
- 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);
- }
- /// <summary>
- /// 获取腔体的列表。<ChamberName,显示名称>
- /// </summary>
- /// <returns></returns>
- public static Dictionary<string, string> GetChamberList()
- {
- return _innerContext.GetChamberList();
- }
- /// <summary>
- /// 获取运行程序的腔体列表,用于按工艺程序查找数据时的过滤条件。<ChamberName,显示名称>
- /// </summary>
- /// <returns></returns>
- public static Dictionary<string, string> GetRecipeChamberList()
- {
- return _innerContext.GetRecipeChamberList();
- }
- public static string GetDBConnString()
- {
- return _innerContext.GetDBConnString();
- }
- }
- }
|