using System;
using System.Windows;
using System.Windows.Media.Animation;

using BeWo.Scheduler.View;

namespace BeWo.View.Master
{
    public partial class SchedulerMasterView
    {
	    public NewSchedulerView NewSchedulerView;

        public SchedulerMasterView()
        {
            InitializeComponent();

			ShowAppointmentScheduler();
        }

	    private void ShowAppointmentScheduler()
	    {
		    if (NewSchedulerView != null)
		    {
		        return;
		    }

		    NewSchedulerView = Resources["NewSchedulerMain"] as NewSchedulerView;

		    if (NewSchedulerView == null)
		    {
		        return;
		    }

		    grid_root.Children.Add(NewSchedulerView);
		    var fadein2 = new DoubleAnimation(1, new Duration(TimeSpan.FromSeconds(1)));
		    grid_root.BeginAnimation(OpacityProperty, fadein2);
	    }
    }
}