Esempio n. 1
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     if (this.txbFolder.Text.Trim() == "")
     {
         string message = Resources.ResourceManager.GetString("CORE25");
         using (MessageDialogSimpleForm form = new MessageDialogSimpleForm())
         {
             form.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Error, message);
         }
         this.txbFolder.Focus();
         base.DialogResult = DialogResult.None;
     }
     else if (this.txbName.Text.Trim() == "")
     {
         string str2 = Resources.ResourceManager.GetString("CORE26");
         using (MessageDialogSimpleForm form2 = new MessageDialogSimpleForm())
         {
             form2.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Error, str2);
         }
         this.txbName.Focus();
         base.DialogResult = DialogResult.None;
     }
     else
     {
         this.SelectPath = this.txbFolder.Text;
         this.FName = this.txbName.Text;
     }
 }
Esempio n. 2
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     if (this.txbUserCode.Text.Length != 8)
     {
         string message = Resources.ResourceManager.GetString("INTR06");
         using (MessageDialogSimpleForm form = new MessageDialogSimpleForm())
         {
             form.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Warning, message);
         }
         this.txbUserCode.Focus();
         base.DialogResult = DialogResult.None;
     }
     else if (this.txbPassword.Text.Length == 0)
     {
         string str2 = Resources.ResourceManager.GetString("INTR07");
         using (MessageDialogSimpleForm form2 = new MessageDialogSimpleForm())
         {
             form2.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Warning, str2);
         }
         this.txbPassword.Focus();
         base.DialogResult = DialogResult.None;
     }
     this.UserCode = this.txbUserCode.Text;
     this.Password = this.txbPassword.Text;
 }
Esempio n. 3
0
 public void ResourceCopy()
 {
     PathInfo info = PathInfo.CreateInstance();
     string path = Path.Combine(info.ProtocolEnvironmentPath, "copy.cfg");
     if (File.Exists(path))
     {
         using (DeleteRestore restore = new DeleteRestore(5))
         {
             restore.Show();
             restore.Refresh();
             try
             {
                 string serverPath = "";
                 using (StreamReader reader = new StreamReader(path, Encoding.GetEncoding("UTF-8")))
                 {
                     serverPath = reader.ReadLine();
                 }
                 if (serverPath.Length != 0)
                 {
                     string directoryName = Path.GetDirectoryName(info.TemplateRoot.TrimEnd(new char[] { '\\' }));
                     this.RestoreDelete(directoryName, serverPath);
                     this.CopyDirectory(serverPath, directoryName);
                 }
             }
             catch (Exception exception)
             {
                 string message = Resources.ResourceManager.GetString("CORE17") + Environment.NewLine + Resources.ResourceManager.GetString("CORE18") + Environment.NewLine + Resources.ResourceManager.GetString("CORE19") + Environment.NewLine + Environment.NewLine + MessageDialog.CreateExceptionMessage(exception);
                 using (MessageDialogSimpleForm form = new MessageDialogSimpleForm())
                 {
                     form.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Warning, message);
                 }
             }
         }
     }
 }
Esempio n. 4
0
 private void btOK_Click(object sender, EventArgs e)
 {
     base.DialogResult = DialogResult.None;
     string outcode = this.Outcode;
     string str2 = null;
     if (Encoding.GetEncoding("UTF-8").GetByteCount(outcode) != 6)
     {
         str2 = Resources.ResourceManager.GetString("CORE01");
     }
     else if (!this.IsNumOrAlfaData(outcode))
     {
         if (this.Outcode.IndexOf('_') >= 0)
         {
             str2 = Resources.ResourceManager.GetString("CORE02");
         }
         else
         {
             str2 = Resources.ResourceManager.GetString("CORE03");
         }
     }
     if (string.IsNullOrEmpty(str2))
     {
         base.DialogResult = DialogResult.OK;
     }
     else
     {
         using (MessageDialogSimpleForm form = new MessageDialogSimpleForm())
         {
             form.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Warning, str2);
         }
         this.cmOutCode.Focus();
     }
 }
Esempio n. 5
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);
     }
 }
Esempio n. 6
0
 private void btnCOPY_Click(object sender, EventArgs e)
 {
     Clipboard.SetDataObject(("#Code\n\t" + this.txbMessageCode.Text + "\n\n#Message\n\t" + this.rTxbMessage.Text + "\n\n#Contents\n\t" + this.rTxbDescription.Text + "\n\n#Solution\n\t" + this.rTxbDisposition.Text + "\n\n#Internal Code\n\t" + this.rTxbInternalCode.Text + "\n").Replace("\n", "\r\n"), true);
     string message = Resources.ResourceManager.GetString("CORE12");
     using (MessageDialogSimpleForm form = new MessageDialogSimpleForm())
     {
         form.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Information, message);
     }
 }
Esempio n. 7
0
 private void btCopy_Click(object sender, EventArgs e)
 {
     Clipboard.SetDataObject(this.txConsole.Text, true);
     string message = Resources.ResourceManager.GetString("CORE12");
     using (MessageDialogSimpleForm form = new MessageDialogSimpleForm())
     {
         form.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Information, message);
     }
 }
Esempio n. 8
0
 private void btnLogon_Click(object sender, EventArgs e)
 {
     if (!this.cmbUserCode.Enabled)
     {
         this.OnButton(false);
     }
     else if (this.cmbUserCode.Text.Length != 8)
     {
         string message = Resources.ResourceManager.GetString("CORE42");
         using (MessageDialogSimpleForm form = new MessageDialogSimpleForm())
         {
             form.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Warning, message);
         }
         this.cmbUserCode.Focus();
     }
     else if (this.txbPassword.Text.Length == 0)
     {
         string str2 = Resources.ResourceManager.GetString("CORE43");
         using (MessageDialogSimpleForm form2 = new MessageDialogSimpleForm())
         {
             form2.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Warning, str2);
         }
         this.txbPassword.Focus();
     }
     else if (!this.SF.ForbiddenPasswordCharCheck(this.txbPassword.Text))
     {
         string str3 = Resources.ResourceManager.GetString("CORE112");
         using (MessageDialogSimpleForm form3 = new MessageDialogSimpleForm())
         {
             form3.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Warning, str3);
         }
         this.txbPassword.Focus();
     }
     else
     {
         this.OnButton(true);
     }
 }
