Ejemplo n.º 1
0
 /// <summary>
 /// Creates an instance of <see cref="PhasorUserControl"/> class.
 /// <param name="deviceID">ID of the device to filter data.</param>
 /// </summary>        
 public PhasorUserControl(int deviceID)
 {
     InitializeComponent();
     this.Unloaded += PhasorUserControl_Unloaded;
     m_dataContext = new Phasors(deviceID, 18);
     m_dataContext.PropertyChanged += ViewModel_PropertyChanged;
     this.DataContext = m_dataContext;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates an instance of <see cref="PhasorUserControl"/> class.
 /// <param name="deviceID">ID of the device to filter data.</param>
 /// </summary>
 public PhasorUserControl(int deviceID)
 {
     InitializeComponent();
     this.Unloaded += PhasorUserControl_Unloaded;
     m_dataContext  = new Phasors(deviceID, 18);
     m_dataContext.PropertyChanged += ViewModel_PropertyChanged;
     this.DataContext = m_dataContext;
 }
Ejemplo n.º 3
0
        void HyperlinkButtonPhasors_Click(object sender, RoutedEventArgs e)
        {
            int     deviceId = Convert.ToInt32(((HyperlinkButton)sender).Tag.ToString());
            string  acronym  = ((HyperlinkButton)sender).Name;
            Phasors phasors  = new Phasors(deviceId, acronym);

            phasors.Show();
        }
        void HyperlinkButtonPhasors_Click(object sender, RoutedEventArgs e)
        {
            int     deviceId = Convert.ToInt32(((Button)sender).Tag.ToString());
            string  acronym  = ((Button)sender).ToolTip.ToString();
            Phasors phasors  = new Phasors(deviceId, acronym);

            phasors.Owner = Window.GetWindow(this);
            phasors.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            phasors.ShowDialog();
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Creates a copy of the signal in reversed direction (<see cref="DC"/> and each <see cref="Phasors"/> value is negated)
 /// </summary>
 /// <returns></returns>
 public PhasorDomainSignal CopyAndNegate() => new PhasorDomainSignal(Phasors.Select((phasor) =>
                                                                                    new KeyValuePair <ISourceDescription, Complex>(phasor.Key, -phasor.Value)));