示例#1
0
        private void CommentList_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (commentList.SelectedIndex == -1)
            {
                return;
            }
            Comment c = comments[commentList.SelectedIndex];

            scoreLabel.Text = $" {c.score1} - {c.score2} - {c.score3} - {c.totalScore} vs {c.userScore}";
            commentBox.Text = c.text;
        }
示例#2
0
        public Form1()
        {
            //RedditAggregator.RedditAggregator.TrainModels();
            Controller.Controller _ = Controller.Controller.Instance;
            //now update all comments
            Comment.RepredictAll();

            InitializeComponent();
            subRedditList.Items.AddRange(subReddits.ToArray());
            FormClosed += Form1_FormClosed;
        }
示例#3
0
        private void CommentBox_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (commentList.SelectedIndex == -1)
            {
                return;
            }
            Comment c = comments[commentList.SelectedIndex];

            c.userScore = userRating.Value / 5f;
            if (!Comment.Comments.Contains(c))
            {
                Comment.Comments.Add(c);
            }
        }
示例#4
0
        private void UserRating_Scroll(object sender, EventArgs e)
        {
            if (commentList.SelectedIndex == -1)
            {
                return;
            }
            Comment c = comments[commentList.SelectedIndex];

            c.userScore = userRating.Value / 5f;
            if (!Comment.Comments.Contains(c))
            {
                Comment.Comments.Add(c);
            }
        }
示例#5
0
 private void Form1_FormClosed(object sender, FormClosedEventArgs e)
 {
     Comment.SaveComments(Comment.Comments, true);
 }