Esempio n. 9
0
 private bool AppendAttachData(bool flgAppend)
 {
     string path = null;
     try
     {
         PathInfo info = PathInfo.CreateInstance();
         if (!flgAppend && (this.ExNaccsData.AttachFolder != null))
         {
             path = this.ExNaccsData.AttachFolder;
             Directory.Delete(path, true);
             CopyDirectory(this.stAttachPath, path);
         }
         else
         {
             path = info.AttachPath + this.ExNaccsData.JobCode.Trim() + this.ExNaccsData.DispCode.Trim() + DateTime.Now.ToString("yyyyMMddHHmmssfff");
             CopyDirectory(this.stAttachPath, path);
         }
     }
     catch (Exception exception)
     {
         Console.WriteLine("Failure in deleting/copying the attachment folder.(CommonJobForm.AppendAttachData)");
         Console.WriteLine(this.stAttachPath);
         Console.WriteLine(path);
         string message = Resources.ResourceManager.GetString("CORE68") + MessageDialog.CreateExceptionMessage(exception);
         using (MessageDialogSimpleForm form = new MessageDialogSimpleForm())
         {
             form.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Error, message);
         }
         return false;
     }
     this.ExNaccsData.AttachFolder = path;
     this.ExNaccsData.AttachFile = new string[this.lvAttach.Items.Count];
     for (int i = 0; i < this.lvAttach.Items.Count; i++)
     {
         this.ExNaccsData.AttachFile[i] = this.lvAttach.Items[i].Text;
     }
     this.ExNaccsData.AttachCount = this.lvAttach.Items.Count;
     return true;
 }
Esempio n. 10
0
 private List<string> DispSet()
 {
     this.cmbDispCode.Items.Clear();
     List<string> list = this.dcl.DispCodeGet(this.GetJobCode());
     try
     {
         if (list.Count > 0)
         {
             for (int i = 0; i < list.Count; i++)
             {
                 this.cmbDispCode.Items.Add(list[i]);
             }
             this.setDropDownWidth(this.cmbDispCode);
             this.cmbDispCode.Enabled = true;
             this.cmbDispCode.SelectedIndex = 0;
             this.cmbDispCode.Focus();
             return list;
         }
         this.cmbDispCode.Enabled = false;
     }
     catch (Exception exception)
     {
         using (MessageDialogSimpleForm form = new MessageDialogSimpleForm())
         {
             form.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Error, MessageDialog.CreateExceptionMessage(exception));
         }
         return list;
     }
     return list;
 }
Esempio n. 11
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     if (this.cmbJobCode.Text == "")
     {
         using (MessageDialog dialog = new MessageDialog())
         {
             dialog.ShowMessage("E582", null, null);
         }
         this.cmbJobCode.Focus();
         base.DialogResult = DialogResult.None;
     }
     else if ((this.cmbDispCode.Items.Count < 1) && (this.DispSet().Count > 0))
     {
         this.cmbDispCode.Focus();
         base.DialogResult = DialogResult.None;
     }
     else
     {
         this.JobCode = this.cmbJobCode.Text;
         if (this.JobCode.IndexOf(" ") > -1)
         {
             this.JobCode = this.JobCode.Remove(this.JobCode.IndexOf(" "));
         }
         if (this.JobCode.IndexOf(".") > -1)
         {
             string jobCode = this.JobCode;
             int index = jobCode.IndexOf(".");
             this.JobCode = jobCode.Substring(0, index);
             this.DispCode = jobCode.Remove(0, index + 1);
             if (this.JobCode == "")
             {
                 using (MessageDialog dialog2 = new MessageDialog())
                 {
                     dialog2.ShowMessage("E582", null, null);
                 }
                 this.cmbJobCode.Focus();
                 base.DialogResult = DialogResult.None;
             }
             else if (this.DispCode == "")
             {
                 string message = Resources.ResourceManager.GetString("CORE40");
                 using (MessageDialogSimpleForm form = new MessageDialogSimpleForm())
                 {
                     form.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Warning, message);
                 }
                 this.cmbJobCode.Focus();
                 base.DialogResult = DialogResult.None;
             }
         }
         else
         {
             if (this.cmbDispCode.Enabled)
             {
                 this.DispCode = this.cmbDispCode.Text.Substring(0, 3);
             }
             else
             {
                 this.DispCode = "";
             }
             int length = -1;
             length = this.JobCode.IndexOf(" ");
             if (length != -1)
             {
                 this.JobCode = this.JobCode.Substring(0, length);
             }
         }
     }
 }
