コード例 #1
0
 /// <summary>
 /// Read data
 /// </summary>
 public void ReadData(string strAppOptionPath)
 {
     try
     {
         using (System.IO.StreamReader t = new System.IO.StreamReader(strAppOptionPath))
         {
             XmlSerializer serializer = new XmlSerializer(typeof(ApplicationOptions));
             s_appOptions = (ApplicationOptions)serializer.Deserialize(t);
         }
     }
     catch (SystemException e)
     {
         string errMsg = "Read config data failed:\n" + e.Message + "\n" + e.StackTrace;
         vtk.vtkOutputWindow.GetInstance().DisplayErrorText(errMsg);
     }
 }
コード例 #2
0
 public static ApplicationOptions Instance()
 {
     if (s_appOptions == null)
     {
         s_appOptions = new ApplicationOptions();
     }
     return s_appOptions;
 }