Exemplo n.º 1
0
 private void SetBedIdTextBox(UserControl1 name, int count)
 {
     if (name.FindName("BedIdTextBox") is TextBox bedIdTextBox)
     {
         bedIdTextBox.Text = count.ToString();
     }
 }
Exemplo n.º 2
0
 private void DisableStartMonitorButton(UserControl1 name)
 {
     if (name.FindName("StartMonitorButton") is Button startButton)
     {
         startButton.Visibility = System.Windows.Visibility.Collapsed;
     }
 }
Exemplo n.º 3
0
        private string GetPatientIdDetails(UserControl1 name)
        {
            string returnValue = "";

            if (name.FindName("PatientIdTextBox1") is TextBox patientIdTextBox)
            {
                returnValue = patientIdTextBox.Text;
            }
            return(returnValue);
        }
Exemplo n.º 4
0
 private void InvokeStartMonitor(UserControl1 name)
 {
     if (GetPatientIdDetails(name) == "")
     {
         if (name.FindName("StartMonitorButton") is Button startButton)
         {
             ButtonAutomationPeer peer       = new ButtonAutomationPeer(startButton);
             IInvokeProvider      invokeProv = peer.GetPattern(PatternInterface.Invoke) as IInvokeProvider;
             invokeProv?.Invoke();
         }
     }
 }
Exemplo n.º 5
0
        public MainWindow()
        {
            if (Properties.Settings.Default.shrani == true)
            {
                dispatcherTimer          = new System.Windows.Threading.DispatcherTimer();
                dispatcherTimer.Tick    += new EventHandler(dispatcherTimer_Tick);
                dispatcherTimer.Interval = new TimeSpan(hr, min, sec);
                dispatcherTimer.Start();
            }
            InitializeComponent();

            UserControl1 uc   = usr;
            var          text = uc.FindName("txtEditor") as RichTextBox;

            struktura          = uc.FindName("strukturaProjekta") as TreeView;
            uc.OnMethodSelect += (senser, e) =>
            {
                PassThrough("MethodChange", senser, e);
            };
            uc.OnFileSelect += (senser, e) =>
            {
                PassThrough("FileChange", senser, e);
            };
        }