コード例 #1
0
ファイル: Reader.cs プロジェクト: cybnetsurfe3011/MSPA-Reader
 void CleanComic()
 {
     RemoveControl(errorLabel);
     RemoveControl(title);
     foreach (var pic in gifs)
     {
         RemoveControl(pic.gif);
         pic.loc.Dispose();
     }
     gifs.Clear();
     foreach (var lp in linkPrefix)
         RemoveControl(lp);
     linkPrefix.Clear();
     foreach (var lp in next)
         RemoveControl(lp);
     next.Clear();
     if (monitorGameOver.IsBusy)
     {
         var tmp = flash;
         flash = null; //prevent progress report from changing colours
         RemoveControl(tmp);
         monitorGameOver.CancelAsync();
     }else
         RemoveControl(flash);
     RemoveControl(pesterHideShow);
     foreach (var line in conversations)
         line.Dispose();
     conversations.Clear();
     RemoveControl(pesterlog);
     RemoveControl(comicPanel);
     RemoveControl(FVideoPlayer);
     FVideoPlayer = null;
     if (x2Panel != null)
     {
         x2Panel.Kill();
         x2Panel = null;
     }
     if (openbound != null)
     {
         openbound.Dispose();
         openbound = null;
     }
     foreach (var p in tempFiles)
     {
         try
         {
             File.Delete(p);
         }
         catch { }
     }
     tempFiles.Clear();
 }
コード例 #2
0
ファイル: Reader.cs プロジェクト: cybnetsurfe3011/MSPA-Reader
        void LoadX2Page()
        {
            LoadRegularPage();
            var oldMeta = page.meta;
            page.links = page.links2;
            page.meta = page.meta2;
            page.resources = page.resources2;

            var fakeLink = gifs.Last();
            if(pesterHideShow != null)
                pesterHideShow.Click -= pesterHideShow_Click;

            if (oldMeta.narr != null)
                x2Panel = new x2Handler(comicPanel);
            else
                x2Panel = new x2Handler(mainPanel,comicPanel, pesterlog, linkPrefix.First(), fakeLink.gif, pesterHideShow, conversations, oldMeta.promptType, pLMinHeight, pLMaxHeight);

            conversations = new List<LineOrPB>();
            LoadRegularPage();
            x2Panel.comicPanel.Location = new Point(mainPanel.Width / 2 - (x2Panel.comicPanel.Width * 2 + 29) / 2, x2Panel.comicPanel.Location.Y);
            comicPanel.Location = new Point(x2Panel.comicPanel.Location.X + x2Panel.comicPanel.Width + 29, comicPanel.Location.Y);
            fakeLink.gif.Location = new Point(next.First().Location.X + linkPrefix.First().Width, next.First().Location.Y + next.First().Height);
            x2Panel.comicPanel.Height = comicPanel.Height;

            mainPanel.Height = comicPanel.Height + REGULAR_COMIC_PANEL_Y_OFFSET + REGULAR_COMIC_PANEL_BOTTOM_Y_OFFSET;
        }