Пример #1
0
 public static User ResetInstance()
 {
     PathInfo info = PathInfo.CreateInstance();
     singletonInstance = AbstractConfig.Load(typeof(User), ExtraTypes, info.UserSetup) as User;
     if (singletonInstance == null)
     {
         singletonInstance = new User();
         singletonInstance.Initialize();
     }
     singletonInstance.Application.OnSettingDivChanged += new EventHandler(singletonInstance.SettingDivChanged);
     singletonInstance.Application.SettingsDiv = info.SettingDiv;
     return singletonInstance;
 }
Пример #2
0
 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
 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
 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);
         }
     }
 }
Пример #5
0
 private void mnSystem_Click(object sender, EventArgs e)
 {
     this.TimerStop();
     this.bOptionShowingFlag = true;
     try
     {
         SettingDivType settingsDiv = this.usr.Application.SettingsDiv;
         string dataViewPath = this.pi.DataViewPath;
         if (this.DsArrangeManager != null)
         {
             this.DsArrangeManager.Dispose();
         }
         using (OptionDialog dialog = (OptionDialog) this.CreateOption())
         {
             dialog.IsLogOn = this.ComStatus > 0;
             if (!dialog.IsLogOn)
             {
                 this.idv.DataViewListSave(dataViewPath);
             }
             if (dialog.ShowDialog() == DialogResult.OK)
             {
                 this.usr = User.CreateInstance();
                 this.pi = PathInfo.CreateInstance();
                 bool reloadFlag = settingsDiv != this.usr.Application.SettingsDiv;
                 if (!reloadFlag)
                 {
                     reloadFlag = this.pi.DataViewPath != dataViewPath;
                 }
                 this.OptionSet(reloadFlag);
                 this.OptionSetProc();
                 this.OptionSetInd();
                 this.idv.SetOpenViewFlag(this.mnVisibleCount.Checked);
                 this.idv.ViewCountCheck(true);
                 this.uJobMenu1.JobMenuSet();
                 this.UpdateMenuItems();
                 this.idv.DataViewRepaint(true);
             }
             else
             {
                 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 == ""))))
                 {
                     Environment.Exit(0);
                 }
             }
         }
     }
     finally
     {
         this.bOptionShowingFlag = false;
     }
     this.TimerStart();
 }
Пример #6
0
 private void MainBase_Load(object sender, EventArgs e)
 {
     if (!this.isDesigning)
     {
         this.DiskCheck();
         this.DataInfoCnt = 0;
         this.usr = User.CreateInstance();
         this.HJobList = this.usr.HistoryJobsList;
         this.HUserList = this.usr.HistoryUserList;
         this.HMailBoxList = this.usr.HistoryAddressList;
         this.usr_apc = this.usr.Application;
         this.usr_tlb = this.usr.ToolBar;
         this.usr_wnd = this.usr.Window;
         this.usr_cwc = this.usr.ColumnWidth;
         this.usr_dvf = this.usr.DataViewForm;
         this.usr_jpc = this.usr.JobOption;
         this.usrenv = UserEnvironment.CreateInstance();
         this.OptionSet(true);
         this.idv.RecvFolderSelect();
         this.FldList = this.msgc.Folders;
         if (this.idv.GetCount(4, this.usrenv.TerminalInfo.SaveTerm) > 0)
         {
             MessageDialog dialog = new MessageDialog {
                 TopMost = true
             };
             if (dialog.ShowMessage("C402", this.usrenv.TerminalInfo.SaveTerm.ToString(), "") == DialogResult.Yes)
             {
                 this.idv.SaveDateDataDelete(this.usrenv.TerminalInfo.SaveTerm);
             }
             dialog.Close();
             dialog.Dispose();
             this.uopd.Show();
             Application.DoEvents();
         }
         this.uJobInput1.HistoryJobListSet(this.HJobList);
         this.uJobMenu1.HistoryJobListSet(this.HJobList);
         this.dscl = new DispCodeList();
         this.LoadUserApplication();
         this.mnJobKey.Visible = false;
         int userKind = this.sysenv.TerminalInfo.UserKind;
         if ((this.sysenv.TerminalInfo.UserKind != 4) && !this.sysenv.TerminalInfo.Receiver)
         {
             this.DsArrangeManager = new ArrangeManager(this, this.idv);
             this.DsArrangeManager.AppendArrangeMenu(this.mnOption);
             this.DsArrangeManager.AutoRun();
         }
         this.tbbJetras.Visible = this.sysenv.TerminalInfo.Jetras;
         this.tbbJSplitter5.Visible = this.sysenv.TerminalInfo.Jetras;
         this.DisposingFlag = false;
         this.swtbl = new SWCheckTbl();
         ULogClass.LogWrite("=====< Log Start >=====");
         this.StatusChange(0);
         this.UpdateMenuItems();
         this.uopd.Close();
         this.uopd.Dispose();
     }
 }
Пример #7
0
 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);
 }