コード例 #1
0
ファイル: HelpSettings.cs プロジェクト: huamanhtuyen/VNACCS
 public static HelpSettings ResetInstance()
 {
     PathInfo info = PathInfo.CreateInstance();
     singletonInstance = AbstractConfig.Load(typeof(HelpSettings), ExtraTypes, info.HelpSetup) as HelpSettings;
     if (singletonInstance == null)
     {
         singletonInstance = new HelpSettings();
         singletonInstance.Initialize();
     }
     return singletonInstance;
 }
コード例 #2
0
ファイル: ConfigFiles.cs プロジェクト: huamanhtuyen/VNACCS
 public static void AllReset()
 {
     pathInfo = PathInfo.ResetInstance();
     systemEnvironment = SystemEnvironment.ResetInstance();
     user = User.ResetInstance();
     userEnvironment = UserEnvironment.ResetInstance();
     optionCertification = OptionCertification.ResetInstance();
     printerSettings = PrintSetups.ResetInstance();
     messageClassify = MessageClassify.ResetInstance();
     helpSettings = HelpSettings.ResetInstance();
     fileSave = FileSave.ResetInstance();
     receiveNotice = ReceiveNotice.ResetInstance();
     userKey = UserKey.ResetInstance();
     termMessage = TermMessage.ResetInstance();
     gStamp = GStampSettings.ResetInstance();
 }
コード例 #3
0
ファイル: OptionDialog.cs プロジェクト: huamanhtuyen/VNACCS
 protected virtual void TabPage_Load()
 {
     ConfigFiles.AllLoad();
     pathInfo = ConfigFiles.pathInfo;
     user = ConfigFiles.user;
     userKey = ConfigFiles.userKey;
     this.saveUserKey = ConfigFiles.userKey;
     printSetups = ConfigFiles.printerSettings;
     userEnvironment = ConfigFiles.userEnvironment;
     messageClassify = ConfigFiles.messageClassify;
     fileSave = ConfigFiles.fileSave;
     receiveNotice = ConfigFiles.receiveNotice;
     helpSettings = ConfigFiles.helpSettings;
     optionCertification = ConfigFiles.optionCertification;
     gStamp = ConfigFiles.gStamp;
     this.LoadTerm();
     this.LoadServer();
     this.LoadPrinter();
     this.LoadAutoPrint();
     this.LoadMsgCls();
     this.LoadFileSaveK();
     this.LoadFileSaveC();
     this.LoadReceiveInform();
     this.LoadUserKey();
     this.LoadLog();
     this.LoadHelp();
     this.LoadPassword();
 }
コード例 #4
0
ファイル: MessageDialog.cs プロジェクト: huamanhtuyen/VNACCS
 public DialogResult ShowJobMessage(string jobCode, string resultCode, string internalCode)
 {
     string messageCode = resultCode.Substring(0, 5);
     if (messageCode.IndexOf('A') == 0)
     {
         jobCode = "SYS";
     }
     ULogClass.LogWrite("Result Code=[" + resultCode + "] Job Code=[" + jobCode + "]\r\n" + internalCode);
     this.helpSet = HelpSettings.CreateInstance();
     string filename = this.helpSet.HelpPath.GymErrPath + jobCode + "_err.xml";
     try
     {
         XmlDocument document = new XmlDocument();
         document.Load(filename);
         XmlNode node = document.SelectSingleNode("//response[@code='" + messageCode + "']");
         this.txbMessageCode.Text = messageCode;
         this.rTxbMessage.Text = node.SelectSingleNode("description").InnerText.Replace(@"\n", "\n");
         this.rTxbDescription.Text = "Process results code;" + resultCode + "\nItem name;" + node.Attributes["name"].Value + "\n\n" + this.rTxbMessage.Text + "\n\n";
         this.rTxbDisposition.Text = node.SelectSingleNode("disposition").InnerText.Replace(@"\n", "\n");
     }
     catch (Exception)
     {
         MessageDialog dialog = new MessageDialog();
         return dialog.ShowMessage("E302", filename, "Service code=" + jobCode + "\nProcess results code=" + resultCode);
     }
     if ((internalCode != null) && !internalCode.Equals(""))
     {
         this.rTxbInternalCode.Text = internalCode;
     }
     else
     {
         this.rTxbInternalCode.Text = Resources.ResourceManager.GetString("INTERNAL_CODE_NULL");
     }
     this.buttonSet(ButtonPatern.OK_ONLY, this.getJobMessageKind(messageCode));
     return base.ShowDialog();
 }