예제 #1
0
        //--------------<Delete the history request log>------------
        private void DeleteHis_Click(object sender, RoutedEventArgs e)
        {
            string path = ResultList.SelectedValue.ToString();

            if (!System.IO.File.Exists(path))
            {
                ResultList.Items.Remove(ResultList.SelectedItem);
                wr = new WarningRes();
                wr.Show();
                return;
            }
            else
            {
                dw = new DeleteConfirm(this);
                dw.ShowDialog();
                if (del)
                {
                    System.IO.File.Delete(path);
                    ResultList.Items.Remove(ResultList.SelectedItem);
                }
            }
        }
예제 #2
0
        //--------------------<Delete history test log from GUI and folder>------------
        private void DeleteRes_Click(object sender, RoutedEventArgs e)
        {
            if (TestHistory.SelectedIndex == -1)
            {
                return;
            }
            string path = clientSave_ + TestHistory.SelectedValue.ToString();

            if (!System.IO.File.Exists(path))
            {
                TestHistory.Items.Remove(TestHistory.SelectedItem);
                ws = new WarningRes();
                ws.Show();
                return;
            }
            dw = new DeleteConfirm(this);
            dw.ShowDialog();
            if (del)
            {
                System.IO.File.Delete(path);
                TestHistory.Items.Remove(TestHistory.SelectedItem);
            }
        }