Exemplo n.º 1
0
 public CommonJobForm()
 {
     this.DoubleBuffered = true;
     base.SuspendLayout();
     this.InitializeComponent();
     this.txtInputInfo.Enter += new EventHandler(this.ShowGuide);
     this.lvAttach.Enter += new EventHandler(this.ShowGuide);
     this.gvResult.Enter += new EventHandler(this.ShowGuide);
     this.rtxtGuide.LanguageOption = RichTextBoxLanguageOptions.UIFonts;
     this.ExNaccsData = new NaccsData();
     this.LinkElement = null;
     this.SendGuardIcon = (Icon) this.statusBar.Panels[1].Icon.Clone();
     this.statusBar.Panels[1].Icon = null;
     if (!this.isDesigning)
     {
         User user = User.CreateInstance();
         this.flgFieldClearMsg = user.JobOption.QueryFieldClear;
         SystemEnvironment environment = SystemEnvironment.CreateInstance();
         UserEnvironment environment2 = UserEnvironment.CreateInstance();
         this.flgDoCheckErr = !environment.TerminalInfo.Debug || environment2.DebugFunction.Check_Off;
         this.mnHelp.Visible = environment.TerminalInfo.Demo;
         this.mnGuidance.Visible = environment.TerminalInfo.Demo;
         this.toolSep5.Visible = environment.TerminalInfo.Demo;
         this.btnGuidance.Visible = environment.TerminalInfo.Demo;
         new CustomizeMenu().VisibleJob(this.MainMenu);
         this.btnAppendJobData.Visible = environment.TerminalInfo.UserKind != 4;
         this.toolSep4.Visible = environment.TerminalInfo.UserKind != 4;
         ReceiveNotice notice = ReceiveNotice.CreateInstance();
         this.flgWarningBeep = notice.WarningInform.WaringMode;
         UserKeySet set = new UserKeySet();
         set.ShortCutSet(this.MainMenu.Items);
         set.ShortCutSet(this.PopMenu.Items);
         JobSettings settings = JobSettings.CreateInstance();
         this.SystemMode = settings.SysMode;
     }
     base.Disposed += new EventHandler(this.CommonJobForm_Disposed);
     base.ResumeLayout();
 }
Exemplo n.º 2
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);
 }