public static SystemEnvironment ResetInstance() { PathInfo info = PathInfo.CreateInstance(); singletonInstance = AbstractConfig.Load(typeof(SystemEnvironment), ExtraTypes, info.SystemEnvironmentSetup) as SystemEnvironment; if (singletonInstance == null) { singletonInstance = new SystemEnvironment(); singletonInstance.Initialize(); } return singletonInstance; }
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(); }
private void OptionDialog_Load(object sender, EventArgs e) { if (!this.isDesigning) { systemEnvironment = SystemEnvironment.CreateInstance(); if (systemEnvironment.TerminalInfo.UserKind == 2) { this.IsBank = true; } if (systemEnvironment.TerminalInfo.UserKind == 4) { this.Protocol = ProtocolType.netNACCS; this.tbcRoot.TabPages.Remove(this.tbpMsgCls); this.tbcRoot.TabPages.Remove(this.tbpReceiveInform); this.tbcRoot.TabPages.Remove(this.tbpUserKey); } else { this.Protocol = systemEnvironment.TerminalInfo.Protocol; this.tbcRoot.TabPages.Remove(this.tbpHelp); } user = User.CreateInstance(); this.DivType = user.Application.SettingsDiv; this.Msdg = new MessageDialog(); this.TabPage_Load(); if (this.defaultTab != null) { this.tbcRoot.SelectTab(this.defaultTab); } } }
private void SetMinStatus() { this.sys_env = SystemEnvironment.CreateInstance(); base.usrenv = UserEnvironment.CreateInstance(); this.ServerSet(base.usrenv.InteractiveInfo.ServerConnect); if (!Directory.Exists(base.pi.LogPath)) { Directory.CreateDirectory(base.pi.LogPath); } this.hts_cls.UseHttps = this.sys_env.TerminalInfo.UseInternet; this.hts_cls.UseProxy = base.usrenv.HttpOption.UseProxy; this.hts_cls.ProxyServer = base.usrenv.HttpOption.ProxyName; this.hts_cls.ProxyPort = base.usrenv.HttpOption.ProxyPort; this.hts_cls.UseProxyAccount = base.usrenv.HttpOption.UseProxyAccount; this.hts_cls.ProxyAccount = base.usrenv.HttpOption.ProxyAccount; this.hts_cls.ProxyPassword = base.usrenv.HttpOption.ProxyPassword; this.hts_cls.ClientCertificateHash = base.usrenv.HttpOption.CertificateHash; this.hts_cls.SendTimeout = this.sys_env.TerminalInfo.SendTimeOut; this.hts_cls.UseTrace = base.usrenv.InteractiveInfo.TraceOutput; this.hts_cls.TraceFile = base.pi.LogPath + this.sys_env.InteractiveInfo.TraceFileName; this.hts_cls.TraceSize = this.sys_env.InteractiveInfo.TraceFileSize; this.hts_cls.IsDebug = this.sys_env.TerminalInfo.Debug; this.hts_bat.UseHttps = this.sys_env.TerminalInfo.UseInternet; this.hts_bat.UseProxy = base.usrenv.HttpOption.UseProxy; this.hts_bat.ProxyServer = base.usrenv.HttpOption.ProxyName; this.hts_bat.ProxyPort = base.usrenv.HttpOption.ProxyPort; this.hts_bat.UseProxyAccount = base.usrenv.HttpOption.UseProxyAccount; this.hts_bat.ProxyAccount = base.usrenv.HttpOption.ProxyAccount; this.hts_bat.ProxyPassword = base.usrenv.HttpOption.ProxyPassword; this.hts_bat.ClientCertificateHash = base.usrenv.HttpOption.CertificateHash; this.hts_bat.SendTimeout = this.sys_env.TerminalInfo.SendTimeOut; this.hts_bat.UseTrace = base.usrenv.InteractiveInfo.TraceOutput; this.hts_bat.TraceFile = base.pi.LogPath + this.sys_env.BatchdocInfo.TraceFileName; this.hts_bat.TraceSize = this.sys_env.BatchdocInfo.TraceFileSize; this.hts_bat.IsDebug = this.sys_env.TerminalInfo.Debug; }
private void OptionCheck() { this.sysenv = SystemEnvironment.CreateInstance(); this.DemoFlag = this.sysenv.TerminalInfo.Demo; this.usrenv = UserEnvironment.CreateInstance(); if (((this.usrenv.TerminalInfo.TermLogicalName == null) || (this.usrenv.TerminalInfo.TermLogicalName == "")) || ((this.sysenv.TerminalInfo.Protocol != ProtocolType.Mail) && ((this.usrenv.TerminalInfo.TermAccessKey == null) || (this.usrenv.TerminalInfo.TermAccessKey == "")))) { OptionDialog dialog = (OptionDialog) this.CreateOption(); this.uopd.Hide(); dialog.ShowDialog(); this.usrenv = UserEnvironment.CreateInstance(); if (((this.usrenv.TerminalInfo.TermLogicalName == null) || (this.usrenv.TerminalInfo.TermLogicalName == "")) || ((this.sysenv.TerminalInfo.Protocol != ProtocolType.Mail) && ((this.usrenv.TerminalInfo.TermAccessKey == null) || (this.usrenv.TerminalInfo.TermAccessKey == "")))) { dialog.Dispose(); Environment.Exit(0); } dialog.Dispose(); this.uopd.Show(); Application.DoEvents(); } else if (this.isProxyError) { OptionDialog dialog2 = (OptionDialog) this.CreateOption(); this.uopd.Hide(); dialog2.DefaultTab = dialog2.tbcRoot.TabPages[1]; DialogResult result = dialog2.ShowDialog(); this.usrenv = UserEnvironment.CreateInstance(); dialog2.Dispose(); if (result == DialogResult.OK) { string fileName = Path.Combine(Application.StartupPath, @"Download\NaccsLauncher.exe"); new Process(); Process.Start(fileName, "-U"); this.VersionUpFlag = true; } Environment.Exit(0); Application.DoEvents(); } }