Beispiel #1
0
 private void btnJobOK_Click(object sender, EventArgs e)
 {
     if (this.cmbJobCode.Text == "")
     {
         using (MessageDialog dialog = new MessageDialog())
         {
             dialog.ShowMessage("E582", null, null);
         }
         this.cmbJobCode.Focus();
     }
     else if ((this.cmbDispCode.Items.Count < 1) && (this.DispSet().Count > 0))
     {
         this.cmbDispCode.Focus();
     }
     else
     {
         string str2;
         string text = this.cmbJobCode.Text;
         if (text.IndexOf(" ") > -1)
         {
             text = text.Remove(text.IndexOf(" "));
         }
         if (text.IndexOf(".") > -1)
         {
             string str3 = text;
             int index = str3.IndexOf(".");
             text = str3.Substring(0, index);
             str2 = str3.Remove(0, index + 1);
             if (text == "")
             {
                 using (MessageDialog dialog2 = new MessageDialog())
                 {
                     dialog2.ShowMessage("E582", null, null);
                 }
                 this.cmbJobCode.Focus();
                 return;
             }
             if (str2 == "")
             {
                 string message = Resources.ResourceManager.GetString("CORE40");
                 using (MessageDialogSimpleForm form = new MessageDialogSimpleForm())
                 {
                     form.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Warning, message);
                 }
                 this.cmbJobCode.Focus();
                 return;
             }
         }
         else if (this.cmbDispCode.Enabled)
         {
             str2 = this.cmbDispCode.Text.Substring(0, 3);
         }
         else
         {
             str2 = "";
         }
         this.OnJobOpen(this, text, str2);
     }
 }
 public void Excute(string toolpath)
 {
     string directoryName = Path.GetDirectoryName(toolpath);
     string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(toolpath);
     try
     {
         this.Update(directoryName, fileNameWithoutExtension);
     }
     catch (Exception exception)
     {
         MessageDialog dialog = new MessageDialog();
         dialog.ShowMessage("E702", string.Format("{0}\r\n{1}", exception.Message, exception.StackTrace));
         dialog.Dispose();
     }
 }
Beispiel #3
0
 protected bool DatasetRemove(bool bResetid)
 {
     bool flag = false;
     try
     {
         flag = this.RemoveRequest(bResetid);
     }
     catch (Exception exception)
     {
         string internalCode = string.Format("# Error occurred while deleting the old messages.\r\n{0}\r\n{1}", exception.Message, exception.StackTrace);
         MessageDialog dialog = new MessageDialog();
         dialog.ShowMessage("E002", "", internalCode);
         dialog.Dispose();
     }
     return flag;
 }
Beispiel #4
0
 private void OnCancel(object sender, EventArgs e)
 {
     MessageDialog dialog = new MessageDialog {
         TopMost = true
     };
     DialogResult result = dialog.ShowMessage("C404", "");
     dialog.Close();
     dialog.Dispose();
     if ((result == DialogResult.Yes) && (this.RemoveProgress != null))
     {
         this.BackWorker.CancelAsync();
     }
 }
Beispiel #5
0
 protected virtual bool OnRevertRequest(object sender, RevertEventArgs e)
 {
     bool flag = false;
     try
     {
         flag = this.RevertRequest(e.PathRoot, e.FileNames);
     }
     catch (Exception exception)
     {
         string internalCode = string.Format("# Error occurred while restoring the old messages.\r\n{0}\r\n{1}", exception.Message, exception.StackTrace);
         MessageDialog dialog = new MessageDialog();
         dialog.ShowMessage("E002", "", internalCode);
         dialog.Dispose();
     }
     return flag;
 }
