private void RetrieveAttachedUsers() { try { List <Tks.Entities.User> ListedUser = null; muserauthentication = new UserAuthentication(); this.mAppManager = muserauthentication.AppManager; mAppManager = Session["APP_MANAGER"] as IAppManager; mUserService = AppService.Create <IUserService>(); mUserService.AppManager = mAppManager; LstUser = mUserService.RetrieveAttachedUsers(Convert.ToInt32(0)); if (LstUser != null) { TreHierarchy.Nodes.Clear(); TreeNode parentnode = new TreeNode("Organization", "0"); foreach (User usr in LstUser) { _treeNode = new TreeNode(usr.LastName + " " + usr.FirstName, usr.Id.ToString()); ListedUser = mUserService.RetrieveAttachedUsers(Convert.ToInt32(usr.Id.ToString())); if (ListedUser != null) { foreach (User user in ListedUser) { TreeNode childnode = new TreeNode(user.LastName + " " + user.FirstName, user.Id.ToString()); _treeNode.ChildNodes.Add(childnode); } } //_treeNode.Selected = true; parentnode.ChildNodes.Add(_treeNode); parentnode.CollapseAll(); } TreHierarchy.Nodes.Add(parentnode); parentnode.Expand(); ShowAttachedUser("0"); //pnlmanager.Visible = true; } else { pnlmanager.Visible = false; } } catch { throw; } finally { if (mUserService != null) { mUserService.Dispose(); } mUserService = null; } }
/// <summary> /// Initializes a new instance of the <see cref="SettingsPage"/> class. /// </summary> public SettingsPage() { InitializeComponent(); _settingsViewModel = (SettingsViewModel)DIService.Instance.Services.GetService(typeof(SettingsViewModel)); DataContext = _settingsViewModel; _logger = (ILogger <SettingsViewModel>)DIService.Instance.Services.GetService(typeof(ILogger <SettingsViewModel>)); SettingOptionsListView.SelectedIndex = 0; _appManager = (IAppManager)DIService.Instance.Services.GetService(typeof(IAppManager)); }
public void Setup() { _imageGenerator = Substitute.For <IPreviewImageGenerator>(); _fileSystem = Substitute.For <IFileSystem>(); _fileService = Substitute.For <IFile>(); _appManager = Substitute.For <IAppManager>(); _viewModel = new PreviewViewModel(_imageGenerator, _fileSystem, _appManager, MockDevice.Self) { IsPageVisible = true }; _fileSystem.File.Returns(_fileService); }
public MainViewModel(IDialogService dialogService, IAppManager manager, IEventAggregator eventAgg, IRepository repository) : base(dialogService, eventAgg) { IsApplicationVisible = true; _appManager = manager; _dialogService = dialogService; _repository = repository; _appManager.RegisterManagerObserver(this); _appManager.Start(); UiSettings = repository.Read <UserInterfaceConfiguration>(); }
public MainWindow() { _appManager = new AppManager(this); _appManager.Busy += OnBusyChange; _appManager.Ready += OnBusyChange; _appManager.SourceSelected += OnSourceSelected; _appManager.QuitConfirmed += Close; InitializeAppState(); InitializeComponent(); Forms.Init(); LoadApplication(new UI.App(_appManager)); }
public MainMasterDetailPageViewModel(INavigationService navigationService, IPageNavigator pageNavigator, IUserDialogs userDialogs, IEventAggregator eventAggregator, IAppManager appManager, IAppUserManager appUserManager) : base(navigationService, pageNavigator, userDialogs, eventAggregator) { _appManager = appManager; _appUserManager = appUserManager; AccountCommmand = new DelegateCommand(async() => await OnAccount()); AttendanceLogCommmand = new DelegateCommand(async() => await OnAttendanceLog()); LogoutCommand = new DelegateCommand(async() => await OnLogout()); }
private string ResetPasswordRequest() { try { authenticate = new UserAuthentication(); // Create Service userService = AppService.Create <IUserService>(); userService.AppManager = mAppManager; mAppManager = authenticate.AppManager; return(userService.ResetPasswordRequest(txtUserName.Text)); } catch { throw; } }
protected void Page_Load(object sender, EventArgs e) { this.mAppManager = Session["APP_MANAGER"] as IAppManager; LoadLabels(); lblActivityStat.InnerHtml = ActivityStatus; lblWorkStat.InnerHtml = WorkDuration; if (!Page.IsPostBack) { LoadWorkDuration(); LoadActivityStatus(); } }
public void EntryPoint(IDevice device, IAppManager app) { bool isClosed = false; app.RunOnUIThread(() => { var window = new MainWindow(device); window.Closed += (s, e) => isClosed = true; window.Show(); }); while (!isClosed) { Thread.Sleep(1000); } }
public PlatformUserController(IDocumentStore documentStore, IHttpContextAccessor httpContextAccessor, IPlatformConnectionManager platformConnectionManager, IAppNotificationManager appNotificationManager, IPlatformManager platformManager, IUserManager userManager, IAppManager appManager, IBus bus, IOptions <EmailVerificationConfiguration> emailVerificationOptions) { _documentStore = documentStore; _httpContextAccessor = httpContextAccessor; _platformConnectionManager = platformConnectionManager; _appNotificationManager = appNotificationManager; _platformManager = platformManager; _userManager = userManager; _appManager = appManager; _bus = bus; _emailVerificationConfiguration = emailVerificationOptions.Value; }
protected void Page_Load(object sender, EventArgs e) { mappmanager = Session["APP_MANAGER"] as IAppManager; if (mappmanager.LoginUser.HasAdminRights == false) { ErrorLogProvider provider = null; try { //create a exception. Exception exception = HttpContext.Current.Error; //insert into Error log. provider = new ErrorLogProvider(); provider.AppManager = this.mappmanager; provider.Insert1(exception); } catch { throw; } finally { if (provider != null) { provider.Dispose(); } } // this.DisplayMessage("YOU DO NOT HAVE ACCESS TO THIS PAGE"); Response.Redirect("~/Homepage.aspx"); } UserAuthentication muserauthentication = new UserAuthentication(); this.mappmanager = muserauthentication.AppManager; LoadLabels(); if (!Page.IsPostBack) { if (Convert.ToString(Session["UserPermissionAddOrUpdate"]) != null) { if (Convert.ToString(Session["UserPermissionAddOrUpdate"]).Equals("TRUE")) { Session["UserPermissionAddOrUpdate"] = null; this.DisplayList(this.SearchUsersPermissions()); } } } }
public ReportViewModel( IMessenger messenger, IFileChooserFactory fileChooserFactory, IAppManager appManager, IAppFileSystem appFileSystem, IActiveWindowsTracker activeWindowsTracker) { _fileChooserFactory = fileChooserFactory; _appManager = appManager; _appFileSystem = appFileSystem; _activeWindowsTracker = activeWindowsTracker; messenger.Register <ChooseJsonFileDialogEvent>(this, OnChooseJsonFileDialog); messenger.Register <ShowCurrentReportEvent>(this, OnShowCurrentReport); messenger.Register <SaveCurrentReportEvent>(this, OnSaveCurrentReport); }
public App(IAppManager appManager) { InitializeComponent(); _appManager = appManager; _mainPage = new MainPage(appManager); _navigation = _mainPage.Navigation; MainPage = _mainPage; NavigationPage.SetHasNavigationBar(_mainPage, false); _appManager.ModalOpened += async(modal) => await OnModalOpened(modal); _appManager.ModalClosed += async() => await OnModalClosed(); }
public SettingsController(ISettingsService settingService, ITemplateService templateService, IAppManager appManager, ICacheService cacheService, IResourceManager resourceManager, ISettingManager settingManager, IConfigurationService configurationService) { this._settingManager = settingManager; this._resourceManager = resourceManager; this._settingService = settingService; this._cacheService = cacheService; this._appManager = appManager; this._templateService = templateService; this._configurationService = configurationService; }
private void InitializeView() { try { if (!Page.IsPostBack) { //Assign the start date StartDate = CalendUserSwipe.TodaysDate; } this.mAppManager = Master.AppManager; this.userSwipeEditControl.AppManager = this.mAppManager; this.HideCalenderControl(false); this.txtuser.Focus(); } catch { throw; } }
public void LoadLabels() { List <LblLanguage> lblLanguagelst = null; ILblLanguage mLanguageService = null; lblLanguagelst = new List <LblLanguage>(); this.mAppManager = Master.AppManager; mLanguageService = AppService.Create <ILblLanguage>(); mLanguageService.AppManager = mAppManager; // retrieve lblLanguagelst = mLanguageService.RetrieveLabel(Master.AppManager.LoginUser.Id, "USERMODULE"); Utility _objUtil = new Utility(); _objUtil.LoadLabels(lblLanguagelst); }
protected void Page_Load(object sender, EventArgs e) { try { this.mAppManager = Session["APP_MANAGER"] as IAppManager; LoadLabels(); if (!Page.IsPostBack) { this.DisplayMessage(string.Empty, false); ClearReport(); // Retrieve client whether available in project. BuildLocations(); } } catch { throw; } }
public TestFixture() { var mockAppSettings = new Mock <ISettingContainer <AppSetting> >(); var mockContextProvider = new Mock <IContextProvider>(); var mockAppManager = new Mock <IAppManager>(); var mockMembershipSettings = new MembershipSettingContainer(); var mockSettingManager = new Mock <ISettingManager>(); mockContextProvider.Setup(m => m.BrowserType).Returns("Chrome"); mockContextProvider.Setup(m => m.ClientIP).Returns("111.222.333.444"); mockContextProvider.Setup(m => m.CountryInfo).Returns(new Country("tr-TR", "Turkey")); mockContextProvider.Setup(m => m.Culture).Returns(CultureInfo.DefaultThreadCurrentCulture); mockContextProvider.Setup(m => m.HttpMethod).Returns("GET"); mockContextProvider.Setup(m => m.RootAddress).Returns(@"http://www.asadmindemo.com"); mockContextProvider.Setup(m => m.SessionId).Returns("q1w2e3r4"); mockContextProvider.Setup(m => m.Url).Returns(new Uri("http://www.asadmindemo.com/Home")); mockContextProvider.Setup(m => m.UserId).Returns(1); mockContextProvider.Setup(m => m.UserName).Returns("UnitTester"); mockAppSettings.Setup(m => m["DbQueryLogEnable"]).Returns(new AppSetting() { Value = "True" }); mockAppManager.Setup(m => m.MapPhysicalFile(It.IsAny <string>())).Returns("Script.sql"); _appSettings = mockAppSettings.Object; _xmlSerializer = new ASXmlSerializer(); _contextProvider = mockContextProvider.Object; this._dbConnectionConfigurationFactory = delegate() { return(new DbConnectionConfiguration(ProviderName, ConnectionString)); }; _database = new Infrastructure.Data.Database(_dbConnectionConfigurationFactory); _appManager = mockAppManager.Object; _typeFinder = new TypeFinder(); mockSettingManager.Setup(m => m.GetContainer <AppSetting>()).Returns(_appSettings); mockSettingManager.Setup(m => m.GetContainer <MembershipSetting>()).Returns(mockMembershipSettings); _dbInitializer = new ASDatabaseInitializer <ASDbContext>(_dbConnectionConfigurationFactory, _appManager); _dbCommandInterceptor = new ASDbCommandInterceptor(_database, _contextProvider, mockSettingManager.Object); _dbContextFactory = new ASDbContextFactory(_xmlSerializer, _contextProvider, _dbInitializer, _typeFinder, _dbConnectionConfigurationFactory); _dbContext = new ASDbContext(_xmlSerializer, _contextProvider, _dbInitializer, _typeFinder, _dbConnectionConfigurationFactory); _userStore = new ASUserStore(_dbContext); _userManager = new ASUserManager(_userStore, mockSettingManager.Object); }
public MainMasterDetailPageViewModel(INavigationService navigationService, IPageNavigator pageNavigator, IUserDialogs userDialogs, IEventAggregator eventAggregator, IAzurePushNotification azurePushNotification, IAppManager appManager, IAppUserManager appUserManager) : base(navigationService, pageNavigator, userDialogs, eventAggregator) { _azurePushNotification = azurePushNotification; _appManager = appManager; _appUserManager = appUserManager; AccountCommmand = new DelegateCommand(async() => await OnAccount()); CustomersCommand = new DelegateCommand(async() => await OnCustomers()); PurchaseOrdersCommand = new DelegateCommand(async() => await OnPurchaseOrders()); LogoutCommand = new DelegateCommand(async() => await OnLogout()); }
protected void Page_Load(object sender, EventArgs e) { try { // Get from master. this.mAppManager = this.Master.AppManager; if (mAppManager.LoginUser.HasAdminRights == false) { ErrorLogProvider provider = null; try { //create a exception. Exception exception = HttpContext.Current.Error; //insert into Error log. provider = new ErrorLogProvider(); provider.AppManager = this.mAppManager; provider.Insert1(exception); } catch { throw; } finally { if (provider != null) { provider.Dispose(); } } // this.DisplayMessage("YOU DO NOT HAVE ACCESS TO THIS PAGE"); Response.Redirect("~/Homepage.aspx"); } LoadLabels(); // Fetch from session. if (Session[ACTIVITY_SUMMARY] != null) { this.mActivitySummary = Session[ACTIVITY_SUMMARY] as List <CustomEntity>; } } catch { throw; } }
public InstallerService(ISchedulerService schedulerService, IAppManager appManager, ICacheService cacheService, ILogger logger, IDbContextFactory dbContextFactory, IDatabase database, IEncryptionProvider encryptionProvider, Func <ASConfiguration> configurationFactory) { this._appManager = appManager; this._schedulerService = schedulerService; this._cacheService = cacheService; this._dbContextFactory = dbContextFactory; this._logger = logger; this._database = database; this._encryptionProvider = encryptionProvider; this._configurationFactory = configurationFactory; }
private static void ShowOnUI(IAppManager app, string pngFile) { app.RunOnUIThread(() => { //获取秋之盒主窗口 var window = (Window)app.GetMainWindow(); //构建一个HandyControl的图片浏览器 var imgWindow = new ImageBrowser(pngFile); //当主窗口关闭时,关闭图片浏览器窗口 //不使用Window.Owner是为了避免图片窗始终在秋之盒主窗体上层 window.Closing += (s, e) => { imgWindow.Close(); }; //显示浏览器窗口 imgWindow.Show(); }); }
protected void Page_Load(object sender, EventArgs e) { try { this.mAppManager = Session["APP_MANAGER"] as IAppManager; LoadLabels(); if (!Page.IsPostBack) { this.DisplayMessage(string.Empty, false); BuildLocations(); RdnAlldate.Checked = true; RdnAll.Checked = true; } } catch { throw; } }
private void InitializeView() { try { if (!Page.IsPostBack) { //Reterive the user swipe details of current month StartDate = CalUserSwipe.TodaysDate; } //Initial view this.mAppManager = Master.AppManager; this.userSwipeEditControl.AppManager = this.mAppManager; this.FillUserSwipes(); LoadLabels(); } catch { throw; } }
public PlatformController(IDocumentStore documentStore, IPlatformManager platformManager, IPlatformDataManager platformDataManager, IAppManager appManager, IAppNotificationManager appNotificationManager, IPlatformConnectionManager platformConnectionManager, IUserManager userManager, IHttpContextAccessor httpContextAccessor, IOptions <Options> options, IBus bus, ILogger <PlatformController> logger) { _documentStore = documentStore; _platformManager = platformManager; _platformDataManager = platformDataManager; _appManager = appManager; _appNotificationManager = appNotificationManager; _platformConnectionManager = platformConnectionManager; _userManager = userManager; _httpContextAccessor = httpContextAccessor; _options = options.Value; _bus = bus; _logger = logger; }
protected void Page_Load(object sender, EventArgs e) { mappmanager = Session["APP_MANAGER"] as IAppManager; if (mappmanager.LoginUser.HasAdminRights == false) { ErrorLogProvider provider = null; try { //create a exception. Exception exception = HttpContext.Current.Error; //insert into Error log. provider = new ErrorLogProvider(); provider.AppManager = this.mappmanager; provider.Insert1(exception); } catch { throw; } finally { if (provider != null) { provider.Dispose(); } } // this.DisplayMessage("YOU DO NOT HAVE ACCESS TO THIS PAGE"); Response.Redirect("~/Homepage.aspx"); } UserAuthentication muserauthentication = new UserAuthentication(); this.mappmanager = muserauthentication.AppManager; LoadLabels(); if (!Page.IsPostBack) { //Display the Inital view. this.InitalView(); } }
private void InitializeView() { try { // Get an instance of IAppManager. this.mAppManager = this.Master.AppManager; Hidloc.Value = this.mAppManager.LoginUser.LocationId.ToString(); // Hide info panels. this.DisplayOrClearSucceedMessage(string.Empty); this.ShowOrHideValidationError(false); if (Page.IsPostBack) { } else { // Not post page. if (Session["Edit_Activitydate"] != null) { this.txtActivityDate.Text = Session["Edit_Activitydate"].ToString(); LoadActivityList(Session["Edit_Activitydate"].ToString()); } else { // Display current date as default date. this.txtActivityDate.Text = this.RetrieveSystemCurrentDateTime().ToString("MM/dd/yyyy"); if (txtActivityDate.Text.Trim() != "") { LoadActivityList(txtActivityDate.Text); } } // Display succeed message if any from other page. this.DisplayOrClearSucceedMessage(this.RetrieveOtherPageSucceedMessage()); //if (this.RetrieveOtherPageSucceedMessage().Trim() != "") //{ // this.divErrorPanel.InnerHtml = this.RetrieveOtherPageSucceedMessage(); // this.ShowOrHideValidationError(true); //} } } catch { throw; } }
protected void Page_Load(object sender, EventArgs e) { try { muserauthentication = new UserAuthentication(); this.mAppManager = muserauthentication.AppManager; LoadLabels(); if (!IsPostBack) { RetrieveAttachedUsers(); txtDate.Text = System.DateTime.Now.ToString("MM/dd/yyyy"); } this.alertError.Style["display"] = "none"; this.alertError.InnerHtml = ""; } catch { throw; } }
public AppRegistryActor(IConfiguration configuration, IAppManager appManager) { _appManager = appManager; _subscribeAbility = new SubscribeAbility(this); _appsDirectory = Path.GetFullPath(configuration["AppsLocation"]); Flow <AllAppsQuery>(b => b.Func(_ => new AllAppsResponse(_apps.Keys.ToArray())).ToSender()); Receive <LoadData>(HandleLoadData); Receive <SaveData>(HandleSaveData); Receive <InstalledAppQuery>(HandleQueryApp); Receive <NewRegistrationRequest>(HandleNewRegistration); Receive <UpdateRegistrationRequest>(HandleUpdateRequest); Receive <QueryHostApps>(ProcessQuery); Receive <AppStatusResponse>(FinishQuery); _subscribeAbility.MakeReceive(); }
public void LoadLabels() { List <LblLanguage> lblLanguagelst = null; ILblLanguage mLanguageService = null; lblLanguagelst = new List <LblLanguage>(); this.mAppManager = Master.AppManager; mLanguageService = AppService.Create <ILblLanguage>(); mLanguageService.AppManager = mAppManager; // retrieve lblLanguagelst = mLanguageService.RetrieveLabel(Master.AppManager.LoginUser.Id, "REPORTS"); Utility _objUtil = new Utility(); _objUtil.LoadLabels(lblLanguagelst); var DATE_VALUE = lblLanguagelst.Where(c => c.LabelId.ToUpper().Equals("FROMTODATE")).FirstOrDefault(); if (DATE_VALUE != null) { FROMDATE = Convert.ToString(DATE_VALUE.DisplayText); TODATE = Convert.ToString(DATE_VALUE.SupportingText1); } var DATE_RANGE_GD = lblLanguagelst.Where(c => c.LabelId.ToUpper().Equals("DATERANGE")).FirstOrDefault(); if (DATE_RANGE_GD != null) { DATE_RANGE = Convert.ToString(DATE_RANGE_GD.DisplayText); INVALIDE_DATE = Convert.ToString(DATE_RANGE_GD.SupportingText1); } var DATE_VALIDATION = lblLanguagelst.Where(c => c.LabelId.ToUpper().Equals("VALIDATION")).FirstOrDefault(); if (DATE_VALIDATION != null) { VALIDATIONERROR = Convert.ToString(DATE_VALIDATION.DisplayText); //INVALIDE_DATE = Convert.ToString(DATE_VALIDATION.SupportingText1); } }
public BundleParser(IFileReader fileReader, IAppManager appManager) { _fileReader = fileReader; _appManager = appManager; }
public BundleParser() { _fileReader = Container.Resolve<IFileReader>(); _appManager = Container.Resolve<IAppManager>(); }
public BundleResolver() { _appManager = Container.Resolve<IAppManager>(); _markupBuilder = Container.Resolve<IMarkupBuilder>(); }
public BundleResolver(IAppManager appManager, IMarkupBuilder markupBuilder) { _appManager = appManager; _markupBuilder = markupBuilder; }