Fusion.Drivers.Graphics.GraphicsDevice.Screenshot C# (CSharp) Method

Screenshot() public method

Makes screenshot and saves image at specified path. If path is null image will be stored at MyPicures\AppName\Shot-CurrentDate.bmp
public Screenshot ( string path = null ) : void
path string
return void
		public void Screenshot ( string path = null )
		{
			if (path==null) {
				string userImgs = Environment.GetFolderPath(Environment.SpecialFolder.MyPictures);
				string appName	= Path.GetFileNameWithoutExtension( AppDomain.CurrentDomain.FriendlyName.Replace(".vshost", "") );
				string fileName = userImgs + @"\" + appName + @"\Screenshots\Shot-" + DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss-ffff") + ".bmp";
				Directory.CreateDirectory( Path.GetDirectoryName( fileName ) );

				path	=	fileName;
			}

			requestScreenShotPath	=	path;
		}