コード例 #1
0
        private void RateIcon_Click(object sender, EventArgs e)
        {
            int.TryParse(((EpisodeControl)((PictureBox)sender).Parent).Text.ToLower().Replace("episode", "").Trim(), out int EpisodeNumber);
            RateAnimeControl RateAnimeCtrl = new RateAnimeControl(EpisodeNumber);
            Point            CtrlLocation  = ((PictureBox)sender).Parent.PointToScreen(Point.Empty);

            RateAnimeCtrl.Location = new Point(CtrlLocation.X, 50);
            this.Controls.Add(RateAnimeCtrl);
            RateAnimeCtrl.BringToFront();
            RateAnimeCtrl.SaveRecord += RateAnimeCtrl_SaveRecord;
        }
コード例 #2
0
        private async void RateAnimeCtrl_SaveRecord(RateAnimeControl RateControl, MyAnimeListAnimeValuesClass MalValues)
        {
            await StaticsClass.MyAnimeListObject.AddAnime(_AnimeObject.Id, MalValues);

            RateControl.Dispose();
        }