public App() { Rafy.WPF.App.MainWindowType = typeof(DefaultShell); ClientApp.LoginWindowType = typeof(DefaultLoginWindow); ClientApp.SplashScreen = new SplashScreen("Shell/ProductSplash.jpg"); RafyEnvironment.Provider.IsDebuggingEnabled = ConfigurationHelper.GetAppSettingOrDefault("IsDebuggingEnabled", false); var app = ClientApp.Register(this); //登录成功时,需要绑定主窗口的模块列表。 app.LoginSuccessed += (o, e) => { var mainWin = App.Current.MainWindow as DefaultShell; mainWin.ShowModules(); }; this.DispatcherUnhandledException += OnDispatcherUnhandledException; }