public Login(EnvDTE80.DTE2 dte, Settings settings)
        {
            WifDetector.CheckForWifInstall();
            InitializeComponent();

            var main = dte.GetMainWindow();

            this.Owner = main;
            //Loaded += delegate  { this.CenterWindow(main); };

            this.settings             = settings;
            this.txtPassword.Password = settings.Password;  // PasswordBox doesn't allow 2 way binding
            this.DataContext          = settings;
        }
        public AddTemplate(EnvDTE80.DTE2 dte, Project project)
        {
            WifDetector.CheckForWifInstall();

            InitializeComponent();

            var main = dte.GetMainWindow();

            Owner = main;

            _Props      = new AddTemplateProp();
            DataContext = Props;

            var           samplesPath = System.IO.Path.Combine(DteHelper.AssemblyDirectory(), @"Resources\Templates");
            DirectoryInfo dir         = new DirectoryInfo(samplesPath);

            Props.TemplateList = new ObservableCollection <String>(dir.GetFiles().Select(x => x.Name).Where(x => !x.Equals("Blank.tt")).ToArray());
            Props.Template     = "CrmSchema.tt";
            Props.Folder       = project.GetProjectDirectory();
        }