Пример #1
0
		public static GifWriter.GifToken DoTokenForm(IWin32Window parent)
		{
			using (var dlg = new GifWriterForm())
			{
				dlg.numericUpDown1.Value = Global.Config.GifWriterFrameskip;
				dlg.numericUpDown2.Value = Global.Config.GifWriterDelay;
				dlg.numericUpDown2_ValueChanged(null, null);

				var result = dlg.ShowDialog(parent);
				if (result == DialogResult.OK)
				{
					Global.Config.GifWriterFrameskip = (int)dlg.numericUpDown1.Value;
					Global.Config.GifWriterDelay = (int)dlg.numericUpDown2.Value;
					return GifWriter.GifToken.LoadFromConfig();
				}
				else
					return null;
			}
		}
Пример #2
0
        public static GifWriter.GifToken DoTokenForm(IWin32Window parent)
        {
            using (var dlg = new GifWriterForm())
            {
                dlg.numericUpDown1.Value = Global.Config.GifWriterFrameskip;
                dlg.numericUpDown2.Value = Global.Config.GifWriterDelay;
                dlg.NumericUpDown2_ValueChanged(null, null);

                var result = dlg.ShowDialog(parent);
                if (result == DialogResult.OK)
                {
                    Global.Config.GifWriterFrameskip = (int)dlg.numericUpDown1.Value;
                    Global.Config.GifWriterDelay     = (int)dlg.numericUpDown2.Value;

                    return(GifWriter.GifToken.LoadFromConfig());
                }

                return(null);
            }
        }
Пример #3
0
        public static GifWriter.GifToken DoTokenForm(IWin32Window parent, Config config)
        {
            using var dlg = new GifWriterForm
                  {
                      numericUpDown1 = { Value = config.GifWriterFrameskip },
                      numericUpDown2 = { Value = config.GifWriterDelay }
                  };
            dlg.NumericUpDown2_ValueChanged(null, null);

            var result = dlg.ShowDialog(parent);

            if (result.IsOk())
            {
                config.GifWriterFrameskip = (int)dlg.numericUpDown1.Value;
                config.GifWriterDelay     = (int)dlg.numericUpDown2.Value;

                return(GifWriter.GifToken.LoadFromConfig(config));
            }

            return(null);
        }
Пример #4
0
 public IDisposable AcquireVideoCodecToken(System.Windows.Forms.IWin32Window hwnd)
 {
     return(GifWriterForm.DoTokenForm(hwnd));
 }