Esempio n. 12
0
 public virtual void DataDelete(int DNInt)
 {
     if (DNInt == -1)
     {
         int index = this.tvSendRecvFolder.SelectedNode.Index;
     }
     if ((this.tvSendRecvFolder.SelectedNode.Level != 0) && ((this.tvSendRecvFolder.SelectedNode.Level > 0) && (this.dgvDataView.SelectedRows != null)))
     {
         this.drProgress = new DeleteRestore(7);
         this.drProgress.Show();
         try
         {
             this.drProgress.pgbRestore.Minimum = 0;
             this.drProgress.pgbRestore.Maximum = this.dgvDataView.SelectedRows.Count;
             IData data = null;
             for (int i = this.dgvDataView.SelectedRows.Count - 1; i > -1; i--)
             {
                 this.drProgress.pgbRestore.Value++;
                 this.drProgress.Refresh();
                 DataRow[] rowArray = this.dtsDataView.Tables["NACCS"].Select("clID = " + this.dgvDataView.SelectedRows[i].Cells["clmID"].Value);
                 rowArray[0]["clDelete"] = 1;
                 data = this.GetData(int.Parse(rowArray[0]["clID"].ToString()));
                 if (data == null)
                 {
                     rowArray[0].Delete();
                 }
                 else
                 {
                     data.IsDeleted = true;
                     this.DataViewDataSave(data, rowArray[0]["clFileName"].ToString());
                 }
             }
         }
         catch (Exception exception)
         {
             string message = Resources.ResourceManager.GetString("CORE58") + Environment.NewLine + MessageDialog.CreateExceptionMessage(exception);
             using (MessageDialogSimpleForm form = new MessageDialogSimpleForm())
             {
                 form.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Error, message);
             }
         }
         finally
         {
             this.dtsDataView.AcceptChanges();
             this.dgvDataView.Refresh();
             this.stpCount();
             if (this.FOpenViewFlag)
             {
                 this.ViewCountChange(this.GetFullPath(this.tvSendRecvFolder.SelectedNode.FullPath));
             }
             this.drProgress.Close();
             this.drProgress.Dispose();
         }
     }
 }
Esempio n. 13
0
 private void mnDelete_Click(object sender, EventArgs e)
 {
     if (((this.dlYear != "") && (this.dlMonth != "")) && ((this.dlYear == this.cmbYear.Text) && (this.dlMonth == this.cmbMonth.Text)))
     {
         this.pastDataView_YYYYMM = this.cmbYear.Text + this.cmbMonth.Text;
         string path = Path.Combine(this.pastDataViewPath, this.pastDataView_YYYYMM);
         if (Directory.Exists(path))
         {
             MessageDialog dialog = new MessageDialog();
             DialogResult result = dialog.ShowMessage("C405", this.pastDataView_YYYYMM, "");
             dialog.Close();
             if (result == DialogResult.Yes)
             {
                 if (ArrangeDataTable.IsLock(this.pastDataView_YYYYMM))
                 {
                     string message = Resources.ResourceManager.GetString("CORE23");
                     using (MessageDialogSimpleForm form = new MessageDialogSimpleForm())
                     {
                         form.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Error, message);
                     }
                     Environment.Exit(0);
                 }
                 Directory.Delete(path, true);
                 this.RevertDialog_Load(sender, e);
             }
         }
     }
 }
Esempio n. 14
0
 private void DirectorySecurityChange(string dirPath)
 {
     DriveInfo info = new DriveInfo(Application.ExecutablePath);
     if (info.DriveType != DriveType.CDRom)
     {
         DirectoryInfo info2 = new DirectoryInfo(dirPath);
         try
         {
             DirectorySecurity accessControl = info2.GetAccessControl();
             foreach (FileSystemAccessRule rule in accessControl.GetAccessRules(true, true, typeof(NTAccount)))
             {
                 if ("everyone".ToUpper() == rule.IdentityReference.ToString().ToUpper())
                 {
                     return;
                 }
             }
             accessControl.AddAccessRule(new FileSystemAccessRule("everyone", FileSystemRights.FullControl, InheritanceFlags.ObjectInherit | InheritanceFlags.ContainerInherit, PropagationFlags.None, AccessControlType.Allow));
             info2.SetAccessControl(accessControl);
         }
         catch (Exception exception)
         {
             using (MessageDialogSimpleForm form = new MessageDialogSimpleForm())
             {
                 form.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Error, MessageDialog.CreateExceptionMessage(exception));
             }
         }
     }
 }
Esempio n. 15
0
 public void FolderDelete()
 {
     if (this.tvSendRecvFolder.SelectedNode.Nodes.Count > 0)
     {
         using (MessageDialog dialog = new MessageDialog())
         {
             dialog.ShowMessage("W405", null, null);
             return;
         }
     }
     if (this.FolderTermCheck(this.GetFullPath(this.tvSendRecvFolder.SelectedNode.FullPath)))
     {
         DialogResult result;
         using (MessageDialog dialog2 = new MessageDialog())
         {
             result = dialog2.ShowMessage("C406", null, null);
         }
         if (result != DialogResult.Yes)
         {
             return;
         }
         this.FolderTermDelete(this.GetFullPath(this.tvSendRecvFolder.SelectedNode.FullPath));
     }
     try
     {
         DataRow[] rowArray = this.dtsDataView.Tables["NACCS"].Select("clFolder = '" + this.GetFullPath(this.tvSendRecvFolder.SelectedNode.FullPath) + "'");
         IData data = null;
         for (int i = 0; i < rowArray.Length; i++)
         {
             rowArray[i]["clDelete"] = 1;
             data = this.GetData(int.Parse(rowArray[i]["clID"].ToString()));
             if (data == null)
             {
                 rowArray[i].Delete();
             }
             else
             {
                 data.IsDeleted = true;
                 this.DataViewDataSave(data, rowArray[i]["clFileName"].ToString());
             }
         }
         this.tvSendRecvFolder.SelectedNode.Remove();
     }
     catch (Exception exception)
     {
         string message = Resources.ResourceManager.GetString("CORE59") + Environment.NewLine + MessageDialog.CreateExceptionMessage(exception);
         using (MessageDialogSimpleForm form = new MessageDialogSimpleForm())
         {
             form.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Error, message);
         }
     }
     finally
     {
         this.dtsDataView.AcceptChanges();
         this.dgvDataView.Refresh();
         this.stpCount();
     }
 }
