/// <summary> /// Removes the given item from the collection /// </summary> /// <returns>True, if the item was removed, otherwise False</returns> /// <param name="item">The item that should be removed</param> public virtual bool Remove(NMF.Models.Meta.IType item) { IComponentType componentTypeItem = item.As <IComponentType>(); if (((componentTypeItem != null) && this._parent.ComponentTypes.Remove(componentTypeItem))) { return(true); } IInterface interfaceItem = item.As <IInterface>(); if (((interfaceItem != null) && this._parent.Interfaces.Remove(interfaceItem))) { return(true); } ISystemSpecification systemSpecificationItem = item.As <ISystemSpecification>(); if (((systemSpecificationItem != null) && this._parent.SystemSpecifications.Remove(systemSpecificationItem))) { return(true); } IDelegate delegateItem = item.As <IDelegate>(); if (((delegateItem != null) && this._parent.Delegates.Remove(delegateItem))) { return(true); } return(false); }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public virtual void Add(NMF.Models.Meta.IType item) { IComponentType componentTypesCasted = item.As <IComponentType>(); if ((componentTypesCasted != null)) { this._parent.ComponentTypes.Add(componentTypesCasted); } IInterface interfacesCasted = item.As <IInterface>(); if ((interfacesCasted != null)) { this._parent.Interfaces.Add(interfacesCasted); } ISystemSpecification systemSpecificationsCasted = item.As <ISystemSpecification>(); if ((systemSpecificationsCasted != null)) { this._parent.SystemSpecifications.Add(systemSpecificationsCasted); } IDelegate delegatesCasted = item.As <IDelegate>(); if ((delegatesCasted != null)) { this._parent.Delegates.Add(delegatesCasted); } }
static void Main() { ISystemSpecification systemSpecification = SystemSpecificationFactory.get("ASC", "SQL"); DataManagementCsv test = new DataManagementCsv(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); GUI gui = new GUI(systemSpecification); Application.Run(gui); }
public GUI(ISystemSpecification systemSpecification) { InitializeComponent(); this.systemSpecification = systemSpecification; cmb_select.Items.Add("Filme"); cmb_select.Items.Add("Schauspieler"); cmb_select.SelectedItem = null; cmb_newrecord.Items.Add("Filme"); cmb_newrecord.Items.Add("Schauspieler"); }
public ITransformedSystemSpecification transform(ISystemSpecification systemSpecification) { ITransformedSystemSpecification transformedSystemSpecification = new SMTLibScript(); BaseExpressionParser expressionParser = new TCTLExpressionParser(); IPropertyTransformer propertyTransformer = new SMTPropertyTransformer(expressionParser); ITransformedPropertySpecification transformedProp; foreach (IPropertySpecification prop in systemSpecification.getProperties()) { transformedProp = propertyTransformer.transform(prop); transformedSystemSpecification.addProperty(transformedProp); } return(transformedSystemSpecification); }
/// <summary> /// Creates a new instance /// </summary> public SystemSpecificationBaseTypesCollection(ISystemSpecification parent) { this._parent = parent; }
/// <summary> /// Creates a new instance /// </summary> public SystemSpecificationReferencesCollection(ISystemSpecification parent) { this._parent = parent; parent.PublicInterfaces.AsNotifiable().CollectionChanged += this.HandleCollectionChange; }