public IWindow Solve(ViewModelBase ivm)
        {
            if (ivm == null)
                throw new ArgumentNullException();

            Type result = SolveType(ivm.GetType());

            if (result == null)
                return null;
         
            return Activator.CreateInstance(result) as IWindow;
        }
        protected override void OnClosed(EventArgs e)
        {
            base.OnClosed(e);

            this.GetVisualChild<IDisposable>().Apply(t => t.Dispose());

            if (_ModelView != null)
            {
                _ModelView.Dispose();
                _ModelView = null;
            }
        }
        public virtual IWindow CreateFromViewModel(ViewModelBase iModelViewBase)
        {
            IWindow res = _ViewModelBinder.Solve(iModelViewBase);
            if (res == null)
                return null;

            res.LogicOwner = this;
            res.CenterScreenLocation = true;
            res.ModelView = iModelViewBase;
            return res;
        }
        //private ViewModelBase Father;

        internal WebsiteMusicSettings(IWebUserSettings iIMusicSettings, IInfraDependencies ims, ViewModelBase iFather)
        {
            _IWebServicesSettingsWrapper = iIMusicSettings.GetDiscogsAutentificator();
            Father = iFather;
            _IInfraDependencies = ims;
            _IWebServicesSettings = iIMusicSettings;
            _DiscogsTimeOut = _IWebServicesSettings.DiscogsTimeOut;
            _FDBS = _IWebServicesSettings.FreedbServer;
            _AA = _IWebServicesSettings.AmazonActivated;
            _DA = _IWebServicesSettings.DiscogsActivated;
            _IsDiscogImageActivated = _IWebServicesSettingsWrapper.IsDiscogImageActivated;
            FreedbServers = _IWebServicesSettings.FreedbServers;

            ActivateDiscogs = this.Register(RelayCommand.Instanciate(DoActivateDiscogs, () => !IsDiscogImageActivated));
            ExportDiscogs = this.Register(RelayCommand.Instanciate(DoExportDiscogs, () => IsDiscogImageActivated));
            ImportDiscogs = RelayCommand.Instanciate(DoImportDiscogs);
        }
 public IWindow CreateFromViewModel(ViewModelBase iModelViewBase)
 {
     throw new NotImplementedException();
 }