public LeapListener() { this.LeapInfo = new LeapFrame(); this.controller = new Controller(); this.listener = new LeapEventListener(this); controller.AddListener(listener); }
public MainWindow() { InitializeComponent(); this.controller = new Controller(); this.listener = new LeapEventListener(this); controller.AddListener(listener); }
public Form1() { InitializeComponent(); oCamera = new InventorCamera(); controller = new Controller(); InitializeTexBox(); AddToLog("Component initialization."); Thread.Sleep(100); // wait for connection if (controller.Devices.IsEmpty) { AddToLog("ERROR: No connection to Leap Motion service."); AddToLog("ERROR: Connect device and restart application."); return; } else { AddToLog("Connected to Leap Motion service."); controller.EnableGesture(Gesture.GestureType.TYPE_SWIPE); controller.EnableGesture(Gesture.GestureType.TYPE_CIRCLE); listener = new LeapEventListener(this); controller.SetPolicyFlags(Controller.PolicyFlag.POLICY_BACKGROUND_FRAMES); controller.AddListener(listener); } if (!oCamera.IsStarted()) AddToLog("ERROR: Inventor instance not found."); else AddToLog("Iventor instance found. "); if (!oCamera.IsOpened()) AddToLog("ERROR: Assembly, part or presentation document not found."); else AddToLog(oCamera.GetDocType() + " document found."); }
public FrmBasket() { InitializeComponent(); this.controller = new Controller(); this.listener = new LeapEventListener(this); controller.AddListener(listener); //Init(); KeyDown += new KeyEventHandler(Form1_KeyDown); misil1.Visible = false; misil2.Visible = false; misil3.Visible = false; label1.Visible = false; lasser.Visible = false; PAUSA.Visible = false; fondo2.Visible = true; fondo3.Visible = true; sp1.Visible = false; sp2.Visible = false; nave1.Visible = false; nave2.Visible = false; }
public LeapListener() { this.LeapInfo = new LeapFrame(); this.controller = new Controller(); this.listener = new LeapEventListener(this); controller.AddListener(listener); }
public FrmAjustes() { InitializeComponent(); this.controller = new Controller(); this.listener = new LeapEventListener(this); controller.AddListener(listener); Init(); }
// Use this for initialization public void Start() { graph = GameObject.Find("Graph"); graphController = graph.GetComponent <GraphControler> (); listener = new LeapEventListener(); controller = new Controller(listener); Debug.Log("Leap start"); }
public FrameDataForm() { InitializeComponent(); // We will create new AppSetting.txt if this file doesnot exist. AppSetting.CheckAndCreateIfHaveNoAppSetting(); JObject settObj = AppSetting.GetAppSetting(); LMSingleton.Instance.compareDownPercent = (float)settObj[AppSetting.settingKeyCompareDownPercent]; LMSingleton.Instance.compareTopPercent = (float)settObj[AppSetting.settingKeyCompareTopPercent]; LMSingleton.Instance.currentForm = LMSingleton.FormName.Training; float cDownPercent = LMSingleton.Instance.compareDownPercent; float cTopPercent = LMSingleton.Instance.compareTopPercent; dictHumanSign = new Dictionary <string, Model.LMFrame>(); this.controller = new Controller(); this.listener = new LeapEventListener(this); controller.AddListener(listener); mCaptureStatus = CaptureStatus.PreviewSign; updateUIByCaptureStatus(); Debug.WriteLine("Load Done"); mTrain = new TrainModule(); string[] signFolders = FileHelper.CheckSignFolders(); // We will create alphabet folders if there is no folder found. if (signFolders.Length == 0) { FileHelper.createABCFolderForFirstTime(); signFolders = FileHelper.CheckSignFolders(); } LMSingleton.Instance.signFolders = signFolders; for (int i = 0; i < signFolders.Length; i++) { TreeNode node = new TreeNode(signFolders[i]); trvHumanSign.Nodes.Add(node); } reloadListHumanSign(); trvHumanSign.SelectedNode = trvHumanSign.Nodes[0]; choosedSign = clearNodeName(trvHumanSign.SelectedNode.Text); lbSelectedSign.Text = "Selected Gesture :" + choosedSign; initView(); }
public TestForm() { LMSingleton.Instance.currentForm = LMSingleton.FormName.Testing; InitializeComponent(); isCapture = false; this.controller = new Controller(); this.listener = new LeapEventListener(this); controller.AddListener(listener); mStatus = TestStatus.Training; ReloadUIByStatus(); mTrain = new TrainModule(); ReloadListTestData(); }
public Form1() { InitializeComponent(); oCamera = new InventorCamera(); controller = new Controller(); InitializeTexBox(); AddToLog("Component initialization."); Thread.Sleep(100); // wait for connection if (controller.Devices.IsEmpty) { AddToLog("ERROR: No connection to Leap Motion service."); AddToLog("ERROR: Connect device and restart application."); return; } else { AddToLog("Connected to Leap Motion service."); controller.EnableGesture(Gesture.GestureType.TYPE_SWIPE); controller.EnableGesture(Gesture.GestureType.TYPE_CIRCLE); listener = new LeapEventListener(this); controller.SetPolicyFlags(Controller.PolicyFlag.POLICY_BACKGROUND_FRAMES); controller.AddListener(listener); } if (!oCamera.IsStarted()) { AddToLog("ERROR: Inventor instance not found."); } else { AddToLog("Iventor instance found. "); } if (!oCamera.IsOpened()) { AddToLog("ERROR: Assembly, part or presentation document not found."); } else { AddToLog(oCamera.GetDocType() + " document found."); } }
public InterpreterForm() { InitializeComponent(); Debug.WriteLine("Init Interpreter"); LMSingleton.Instance.currentForm = LMSingleton.FormName.Interpreter; isCapture = false; this.controller = new Controller(); this.listener = new LeapEventListener(this); controller.AddListener(listener); mStatus = TestStatus.Training; ReloadUIByStatus(); mTrain = new TrainModule(); // neu co data moi thi se load lai training //mTrain.ConvertSignDataToAngle(); // load Test data mStatus = TestStatus.Testing; ReloadUIByStatus(); mTrain.ReloadTrainResult(); }