Beispiel #6
0
 protected override void SetFocusField(string id, int errorPage, int idx)
 {
     bool flag = true;
     for (int i = 0; i < this.JPList.Count; i++)
     {
         if (this.JPList[i].JPStatus == JobPanelStatus.Open)
         {
             Control c = null;
             IItemAttributesEx ex = null;
             DivJobPanel jP = this.JPList[i].JP;
             List<Control> lstCtrl = new List<Control>();
             jP.GetControlsFromID(jP, id, lstCtrl);
             if (lstCtrl.Count > 0)
             {
                 if ((errorPage > 0) && ((jP.RepeatPos > errorPage) || (errorPage > (jP.RepeatPos + jP.BsCount))))
                 {
                     int num2;
                     if (jP.RepeatPos < errorPage)
                     {
                         num2 = 1;
                     }
                     else
                     {
                         num2 = -1;
                     }
                     int num3 = 0;
                     int repeatPos = jP.RepeatPos;
                     while (((num2 == 1) && ((repeatPos > jP.RepeatCnt) || (jP.RepeatCnt > (repeatPos + jP.BsCount)))) || ((num2 == -1) && (repeatPos != 1)))
                     {
                         num3++;
                         repeatPos += (jP.BsCount + 1) * num2;
                         if ((repeatPos <= errorPage) && (errorPage <= (repeatPos + jP.BsCount)))
                         {
                             for (int k = 0; k < num3; k++)
                             {
                                 if (num2 == 1)
                                 {
                                     jP.bindingNavigatorMoveNextItem_Click(null, null);
                                 }
                                 else
                                 {
                                     jP.bindingNavigatorMovePreviousItem_Click(null, null);
                                 }
                             }
                             this.SetFocusField(id, errorPage, idx);
                             return;
                         }
                     }
                 }
                 for (int j = 0; j < lstCtrl.Count; j++)
                 {
                     c = lstCtrl[j];
                     if (c is LBDataGridView)
                     {
                         this.OpenDivTabPage(i);
                         jP.OpenTabPage(c);
                         jP.Focus();
                         LBDataGridView view = (LBDataGridView) c;
                         view.Focus();
                         view.SetFocusCell(id, errorPage - 1);
                         return;
                     }
                     ex = (IItemAttributesEx) c;
                     if (ex.CurrentPage == errorPage)
                     {
                         this.OpenDivTabPage(i);
                         jP.OpenTabPage(c);
                         jP.Focus();
                         c.Focus();
                         return;
                     }
                 }
             }
         }
         else
         {
             flag = false;
         }
     }
     if (((errorPage != 0) || (id[id.Length - 1] < '0')) || (id[id.Length - 1] > '9'))
     {
         MessageDialog dialog = new MessageDialog();
         if (!flag)
         {
             dialog.ShowMessage("E530", "", null);
         }
         else
         {
             dialog.ShowMessage("E531", "", null);
         }
         dialog.Dispose();
     }
     else
     {
         StringBuilder builder = new StringBuilder();
         builder.Append(id.ToCharArray());
         string s = "0";
         int num7 = 0;
         num7 = builder.Length - 1;
         while (num7 > -1)
         {
             if ((builder[num7] < '0') || (builder[num7] > '9'))
             {
                 break;
             }
             builder[num7] = '_';
             num7--;
         }
         s = id.Substring(num7 + 1);
         this.SetFocusField(builder.ToString(), int.Parse(s), idx);
     }
 }
Beispiel #7
0
 private void MainBase_FormClosing(object sender, FormClosingEventArgs e)
 {
     this.bMailActionFlag = true;
     if (!this.VersionUpFlag && (this.idv.GetCount(3) > 0))
     {
         MessageDialog dialog = new MessageDialog();
         DialogResult result = dialog.ShowMessage("C403", "");
         if (result == DialogResult.Yes)
         {
             this.idv.ClearDelete();
         }
         else if (result != DialogResult.No)
         {
             e.Cancel = true;
             dialog.Dispose();
             this.bMailActionFlag = false;
             return;
         }
         dialog.Dispose();
     }
     try
     {
         this.DisposingFlag = true;
         if (this.DsArrangeManager != null)
         {
             this.DsArrangeManager.Dispose();
         }
         this.BackupFileDelete();
         this.SaveUserApplication();
         this.usr.Save();
         this.msgc.Save();
         this.idv.DataViewListSave("");
     }
     catch (Exception exception)
     {
         MessageDialog dialog2 = new MessageDialog();
         dialog2.ShowMessage("E304", Naccs.Core.Properties.Resources.ResourceManager.GetString("CORE106"), null, exception);
         dialog2.Close();
         dialog2.Dispose();
     }
     ULogClass.LogWrite("=====< Log End >=====");
 }
