Example #1
0
        private Point windowOffset = new Point(16, 70); // window padding to add to previewWindow

        #endregion Fields

        #region Constructors

        public NyaaSnapMain()
        {
            self = this;

            InitializeComponent();
            UpMan = new UploadManager();

            progressWindow = new ProgressWindow();

            saveAction = "Save to file";
            BTT_Save.Text = saveAction;
            CM_FileDests.Items.Add(saveAction);

            foreach (string ety in UpMan.GetUploaders())
                CM_FileDests.Items.Add(ety);

            SetCaptureDims();

            if (MessageBox.Show("Temporaly set the window style to basic? \nBasic will improve the capture preformance by a whole lot so please say yes.", "Enable Windows Aero Basic?", MessageBoxButtons.YesNo) == DialogResult.Yes)
                DwmEnableComposition(DWM_EC_DISABLECOMPOSITION);
        }
Example #2
0
        public void Upload(UploadManager uper, string host)
        {
            string webm = Path.GetTempFileName();
            File.Delete(webm);
            webm += ".webm";

            EncodeToWebm(webm);

            uper.Upload(host, webm);
        }
Example #3
0
 public static void UploadVP8Capture(UploadManager uper, string host)
 {
     Encoder.Upload(uper, host);
 }