private bool checkUniqueIdentifier(string value, SharedMemoryVariable shmVar) { if (!SharedMemoryVariableList.IsUniqueIdentifier(value, shmVar)) { MessageBox.Show("The entered name already exists as a shared memory variable.\n\nPlease enter a unique name.", "Validation Failed", MessageBoxButton.OK, MessageBoxImage.Information); ShmVarsEditor.boolHasInvalidValue = true; ShmVarsEditor.strNewValidValue = ShmVarsEditor.GetUniqueVarName(); shmVar.Name = ShmVarsEditor.strNewValidValue; return(false); } return(true); }
private bool checkIECIdentifier(string value, SharedMemoryVariable shmVar) { if (!SharedMemoryVariableList.IsValidIECIdentifier(value)) { MessageBox.Show("The entered name is not a valid IEC 61131 identifier.\n\nPlease enter a valid name.", "Validation Failed", MessageBoxButton.OK, MessageBoxImage.Information); ShmVarsEditor.boolHasInvalidValue = true; ShmVarsEditor.strNewValidValue = ShmVarsEditor.GetUniqueVarName(); shmVar.Name = ShmVarsEditor.strNewValidValue; return(false); } return(true); }