Beispiel #8
0
 private void btnEntryPrtAdd_Click(object sender, EventArgs e)
 {
     if (this.prtInfoList.Count >= 0x63)
     {
         this.ShowModelessMessage("E548", null, null);
     }
     else
     {
         PrinterSettings settings = new PrinterSettings();
         if (!settings.IsValid)
         {
             MessageDialog dialog = new MessageDialog();
             dialog.ShowMessage("E607", "");
             dialog.Close();
             dialog.Dispose();
         }
         else
         {
             PrinterTrayDlg dlg = null;
             try
             {
                 dlg = new PrinterTrayDlg();
                 if (dlg.ShowDialog() == DialogResult.OK)
                 {
                     if (this.IsEntryPrinter(dlg.PrinterSettings.PrinterName))
                     {
                         this.ShowModelessMessage("E549", null, null);
                     }
                     else
                     {
                         this.GetPrinterInfo(dlg.PrinterSettings);
                         if (string.IsNullOrEmpty(this.txbDefaultPrinter.Text))
                         {
                             this.txbDefaultPrinter.Text = dlg.PrinterSettings.PrinterName;
                             this.txbDefaultBin.Text = dlg.PrinterSettings.DefaultPageSettings.PaperSource.SourceName;
                             this.default_binno = dlg.PrinterSettings.DefaultPageSettings.PaperSource.RawKind;
                         }
                         this.tbpPrinter_Refresh();
                     }
                 }
             }
             catch (Exception exception)
             {
                 MessageDialog dialog2 = new MessageDialog();
                 dialog2.ShowMessage("E611", dlg.PrinterSettings.PrinterName, null, exception);
                 dialog2.Close();
                 dialog2.Dispose();
             }
         }
     }
 }
Beispiel #9
0
 private void ShowModelessMessage(string msgCode, string applyStr, string message)
 {
     try
     {
         base.Enabled = false;
         MessageDialog dialog = new MessageDialog();
         dialog.FormClosing += new FormClosingEventHandler(this.dialog_FormClosing);
         dialog.ShowModelessMessageDialog(msgCode, applyStr, message);
     }
     catch (Exception exception)
     {
         base.Enabled = true;
         throw exception;
     }
 }
Beispiel #10
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();
     }
 }
Beispiel #11
0
 private void mnClearDelete_Click(object sender, EventArgs e)
 {
     MessageDialog dialog = new MessageDialog();
     if (dialog.ShowMessage("C401", "") == DialogResult.Yes)
     {
         this.idv.ClearDelete();
     }
     dialog.Dispose();
 }
Beispiel #12
0
 private void mnVersionUp_Click(object sender, EventArgs e)
 {
     DialogResult result;
     this.bMailActionFlag = true;
     using (MessageDialog dialog = new MessageDialog())
     {
         result = dialog.ShowMessage("W002", null, null);
     }
     if (result == DialogResult.Yes)
     {
         try
         {
             string fileName = Path.Combine(Application.StartupPath, @"Download\NaccsLauncher.exe");
             new Process();
             Process.Start(fileName, "-U");
             this.VersionUpFlag = true;
             base.Close();
             return;
         }
         catch (Exception exception)
         {
             string message = Naccs.Core.Properties.Resources.ResourceManager.GetString("CORE70") + MessageDialog.CreateExceptionMessage(exception);
             using (MessageDialogSimpleForm form = new MessageDialogSimpleForm())
             {
                 form.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Error, message);
             }
             return;
         }
     }
     this.bMailActionFlag = false;
 }
