1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using DataAnalysisControl.Core;
- using Aitex.Core.RT.Log;
- namespace Triton160.UI.ViewModel
- {
- public class JetDataAnalysisContext : IDataAnalysisControlContext
- {
- public Dictionary<string, string> GetChamberList()
- {
- Dictionary<string, string> lst = new Dictionary<string, string>();
- lst["System"] = "System";
- return lst;
- }
- public Dictionary<string, string> GetRecipeChamberList()
- {
- Dictionary<string, string> lst = new Dictionary<string, string>();
- lst["System"] = "System";
- return lst;
- }
- public void Write(string info)
- {
- LOG.Write(info);
- }
- public void Write(Exception ex, string error)
- {
- LOG.Write(ex, error);
- }
-
- public string GetDBConnString()
- {
- string connString = string.Empty;
- try
- {
- connString = System.Configuration.ConfigurationManager.ConnectionStrings["DataAnalysisPostgreSQL"].ConnectionString;
- }
- catch (Exception ex)
- {
- LOG.Write(ex);
- }
- if (string.IsNullOrEmpty(connString))
- connString = "Server=localhost;Port=5432;User Id=postgres;Password=123456;Database=triton160db;Enlist=true;";
- return connString;
- }
- public void WriteLog(Exception ex, string error)
- {
- LOG.Write(ex);
- }
- }
- }
|