public void ChangeDatatypeButtonClick() { List <IGUID> datatypes = AutosarApplication.GetInstance().GetAllDataTypes(this.datatype.Name); System.Windows.Forms.DialogResult result = DatatypeForm.GetInstance().ShowForm(datatypes, datatype.DataTypeGUID); if (result == System.Windows.Forms.DialogResult.OK) { datatype.DataTypeGUID = DatatypeForm.GetInstance().SelectedDatatype.GUID; updateDataTypeButton.Content = datatype.DataTypeName; } }
public void ChangeDatatypeButtonClick() { int index = grid.SelectedIndex; List <IGUID> datatypes = AutosarApplication.GetInstance().GetAllDataTypes(this.datatype.Name); System.Windows.Forms.DialogResult result = DatatypeForm.GetInstance().ShowForm(datatypes, datatype.Fields[index].DataTypeGUID); if (result == System.Windows.Forms.DialogResult.OK) { datatype.Fields[index].DataTypeGUID = DatatypeForm.GetInstance().SelectedDatatype.GUID; RefreshComplexDatatypeGridView(); } }
public void ChangeDatatypeButtonClick() { int index = grid.SelectedIndex; if (gridElements[index].containObject is ClientServerOperationField) { ClientServerOperationField field = (gridElements[index].containObject as ClientServerOperationField); List <IGUID> datatypes = AutosarApplication.GetInstance().GetAllDataTypes(); System.Windows.Forms.DialogResult result = DatatypeForm.GetInstance().ShowForm(datatypes, field.BaseDataTypeGUID); if (result == System.Windows.Forms.DialogResult.OK) { field.BaseDataTypeGUID = DatatypeForm.GetInstance().SelectedDatatype.GUID; RefreshGridView(); } } }
public void CData_ChangeDatatype_Button_Click(object sender, RoutedEventArgs e) { int index = CDataGrid.SelectedIndex; if ((index < CDataGrid.Items.Count) && (index >= 0)) { List <IGUID> datatypes = AutosarApplication.GetInstance().GetAllDataTypes(); System.Windows.Forms.DialogResult result = DatatypeForm.GetInstance().ShowForm(datatypes, _componentDefenition.CDataDefenitions[index].DatatypeGuid); if (result == System.Windows.Forms.DialogResult.OK) { _componentDefenition.CDataDefenitions[index].DatatypeGuid = DatatypeForm.GetInstance().SelectedDatatype.GUID; AutosarApplication.GetInstance().SyncronizeCData(_componentDefenition); UpdateCDataGrid(); } } }
public void ChangePortInterfaceButtonClick() { int index = portsGrid.SelectedIndex; if ((index < portsGrid.Items.Count) && (index >= 0)) { List <IGUID> interfaces = null; if ((composition.PortsDefenitions[index].PortType == PortType.Client) || (composition.PortsDefenitions[index].PortType == PortType.Server)) { interfaces = AutosarApplication.GetInstance().GetAllClientServerInterfacesNames(); } else if ((composition.PortsDefenitions[index].PortType == PortType.Sender) || (composition.PortsDefenitions[index].PortType == PortType.Receiver)) { interfaces = AutosarApplication.GetInstance().GetAllSenderReceiverInterfacesNames(); } System.Windows.Forms.DialogResult result = DatatypeForm.GetInstance().ShowForm(interfaces, composition.PortsDefenitions[index].InterfaceGUID); if (result == System.Windows.Forms.DialogResult.OK) { composition.PortsDefenitions[index].InterfaceGUID = DatatypeForm.GetInstance().SelectedDatatype.GUID; UpdatePortsGrid(); } } }