Beispiel #13
0
 protected int ReceiveNoticeMessage(IData data)
 {
     int num = -1;
     ReceiveNotice notice = ReceiveNotice.CreateInstance();
     try
     {
         if (notice.Inform.InfoMode)
         {
             if ((this.rnd != null) && !this.rnd.IsDisposed)
             {
                 return num;
             }
             for (int i = 0; i < notice.ReceiveInformList.Count; i++)
             {
                 if (data.OutCode.StartsWith(notice.ReceiveInformList[i].OutCode))
                 {
                     if (this.sysenv.TerminalInfo.Protocol == ProtocolType.Mail)
                     {
                         if (notice.ReceiveInformList[i].Inform)
                         {
                             if (notice.ReceiveInformList[i].InformSound)
                             {
                                 num = 2;
                             }
                             else
                             {
                                 num = 1;
                             }
                         }
                         else if (notice.ReceiveInformList[i].InformSound)
                         {
                             num = 0;
                         }
                     }
                     else
                     {
                         if (notice.ReceiveInformList[i].Inform)
                         {
                             this.rnd = new frmReceiveNoticeDlg();
                             this.rnd.Show(this);
                         }
                         if (notice.ReceiveInformList[i].InformSound && File.Exists(notice.Sound.SoundFile))
                         {
                             new SoundPlayer(notice.Sound.SoundFile).Play();
                         }
                     }
                     break;
                 }
             }
         }
         return num;
     }
     catch (Exception exception)
     {
         using (MessageDialog dialog = new MessageDialog())
         {
             dialog.ShowMessage("E301", notice.Sound.SoundFile, null, exception);
         }
         return num;
     }
 }
Beispiel #14
0
 private void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
 {
     MessageDialog dialog = new MessageDialog();
     string message = e.Exception.Message + "\n" + e.Exception.Source + "\n\n" + e.Exception.StackTrace;
     ULogClass.WriteProcessInfo(message);
     dialog.ShowMessage("E002", "", message);
     dialog.Dispose();
 }
Beispiel #15
0
 private void mnFileOpen_Click(object sender, EventArgs e)
 {
     this.ofdMain.Multiselect = false;
     this.ofdMain.InitialDirectory = this.GetInitialDirectory();
     if (this.ofdMain.ShowDialog() == DialogResult.OK)
     {
         IData data = null;
         try
         {
             data = DataFactory.LoadFromEdiFile(this.ofdMain.FileName);
         }
         catch (Exception exception)
         {
             MessageDialog dialog = new MessageDialog();
             dialog.ShowMessage("E302", this.ofdMain.FileName, null, exception);
             dialog.Close();
             dialog.Dispose();
             return;
         }
         if (!(data.JobCode.Trim() == ""))
         {
             if (!this.SearchDispCode(data))
             {
                 UJobInputDlg dlg = new UJobInputDlg();
                 dlg.SetCodeSelect(data.JobCode.Trim());
                 if (dlg.ShowDialog() != DialogResult.OK)
                 {
                     dlg.Close();
                     dlg.Dispose();
                     return;
                 }
                 data.Header.DispCode = dlg.DispCode;
                 dlg.Close();
                 dlg.Dispose();
             }
             this.JobFormOpen(data);
         }
         else
         {
             this.JobError(-1);
         }
     }
 }
