예제 #1
0
        public void setupBehaviorCharazterization(string behavior)
        {
            foreach (Type t in this.GetType().Assembly.GetTypes())
            {
                if (t.GetInterface("IBehaviorCharacterization", true) != null)
                {
                    behaviorComboBox.Items.Add(t.Name);
                }
            }

            bc = BehaviorCharacterizationFactory.getBehaviorCharacterization(behavior);
            if (bc != null)
            {
                for (int j = 0; j < behaviorComboBox.Items.Count; j++)
                {
                    if (behaviorComboBox.Items[j].ToString().Equals(bc.name))
                    {
                        behaviorComboBox.SelectedIndex = j;
                        break;
                    }
                }
            }
            fillTexBehaviorTextBox();
        }
예제 #2
0
 private void behaviorComboBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     bc = BehaviorCharacterizationFactory.getBehaviorCharacterization(behaviorComboBox.SelectedItem.ToString());
     fillTexBehaviorTextBox();
     Invalidate();
 }