Esempio n. 1
0
 /// <summary>
 /// Contructor for making the frmRecorder GUI
 /// </summary>
 public frmRecorder()
 {
     InitializeComponent();
     aviBits             = new List <Image>();
     sc                  = new ScreenShotDemo.ScreenCapture();
     numScreenSize.Value = sizeImage;
 }
Esempio n. 2
0
        private void tweetButton_Click(object sender, EventArgs e)
        {
            // do screenshot using an external library
            ScreenShotDemo.ScreenCapture pic = new ScreenShotDemo.ScreenCapture();

            Image img = pic.CaptureWindow(this.Handle);
            // cap this window

            string input = Microsoft.VisualBasic.Interaction.InputBox("Accompany your results tweet with a <100char message?", "Tweet", "Having a great time solvin ODEs with my pal @ODEBot9000", 0, 0);

            img.Save("temp.bmp");

            var response = tweetMachine.TweetImage("temp.bmp", input);

            string regex = "<url>(.*?)</url>";

            Match match = Regex.Match(response.Content, regex);
            var url = match.Value.Substring(5, match.Value.Length - 11);
            tweetMachine.SendTweet(input + "  " + url);

            // tweet input + SS
        }
Esempio n. 3
0
 // Gets screenshot of game window
 public Bitmap GetScreenshot()
 {
     var sc = new ScreenShotDemo.ScreenCapture();
     Image img = sc.CaptureWindow(GameWindowHandle());
     return new Bitmap(img);
 }