Пример #1
0
        private void tmrUpdatePosition_Tick(object sender, EventArgs e)
        {
            ScreenSize size = EmuApi.GetScreenSize(false, EmuApi.ConsoleId.HistoryViewer);

            if (size.Width != ctrlRenderer.ClientSize.Width || size.Height != ctrlRenderer.ClientSize.Height)
            {
                ctrlRenderer.ClientSize = new Size(size.Width, size.Height);
            }

            _paused = EmuApi.IsPaused(EmuApi.ConsoleId.HistoryViewer);
            if (_paused)
            {
                btnPausePlay.Image = Properties.Resources.MediaPlay;
            }
            else
            {
                btnPausePlay.Image = Properties.Resources.MediaPause;
            }

            UInt32 positionInSeconds = HistoryViewerApi.HistoryViewerGetPosition();

            UpdatePositionLabel(positionInSeconds);

            if (positionInSeconds <= trkPosition.Maximum)
            {
                trkPosition.ValueChanged -= trkPosition_ValueChanged;
                trkPosition.Value         = (int)positionInSeconds;
                trkPosition.ValueChanged += trkPosition_ValueChanged;
            }
        }
Пример #2
0
 private void mnuCreateSaveState_Click(object sender, EventArgs e)
 {
     using (SaveFileDialog sfd = new SaveFileDialog()) {
         sfd.SetFilter(ResourceHelper.GetMessage("FilterSavestate"));
         sfd.InitialDirectory = ConfigManager.SaveStateFolder;
         sfd.FileName         = EmuApi.GetRomInfo().GetRomName() + ".mst";
         if (sfd.ShowDialog() == DialogResult.OK)
         {
             if (!HistoryViewerApi.HistoryViewerCreateSaveState(sfd.FileName, HistoryViewerApi.HistoryViewerGetPosition()))
             {
                 MesenMsgBox.Show("FileSaveError", MessageBoxButtons.OK, MessageBoxIcon.Error);
             }
         }
     }
 }
Пример #3
0
 private void mnuResumeGameplay_Click(object sender, EventArgs e)
 {
     HistoryViewerApi.HistoryViewerResumeGameplay(HistoryViewerApi.HistoryViewerGetPosition());
 }