public ModelCheckingForm1(string Name, SpecificationBase spec, bool UseFairness) { ModelCheckingFormInstance = this; InitializeComponent(); InitializeResourceText(); this.Spec = spec; //timer = new Stopwatch(); int Index = 1; foreach (KeyValuePair <string, AssertionBase> entry in Spec.AssertionDatabase) { ListViewItem item = new ListViewItem(new string[] { "", Index.ToString(), entry.Key }); //remember the type of the assertion item.Tag = entry.Value.AssertionType; //if the assertion is LTL, the button of the view BA should be enabled. if (entry.Value is AssertionLTL) { BuchiAutomata BA = (entry.Value as AssertionLTL).BA; if (BA != null) { if (BA.HasXOperator) { item.SubItems[0].Tag = true; } } } //if (entry.Value is AssertionLTLSafety) //{ // BuchiAutomata BA = (entry.Value as AssertionLTLSafety).BA; // if (BA != null) // { // if (BA.HasXOperator) // { // item.SubItems[0].Tag = true; // } // } //} //set the question mark image item.ImageIndex = 2; this.ListView_Assertions.Items.Add(item); Index++; } ////select the first assertion //if (this.ListView_Assertions.Items.Count > 0) //{ // this.ListView_Assertions.Items[0].Selected = true; //} if (Name != "") { this.Text = this.Text + " - " + Name; } this.StatusLabel_Text.Text = Resources.Select_an_assertion_to_start_with; ComboBox_Fairness.SelectedIndex = 0; //if there is no fair events in the system, then remove the "Fairness Label Only" entry. //if(!spec.HasFairEvent) //{ // ComboBox_Fairness.Items.RemoveAt(1); //} if (!UseFairness) { this.ComboBox_Fairness.Visible = false; this.Label_Fairness.Visible = false; } this.CheckBox_BDD.Visible = false; }
private void ModelCheckingForm_FormClosed(object sender, FormClosedEventArgs e) { ModelCheckingFormInstance = null; }