Esempio n. 16
0
 protected virtual void tvSendRecvFolder_DragDrop(object sender, DragEventArgs e)
 {
     if (e.Data.GetDataPresent(typeof(DataGridViewSelectedRowCollection)))
     {
         try
         {
             TreeView view = (TreeView) sender;
             TreeNode nodeAt = view.GetNodeAt(view.PointToClient(new Point(e.X, e.Y)));
             if ((nodeAt != null) && this.IsMoveDataCheck(nodeAt))
             {
                 if ((nodeAt.Level == 1) && (nodeAt.Index == 3))
                 {
                     this.DataDelete(this.dtn.Index);
                 }
                 else
                 {
                     this.drProgress = new DeleteRestore(9);
                     this.drProgress.Show();
                     try
                     {
                         this.drProgress.pgbRestore.Minimum = 0;
                         this.drProgress.pgbRestore.Maximum = this.dgvDataView.SelectedRows.Count;
                         IData data = null;
                         for (int i = this.dgvDataView.SelectedRows.Count - 1; i > -1; i--)
                         {
                             this.drProgress.pgbRestore.Value++;
                             this.drProgress.Refresh();
                             DataRow[] rowArray = this.dtsDataView.Tables["NACCS"].Select("clID = " + this.dgvDataView.SelectedRows[this.dgvDataView.SelectedRows.Count - 1].Cells["clmID"].Value);
                             data = this.GetData(int.Parse(rowArray[0]["clID"].ToString()));
                             if (data == null)
                             {
                                 rowArray[0].Delete();
                             }
                             else
                             {
                                 if (nodeAt.Level == 1)
                                 {
                                     rowArray[0]["clFolder"] = "";
                                     data.UserFolder = "";
                                 }
                                 else
                                 {
                                     rowArray[0]["clFolder"] = this.GetFullPath(nodeAt.FullPath);
                                     data.UserFolder = this.GetFullPath(nodeAt.FullPath);
                                 }
                                 this.DataViewDataSave(data, rowArray[0]["clFileName"].ToString());
                             }
                         }
                     }
                     catch (Exception exception)
                     {
                         string message = Resources.ResourceManager.GetString("CORE53") + Environment.NewLine + MessageDialog.CreateExceptionMessage(exception);
                         using (MessageDialogSimpleForm form = new MessageDialogSimpleForm())
                         {
                             form.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Error, message);
                         }
                     }
                     finally
                     {
                         this.dtsDataView.AcceptChanges();
                         this.dgvDataView.Refresh();
                         this.drProgress.Close();
                         this.drProgress.Dispose();
                     }
                 }
                 this.tvSendRecvFolder.SelectedNode = this.dtn;
                 if (this.FOpenViewFlag)
                 {
                     if (((nodeAt.Level == 1) && (nodeAt.Index == 0)) || (nodeAt.Level > 1))
                     {
                         this.ViewCountChange(this.GetFullPath(nodeAt.FullPath));
                     }
                     if (((this.dtn.Level == 1) && (this.dtn.Index == 0)) || (this.dtn.Level > 1))
                     {
                         this.ViewCountChange(this.GetFullPath(this.dtn.FullPath));
                     }
                 }
             }
             else
             {
                 e.Effect = DragDropEffects.None;
             }
         }
         finally
         {
             this.DragFlag = false;
             this.stpCount();
         }
     }
 }
Esempio n. 17
0
 private void tvSendRecvFolder_AfterLabelEdit(object sender, NodeLabelEditEventArgs e)
 {
     try
     {
         string str = "";
         string label = "";
         if ((e.Label != null) && (this.tvSendRecvFolder.SelectedNode.Parent != null))
         {
             for (int i = 0; i < this.tvSendRecvFolder.SelectedNode.Parent.Nodes.Count; i++)
             {
                 label = e.Label;
                 if (this.LenCount(label) > 0x40)
                 {
                     label = this.SF.CutByteLength(e.Label, 0x40);
                 }
                 string str3 = this.FolderStringCut(label.ToUpper());
                 string str4 = this.FolderStringCut(this.GetFullPath(this.tvSendRecvFolder.SelectedNode.Parent.Nodes[i].Text).ToUpper());
                 if ((str3.Normalize(NormalizationForm.FormKC) == str4.Normalize(NormalizationForm.FormKC)) && (e.Node.Text.Normalize(NormalizationForm.FormKC).ToUpper() != this.GetFullPath(this.tvSendRecvFolder.SelectedNode.Parent.Nodes[i].Text).Normalize(NormalizationForm.FormKC).ToUpper()))
                 {
                     using (MessageDialog dialog = new MessageDialog())
                     {
                         dialog.ShowMessage("W505", null, null);
                     }
                     if (this.FOpenViewFlag)
                     {
                         string filterExpression = "clStatus = 'r' AND clDelete = 0 AND clOpen = '0' AND clFolder = '" + this.GetFullPath(this.tvSendRecvFolder.SelectedNode.FullPath) + "'";
                         DataRow[] rowArray = this.dtsDataView.Tables["NACCS"].Select(filterExpression);
                         str = "(" + rowArray.Length.ToString() + ")";
                     }
                     e.Node.Text = e.Node.Text + str;
                     e.CancelEdit = true;
                     return;
                 }
             }
         }
         else
         {
             if (this.FOpenViewFlag)
             {
                 string str6 = "clStatus = 'r' AND clDelete = 0 AND clOpen = '0' AND clFolder = '" + this.GetFullPath(this.tvSendRecvFolder.SelectedNode.FullPath) + "'";
                 DataRow[] rowArray2 = this.dtsDataView.Tables["NACCS"].Select(str6);
                 str = "(" + rowArray2.Length.ToString() + ")";
             }
             e.Node.Text = e.Node.Text + str;
             e.CancelEdit = true;
             return;
         }
         if (e.Label.Trim() == "")
         {
             string message = Resources.ResourceManager.GetString("CORE55");
             using (MessageDialogSimpleForm form = new MessageDialogSimpleForm())
             {
                 form.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Information, message);
             }
             e.Node.Text = e.Node.Text;
             e.CancelEdit = true;
             e.Node.BeginEdit();
         }
         else if (!this.FolderNameCheck(e.Label))
         {
             if (this.FOpenViewFlag)
             {
                 string str8 = "clStatus = 'r' AND clDelete = 0 AND clOpen = '0' AND clFolder = '" + this.GetFullPath(this.tvSendRecvFolder.SelectedNode.FullPath) + "'";
                 DataRow[] rowArray3 = this.dtsDataView.Tables["NACCS"].Select(str8);
                 str = "(" + rowArray3.Length.ToString() + ")";
             }
             e.Node.Text = e.Node.Text + str;
             e.CancelEdit = true;
         }
         else
         {
             label = e.Label;
             if (this.LenCount(e.Label) > 0x40)
             {
                 label = this.SF.CutByteLength(e.Label, 0x40);
             }
             string fulfld = this.GetFullPath(e.Node.Parent.FullPath) + @"\" + label;
             try
             {
                 this.NodeNameChange(e.Node, fulfld);
             }
             catch (Exception exception)
             {
                 string str10 = Resources.ResourceManager.GetString("CORE57") + Environment.NewLine + MessageDialog.CreateExceptionMessage(exception);
                 using (MessageDialogSimpleForm form2 = new MessageDialogSimpleForm())
                 {
                     form2.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Error, str10);
                 }
             }
             if (this.FOpenViewFlag)
             {
                 string str11 = "clStatus = 'r' AND clDelete = 0 AND clOpen = '0' AND clFolder = '" + this.GetFullPath(fulfld) + "'";
                 DataRow[] rowArray4 = this.dtsDataView.Tables["NACCS"].Select(str11);
                 str = "(" + rowArray4.Length.ToString() + ")";
             }
             e.Node.Text = label + str;
             this.SaveFolder();
             this.DBFixAdd();
             this.DataViewRepaint(true);
             e.CancelEdit = true;
         }
     }
     finally
     {
         this.tvSendRecvFolder.LabelEdit = false;
     }
 }
