Пример #1
0
        /// <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();
        }
Пример #2
0
        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);
            }
        }
Пример #3
0
 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;
     }
 }
Пример #4
0
 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);
     }
 }
Пример #5
0
 void initializeConfig()
 {
     /* 读取本地用户配置文件 */
     User_LocalInfo = MyConfig.getUserLocalInfo(User_Info.UserID);
 }
Пример #6
0
 private void SetObj()
 {
     UserBrowsingInfo = SessionBag.UserBrowsingInfo;
 }
Пример #7
0
 public SettingsPage(UserLocalInfo userInfo)
 {
     this.InitializeComponent();
     this.BindingContext = new SettingsViewModel(userInfo, this);
 }
Пример #8
0
        public FindieWebApiService()
        {
            var sqliteService = new SQLiteService();

            this._userLocalInfo = sqliteService.GetLocalUserInfo();
        }