private void buttonON4_Click(object sender, RoutedEventArgs e)
 {
     soundControllers.ElementAt(3).On = !soundControllers.ElementAt(3).On;
     Update();
     VCE?.Invoke(this, new VolChangedArgs {
     });
 }
예제 #2
0
        public void Restart()
        {
            vce = emu.VCE;

            if (emu.SystemId == "SGX")
            {
                checkBoxVDC2.Enabled = true;
            }
            else
            {
                checkBoxVDC2.Enabled = false;
                checkBoxVDC2.Checked = false;
            }
            checkBoxVDC2_CheckedChanged(null, null);
        }
 private void Slider4_ValueChanged(object sender, RoutedPropertyChangedEventArgs <double> e)
 {
     if (Slider4.Value > 0)
     {
         soundControllers.ElementAt(3).Mute = false;
     }
     else
     {
         soundControllers.ElementAt(3).Mute = true;
     }
     SetVolume();
     VCE?.Invoke(this, new VolChangedArgs {
     });
     Update();
 }
 private void Slider3_ValueChanged(object sender, RoutedPropertyChangedEventArgs <double> e)
 {
     if (!MainChange)
     {
         if (Slider3.Value > 0)
         {
             soundControllers.ElementAt(2).Mute = false;
         }
         else
         {
             soundControllers.ElementAt(2).Mute = true;
         }
         //MainWindow.Monitors.ElementAt(2).Volume = (int)Slider3.Value;
         SetVolume();
         VCE?.Invoke(this, new VolChangedArgs {
         });
         Update();
     }
 }
예제 #5
0
        public void Restart()
        {
            if (!(Global.Emulator is PCEngine))
            {
                Close();
                return;
            }
            emu = (PCEngine)Global.Emulator;

            vce = emu.VCE;

            if (emu.SystemId == "SGX")
            {
                checkBoxVDC2.Enabled = true;
            }
            else
            {
                checkBoxVDC2.Enabled = false;
                checkBoxVDC2.Checked = false;
            }
            checkBoxVDC2_CheckedChanged(null, null);
        }
예제 #6
0
        //拍照按钮
        private void Capture_Click_Btn(object sender, RoutedEventArgs e)
        {
            //vce是前台wpfmedia控件的name
            //为避免抓不全的情况,需要在Render之前调用Measure、Arrange
            RenderTargetBitmap bmp = new RenderTargetBitmap((int)VCE.ActualWidth,
                                                            (int)VCE.ActualHeight, 96, 96, PixelFormats.Default);

            VCE.Measure(VCE.RenderSize);
            VCE.Arrange(new Rect(VCE.RenderSize));

            bmp.Render(VCE);

            var renderTargetBitmap = bmp;
            var bitmapImage        = new BitmapImage();
            var bitmapEncoder      = new JpegBitmapEncoder();

            bitmapEncoder.Frames.Add(BitmapFrame.Create(renderTargetBitmap));

            using (var stream = new MemoryStream())
            {
                bitmapEncoder.Save(stream);
                stream.Seek(0, SeekOrigin.Begin);

                bitmapImage.BeginInit();
                bitmapImage.CacheOption  = BitmapCacheOption.OnLoad;
                bitmapImage.StreamSource = stream;
                bitmapImage.EndInit();
            }

            VCE.Pause();


            //var win2 = new PhotoCutWindow();

            //win2.SetImage(bitmapImage);
            //win2.Show();
        }
예제 #7
0
 private void PCETileViewer_Load(object sender, EventArgs e)
 {
     vce = emu.VCE;
 }
예제 #8
0
 private void PceTileViewer_Load(object sender, EventArgs e)
 {
     _vce = Emu.VCE;
 }