Beispiel #16
0
 private void mnFileDataViewAppend_Click(object sender, EventArgs e)
 {
     this.ofdMain.Multiselect = true;
     this.ofdMain.InitialDirectory = this.GetInitialDirectory();
     if (this.ofdMain.ShowDialog() == DialogResult.OK)
     {
         DeleteRestore restore = new DeleteRestore(3);
         restore.Show();
         restore.pgbRestore.Minimum = 0;
         restore.pgbRestore.Maximum = this.ofdMain.FileNames.Length;
         try
         {
             int num = 0;
             foreach (string str in this.ofdMain.FileNames)
             {
                 IData data;
                 num++;
                 restore.pgbRestore.Value = num;
                 restore.Refresh();
                 try
                 {
                     data = DataFactory.LoadFromEdiFile(str);
                 }
                 catch (Exception exception)
                 {
                     MessageDialog dialog = new MessageDialog();
                     dialog.ShowMessage("E302", str, null, exception);
                     dialog.Dispose();
                     return;
                 }
                 if (data.Header.OutCode.Trim() != "")
                 {
                     this.idv.AppendJobData(data, 2, false, false, false);
                 }
                 else
                 {
                     using (MessageDialog dialog2 = new MessageDialog())
                     {
                         dialog2.ShowMessage("W406", null, null);
                     }
                 }
             }
         }
         finally
         {
             restore.Close();
             restore.Dispose();
             this.idv.DataViewSaveRepaint();
         }
     }
 }
Beispiel #17
0
 private bool RevertRequest(string root, string[] files)
 {
     ULogClass.LogWrite(string.Format("# Will start restoring the old messages.[Number of messages:{0}]", files.Length));
     DataGridView internalDataGrid = this.Dataview.InternalDataGrid;
     DataSet internalDataSet = this.Dataview.InternalDataSet;
     Stopwatch stopwatch = new Stopwatch();
     stopwatch.Start();
     this.Dataview.DataViewNoRepaint(true);
     internalDataGrid.RowPrePaint += new DataGridViewRowPrePaintEventHandler(this.OnRowPrePaint);
     internalDataGrid.ClearSelection();
     internalDataGrid.Refresh();
     internalDataGrid.Cursor = Cursors.WaitCursor;
     bool flag = false;
     try
     {
         Naccs.Core.DataView.Arrange.DatasetRevert revert = new Naccs.Core.DataView.Arrange.DatasetRevert();
         RevertWorkerArgs args = new RevertWorkerArgs {
             DataView = this.Dataview,
             PathRoot = root,
             FileNames = files
         };
         RevertWorkerResult result = revert.Execute(args);
         flag = !result.IsCancel;
         if (result.IsCancel)
         {
             ULogClass.LogWrite(string.Format("# Restoration of old messages has been stopped.[Number of restored messages:{0} Processing time:{1}]", result.RevertCount, stopwatch.ElapsedMilliseconds));
         }
         else
         {
             ULogClass.LogWrite(string.Format("# Restoration of old messages has been completed.  [Number of restored messages:{0} Processing time:{1}]", result.RevertCount, stopwatch.ElapsedMilliseconds));
         }
         if (result.SkipFiles.Length > 0)
         {
             StringBuilder builder = new StringBuilder();
             builder.AppendLine(string.Format("# The file exists, so no need to restore the file.[Number of skipped processes:{0}]", result.SkipFiles.Length));
             ULogClass.LogWrite(builder.ToString());
         }
         if (result.FirstError == null)
         {
             return flag;
         }
         StringBuilder builder2 = new StringBuilder();
         builder2.AppendLine(string.Format("# Error occurred while restoring the old messages.\r\n{0}\r\n{1}", result.FirstError.Message, result.FirstError.StackTrace));
         builder2.AppendLine(Resources.ResourceManager.GetString("CORE105") + result.ErrorFiles.Length);
         foreach (string str in result.ErrorFiles)
         {
             builder2.AppendLine(str);
         }
         MessageDialog dialog = new MessageDialog();
         dialog.ShowMessage("E402", "", builder2.ToString());
         dialog.Dispose();
     }
     finally
     {
         stopwatch.Stop();
         internalDataGrid.RowPrePaint -= new DataGridViewRowPrePaintEventHandler(this.OnRowPrePaint);
         this.Dataview.DataViewNoRepaint(false);
         internalDataSet.AcceptChanges();
         internalDataGrid.Refresh();
         this.Dataview.UpdateCount();
         internalDataGrid.Cursor = Cursors.Default;
     }
     return flag;
 }
