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(); } }
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; }
protected void mnPrintJobDataPreview_Click(object sender, EventArgs e) { try { this.CommitGridData(); IData data = null; data = this.MakeExNaccsData(Naccs.Common.Generator.ItemInfo.JobDataStatus.jdNone); data.Contained = ContainedType.SendReceive; new PrintManager().PrintPreview(this, "", data); } catch (Exception exception) { MessageDialog dialog = new MessageDialog(); dialog.ShowMessage("E609", "", null, exception); dialog.Dispose(); } }
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); } }
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(); } } } }
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(); } } }
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; }
private void ShowErrMessage(ButtonPatern bp, MessageKind mk, string err_str) { MessageDialog dialog = new MessageDialog(); dialog.ShowMessage(bp, mk, err_str); dialog.Dispose(); }
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(); } }
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(); } }
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 >====="); }
protected void JobError(int errint) { string messageCode = ""; switch (errint) { case -12: messageCode = "E512"; break; case -11: messageCode = "E511"; break; case -9: messageCode = "E509"; break; case -8: messageCode = "E508"; break; case -7: messageCode = "E507"; break; case -6: messageCode = "E506"; break; case -5: messageCode = "E505"; break; case -4: messageCode = "E504"; break; case -3: messageCode = "E503"; break; case -2: messageCode = "E502"; break; case -1: messageCode = "E501"; break; default: messageCode = "E510"; break; } if (messageCode != "") { MessageDialog dialog = new MessageDialog(); dialog.ShowMessage(messageCode, ""); dialog.Dispose(); } }
private void CsvFileOpen(string tblName) { string path = null; StreamReader reader = null; this.OpenFileDlg.InitialDirectory = this.GetInitialDirectory(); this.OpenFileDlg.Filter = "CSV file(*.csv)|*.csv|All files(*.*)|*.*"; if (this.OpenFileDlg.ShowDialog() == DialogResult.OK) { try { try { path = this.OpenFileDlg.FileName; reader = new StreamReader(path, Encoding.UTF8); List<string> stList = CommaText.CommaTextToItems(reader.ReadToEnd(), true); this.AddCsvData(stList, tblName); } finally { reader.Close(); } } catch (Exception exception) { MessageDialog dialog = new MessageDialog(); dialog.ShowMessage("E302", path, null, exception); dialog.Dispose(); } } }
private IData CmnAppendJob(bool flgAppend) { IData data = null; DivideConfig config = null; NormalConfig jobConfig = null; CombiConfig config3 = null; XmlNode node; bool flag = true; if (this.JobConfig.jobStyle == JobStyle.normal) { jobConfig = (NormalConfig) this.JobConfig; if ((jobConfig.record.jobcode == "") || (jobConfig.record.jobcode == null)) { flag = false; } } else if (this.JobConfig.jobStyle == JobStyle.divide) { config = (DivideConfig) this.JobConfig; if ((config.record.jobcode == "") || (config.record.jobcode == null)) { flag = false; } } else { config3 = (CombiConfig) this.JobConfig; if ((config3.jobcode == "") || (config3.jobcode == null)) { flag = false; } } if (!flag) { MessageDialog dialog = new MessageDialog(); dialog.ShowMessage("E517", ""); dialog.Dispose(); return null; } if (this.BoolSendGuard) { MessageDialog dialog2 = new MessageDialog(); dialog2.ShowMessage("E515", ""); dialog2.Dispose(); return null; } if (!this.CheckError(true)) { return null; } data = this.MakeExNaccsData(Naccs.Common.Generator.ItemInfo.JobDataStatus.jdSend); data.ID = this.ExNaccsData.ID; if ((this.ExNaccsData.Status == DataStatus.Recept) || (this.ExNaccsData.Status == DataStatus.Sent)) { data.ID = null; } if (flgAppend && (this.ExNaccsData.Status == DataStatus.Send)) { data.ID = null; } this.JobConfig.selectRecord(DateTime.Now, out node); if (node != null) { node = node.Attributes["sign-flg"]; if (node != null) { data.Signflg = int.Parse(node.Value); } } if (this.BoolAttach && this.IsAttach(data.JobCode.TrimEnd(new char[0]), data.DispCode.TrimEnd(new char[0]))) { if (!this.AppendAttachData(data.ID == null)) { return null; } data.AttachFolder = this.ExNaccsData.AttachFolder; data.AttachFile = new string[this.lvAttach.Items.Count]; for (int i = 0; i < this.lvAttach.Items.Count; i++) { data.AttachFile[i] = this.lvAttach.Items[i].Text; } data.AttachCount = this.ExNaccsData.AttachCount; } else { this.BoolAttach = false; } if (!this.ConfirmDialog(data.JobCode.TrimEnd(new char[0]), data.DispCode.TrimEnd(new char[0]))) { return null; } return data; }
protected virtual bool CheckError(bool flgCheckReq) { if (!StrFunc.CreateInstance().InputInfoCharCheck(this.txtInputInfo.Text)) { MessageDialog dialog = new MessageDialog(); dialog.ShowMessage("E516", Resources.ResourceManager.GetString("MSG_FORBIDDENCHAR_ERROR"), ""); dialog.Dispose(); this.gbInputInfo.Focus(); this.txtInputInfo.Focus(); return false; } return true; }
private void HtmlShow(string pathstr) { if (File.Exists(pathstr)) { Process.Start(pathstr); } else { MessageDialog dialog = new MessageDialog(); dialog.ShowMessage("W302", ""); dialog.Close(); dialog.Dispose(); } }
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(); }
private void mnClearDelete_Click(object sender, EventArgs e) { MessageDialog dialog = new MessageDialog(); if (dialog.ShowMessage("C401", "") == DialogResult.Yes) { this.idv.ClearDelete(); } dialog.Dispose(); }
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(); } }
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(); } } }
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; }
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); } } }
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(); }
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); } } } }
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(); } } }
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(); } } } }
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; }
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); } } } }
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); }
private void mnGuidance_Click(object sender, EventArgs e) { string jobcode = ""; string str2 = ""; string path = ""; PathInfo info = PathInfo.CreateInstance(); DivideConfig config = null; NormalConfig jobConfig = null; CombiConfig config3 = null; if (this.JobConfig.jobStyle == JobStyle.normal) { jobConfig = (NormalConfig) this.JobConfig; if (jobConfig.record.jobcode != null) { jobcode = jobConfig.record.jobcode; } if ((jobConfig.record.dispcode != null) && (jobConfig.record.dispcode != "")) { str2 = "." + jobConfig.record.dispcode; } } else if (this.JobConfig.jobStyle == JobStyle.divide) { config = (DivideConfig) this.JobConfig; if (config.record.jobcode != null) { jobcode = config.record.jobcode; } if ((config.record.dispcode != null) && (config.record.dispcode != "")) { str2 = "." + config.record.dispcode; } } else { config3 = (CombiConfig) this.JobConfig; if (config3.jobcode != null) { jobcode = config3.jobcode; } if ((config3.dispcode != null) && (config3.dispcode != "")) { str2 = "." + config3.dispcode; } } path = info.GuidanceRoot + jobcode + str2 + "_guidance.htm"; if (File.Exists(path)) { Process.Start(path); } else { MessageDialog dialog = new MessageDialog(); dialog.ShowMessage("W302", ""); dialog.Close(); dialog.Dispose(); } }