/// <summary> /// 从父窗体设置用户信息 /// </summary> /// <param name="userInfo"></param> /// <param name="userLocalInfo"></param> public void setUserInfo(UserInfo userInfo, UserLocalInfo userLocalInfo) { User_Info = userInfo; User_LocalInfo = userLocalInfo; this.Text += "-" + User_Info.UserID; initializeConfig(); initializeWidget(); }
public UserLocalInfo GetLocalUserInfo() { using (var controller = new SQLiteController()) { var table = controller._sqLiteConnection.Table <UserLocalInfo>(); UserLocalInfo user = (from account in table select account).FirstOrDefault(); return(user); } }
void Session_Start(object sender, EventArgs e) { try { //TODO: set or get what is the location of files for user on fileserver //http://www.velocityreviews.com/forums/t75517-access-to-the-fileserver-from-webserver.html //This will set users local settings UserLocalInfo info = new UserLocalInfo(Server.MapPath(System.Configuration.ConfigurationManager.AppSettings["GeoDatabase"].ToString())); SessionStateBag bag = new SessionStateBag(); bag.UserBrowsingInfo = info; } catch (Exception ex) { //TODO: Logging here throw ex; } }
private bool IsUserAreadyLoggedIn() { try { if (this._apiService.IsUserExists()) { this.userLocalInfo = this._sqLiteService.GetLocalUserInfo(); IsLoading = false; return(true); } else { IsLoading = false; return(false); } } catch (Exception) { return(false); } }
void initializeConfig() { /* 读取本地用户配置文件 */ User_LocalInfo = MyConfig.getUserLocalInfo(User_Info.UserID); }
private void SetObj() { UserBrowsingInfo = SessionBag.UserBrowsingInfo; }
public SettingsPage(UserLocalInfo userInfo) { this.InitializeComponent(); this.BindingContext = new SettingsViewModel(userInfo, this); }
public FindieWebApiService() { var sqliteService = new SQLiteService(); this._userLocalInfo = sqliteService.GetLocalUserInfo(); }