Beispiel #18
0
 private void btnDefaultPrinter_Click(object sender, EventArgs e)
 {
     PrinterSettings settings = new PrinterSettings();
     if (!settings.IsValid)
     {
         MessageDialog dialog = new MessageDialog();
         dialog.ShowMessage("E607", "");
         dialog.Close();
         dialog.Dispose();
     }
     else
     {
         PrinterTrayDlg dlg = null;
         try
         {
             dlg = new PrinterTrayDlg();
             if (dlg.ShowDialog() == DialogResult.OK)
             {
                 this.txbDefaultPrinter.Text = dlg.PrinterSettings.PrinterName;
                 this.txbDefaultBin.Text = dlg.PrinterSettings.DefaultPageSettings.PaperSource.SourceName;
                 this.default_binno = dlg.PrinterSettings.DefaultPageSettings.PaperSource.RawKind;
                 if (!this.IsEntryPrinter(dlg.PrinterSettings.PrinterName))
                 {
                     this.GetPrinterInfo(dlg.PrinterSettings);
                     this.tbpPrinter_Refresh();
                 }
             }
         }
         catch (Exception exception)
         {
             MessageDialog dialog2 = new MessageDialog();
             dialog2.ShowMessage("E611", dlg.PrinterSettings.PrinterName, null, exception);
             dialog2.Close();
             dialog2.Dispose();
         }
     }
 }
Beispiel #19
0
 private void SeqLoad(object sender)
 {
     if (this.SeqList != null)
     {
         this.SeqInt++;
         if (this.SeqInt >= this.SeqList.Count)
         {
             this.stbInfomation.Text = this.ProtocolName;
             this.stbInfomation.Font = new Font(this.stbInfomation.Font, FontStyle.Regular);
             this.SeqList = null;
         }
         else
         {
             FileInfo info = new FileInfo(this.SeqList[this.SeqInt]);
             string name = info.Name;
             string[] strArray = new string[] { "順次ファイル選択中 ", (this.SeqInt + 1).ToString(), "/", this.SeqList.Count.ToString(), " <", name, "> " };
             this.stbInfomation.Text = string.Concat(strArray);
             this.stbInfomation.Font = new Font(this.stbInfomation.Font, FontStyle.Bold);
             IData data = null;
             try
             {
                 data = DataFactory.LoadFromEdiFile(this.SeqList[this.SeqInt]);
             }
             catch (Exception exception)
             {
                 MessageDialog dialog = new MessageDialog();
                 dialog.ShowMessage("E302", this.SeqList[this.SeqInt], null, exception);
                 dialog.Dispose();
                 return;
             }
             if ((sender != null) || !(data.JobCode.Trim() == ""))
             {
                 if (data != null)
                 {
                     if ((sender == null) && !this.SearchDispCode(data))
                     {
                         UJobInputDlg dlg = new UJobInputDlg();
                         dlg.SetCodeSelect(data.JobCode.Trim());
                         if (dlg.ShowDialog() != DialogResult.OK)
                         {
                             dlg.Close();
                             dlg.Dispose();
                             return;
                         }
                         data.Header.DispCode = dlg.DispCode;
                         dlg.Close();
                         dlg.Dispose();
                     }
                     this.JobFormOpen(data, sender);
                 }
             }
             else
             {
                 this.JobError(-1);
             }
         }
     }
 }
Beispiel #20
0
 private void mnACLCustomize_Click(object sender, EventArgs e)
 {
     try
     {
         if (File.Exists(Path.Combine(this.pi.CustomizeRoot, "CustomizeACL.exe")))
         {
             Process.Start(Path.Combine(this.pi.CustomizeRoot, "CustomizeACL.exe"), ((int) this.sysenv.TerminalInfo.Protocol).ToString());
         }
         else
         {
             MessageDialog dialog = new MessageDialog();
             dialog.ShowMessage("E701", "");
             dialog.Close();
             dialog.Dispose();
         }
     }
     catch (Exception exception)
     {
         MessageDialog dialog2 = new MessageDialog();
         dialog2.ShowMessage("E701", "", null, exception);
         dialog2.Close();
         dialog2.Dispose();
     }
 }
