コード例 #1
0
 public InternalMembershipProvider(IUserProxy userProxy)
 {
     if (userProxy == null)
         this.userProxy = new UserProxy();
     else
         this.userProxy = userProxy;
 }
コード例 #2
0
ファイル: CreateNewUser.xaml.cs プロジェクト: barbarossia/DIS
 public CreateNewUser(IUserProxy userProxy, User currentUser, UserOperation userOperation)
 {
     InitializeComponent();
     VM = new CreateUserViewModel(userProxy, currentUser, userOperation);
     VM.View = this;
     DataContext = VM;
 }
コード例 #3
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="userProxy"></param>
        /// <param name="currentUser"></param>
        /// <param name="userOperation"></param>
        public CreateUserViewModel(IUserProxy userProxy, User currentUser, UserOperation userOperation)
        {
            this.userProxy = userProxy;

            this.userOperation = userOperation;
            if (userOperation == UserOperation.Edit)
            {
                Title = MergedResources.Common_EditUser;
                this.currentUser = currentUser;
                this.LoginIdReadOnly = true;
            }
            else if (userOperation == UserOperation.Add)
            {
                Title = MergedResources.Common_AddUser;
                this.currentUser = new User();
                this.LoginIdReadOnly = false;
            }
            else
            {
                this.currentUser = currentUser;
                this.LoginIdReadOnly = true;
            }
            InitializeCollections(this.currentUser);
            isLanguageChanged = false;
            IsChanged = false;
            IsSaved = true;
        }
コード例 #4
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="userProxy"></param>
        public AccountSetting(IUserProxy userProxy)
        {
            this.InitializeComponent();

            VM = new CreateUserViewModel(userProxy, KmtConstants.LoginUser, UserOperation.SetAccount);
            DataContext = VM;
        }
コード例 #5
0
		public AccountController(
			IConfigurationService configurationService,
			IUserProxy userProxy,
			IAuthenticationService authenticationService) {
			_configurationService = configurationService;
			_userProxy = userProxy;
			_authenticationService = authenticationService;
		}
コード例 #6
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="configProxy"></param>
 /// <param name="ssProxy"></param>
 /// <param name="hqProxy"></param>
 /// <param name="userProxy"></param>
 /// <param name="stockProxy"></param>
 /// <param name="keyProxy"></param>
 public ConfigurationView(IConfigProxy configProxy, ISubsidiaryProxy ssProxy, IHeadQuarterProxy hqProxy,
     IUserProxy userProxy, IKeyTypeConfigurationProxy stockProxy, IKeyProxy keyProxy, int? pageIndex)
 {
     InitializeComponent();
     this.reSizeWnd();
     VM = new ConfigurationViewModel(configProxy,ssProxy,hqProxy,userProxy,stockProxy,keyProxy,pageIndex);
     VM.View = this;
     DataContext = VM;
     Closed += this.ConfigurationView_Closed;
 }
コード例 #7
0
        public UserManagement(MainWindowViewModel mainVm, IUserProxy userProxy)
        {
            InitializeComponent();
            VM = new UserManagementViewModel(userProxy);
            DataContext = VM;

            mainVm.CheckUserSelected += new CheckAvailableEventHandler((s, e) => VM.CheckUserSelected(e));
            mainVm.CreateUser += new EventHandler((s, e) => VM.CreaterUser());
            mainVm.EditUser += new EventHandler((s, e) => VM.EditUser());
            mainVm.DeleteUser += new EventHandler((s, e) => VM.DeleteUser());
            mainVm.RefreshUsers += new SearchUserEventHandler((s, e) => VM.RefreshUsers(e.UserName, e.Role.RoleId));
        }
コード例 #8
0
 public ConfigurationViewModel(IConfigProxy configProxyParam, ISubsidiaryProxy ssProxyParam, IHeadQuarterProxy hqProxyParam,
     IUserProxy userProxyParam, IKeyTypeConfigurationProxy stockProxyParam, IKeyProxy keyProxyParam, int? pageIndex)
 {
     ssProxy = ssProxyParam ?? new SubsidiaryProxy();
     configProxy = configProxyParam ?? new ConfigProxy(KmtConstants.LoginUser);
     userProxy = userProxyParam ?? new UserProxy();
     hqProxy = hqProxyParam ?? new HeadQuarterProxy();
     stockProxy = stockProxyParam ?? new KeyTypeConfigurationProxy();
     keyProxy = keyProxyParam ?? new KeyProxy(KmtConstants.LoginUser, KmtConstants.HeadQuarterId);
     this.LoadPages();
     if (pageIndex != null && pageIndex < ConfigPages.Count)
         this.SelectedConfigPage = ConfigPages.ElementAt(pageIndex.Value);
     else
         this.SelectedConfigPage = ConfigPages.ElementAt(0);
 }
コード例 #9
0
ファイル: Example.cs プロジェクト: korenzerah/DesignPatterns
        static void Example(string[] args)
        {
            IUserProxy pr = LoginFactory.LoginToFacadeSystem("elal");

            (pr as CompanyFacadeProxy).createFlight("1");
            (pr as CompanyFacadeProxy).createFlight("2");
            (pr as CompanyFacadeProxy).createFlight("1");
            (pr as CompanyFacadeProxy).createFlight("1");

            IUserProxy pr2 = LoginFactory.LoginToFacadeSystem("koren");

            (pr2 as CustomerFacadeProxy).buyTicket("1");
            (pr2 as CustomerFacadeProxy).buyTicket("1");

            IUserProxy pr3 = LoginFactory.LoginToFacadeSystem("");

            (pr3 as AnonymousFacadeProxy).showFlights();
        }
