Esempio n. 1
0
		public override bool ProcessCapture(ISurface surface, ICaptureDetails captureDetails) {
			surface.SelectElement(surface.AddCursorContainer(Cursors.Hand, 100, 100));
			// Do something with the screenshot
			string title = captureDetails.Title;
			if (title != null) {
				LOG.Debug("Added title to surface: " + title);
				surface.SelectElement(surface.AddTextContainer(title, HorizontalAlignment.Center, VerticalAlignment.CENTER,
                       FontFamily.GenericSansSerif, 12f, false, false, false, 2, Color.Red, Color.White));
			}
			surface.SelectElement(surface.AddTextContainer(Environment.UserName, HorizontalAlignment.Right, VerticalAlignment.TOP,
                       FontFamily.GenericSansSerif, 12f, false, false, false, 2, Color.Red, Color.White));
			surface.SelectElement(surface.AddTextContainer(Environment.MachineName, HorizontalAlignment.Right, VerticalAlignment.BOTTOM,
                       FontFamily.GenericSansSerif, 12f, false, false, false, 2, Color.Red, Color.White));
			surface.SelectElement(surface.AddTextContainer(captureDetails.DateTime.ToLongDateString(), HorizontalAlignment.Left, VerticalAlignment.BOTTOM,
                       FontFamily.GenericSansSerif, 12f, false, false, false, 2, Color.Red, Color.White));
			return true;
		}
        public override bool ProcessCapture(ISurface surface, ICaptureDetails captureDetails)
        {
            surface.SelectElement(surface.AddCursorContainer(Cursors.Hand, 100, 100));
            // Do something with the screenshot
            string title = captureDetails.Title;

            if (title != null)
            {
                LOG.Debug("Added title to surface: " + title);
                surface.SelectElement(surface.AddTextContainer(title, HorizontalAlignment.Center, VerticalAlignment.CENTER,
                                                               FontFamily.GenericSansSerif, 12f, false, false, false, 2, Color.Red, Color.White));
            }
            surface.SelectElement(surface.AddTextContainer(Environment.UserName, HorizontalAlignment.Right, VerticalAlignment.TOP,
                                                           FontFamily.GenericSansSerif, 12f, false, false, false, 2, Color.Red, Color.White));
            surface.SelectElement(surface.AddTextContainer(Environment.MachineName, HorizontalAlignment.Right, VerticalAlignment.BOTTOM,
                                                           FontFamily.GenericSansSerif, 12f, false, false, false, 2, Color.Red, Color.White));
            surface.SelectElement(surface.AddTextContainer(captureDetails.DateTime.ToLongDateString(), HorizontalAlignment.Left, VerticalAlignment.BOTTOM,
                                                           FontFamily.GenericSansSerif, 12f, false, false, false, 2, Color.Red, Color.White));
            return(true);
        }