Beispiel #21
0
 private void dgvAutoPrint_CellClick(DataGridView dgv)
 {
     PrinterSettings settings = new PrinterSettings();
     if (!settings.IsValid)
     {
         MessageDialog dialog = new MessageDialog();
         dialog.ShowMessage("E607", "");
         dialog.Close();
         dialog.Dispose();
     }
     else
     {
         DataGridViewRow currentRow = dgv.CurrentRow;
         PrinterTrayDlg dlg = null;
         try
         {
             short num;
             dlg = new PrinterTrayDlg();
             if (short.TryParse(currentRow.Cells[this.cAPCount.Index].Value.ToString(), out num))
             {
                 settings.Copies = num;
             }
             dlg.PrinterSettings = settings;
             if (dlg.ShowDialog() == DialogResult.OK)
             {
                 if (this.IsEntryPrinter(dlg.PrinterSettings.PrinterName))
                 {
                     currentRow.Cells[this.cAPPrinter.Index].Value = dlg.PrinterSettings.PrinterName;
                     currentRow.Cells[this.cAPBinName.Index].Value = dlg.PrinterSettings.DefaultPageSettings.PaperSource.SourceName;
                     currentRow.Cells[this.cAPBinNo.Index].Value = dlg.PrinterSettings.DefaultPageSettings.PaperSource.RawKind;
                     if (dlg.PrinterSettings.Copies > 0x63)
                     {
                         currentRow.Cells[this.cAPCount.Index].Value = 0x63;
                     }
                     else
                     {
                         currentRow.Cells[this.cAPCount.Index].Value = dlg.PrinterSettings.Copies;
                     }
                 }
                 else
                 {
                     this.ShowModelessMessage("E553", null, null);
                 }
             }
         }
         catch (Exception exception)
         {
             MessageDialog dialog2 = new MessageDialog();
             dialog2.ShowMessage("E611", dlg.PrinterSettings.PrinterName, null, exception);
             dialog2.Close();
             dialog2.Dispose();
         }
     }
 }
Beispiel #22
0
 private void UserPathAuth()
 {
     UserPathNames names = UserPathNames.CreateInstance();
     if (names.CommonPath.Specify)
     {
         try
         {
             string path = Path.Combine(names.CommonPath.Folder, Path.GetRandomFileName());
             File.WriteAllText(path, Environment.UserName);
             File.Delete(path);
         }
         catch (Exception exception)
         {
             ULogClass.LogWrite(string.Format("{0} {1}", MessageKind.Error.ToString(), string.Format(Naccs.Core.Properties.Resources.ResourceManager.GetString("cnAuthMessage"), names.CommonPath.Folder, MessageDialog.CreateExceptionMessage(exception))));
             MessageDialog dialog = new MessageDialog();
             try
             {
                 if (dialog.ShowMessage(ButtonPatern.YES_NO, MessageKind.Error, string.Format(Naccs.Core.Properties.Resources.ResourceManager.GetString("cnAuthMessage"), names.CommonPath.Folder, Naccs.Core.Properties.Resources.ResourceManager.GetString("cnAuthReply")), false, true, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
                 {
                     names.CommonPath.Specify = false;
                     names.Save();
                     UserPathNames.ResetInstance();
                     PathInfo.ResetInstance();
                     ULogClass.LogWrite("=====< Common Settings Reset>=====");
                 }
                 else
                 {
                     ULogClass.LogWrite("=====< Common Settings Error >=====");
                     Environment.Exit(0);
                 }
             }
             finally
             {
                 dialog.Close();
                 dialog.Dispose();
             }
         }
     }
 }
Beispiel #23
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);
         }
     }
 }