Esempio n. 18
0
 public void RestoreDelete(string localPath, string serverPath)
 {
     string str = "";
     PathInfo info = PathInfo.CreateInstance();
     string path = Path.Combine(serverPath, "DeleteList.cfg");
     if (File.Exists(path))
     {
         string str4 = Path.Combine(localPath, "DeleteList.cfg");
         if (File.Exists(str4))
         {
             using (StreamReader reader = new StreamReader(str4, Encoding.GetEncoding("UTF-8")))
             {
                 str = reader.ReadLine();
             }
         }
         StreamReader reader2 = new StreamReader(path, Encoding.GetEncoding("UTF-8"));
         try
         {
             if (reader2.ReadLine() != str)
             {
                 if (Directory.Exists(info.TemplateRoot))
                 {
                     Directory.Delete(info.TemplateRoot, true);
                 }
                 if (Directory.Exists(info.DefaultHelpPath))
                 {
                     Directory.Delete(info.DefaultHelpPath, true);
                 }
             }
         }
         catch (Exception exception)
         {
             string message = Resources.ResourceManager.GetString("CORE20") + Environment.NewLine + MessageDialog.CreateExceptionMessage(exception);
             using (MessageDialogSimpleForm form = new MessageDialogSimpleForm())
             {
                 form.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Error, message);
             }
         }
         finally
         {
             if (reader2 != null)
             {
                 reader2.Dispose();
             }
         }
     }
 }
Esempio n. 19
0
 private void lsbGeneralApp_MouseDown(object sender, MouseEventArgs e)
 {
     if ((this.lsbGeneralApp.Items.Count >= 1) && (this.lsbGeneralApp.SelectedItem.ToString() != ""))
     {
         try
         {
             Process.Start(this.GeneralAppList[this.lsbGeneralApp.SelectedIndex].URL);
         }
         catch (Exception exception)
         {
             string message = Resources.ResourceManager.GetString("CORE41") + Environment.NewLine + MessageDialog.CreateExceptionMessage(exception);
             using (MessageDialogSimpleForm form = new MessageDialogSimpleForm())
             {
                 form.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Error, message);
             }
         }
     }
 }
