Exemplo n.º 1
0
        private void DepAddBtn_Click(object sender, System.EventArgs e)
        {
            using (Dialogs.SelectComponentDialog sf = new Dialogs.SelectComponentDialog(true, false, false, false, false, false, false, false, false, true))
            {
                if (sf.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
                {
                    //ComponentWrapper c = sf.SelectedComponent;

                    ListViewItem it = DepsListView.Items.Add(sf.SelectedComponent.ComponentType.ToString());
                    it.SubItems.Add(sf.SelectedComponent.Name);
                    switch (sf.SelectedComponent.ComponentType)
                    {
                    case ComponentTypeWrapper.Library:
                        it.ImageIndex = (int)MFTreeNodeBase.ImageKeysEnum.Library;
                        break;

                    case ComponentTypeWrapper.LibraryCategory:
                        it.ImageIndex = (int)MFTreeNodeBase.ImageKeysEnum.LibraryCategory;
                        break;

                    case ComponentTypeWrapper.Feature:
                    case ComponentTypeWrapper.MFAssembly:
                    case ComponentTypeWrapper.MFSolution:
                    case ComponentTypeWrapper.Processor:
                    case ComponentTypeWrapper.OperatingSystem:
                    case ComponentTypeWrapper.BuildTool:
                    case ComponentTypeWrapper.ISA:
                    case ComponentTypeWrapper.BuildParameter:
                    case ComponentTypeWrapper.Unknown:
                    default:
                        break;
                    }
                    it.Selected = true;

                    ModifiedChange();
                }
            }
        }
Exemplo n.º 2
0
        private void DepAddBtn_Click(object sender, System.EventArgs e)
        {
            using (Dialogs.SelectComponentDialog sf = new Dialogs.SelectComponentDialog(true, false, false, false, false, false, false, false, false, true))
            {
                if (sf.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
                {
                    //ComponentWrapper c = sf.SelectedComponent;

                    ListViewItem it = DepsListView.Items.Add(sf.SelectedComponent.ComponentType.ToString());
                    it.SubItems.Add(sf.SelectedComponent.Name);
                    switch (sf.SelectedComponent.ComponentType)
                    {
                        case ComponentTypeWrapper.Library:
                            it.ImageIndex = (int)MFTreeNodeBase.ImageKeysEnum.Library;
                            break;
                        case ComponentTypeWrapper.LibraryCategory:
                            it.ImageIndex = (int)MFTreeNodeBase.ImageKeysEnum.LibraryCategory;
                            break;
                        case ComponentTypeWrapper.Feature:
                        case ComponentTypeWrapper.MFAssembly:
                        case ComponentTypeWrapper.MFSolution:
                        case ComponentTypeWrapper.Processor:
                        case ComponentTypeWrapper.OperatingSystem:
                        case ComponentTypeWrapper.BuildTool:
                        case ComponentTypeWrapper.ISA:
                        case ComponentTypeWrapper.BuildParameter:
                        case ComponentTypeWrapper.Unknown:
                        default:
                            break;
                    }
                    it.Selected = true;

                    ModifiedChange();
                }
            }
        }