コード例 #10
0
        public void Init()
        {
            _fakeUserProxy = Substitute.For <IUserProxy>();
            _uut           = new KontoController(_fakeUserProxy);

            _rvm = new RegistorViewModel()
            {
                Username        = "******",
                Email           = "*****@*****.**",
                GivenName       = "Test",
                LastName        = "Tango",
                Password        = "******",
                ConfirmPassword = "******"
            };
            _savedUser = new User()
            {
                Username  = "******",
                Email     = "*****@*****.**",
                GivenName = "Saved",
                LastName  = "User",
                Password  = "******",
            };
        }
コード例 #11
0
 public AccountBackend(IUserProxy userProxy)
 {
     _userProxy = userProxy;
 }
コード例 #12
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="mainFrame"></param>
        /// <param name="configProxy"></param>
        /// <param name="keyProxy"></param>
        /// <param name="userProxy"></param>
        /// <param name="logProxy"></param>
        /// <param name="ssProxy"></param>
        /// <param name="hqProxy"></param>
        /// <param name="stockProxy"></param>
        public MainWindowViewModel(Frame mainFrame, IConfigProxy configProxy, IKeyProxy keyProxy, IUserProxy userProxy,
            ILogProxy logProxy, ISubsidiaryProxy ssProxy, IHeadQuarterProxy hqProxy, IKeyTypeConfigurationProxy stockProxy)
        {
            this.configProxy = configProxy ?? new ConfigProxy(KmtConstants.LoginUser);
            this.keyProxy = keyProxy ?? new KeyProxy(KmtConstants.LoginUser, KmtConstants.HeadQuarterId);
            this.userProxy = userProxy ?? new UserProxy();
            this.logProxy = logProxy ?? new LogProxy();
            this.ssProxy = ssProxy ?? new SubsidiaryProxy();
            this.hqProxy = hqProxy ?? new HeadQuarterProxy();
            this.stockProxy = stockProxy ?? new KeyTypeConfigurationProxy();

            this.mainFrame = mainFrame;
            keyManagement = new KeyManagement(this, this.keyProxy, this.configProxy, this.ssProxy, this.hqProxy);
            userManagement = new UserManagement(this, this.userProxy);
            logViewer = new ViewLogs(this, this.logProxy);
            InitializeNotificationSystem();

            RibbonTabIndex = KeyPageIndex;
            InitializeRoles();
            LogTypes.Add(MergedResources.Common_SystemLog);
            LogTypes.Add(MergedResources.Common_OperationLog);
            OnCurrentUserRoleChanged();
            OnAutoReportChanged(null, null);
        }
コード例 #13
0
 public CollabratorQuery(IUserProxy userAPI, IUnitOfWork <CPDbContext> unitOfWork, IAppUser user)
 {
     _uproxy     = userAPI;
     _unitOfWork = unitOfWork;
     _user       = user;
 }
コード例 #14
0
 public AppUser(ICoursePlatformHttpContext ctx, IUserProxy userSvc)
 {
     _ctx     = ctx;
     _userSvc = userSvc;
 }
コード例 #15
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="userProxy"></param>
 public UserManagementViewModel(IUserProxy userProxy)
 {
     this.userProxy = userProxy;
     users = new ObservableCollection<User>();
     selectedUserCollection = new ObservableCollection<User>();
 }
コード例 #16
0
 public RegistrationBackend(ICheckConnection checkConnection, IUserProxy userProxy)
 {
     _checkConnection = checkConnection;
     _userProxy       = userProxy;
 }
コード例 #17
0
 public HomeController(IUserProxy userProxy)
 {
     _proxy = userProxy;
 }
コード例 #18
0
 /// <summary>
 /// 绑定与数据源的关联
 /// </summary>
 /// <param name="proxy"></param>
 public void InitDataSource(IUserProxy proxy)
 {
     m_proxyUser = proxy;
 }
コード例 #19
0
 /// <summary>
 /// setup everything for the LobbyController
 /// </summary>
 /// <param name="userProxy">Instance of user proxy</param>
 /// <param name="lobbyProxy">Instance of Lobby proxy</param>
 /// <param name="userSession">Instance of user session</param>
 public LobbyController(IUserProxy userProxy, ILobbyProxy lobbyProxy, IUserSession userSession)
 {
     _userproxy   = userProxy;
     _lobbyProxy  = lobbyProxy;
     _userSession = userSession;
 }
コード例 #20
0
 public KontoController(IUserProxy userProxy)
 {
     _proxy = userProxy;
 }
コード例 #21
0
 public RegisterBackend(IUserProxy userProxy)
 {
     _userProxy = userProxy;
 }
コード例 #22
0
 public SettingsBackend(ICheckConnection checkConnection, IUserProxy userProxy)
 {
     _checkConnection = checkConnection;
     _userProxy       = userProxy;
 }
コード例 #23
0
 public UserService(IUserProxy userProxy)
 {
     this._userProxy = userProxy;
 }
コード例 #24
0
 public LoginBackend(IUserProxy userProxy)
 {
     _userProxy = userProxy;
 }
コード例 #25
0
 public LoginBackend(ICheckConnection checkConnection, IUserProxy userProxy)
 {
     _checkConnection = checkConnection;
     _userProxy       = userProxy;
 }