Ejemplo n.º 1
0
 // 検索
 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;
     }
 }
Ejemplo n.º 2
0
        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)
            {
            }

        }
Ejemplo n.º 3
0
 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));
     }
 }
Ejemplo n.º 4
0
        //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);
            }
        }
Ejemplo n.º 5
0
        //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));
            }
        }