static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); MainWindow mWin = new MainWindow(); DataCollection dc = new DataCollection(mWin); if (!mWin.IsDisposed) { mWin.SetDataCollection(dc); dc.start(); Application.Run(mWin); } }
public DataCollection(MainWindow mwin) { window = mwin; //load conf file loadConfFile(DEFAULT_CONF_FILE); mwin.SetParams(param); try { dataStat = new DataStatistics(param); } catch (MyException ex) { mwin.ProcessException(ex); } dataStat.Log("Finished init data statistics..."); api = new PtopwAPIImpl(dataStat); dataStat.Log("Finished init API server..."); DisplayResult = PublicFuns.str2Int32((String)param["DisplayResult"], 1); initPerformanceCounter(); dataStat.Log("Finished init performance counter..."); }