コード例 #1
0
ファイル: Face.cs プロジェクト: liyahui520/ArcFacePro
        public void Excete(object InvokerClass)
        {
            InvokerClass _InvokerClass = InvokerClass as InvokerClass;

            while (!thread.Stop)
            {
                if (null == _InvokerClass)
                {
                    _InvokerClass = new InvokerClass();
                }

                string RTSPStreamText = textBox1.Text.Trim();
                capture = new Capture(RTSPStreamText);
                //capture.SetCaptureProperty(CapProp.Fps, 1);
                // VideoFps1=(int)capture.GetCaptureProperty(CapProp.Fps);
                // capture.GetCaptureProperty(1);
                //VideoFps1 = CvInvoke.pro.cvGetCaptureProperty().cvGetCaptureProperty(capture, Emgu.CV.CvEnum.CAP_PROP.CV_CAP_PROP_FPS);
                //capture.ImageGrabbed += Capture_ImageGrabbed;

                _InvokerClass.String = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " :   执行中。。。";
                aa();

                thread.AsynCallback(_InvokerClass);
                Thread.Sleep(thread.Sleep);
            }
        }
コード例 #2
0
ファイル: Face.cs プロジェクト: liyahui520/ArcFacePro
 public void AsynUpdateTxtMethod(InvokerClass InvokerClass)
 {
     if (this.listBox1.InvokeRequired)
     {
         this.BeginInvoke(new ThreadInvoker.CallbackFunc(updatemethod), InvokerClass);
     }
     else
     {
         updatemethod(InvokerClass);
     }
 }
コード例 #3
0
ファイル: Face.cs プロジェクト: liyahui520/ArcFacePro
        public void updatemethod(InvokerClass InvokerClass)
        {
            if (capture == null || capture.Ptr == IntPtr.Zero)
            {
                this.listBox1.Items.Add(InvokerClass.String + "\r\n");
            }
            else
            {
                thread.Stop       = true;
                Application.Idle += new EventHandler(Capture_ImageGrabbed);
                this.listBox1.Items.Add(InvokerClass.String + "\r\n");

                //capture.ImageGrabbed += Capture_ImageGrabbed;
                capture.Start();
            }
        }
コード例 #4
0
        public string ChooseAction(string templateName, TemplateDTO templateDTO, string actionName, int templateId)
        {
            TemplateStorage = templateDTO;
            var    classType  = GetType();
            string methodName = actionName + templateName;

            if (actionName == "Create")
            {
                return(InvokerClass.InvokeStringToMethod(classType.ToString(), methodName, templateName, templateDTO, 0));
            }
            else if (actionName == "Update")
            {
                return(InvokerClass.InvokeStringToMethod(classType.ToString(), methodName, templateName, templateDTO, templateId));
            }
            else
            {
                return("Action not reconigezed");
            }
        }
コード例 #5
0
        //Carga usando Reflection todos los tipos de los emsamblados del Proyecto
        private static void LoadMSharpTypes()
        {
            //Obtener directorio actual
            DirectoryInfo dir = new DirectoryInfo(Directory.GetCurrentDirectory());

            //Cargar todos los ensamblados
            foreach (var file in dir.GetFiles("*.dll"))
            {
                var instances = InvokerClass <Expression> .FetchInstance(file.FullName);

                foreach (var item in instances)
                {
                    Type type = item.GetType();

                    PropertyInfo propertyToText       = type.GetProperty("ToText");
                    MethodInfo   method_PropertyToTex = propertyToText.GetGetMethod();

                    string representationText = (method_PropertyToTex.Invoke(item, null)).ToString();

                    Memory.MSharpTypes.Add(representationText, item);
                }
            }
        }
コード例 #6
0
 static void Main(string[] args)
 {
     InvokerClass.StartInvokeExample <Program>("Hello", "World!");
 }
コード例 #7
0
 static void Main(string[] args)
 {
     ic = new InvokerClass <Program>();
     ic.StartInvokeExample("Hello", "World!");
 }