Example #1
0
        public Mainform()
        {
            //Seed.SetupData(clinic);

            InitializeComponent();
            LoadProperties();
            LoadProtocols();
            Text += " - " + clinic.Name;

            lstOptionsGeneralRewards.DataSource = clinic.Rewards;

            //lstOptionsGeneralRewards.DisplayMember = "";

            NW = new MRNetwork(deviceIP, Int32.Parse(devicePORT)); //("169.254.1.1", 2000
            NW.SetLogBox(textBoxLog);
            tabControl.SelectTab(0);
            actionTimer.Start();
            comboTreatment.SelectedIndex = 0;
            //ServerSL = new Thread(() => AsyncServer.StartListening(10101));
            //ServerSL.Start();

            HOHEvent.LogUpdated    += OnHOHEventUpdate;
            HOHEvent.UsrMsgUpdated += OnHOHEventUpdate;
            HOHEvent.ClinicUpdated += OnClinicEventUpdate;

            HOHEvent.ProtocolGUIStatusUpdated += OnProtocolGUIStatusUpdate;

            GetProtocols();
        }
Example #2
0
 public ProtocolGUI(Clinic c, Protocol protocol, MRNetwork NW)
 {
     InitializeComponent();
     this.protocol                   = protocol;
     this.NW                         = NW;
     this.c                          = c;
     Text                            = protocol.Name;
     HOHEvent.LogUpdated            += OnHOHEventUpdate;
     HOHEvent.UsrMsgUpdated         += OnHOHEventUpdate;
     HOHEvent.ExerciseTimerUpdated  += OnHOHEventUpdate;
     HOHEvent.ExerciseNameUpdated   += OnHOHEventUpdate;
     HOHEvent.ProtocolStateUpdated  += OnHOHEventUpdate;
     HOHEvent.RewardLauncherUpdated += OnHOHEventUpdate;
 }