public void AddNewEntryValid() { //will determine if the add new entry is valid List <string> check_title_subtitle = new List <string> { Title_Add, Subtitle_Add }; List <string> exclude_lst = new List <string>(); Glo_ProjectData_Reference.IsNewTitleValid(check_title_subtitle, exclude_lst, out bool valid_entry, out bool is_duplicate, out bool is_title_exist); //this will only display if it's going to say it's invalid if (!valid_entry) { Debug.WriteLine("\nAddNewEntryValid"); Debug.WriteLine(string.Format(" {0,-15} = {1}", "Title", Title_Add)); Debug.WriteLine(string.Format(" {0,-15} = {1}", "Subtitle", Subtitle_Add)); Debug.WriteLine(string.Format(" {0,-15} = {1}", "is_duplicate", is_duplicate)); Debug.WriteLine(string.Format(" {0,-15} = {1}", "is_title_exist", is_title_exist)); Debug.WriteLine(string.Format(" {0,-15} = {1}", "valid_entry", valid_entry)); Debug.WriteLine(""); } Title_Valid = valid_entry; }
private void IsValidChangeTitleSubtitle() { List <string> check_title_subtitle = new List <string> { title_new_, subtitle_new_ }; List <string> exclude_lst = new List <string> { Title_Old, Subtitle_Old }; if (Glo_ProjectData_Reference == null) { return; } Glo_ProjectData_Reference.IsNewTitleValid(check_title_subtitle, exclude_lst, out bool valid_entry, out _, out _); Title_Valid = valid_entry; if (!Title_Valid) { Glo_MainPage_Reference.ShowPropertiesTitleInvalidTeachingTip(); } }