private bool EditMatrixMapping(string name, LipSyncMapData newMapping) { bool retVal = false; bool doRemove = true; LipSyncMapMatrixEditor editor = new LipSyncMapMatrixEditor(newMapping); editor.LibraryMappingName = name; if (editor.ShowDialog() == System.Windows.Forms.DialogResult.OK) { if ((name.Equals(editor.LibraryMappingName) == false) && (this.Contains(editor.LibraryMappingName) == true)) { DialogResult dr = MessageBox.Show("Overwrite existing " + editor.LibraryMappingName + " mapping?", "Map exists", MessageBoxButtons.YesNo); doRemove = (dr == DialogResult.Yes) ? true : false; } if (doRemove == true) { RemoveMapping(name); } AddMapping(!doRemove, editor.LibraryMappingName, editor.MapData, true); retVal = true; } return(retVal); }
private bool EditMatrixMapping(string name, LipSyncMapData newMapping) { bool retVal = false; bool doRemove = true; LipSyncMapMatrixEditor editor = new LipSyncMapMatrixEditor(newMapping); if (editor.ShowDialog() == DialogResult.OK) { if ((name.Equals(editor.LibraryMappingName) == false) && (this.Contains(editor.LibraryMappingName) == true)) { //messageBox Arguments are (Text, Title, No Button Visible, Cancel Button Visible) MessageBoxForm.msgIcon = SystemIcons.Question; //this is used if you want to add a system icon to the message form. var messageBox = new MessageBoxForm("Overwrite existing " + editor.LibraryMappingName + " mapping?", "Map exists", true, false); messageBox.ShowDialog(); doRemove = (messageBox.DialogResult == DialogResult.OK) ? true : false; } if (doRemove == true) { RemoveMapping(name); } AddMapping(!doRemove, editor.LibraryMappingName, editor.MapData, true); retVal = true; } return(retVal); }