Esempio n. 20
0
 public void ViewRestore()
 {
     DialogResult result;
     using (MessageDialog dialog = new MessageDialog())
     {
         result = dialog.ShowMessage("C408", null, null);
     }
     if (result == DialogResult.Yes)
     {
         string str = "";
         string[] strArray = new string[0];
         if (Directory.Exists(this.pi.BackupPath))
         {
             strArray = Directory.GetFiles(this.pi.BackupPath, "*.dat", SearchOption.TopDirectoryOnly);
         }
         if (strArray.Length <= 0)
         {
             DialogResult result2;
             using (MessageDialog dialog2 = new MessageDialog())
             {
                 result2 = dialog2.ShowMessage("C409", null, null);
             }
             if (result2 != DialogResult.Yes)
             {
                 return;
             }
         }
         if (Directory.Exists(this.pi.DataViewPath))
         {
             Directory.Delete(this.pi.DataViewPath, true);
         }
         if (Directory.Exists(this.pi.AttachPath))
         {
             string[] directories = Directory.GetDirectories(this.pi.AttachPath);
             for (int i = 0; i < directories.Length; i++)
             {
                 this.AttachDelete(directories[i]);
             }
         }
         this.dtsDataView.Clear();
         this.drProgress = new DeleteRestore(10);
         this.drProgress.Show();
         try
         {
             this.drProgress.pgbRestore.Minimum = 0;
             this.drProgress.pgbRestore.Maximum = strArray.Length;
             for (int j = 0; j < strArray.Length; j++)
             {
                 this.drProgress.pgbRestore.Value = j + 1;
                 this.drProgress.Refresh();
                 str = strArray[j].ToString();
                 DataCompress compress = new DataCompress(Path.GetDirectoryName(strArray[j].ToString()), Path.GetFileName(strArray[j].ToString()));
                 int count = compress.IndexList.Count;
                 IData data = null;
                 for (int k = 0; k < count; k++)
                 {
                     bool flag;
                     string s = compress.GetData(k);
                     data = this.SetExportData(s, out flag, false);
                     if (data != null)
                     {
                         data.UserFolder = this.FolderAddSet(data.UserFolder);
                         this.AppendJobData(data, (int) data.Status, false, false, flag);
                     }
                 }
             }
         }
         catch (Exception exception)
         {
             string message = Resources.ResourceManager.GetString("CORE65") + Environment.NewLine + Resources.ResourceManager.GetString("CORE66") + str + Environment.NewLine + Resources.ResourceManager.GetString("CORE67") + Environment.NewLine + MessageDialog.CreateExceptionMessage(exception);
             using (MessageDialogSimpleForm form = new MessageDialogSimpleForm())
             {
                 form.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Error, message);
             }
             return;
         }
         finally
         {
             this.MaxID = this.GetID();
             this.SaveFolder();
             this.dtsDataView.AcceptChanges();
             this.dgvDataView.Refresh();
             this.stpCount();
             if (this.FOpenViewFlag)
             {
                 this.ViewCountCheck(true);
             }
             this.drProgress.Close();
             this.drProgress.Dispose();
         }
         using (MessageDialog dialog3 = new MessageDialog())
         {
             dialog3.ShowMessage("I502", null);
         }
     }
 }
Esempio n. 21
0
 public virtual void DataUndo()
 {
     if ((this.tvSendRecvFolder.SelectedNode.Index == 3) && (this.dgvDataView.SelectedRows != null))
     {
         this.drProgress = new DeleteRestore(8);
         this.drProgress.Show();
         StringList sl = new StringList();
         try
         {
             this.drProgress.pgbRestore.Minimum = 0;
             this.drProgress.pgbRestore.Maximum = this.dgvDataView.SelectedRows.Count;
             IData data = null;
             for (int i = this.dgvDataView.SelectedRows.Count - 1; i > -1; i--)
             {
                 this.drProgress.pgbRestore.Value++;
                 this.drProgress.Refresh();
                 DataRow[] rowArray = this.dtsDataView.Tables["NACCS"].Select("clID = " + this.dgvDataView.SelectedRows[i].Cells["clmID"].Value);
                 rowArray[0]["clDelete"] = 0;
                 rowArray[0]["clFolder"] = this.FolderAddSet(rowArray[0]["clFolder"].ToString());
                 if (((rowArray[0]["clStatus"].ToString() == "r") && (rowArray[0]["clFolder"].ToString() != "")) && !this.ExistCheck(sl, rowArray[0]["clFolder"].ToString()))
                 {
                     sl.Add(rowArray[0]["clFolder"].ToString());
                 }
                 data = this.GetData(int.Parse(rowArray[0]["clID"].ToString()));
                 if (data == null)
                 {
                     rowArray[0].Delete();
                 }
                 else
                 {
                     data.IsDeleted = false;
                     data.UserFolder = rowArray[0]["clFolder"].ToString();
                     this.DataViewDataSave(data, rowArray[0]["clFileName"].ToString());
                 }
             }
         }
         catch (Exception exception)
         {
             string message = Resources.ResourceManager.GetString("CORE60") + Environment.NewLine + MessageDialog.CreateExceptionMessage(exception);
             using (MessageDialogSimpleForm form = new MessageDialogSimpleForm())
             {
                 form.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Error, message);
             }
         }
         finally
         {
             this.SaveFolder();
             this.dtsDataView.AcceptChanges();
             this.dgvDataView.Refresh();
             this.stpCount();
             if (this.FOpenViewFlag)
             {
                 for (int j = 0; j < sl.Count; j++)
                 {
                     this.ViewCountChange(sl[j]);
                 }
             }
             this.drProgress.Close();
             this.drProgress.Dispose();
         }
     }
 }
Esempio n. 22
0
 public void DataExport()
 {
     this.sfdDataView.Filter = "Export file(*.dat)|*.dat";
     if (this.sfdDataView.ShowDialog() == DialogResult.OK)
     {
         List<int> list = new List<int>();
         this.drProgress = new DeleteRestore(11);
         this.drProgress.Show();
         try
         {
             this.drProgress.pgbRestore.Minimum = 0;
             this.drProgress.pgbRestore.Maximum = this.dgvDataView.SelectedRows.Count;
             this.drProgress.pgbRestore.Value = 0;
             string directoryName = Path.GetDirectoryName(this.sfdDataView.FileName);
             string fileName = Path.GetFileName(this.sfdDataView.FileName);
             DataCompress compress = new DataCompress(directoryName, fileName);
             compress.Clear();
             IData data = null;
             for (int i = 0; i < this.dgvDataView.RowCount; i++)
             {
                 if (this.dgvDataView.Rows[i].Selected)
                 {
                     this.drProgress.pgbRestore.Value++;
                     this.drProgress.Refresh();
                     data = this.GetData(int.Parse(this.dgvDataView.Rows[i].Cells["clmID"].Value.ToString()));
                     if (data == null)
                     {
                         list.Add(int.Parse(this.dgvDataView.Rows[i].Cells["clmID"].Value.ToString()));
                     }
                     else
                     {
                         compress.AddData(this.GetExportData(data));
                     }
                 }
             }
         }
         catch (Exception exception)
         {
             using (MessageDialogSimpleForm form = new MessageDialogSimpleForm())
             {
                 form.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Error, MessageDialog.CreateExceptionMessage(exception));
             }
         }
         finally
         {
             list.Sort();
             for (int j = list.Count - 1; j > -1; j--)
             {
                 this.RecordDelete(list[j]);
             }
             this.dtsDataView.AcceptChanges();
             this.dgvDataView.Refresh();
             this.stpCount();
             this.drProgress.Close();
             this.drProgress.Dispose();
         }
     }
 }
