Ejemplo n.º 1
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.º 2
0
        private void toolStripMenuItemTouch_Click(object sender, EventArgs e)
        {
            if (TDCGExplorer.BusyTest() == true) return;

            try
            {
                int index = listBoxMainListBox.SelectedIndex;
                if (index >= 0)
                {
                    LbSaveFileItem item = listBoxMainListBox.Items[index] as LbSaveFileItem;
                    if (item != null)
                    {
                        item.Touch();
                    }
                }
            }
            catch (Exception)
            {
            }
        }