示例#1
0
        private void NewCoverage_Click(object sender, EventArgs e)
        {
            CommonData.CovEdit = false;
            CoverageOptionsForm form = new CoverageOptionsForm();

            form.ShowDialog();
            if (!CommonData.CovDefFail && CommonData.NewCoverage && CommonData.CoverageCompute)
            {
                try
                {
                    CommonData.StkRoot.ExecuteCommand("Cov */CoverageDefinition/" + CommonData.OaName + " Access Compute");
                }
                catch (Exception)
                {
                    string mes = "Could not Compute Coverage";
                    MessageBox.Show(mes);
                }
            }

            try
            {
                ReadWrite.WriteCoverageData(CommonData.DirectoryStr + "\\CoverageData.txt");
            }
            catch (Exception)
            {
                MessageBox.Show("Could not write file");
            }
            PopulateCoverageList();
        }
示例#2
0
        private void EditCoverage_Click(object sender, EventArgs e)
        {
            if (CoverageList.FocusedItem != null && CoverageList.FocusedItem.Index != -1)
            {
                CommonData.CovEdit = true;
                if (CommonData.CoverageList[CommonData.CoverageIndex].IsCustom)
                {
                    MessageBox.Show("This is a custom Coverage Definition (i.e. not created in this plugin).\nOnly access can be computed from this interface.");
                }
                else
                {
                    CoverageOptionsForm form = new CoverageOptionsForm();
                    form.ShowDialog();
                    if (!CommonData.CovDefFail && CommonData.CoverageCompute)
                    {
                        try
                        {
                            CommonData.StkRoot.ExecuteCommand("Cov */CoverageDefinition/" + CommonData.OaName + " Access Compute");
                        }
                        catch (Exception)
                        {
                            string mes = "Could not Compute Coverage";
                            MessageBox.Show(mes);
                        }
                    }

                    try
                    {
                        ReadWrite.WriteCoverageData(CommonData.DirectoryStr + "\\CoverageData.txt");
                    }
                    catch (Exception)
                    {
                        MessageBox.Show("Could not write file");
                    }
                    PopulateCoverageList();
                }
            }
        }