Exemplo n.º 1
0
        public FrmTester()
        {
            InitializeComponent();
            log = new TextBoxStreamWriter(txtConsole);

            modules = new Dictionary<string, ConnectionManager>();
            autoResponders = new List<AutoResponder>();
            prompters = new List<Prompter>();
            dataReceived = new ProducerConsumer<ReceivedPacket>(100);
            receivedResponses = new List<Response>();
            quickCommands = new List<QuickCommand>();

            ValidateAddModuleButton();
            ValidateAddAutoResponderButton();
            ValidateAddPrompterButton();
            ValidateStartPerformanceTest();
            ValidateAddQuickCommandButton();
            SelectModule(null);
            SelectResponder(null);
            SelectPrompter(null);
            SelectQuickCommand(null);

            dlgConsole = new StringEventHandler(Console);
            dlgMainThreadTask = new ThreadStart(MainThreadTask);
            dlgGetPromptDialog = new GetPromptDialogCaller(GetPromptDialog);
            dlgShowPromptDialog = new ShowPromptDialogCaller(ShowPromptDialog);

            stopwatch = new Stopwatch();
            mainThread = new Thread(dlgMainThreadTask);
            mainThread.IsBackground = true;
            mainThread.Start();
        }
 /// <summary>
 /// Initializes all static variables
 /// </summary>
 static TextBoxStreamWriter()
 {
     TextBoxStreamWriter.defaultLog = new TextBoxStreamWriter(new TextBox(), Application.ExecutablePath + ".log", 1);
 }
Exemplo n.º 3
0
		/// <summary>
		/// Initiates a new instance of FrmRecoHuman
		/// </summary>
		public FrmRecoHuman()
		{
			InitializeComponent();
			SetImageSource(ImageSourceType.Camera);
			log = new TextBoxStreamWriter(txtConsole);
			//VideoClientPort = 2001;
			//VideoClientAddress = IPAddress.Parse("127.0.0.1");

			//LoadKnownFaces();
			//lastDetectedFaces = new FaceCollection();

			settings = RecoHumanSettigs.Load("Settings.xml");
			if (settings == null) settings = RecoHumanSettigs.Default;
			settingsPannel.Settings = settings;

			SetupAdapters();
			SetupSourceManager();
			SetupEngine();
			SetupCommandManager();
			SetupConnectionManager();
			SetupSharedVariables();
			chkAutoFind.Checked = autoFind;
			SetupEventHandlers();
		}