コード例 #1
0
 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
 }
コード例 #2
0
 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
 }