示例#1
0
    private void OpenResultXmlToolStripMenuItem_Click(object sender, EventArgs e)
    {
        DialogResult result = openFileDialog1.ShowDialog();

        if (result.ToString() == "OK")
        {
            Application.DoEvents();
            ImportResultXml importResultXml = new ImportResultXml(openFileDialog1.FileName);

            if (importResultXml.GetSuccess())
            {
                SetFileName(openFileDialog1.FileName);

                Hide();
                Initialize(importResultXml.GetTraceData(), importResultXml.GetCalculatedPerformanceCounters(), importResultXml.GetRanTaskInfo(), importResultXml.GetResultTaskCollection(), importResultXml.GetResultInfo());
                PostInitializeSteps();
            }
        }
    }
示例#2
0
    private void ResultsForm_DragDrop(object sender, DragEventArgs e)
    {
        string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);

        if (files != null)
        {
            if (files.Length == 1)
            {
                ImportResultXml importResultXml = new ImportResultXml(files[0]);

                if (importResultXml.GetSuccess())
                {
                    SetFileName(files[0]);

                    Hide();
                    Initialize(importResultXml.GetTraceData(), importResultXml.GetCalculatedPerformanceCounters(), importResultXml.GetRanTaskInfo(), importResultXml.GetResultTaskCollection(), importResultXml.GetResultInfo());
                    PostInitializeSteps();
                }
            }
        }
    }
示例#3
0
    private void ExistingFileNameMenuItem_Click(object sender, EventArgs e)
    {
        string fileName = ((ToolStripMenuItem)sender).Text;

        if (File.Exists(fileName))
        {
            ImportResultXml importResultXml = new ImportResultXml(fileName);

            if (importResultXml.GetSuccess())
            {
                SetFileName(fileName);

                Hide();
                Initialize(importResultXml.GetTraceData(), importResultXml.GetCalculatedPerformanceCounters(), importResultXml.GetRanTaskInfo(), importResultXml.GetResultTaskCollection(), importResultXml.GetResultInfo());
                PostInitializeSteps();
            }
        }
        else
        {
            MessageBox.Show("File not found.", GenericHelper.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
    }