Esempio n. 23
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;
 }
Esempio n. 24
0
        private void getTestServerInfo(TestServer testServer)
        {
            SystemEnvironment environment = SystemEnvironment.CreateInstance();
            switch (testServer)
            {
                case TestServer.Interactive_MainCenter:
                    this.trmKind = "Interactive";
                    this.serverName = environment.InteractiveInfo.SelectServer("MAIN").PingPoint;
                    return;

                case TestServer.Interactive_BackupCenter:
                    this.trmKind = "Interactive";
                    this.serverName = environment.InteractiveInfo.SelectServer("BACK").PingPoint;
                    return;

                case TestServer.Interactive_Test:
                    this.trmKind = "Interactive";
                    this.serverName = environment.InteractiveInfo.SelectServer("TEST").PingPoint;
                    return;

                case TestServer.netNACCS_MainNode_MainCenter:
                    this.trmKind = "Interactive";
                    this.serverName = environment.InteractiveInfo.SelectServer("MAIN-MAIN").ServerName;
                    return;

                case TestServer.netNACCS_MainNode_BackupCenter:
                    this.trmKind = "Interactive";
                    this.serverName = environment.InteractiveInfo.SelectServer("MAIN-BACK").ServerName;
                    return;

                case TestServer.netNACCS_MainNode_Test:
                    this.trmKind = "Interactive";
                    this.serverName = environment.InteractiveInfo.SelectServer("MAIN-TEST").ServerName;
                    return;

                case TestServer.netNACCS_BackupNode_MainCenter:
                    this.trmKind = "Interactive";
                    this.serverName = environment.InteractiveInfo.SelectServer("BACK-MAIN").ServerName;
                    return;

                case TestServer.netNACCS_BackupNode_BackupCenter:
                    this.trmKind = "Interactive";
                    this.serverName = environment.InteractiveInfo.SelectServer("BACK-BACK").ServerName;
                    return;

                case TestServer.netNACCS_BackupNode_Test:
                    this.trmKind = "Interactive";
                    this.serverName = environment.InteractiveInfo.SelectServer("BACK-TEST").ServerName;
                    return;

                case TestServer.Mail_MainCenter:
                    this.trmKind = "Mail";
                    this.serverName = environment.MailInfo.SelectServer("MAIN").PingPoint;
                    return;

                case TestServer.Mail_BackupCenter:
                    this.trmKind = "Mail";
                    this.serverName = environment.MailInfo.SelectServer("BACK").PingPoint;
                    return;

                case TestServer.Mail_Test:
                    this.trmKind = "Mail";
                    this.serverName = environment.MailInfo.SelectServer("TEST").PingPoint;
                    return;
            }
            using (MessageDialogSimpleForm form = new MessageDialogSimpleForm())
            {
                form.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Error, string.Format(Resources.ResourceManager.GetString("CORE15"), testServer.ToString()));
            }
        }
Esempio n. 25
0
 private void tbbJetras_Click(object sender, EventArgs e)
 {
     try
     {
         Process.Start(this.pi.Jetras);
     }
     catch (Exception exception)
     {
         string message = Naccs.Core.Properties.Resources.ResourceManager.GetString("CORE71") + Environment.NewLine + MessageDialog.CreateExceptionMessage(exception);
         using (MessageDialogSimpleForm form = new MessageDialogSimpleForm())
         {
             form.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Error, message);
         }
     }
 }
Esempio n. 26
0
 public void AppendRecord()
 {
     string dir = this.fs.TypeList.getType("A").Dir;
     try
     {
         if (!Directory.Exists(dir))
         {
             Directory.CreateDirectory(dir);
         }
         int num = 0;
         IData data = null;
         List<string[]> list = new List<string[]>();
         for (int i = 0; i < this.dgvDataView.Rows.Count; i++)
         {
             if (this.dgvDataView.Rows[i].Selected && (this.dgvDataView.Rows[i].Cells["clmSyu"].Value.ToString() == "A"))
             {
                 string[] item = new string[] { this.dgvDataView.Rows[i].Cells["clmID"].Value.ToString(), Path.Combine(this.pi.DataViewPath, this.dgvDataView.Rows[i].Cells["clmFileName"].Value.ToString()) };
                 list.Add(item);
             }
         }
         string appendRecord = "";
         for (int j = 0; j < list.Count; j++)
         {
             data = DataFactory.LoadFromDataView(list[j][0], list[j][1]);
             appendRecord = this.GetAppendRecord(data);
             string str2 = data.OutCode.Trim() + DateTime.Now.ToString("ddMMyyyy", DateTimeFormatInfo.InvariantInfo) + ".csv";
             if (File.Exists(Path.Combine(dir, str2)))
             {
                 StreamWriter writer = new StreamWriter(Path.Combine(dir, str2), true, Encoding.GetEncoding("UTF-8"));
                 writer.WriteLine(appendRecord);
                 writer.Close();
             }
             else
             {
                 StreamWriter writer2 = new StreamWriter(Path.Combine(dir, str2), false, Encoding.GetEncoding("UTF-8"));
                 writer2.WriteLine(appendRecord);
                 writer2.Close();
             }
             this.SaveStatusChange(data.ID, true);
             num++;
         }
         string message = num.ToString() + Resources.ResourceManager.GetString("CORE63");
         using (MessageDialogSimpleForm form = new MessageDialogSimpleForm())
         {
             form.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Information, message);
         }
     }
     catch (Exception exception)
     {
         MessageDialog dialog = new MessageDialog();
         dialog.ShowMessage("E303", this.sfdDataView.FileName, null, exception);
         dialog.Dispose();
     }
 }
