public void NewStoriesControl(WrapPanel panel, int position) { NewStoryView frm = new NewStoryView(); frm.ShowDialog(); if (frm.NewStory != null && frm.NewStory.Trim() != "") { Stories tempStories = new Stories(); tempStories.Value = frm.NewStory + Environment.NewLine + frm.NewStorydate; tempStories.ElementType = GeneralVariable.ElementType.NewStory.GetHashCode(); tempStories.Position = position; if (_StoriesService.Add(tempStories)) { Label tempLabel = new Label(); tempLabel.Content = frm.NewStory + Environment.NewLine + frm.NewStorydate; tempLabel.HorizontalContentAlignment = HorizontalAlignment.Center; tempLabel.VerticalContentAlignment = VerticalAlignment.Center; panel.Children.Clear(); panel.Children.Add(tempLabel); } else { MessageBox.Show("KAYIT ESNASINDA SORUNLA KARŞILAŞILDI."); } } }
public void NewStartedControl(WrapPanel panel, int position) { NewStoryView frm = new NewStoryView(); frm.ShowDialog(); if (frm.NewStory != null && frm.NewStory.Trim() != "" && frm.NewStorydate != null) { Stories tempStories = new Stories(); tempStories.Value = frm.NewStory + Environment.NewLine + frm.NewStorydate; tempStories.ElementType = GeneralVariable.ElementType.NotStarted.GetHashCode(); tempStories.Position = position; if (_StoriesService.Add(tempStories)) { UCHistoryView tt = new UCHistoryView(tempStories); panel.Children.Add(tt); } else { MessageBox.Show("KAYIT ESNASINDA SORUNLA KARŞILAŞILDI."); } } }