using System.Windows;
using System.Windows.Documents;
using System.Windows.Navigation;

using BeWo.Core;
using BeWo.View.Navigation;
using BS.Shared.DataContracts.Compact;

namespace BeWo.Styles
{
    public partial class OrangeBlack
    {
        private void EMailHyperLink_RequestNavigate(object sender, RequestNavigateEventArgs e)
        {
            BeWoUtils.OpenMailClient(e.Uri.ToString());
        }

		private void Hyperlink_Organisation_Reaktivieren_Click(object sender, RoutedEventArgs e)
		{
			var av = BeWoApp.MainControl.ActiveView;

			var orgaNavView = (OrganisationNavigationView)av;

			if (orgaNavView != null)
			{
				var supportConcept = (CompactOrganisationDC)((Hyperlink)sender).Tag;
				orgaNavView.ReactivateOrganisation(supportConcept);
			}
		}

	    private void Hyperlink_Person_Reaktivieren_Click(object sender, RoutedEventArgs e)
	    {
			var av = BeWoApp.MainControl.ActiveView;

			var personNavView = (PersonNavigationView)av;

			if (personNavView != null)
			{
				var person = (CompactPersonDC)((Hyperlink)sender).Tag;
				personNavView.ReactivatePerson(person);
			}
	    }
    }
}
