// 検索 private void FindItemToolStripMenuItem_Click(object sender, EventArgs e) { SimpleTextDialog dialog = new SimpleTextDialog(); dialog.Owner = this; dialog.dialogtext = "検索"; dialog.labeltext = "検索文字列"; if (dialog.ShowDialog() == DialogResult.OK) { string text = dialog.textfield; Cursor.Current = Cursors.WaitCursor; foreach (TreeNode node in treeViewArcs.Nodes) TDCGExplorer.FindTreeNode(node, text); foreach (TreeNode node in treeViewZips.Nodes) TDCGExplorer.FindTreeNode(node, text); foreach (TreeNode node in treeViewInstalled.Nodes) TDCGExplorer.FindTreeNode(node, text); foreach (TreeNode node in treeViewCollision.Nodes) TDCGExplorer.FindTreeNode(node, text); foreach (TreeNode node in treeViewTag.Nodes) TDCGExplorer.FindTreeNode(node, text); foreach (TreeNode node in treeViewSaveFile.Nodes) TDCGExplorer.FindTreeNode(node, text); Cursor.Current = Cursors.Default; } }
private void toolStripMenuItemTouchAll_Click(object sender, EventArgs e) { if (TDCGExplorer.BusyTest() == true) return; try { SimpleTextDialog dialog = new SimpleTextDialog(); dialog.Owner = TDCGExplorer.MainFormWindow; dialog.dialogtext = TextResource.TouchDialogText; dialog.labeltext = TextResource.DateTime; dialog.textfield = DateTime.Now.ToString(); if (dialog.ShowDialog() == DialogResult.OK) { DateTime newtime = DateTime.Parse(dialog.textfield); foreach (Object itemobject in ListBoxMainView.Items) { LbSaveFileItem item = itemobject as LbSaveFileItem; if (item != null) { item.SetDate(newtime); } } } } catch (Exception) { } }
private void tahfilesearchToolStripMenuItem_Click(object sender, EventArgs e) { SimpleTextDialog dialog = new SimpleTextDialog(); dialog.Owner = this; dialog.dialogtext = TextResource.SearchDialogText; dialog.labeltext = TextResource.SearchDialogLabel; dialog.checkboxenable = true; dialog.checkboxtext = TextResource.SearchWithZipFile; dialog.checkboxchecked = true; if (dialog.ShowDialog() == DialogResult.OK) { string text = dialog.textfield; AssignTagPageControl(new FindItemPage(text, dialog.checkboxchecked, true)); } }
//rename public void Touch() { DateTime datetime = System.IO.File.GetCreationTime(path); SimpleTextDialog dialog = new SimpleTextDialog(); dialog.Owner = TDCGExplorer.MainFormWindow; dialog.dialogtext = TextResource.Touch; //"タイムスタンプの変更"; dialog.labeltext = TextResource.DateTime; //"日時"; dialog.textfield = datetime.ToString(); if (dialog.ShowDialog() == DialogResult.OK) { DateTime newtime = DateTime.Parse(dialog.textfield); SetDate(newtime); } }
//rename public void Rename() { string directory = Path.GetDirectoryName(path); SimpleTextDialog dialog = new SimpleTextDialog(); dialog.Owner = TDCGExplorer.MainFormWindow; dialog.dialogtext = TextResource.Rename; //"ファイル名の変更"; dialog.labeltext = TextResource.Filename; //"ファイル名"; dialog.textfield = Path.GetFileName(path); if (dialog.ShowDialog() == DialogResult.OK) { File.Move(path, Path.Combine(directory, dialog.textfield)); TDCGExplorer.DeleteFileTree(path); TDCGExplorer.AddFileTree(Path.Combine(directory, dialog.textfield)); } }