Exemplo n.º 1
0
 public string Capture()
 {
     process.StartInfo.Arguments = RaspistillParam.ToString();
     Logger?.BeginInvoke(process.StartInfo.Arguments, null, null);
     process.Start();
     using (var sr = process.StandardOutput)
     {
         while (!sr.EndOfStream)
         {
             _outputString.AppendLine(sr.ReadLine());
         }
     }
     return(RaspistillParam.Output);
 }
Exemplo n.º 2
0
 public Camera()
 {
     if (Environment.OSVersion.Platform != PlatformID.Unix)
     {
         throw new NotSupportedException($"不支持此{Environment.OSVersion.Platform}平台");
     }
     info = new ProcessStartInfo("ipconfig")
     {
         RedirectStandardOutput = true, UseShellExecute = false
     };
     RaspistillParam = new RaspistillParam()
     {
         Output = "image.jpg"
     };
     process           = new Process();
     _outputString     = new StringBuilder();
     process.StartInfo = info;
 }
Exemplo n.º 3
0
 public Camera(RaspistillParam _RaspistillParam) : this()
 {
     RaspistillParam = _RaspistillParam;
 }