/// <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; }
/// <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; }
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(); }
/// <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)));