void ButtonAdd_Click(object sender, RoutedEventArgs e) { if ((bool)CheckAll.IsChecked) CheckAll.IsChecked = false; #if SILVERLIGHT Storyboard sb = new Storyboard(); sb = Application.Current.Resources["ButtonPressAnimation"] as Storyboard; sb.Completed += new EventHandler(delegate(object obj, EventArgs es) { sb.Stop(); }); Storyboard.SetTarget(sb, ButtonAddTransform); sb.Begin(); #endif AddDevices addDevices = new AddDevices(m_sourceOutputStreamID, m_sourceOutputStreamAcronym); addDevices.Closed += new EventHandler(addDevices_Closed); #if SILVERLIGHT addDevices.Show(); #else addDevices.Owner = Window.GetWindow(this); addDevices.WindowStartupLocation = WindowStartupLocation.CenterOwner; addDevices.ShowDialog(); #endif }
private void HyperlinkButton_Click(object sender, RoutedEventArgs e) { AddDevices addDevices = new AddDevices(m_sourceOutputStreamID, m_sourceOutputStreamAcronym); addDevices.Closed += new EventHandler(addDevices_Closed); #if SILVERLIGHT addDevices.Show(); #else addDevices.Owner = Window.GetWindow(this); addDevices.WindowStartupLocation = WindowStartupLocation.CenterOwner; addDevices.ShowDialog(); #endif }