private void CommentListWindowInit() { if (commentListWindow == null) { commentListWindow = new CommentList(); commentListWindow.Owner = Window.GetWindow(this); commentListWindow.ShowInTaskbar = false; commentListWindow.Show(); commentListWindow.Closed += CommentListWindow_Closed; commentList.ForEach(x => commentListWindow.AddComment(x)); } }
private void AddComment(NameValueCollection data) { try { if (data["text"].Length <= 0) { return; } } catch (Exception) { return; } commentList.Add(data["text"]); commentListWindow.AddComment(data["text"]); CreateComment(data); }