private void AcceptDialog(object sender, RoutedEventArgs e) { if (!Validation.GetHasError(StoryTitle) && !Validation.GetHasError(StoryAuthor) && !Validation.GetHasError(StoryDescription)) { var contains = new StringContains(); string _storyTitle = StoryTitle.Text; string _storyAuthor = StoryAuthor.Text; string _storyDate = StoryDate.Text; string _storyType = StoryType.Text; string _storyDescription = StoryDescription.Text; var forgeDatabase = Global.Instance.ForgeDatabase(); STORY story = forgeDatabase.Stories.Single(s => s.ID == Global.Instance.StoryID); story.Name = _storyTitle; story.Author = _storyAuthor; story.Created = _storyDate; story.Type = _storyType; story.Description = _storyDescription; forgeDatabase.SubmitChanges(); Global.Instance.UpdateNote(@"Story UPDATED! (Name = " + _storyTitle + @") (Author = " + _storyAuthor + @") (Created = " + _storyDate + @") (Type = " + _storyType + @") (Description = " + _storyDescription + @")"); IoC.Get <IEventAggregator>().PublishOnUIThread("AcceptRootDialog"); IoC.Get <IEventAggregator>().PublishOnUIThread("AcceptRealmUpdate"); } }
private static void StringContainTest() { Console.WriteLine("input long string: "); string longStr = Console.ReadLine(); Console.WriteLine("input short string: "); string shortStr = Console.ReadLine(); StringContains stringContains = new StringContains(); int ret = stringContains.CompareString(longStr, shortStr); }