using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
namespace DiagnosticExplorer.Silverlight.Controls
{
public partial class RegistrationPrompt : UserControl
{
public RegistrationPrompt()
{
InitializeComponent();
DataContext = this;
}
public event EventHandler OkClicked;
public event EventHandler CancelClicked;
public string Prompt
{
get { return (string)GetValue(PromptProperty); }
set { SetValue(PromptProperty, value); }
}
// Using a DependencyProperty as the backing store for Prompt. This enables animation, styling, binding, etc...
public static readonly DependencyProperty PromptProperty =
DependencyProperty.Register("Prompt", typeof(string), typeof(NamePrompt), new PropertyMetadata("Prompt goes here"));
public string ProcessName
{
get { return (string)GetValue(ProcessNameProperty); }
set { SetValue(ProcessNameProperty, value); }
}
// Using a DependencyProperty as the backing store for ProcessName. This enables animation, styling, binding, etc...
public static readonly DependencyProperty ProcessNameProperty =
DependencyProperty.Register("ProcessName", typeof(string), typeof(RegistrationPrompt), new PropertyMetadata(null));
public string ProcessUri
{
get { return (string)GetValue(ProcessUriProperty); }
set { SetValue(ProcessUriProperty, value); }
}
// Using a DependencyProperty as the backing store for ProcessUri. This enables animation, styling, binding, etc...
public static readonly DependencyProperty ProcessUriProperty =
DependencyProperty.Register("ProcessUri", typeof(string), typeof(RegistrationPrompt), new PropertyMetadata(null));
private void OnOkClick(object sender, RoutedEventArgs e)
{
if (OkClicked != null)
OkClicked(this, EventArgs.Empty);
}
private void OnCancelClick(object sender, RoutedEventArgs e)
{
if (CancelClicked != null)
CancelClicked(this, EventArgs.Empty);
}
}
}