AVaRICEDebugPackage.AVaRICEDebugSettingsControl.AVaRICEDebugSettingsControl C# (CSharp) Method

AVaRICEDebugSettingsControl() public method

public AVaRICEDebugSettingsControl ( DebugMethod method, string bspDir ) : System
method DebugMethod
bspDir string
return System
        public AVaRICEDebugSettingsControl(DebugMethod method, string bspDir)
        {
            InitializeComponent();
            _MyMethod = method;
            _ToolchainBin = Path.Combine(Path.GetDirectoryName(bspDir), "bin");

            foreach (Control ctl in Controls)
            {
                if (ctl.Tag is string)
                {
                    _Controls[ctl.Tag.ToString()] = new ControlObj { Control = ctl, ID = ctl.Tag.ToString() };
                }
            }

            foreach (var prop in method.GDBServerArguments.Properties.PropertyGroups[0].Properties)
            {
                ControlObj obj;
                if (_Controls.TryGetValue(method.GDBServerArguments.Properties.PropertyGroups[0].UniqueID + prop.UniqueID, out obj))
                {
                    obj.Property = prop;

                    if (obj.Control is ComboBox)
                    {
                        foreach (var e in (prop as PropertyEntry.Enumerated).SuggestionList)
                            (obj.Control as ComboBox).Items.Add(e);
                        (obj.Control as ComboBox).SelectedIndex = (prop as PropertyEntry.Enumerated).DefaultEntryIndex;
                    }
                }
            }
        }