Esempio n. 27
0
 protected string ErrCreate(string str)
 {
     string message = Naccs.Core.Properties.Resources.ResourceManager.GetString("CORE37");
     using (MessageDialogSimpleForm form = new MessageDialogSimpleForm())
     {
         form.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Error, message);
     }
     IData data = DataFactory.CreateInstance();
     data.Header.OutCode = "*ERROR";
     data.Header.DataType = "E";
     data.Header.Div = "001";
     data.Header.EndFlag = "E";
     data.Header.Subject = "LENGTH ERROR";
     data.Header.DataInfo = "ERROR" + DateTime.Now.ToString("yyyyMMddHHmmss", DateTimeFormatInfo.InvariantInfo);
     data.JobData = str;
     return data.GetDataString();
 }
Esempio n. 28
0
 private int cmbCheck()
 {
     int length = this.cmbYear.Text.Length;
     int num2 = this.cmbMonth.Text.Length;
     if ((length != 4) || !Regex.IsMatch(this.cmbYear.Text, "^[0-9]+$"))
     {
         string message = Resources.ResourceManager.GetString("CORE21");
         using (MessageDialogSimpleForm form = new MessageDialogSimpleForm())
         {
             form.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Error, message);
         }
         base.ActiveControl = this.cmbYear;
         this.err = 1;
         return this.err;
     }
     if ((num2 != 2) || !Regex.IsMatch(this.cmbMonth.Text, "^[0-9]+$"))
     {
         string str4 = Resources.ResourceManager.GetString("CORE22");
         using (MessageDialogSimpleForm form2 = new MessageDialogSimpleForm())
         {
             form2.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Error, str4);
         }
         base.ActiveControl = this.cmbMonth;
         this.err = 1;
     }
     return this.err;
 }
Esempio n. 29
0
 private void NetworkTestControl()
 {
     string text = "";
     Cursor.Current = Cursors.WaitCursor;
     NetTestMode all = NetTestMode.All;
     switch (all)
     {
         case NetTestMode.All:
         case NetTestMode.ping:
         {
             this.getTestServerInfo(this.testServer);
             string trmKind = this.trmKind;
             if (trmKind == null)
             {
                 goto Label_00DC;
             }
             if (!(trmKind == "Interactive"))
             {
                 if (trmKind == "Mail")
                 {
                     this.txConsole.AppendText("#コマンド発行:");
                     text = DosCommand.doCommand("ping " + this.serverName);
                     this.txConsole.AppendText(text);
                     this.txConsole.AppendText("\n");
                     break;
                 }
                 goto Label_00DC;
             }
             this.txConsole.AppendText("#コマンド発行:");
             text = DosCommand.doCommand("ping " + this.serverName);
             this.txConsole.AppendText(text);
             this.txConsole.AppendText("\n");
             break;
         }
     }
     goto Label_0111;
 Label_00DC:
     using (MessageDialogSimpleForm form = new MessageDialogSimpleForm())
     {
         form.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Error, string.Format(Resources.ResourceManager.GetString("CORE16"), this.trmKind));
     }
 Label_0111:
     if ((all == NetTestMode.All) || (all == NetTestMode.ipconfig))
     {
         this.txConsole.AppendText("#コマンド発行:");
         text = DosCommand.doCommand("ipconfig /all");
         this.txConsole.AppendText(text);
         this.txConsole.AppendText("\n");
     }
     Cursor.Current = Cursors.Default;
 }
Esempio n. 30
0
 public void ClearDelete()
 {
     this.drProgress = new DeleteRestore(0);
     this.drProgress.Show();
     try
     {
         DataRow[] rowArray = this.dtsDataView.Tables["NACCS"].Select("clDelete = 1");
         this.drProgress.pgbRestore.Minimum = 0;
         this.drProgress.pgbRestore.Maximum = rowArray.Length;
         for (int i = 0; i < rowArray.Length; i++)
         {
             this.drProgress.pgbRestore.Value = i + 1;
             this.drProgress.Refresh();
             try
             {
                 if (File.Exists(this.pi.DataViewPath + rowArray[i]["clFileName"].ToString()))
                 {
                     File.Delete(this.pi.DataViewPath + rowArray[i]["clFileName"].ToString());
                 }
                 if ((rowArray[i]["clSign"].ToString() != "0") && File.Exists(rowArray[i]["clSignPath"].ToString()))
                 {
                     File.Delete(rowArray[i]["clSignPath"].ToString());
                 }
             }
             catch (Exception exception)
             {
                 string message = Resources.ResourceManager.GetString("CORE61") + Environment.NewLine + MessageDialog.CreateExceptionMessage(exception);
                 using (MessageDialogSimpleForm form = new MessageDialogSimpleForm())
                 {
                     form.ShowMessage(ButtonPatern.OK_ONLY, MessageKind.Error, message);
                 }
             }
             this.AttachDelete(rowArray[i]["clAttach"].ToString());
             rowArray[i].Delete();
         }
         this.dtsDataView.AcceptChanges();
         this.dgvDataView.Refresh();
         this.stpCount();
     }
     finally
     {
         this.drProgress.Close();
         this.drProgress.Dispose();
     }
 }