public bool Login(ExtendedApplicationBase app) { LoginWindow login = new LoginWindow(app); var dialogResult = login.ShowDialog(); return dialogResult.HasValue && dialogResult.Value; }
protected override bool OnStartup(StartupEventArgs e) { _app = new ExtendedApplication(); ExtendedApplicationBase.Current = _app; _app.Run(); return false; }
public void Execute(ExtendedApplicationBase app) { MainWindow mainWindow = new MainWindow(); app.MainWindow = mainWindow; mainWindow.ShowDialog(); app.ExitEx(); }
public bool Loading(ExtendedApplicationBase app, string name) { ResourceDictionary resource = new ResourceDictionary() { Source = new Uri("pack://application:,,,/HeaviSoft.FrameworkBase.Theme;component/Themes/Generic.xaml") }; //(ResourceDictionary)Application.LoadComponent(new Uri("pack://application:,,,/HeaviSoft.FrameworkBase.Theme;component/Themes/Generic.xaml")); app.Resources.MergedDictionaries.Add(resource); return true; }
public bool Login(ExtendedApplicationBase app) { var loginWindow = new LoginWindow(app); var result = loginWindow.ShowDialog(); if (result.HasValue && result.Value) { return true; } return false; }
public bool Login(ExtendedApplicationBase app) { var user = new User() { Name = "test", Password = EncryptHelper.DES3Encrypt("test") }; using(var unitOfWork = new UnitOfWork()) { if (unitOfWork.UserRepository.GetUserByName(user.Name) == null) { unitOfWork.UserRepository.Add(user); } } return true; }
public void LoginSuccessed(ExtendedApplicationBase app, object message) { }
public bool UnLoading(ExtendedApplicationBase app, string name) { return true; }
public bool Loading(ExtendedApplicationBase app, string name) { var resource = new ResourceDictionary() { Source = new Uri("pack://application:,,,/HeaviSoft.Documentor.Theme;component/Themes/Generic.xaml") }; app.Resources.MergedDictionaries.Add(resource); return true; }
public void LoginFailed(ExtendedApplicationBase app, object message) { MessageBoxHelper.Info("Tips", message); }
public LoginWindow(ExtendedApplicationBase app) { InitializeComponent(); _app = app; }
public void LoginSuccessed(ExtendedApplicationBase app, object message) { throw new NotImplementedException(); }
public void Login(ExtendedApplicationBase app) { LoginWindow loginWindow = new LoginWindow(); loginWindow.ShowDialog(); }
public bool UnLoading(ExtendedApplicationBase app, string name) { throw new NotImplementedException(); }
public void LoginFailed(ExtendedApplicationBase app, object message) { MessageBox.Show(message.ToString()); }