コード例 #1
0
        private void btnRender_Click(object sender, EventArgs e)
        {
            lblStatus.Text = "starting renderer...";
            Application.DoEvents();
            Field.Resize((int)nudWidth.Value, (int)nudHeight.Value);
            IFrameGenerator generator = new Model.FieldFrameGenerator(Field);

            Maker = new(generator, (int)(nudFps.Value * nudSeconds.Value), (int)nudFps.Value);

            int linuxTime = (int)((DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds);

            if (rbWebM.Checked)
            {
                _ = Maker.RenderAsync_WebM($"mystify-{linuxTime}.webm");
            }
            else if (rbX264.Checked)
            {
                _ = Maker.RenderAsync_X264($"mystify-{linuxTime}.mp4");
            }
            else
            {
                throw new NotImplementedException("unknown render format");
            }
        }
コード例 #2
0
 private void AdvancedFormFullScreen_Load(object sender, EventArgs e)
 {
     Field.Resize(skglControl1.Width, skglControl1.Height, reset: true);
 }