示例#1
0
 public MidiInformation()
 {
     ContextManager.MidiInformation = this;
     this.RuleSets          = new MidiInformation.RuleSetCollection();
     this.RuleSets.Added   += new EventHandler <MidiInformation.RuleSetEventArgs>(this.OnRuleSetAdded);
     this.RuleSets.Deleted += new EventHandler <MidiInformation.RuleSetEventArgs>(this.OnRuleSetDeleted);
 }
示例#2
0
 public void Dispose()
 {
     if (!this.disposed)
     {
         this.disposed = true;
         this.RuleSets.Clear();
         this.RuleSets.Added   -= new EventHandler <MidiInformation.RuleSetEventArgs>(this.OnRuleSetAdded);
         this.RuleSets.Deleted -= new EventHandler <MidiInformation.RuleSetEventArgs>(this.OnRuleSetDeleted);
         this.RuleSets          = null;
     }
 }