Beispiel #24
0
 private void DiskCheck()
 {
     DriveInfo info = new DriveInfo(Application.ExecutablePath);
     if (info.DriveType != DriveType.CDRom)
     {
         char ch = Application.StartupPath[0];
         string driveName = ch.ToString().ToUpper();
         if (('A' <= driveName[0]) && (driveName[0] <= 'Z'))
         {
             DriveInfo info2 = new DriveInfo(driveName);
             long num = (info2.TotalFreeSpace / 0x400L) / 0x400L;
             if (this.usrenv.TerminalInfo.DiskWarning > num)
             {
                 MessageDialog dialog = new MessageDialog();
                 dialog.ShowMessage("W301", num.ToString(), "");
                 dialog.Close();
                 dialog.Dispose();
                 Environment.Exit(0);
             }
         }
     }
 }
Beispiel #25
0
 private DialogResult ShowModalMessage(string msgCode, string applyStr, string message)
 {
     DialogResult result;
     try
     {
         base.Enabled = false;
         MessageDialog dialog = new MessageDialog();
         dialog.FormClosing += new FormClosingEventHandler(this.dialog_FormClosing);
         result = dialog.ShowMessage(msgCode, applyStr, message);
     }
     catch (Exception exception)
     {
         base.Enabled = true;
         throw exception;
     }
     return result;
 }
Beispiel #26
0
 private void HtmlShow(string pathstr)
 {
     if (File.Exists(pathstr))
     {
         Process.Start(pathstr);
     }
     else
     {
         MessageDialog dialog = new MessageDialog();
         dialog.ShowMessage("W302", "");
         dialog.Close();
         dialog.Dispose();
     }
 }
Beispiel #27
0
 protected override bool CheckError(bool flgCheckReq)
 {
     int errorPage = 0;
     string[] idArray = null;
     bool flag = true;
     string msg = null;
     this.JobErrs.ClearInputErrorInfo();
     this.InitCtlColor();
     if (!base.flgDoCheckErr)
     {
         return flag;
     }
     flag = base.CheckError(flgCheckReq);
     if (!flag)
     {
         return flag;
     }
     if (this.JPList[0].JP.SearchErrorField(out idArray, out errorPage, out msg, flgCheckReq) == 0)
     {
         return flag;
     }
     for (int i = 0; i < idArray.Length; i++)
     {
         if (((i == 0) && !string.IsNullOrEmpty(idArray[i])) && (errorPage >= 0))
         {
             this.SetFocusField(idArray[i], errorPage, 0);
         }
         this.SetFieldError(idArray[i], errorPage, true, 0);
     }
     MessageDialog dialog = new MessageDialog();
     dialog.ShowMessage("E516", msg, "");
     dialog.Dispose();
     return false;
 }
Beispiel #28
0
 private void ShowEditErrMessage(ButtonPatern bp, MessageKind mk, string err_str, TextBox txb)
 {
     MessageDialog dialog = new MessageDialog();
     dialog.ShowMessage(bp, mk, string.Concat(new object[] { txb.Tag.ToString(), "は", txb.MaxLength, err_str }));
     dialog.Dispose();
 }
Beispiel #29
0
 private void TC_Selected(object sender, TabControlEventArgs e)
 {
     if (this.JPList[e.TabPageIndex + 1].JPStatus == JobPanelStatus.Closed)
     {
         int errint = this.CreateDivJobPanel(e.TabPageIndex + 1);
         if (errint != 0)
         {
             string msgCode = JobFormFactory.GetMsgCode(errint);
             string text = e.TabPage.Text;
             MessageDialog dialog = new MessageDialog();
             dialog.ShowMessage(msgCode, text);
             dialog.Dispose();
         }
     }
     else
     {
         this.ReadValue(this.JPList[e.TabPageIndex + 1].JP);
     }
     this.ReadValue(this.JPList[0].JP);
 }
Beispiel #30
0
 private void ShowErrMessage(ButtonPatern bp, MessageKind mk, string err_str)
 {
     MessageDialog dialog = new MessageDialog();
     dialog.ShowMessage(bp, mk, err_str);
     dialog.Dispose();
 }