Beispiel #1
0
 /// <summary>
 /// Creates an instance of <see cref=" OutputStreamDeviceAnalogUserControl"/> class.
 /// </summary>
 public OutputStreamDeviceAnalogUserControl(int outputStreamDeviceID)
 {
     InitializeComponent();
     m_dataContext = new OutputStreamDeviceAnalogs(outputStreamDeviceID, 20, true);
     m_dataContext.PropertyChanged += ViewModel_PropertyChanged;
     this.DataContext = m_dataContext;
 }
 /// <summary>
 /// Creates an instance of <see cref=" OutputStreamDeviceAnalogUserControl"/> class.
 /// </summary>
 public OutputStreamDeviceAnalogUserControl(int outputStreamDeviceID)
 {
     InitializeComponent();
     m_dataContext = new OutputStreamDeviceAnalogs(outputStreamDeviceID, 20, true);
     m_dataContext.PropertyChanged += ViewModel_PropertyChanged;
     this.DataContext = m_dataContext;
 }
Beispiel #3
0
        private void HyperlinkButtonAnalogs_Click(object sender, RoutedEventArgs e)
        {
            int    outputStreamDeviceId = Convert.ToInt32(((Button)sender).Tag.ToString());
            string acronym = ToolTipService.GetToolTip((Button)sender).ToString();  // ((HyperlinkButton)sender).Name;
            OutputStreamDeviceAnalogs osda = new OutputStreamDeviceAnalogs(outputStreamDeviceId, acronym);

#if SILVERLIGHT
            osda.Show();
#else
            osda.Owner = Window.GetWindow(this);
            osda.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            osda.ShowDialog();
#endif
        }