public static FileSave ResetInstance() { PathInfo info = PathInfo.CreateInstance(); singletonInstance = AbstractConfig.Load(typeof(FileSave), ExtraTypes, info.FileSaveSetup) as FileSave; if (singletonInstance == null) { singletonInstance = new FileSave(); singletonInstance.Initialize(); singletonInstance.SetDefaultDir(); } 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(); }
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(); }
private void OptionSet(bool ReloadFlag) { this.usrenv = UserEnvironment.CreateInstance(); if (this.sysenv.TerminalInfo.Protocol == ProtocolType.Mail) { this.ProtocolName = this.sysenv.MailInfo.SelectServer(this.usrenv.MailInfo.ServerConnect).display; } else { this.ProtocolName = this.sysenv.InteractiveInfo.SelectServer(this.usrenv.InteractiveInfo.ServerConnect).display; } if (this.SeqList == null) { this.stbInfomation.Text = this.ProtocolName; this.stbInfomation.Font = new Font(this.stbInfomation.Font, FontStyle.Regular); } this.usrenv_term = this.usrenv.TerminalInfo; this.stbTerm.Text = this.usrenv_term.TermLogicalName; this.SendRecvTimer = this.usrenv.InteractiveInfo.AutoSendRecvTm; this.SendRecvTimerFlg = this.usrenv.InteractiveInfo.AutoSendRecvMode; this.JobConnectSet(); this.JobConnect = this.usrenv.InteractiveInfo.JobConnect; this.AutoSendRecvFlag = this.usrenv.MailInfo.AutoMode; this.AutoSendRecvTimer = this.usrenv.MailInfo.AutoTm; this.AutoSendRecvKind = this.usrenv.MailInfo.AutoTmKind; if (this.AutoSendRecvTimer > 0) { this.tmrSendRecv.Interval = (this.AutoSendRecvTimer * 60) * 0x3e8; } else { this.AutoSendRecvFlag = false; } this.tmrSendRecv.Enabled = this.AutoSendRecvFlag; this.fsc = FileSave.CreateInstance(); this.msgc = MessageClassify.CreateInstance(); this.JobKeySet(); new UserKeySet().ShortCutSet(this.mnMainMenu.Items); this.FunctionSet(0); this.idv.SetUserClass(this.sysenv.TerminalInfo.Debug, ReloadFlag); }
public void JobMenuSet() { this.pi = PathInfo.CreateInstance(); this.fs = FileSave.CreateInstance(); }
public void SetUserClass(bool DebugFlag, bool ReloadFlag) { this.usr = User.CreateInstance(); this.usrenv = UserEnvironment.CreateInstance(); this.HSearchList = this.usr.HistorySearchList; this.SearchListSet(); this.cmbSearchDiv.SelectedIndex = 0; this.msgc = MessageClassify.CreateInstance(); this.trmlist = this.msgc.TermList; this.FldList = this.msgc.Folders; this.FolderSet(); this.DBFixAdd(); this.pi = PathInfo.CreateInstance(); if (ReloadFlag) { string path = this.pi.DataViewPath + "Data.xml"; string str2 = ""; if (File.Exists(path)) { str2 = File.GetLastWriteTime(path).ToString("yyyy/MM/dd HH:mm:ss", DateTimeFormatInfo.InvariantInfo); } string upTime = this.msgc.DataView.upTime; bool flag = (upTime == null) || (str2.CompareTo(upTime) > 0); bool flag2 = true; if (!flag) { if (DebugFlag) { DialogResult result; using (MessageDialog dialog = new MessageDialog()) { result = dialog.ShowMessage("W403", null, null); } if (result == DialogResult.No) { flag2 = false; } } else { using (MessageDialog dialog2 = new MessageDialog()) { dialog2.ShowMessage("W404", null, null); } } } try { this.msgc.DataView.upTime = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss", DateTimeFormatInfo.InvariantInfo); this.msgc.Save(); } catch (Exception exception) { MessageDialog dialog3 = new MessageDialog(); dialog3.ShowMessage("E304", Resources.ResourceManager.GetString("CORE106"), null, exception); dialog3.Close(); dialog3.Dispose(); } if (flag || (!flag && !flag2)) { TreeNode selectedNode = this.tvSendRecvFolder.SelectedNode; this.tvSendRecvFolder.SelectedNode = this.tvSendRecvFolder.Nodes[0]; this.dtsDataView.Clear(); if (str2 != "") { try { this.dtsDataView.Tables[0].BeginLoadData(); try { this.dtsDataView.ReadXml(path); } finally { this.dtsDataView.Tables[0].EndLoadData(); } this.MaxID = this.GetID(); } catch (Exception exception2) { MessageDialog dialog4 = new MessageDialog(); dialog4.ShowMessage("E403", path, null, exception2); dialog4.Dispose(); this.ViewRepair(true); } } this.tvSendRecvFolder.SelectedNode = selectedNode; } else { this.ViewRepair(true); } } this.fs = FileSave.CreateInstance(); UserKeySet set = new UserKeySet(); set.ShortCutSet(this.rmnDataView.Items); set.ShortCutSet(this.rmnSendRecvFolder.Items); }