.vs/HDL_APP_Project/xs/UserPrefs.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/Common/DB_AccountList.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/Common/HDLCommon.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/Entity/UserInfo.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/HDL_ON.projitems | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,4 +1,5 @@ <Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default"> <<<<<<< Updated upstream <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.94B44E9C-E1BC-4BF7-812E-FC71E9B623B2" /> <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/3-Intelligence/Scene/NewSceneMenuListPage.cs"> <Files> @@ -9,6 +10,18 @@ <File FileName="HDL_ON/Entity/UserInfo.cs" Line="97" Column="25" /> <File FileName="HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs" Line="1" Column="1" /> <File FileName="HDL_ON/UI/UI2/3-Intelligence/Scene/NewSceneMenuListPage.cs" Line="1" Column="1" /> ======= <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.6242be7109c740c6cb8999a8904b6e0ea8d45192" /> <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/Entity/UserInfo.cs"> <Files> <File FileName="HDL_ON/UI/MainPage.cs" Line="137" Column="10" /> <File FileName="HDL_ON/Entity/DB_ResidenceData.cs" Line="148" Column="23" /> <File FileName="HDL_ON/Common/HDLCommon.cs" Line="281" Column="7" /> <File FileName="HDL_ON/Common/DB_AccountList.cs" Line="22" Column="44" /> <File FileName="HDL-ON_iOS/AppDelegate.cs" Line="104" Column="33" /> <File FileName="HDL_ON/DAL/Server/HttpServerRequest.cs" Line="1" Column="1" /> <File FileName="HDL_ON/Entity/UserInfo.cs" Line="90" Column="19" /> >>>>>>> Stashed changes </Files> <Pads> <Pad Id="ProjectPad"> @@ -17,11 +30,15 @@ <Node name="HDL_ON" expanded="True"> <Node name="Common" expanded="True" /> <Node name="DAL" expanded="True"> <<<<<<< Updated upstream <Node name="DriverLayer" expanded="True" /> ======= >>>>>>> Stashed changes <Node name="Server" expanded="True" /> </Node> <Node name="Entity" expanded="True"> <Node name="Function" expanded="True" /> <Node name="UserInfo.cs" selected="True" /> </Node> <Node name="UI" expanded="True"> <Node name="UI0-Public" expanded="True" /> HDL_ON/Common/DB_AccountList.cs
New file @@ -0,0 +1,203 @@ //using System; //using System.Collections.Generic; //using System.IO; //using HDL_ON.DAL.Server; //namespace HDL_ON.Common //{ // public class DB_AccountList // { // static DB_AccountList _AccountList; // public static DB_AccountList Accounts // { // get // { // if (_AccountList == null) // { // try // { // DB_AccountList temp = Newtonsoft.Json.JsonConvert.DeserializeObject<DB_AccountList>(System.Text.Encoding.UTF8.GetString(Common.FileUtlis.Files.ReadUserInfo())); // if (temp == null) // { // _AccountList = new DB_AccountList() { }; // Utlis.WriteLine("UserInfo null"); // } // else // { // _AccountList = temp; // Utlis.WriteLine("UserInfo Current"); // } // } // catch // { // _AccountList = new DB_AccountList() { }; // Utlis.WriteLine("UserInfo null"); // } // } // return _AccountList; // } // } // public List<DB_Account> List = new List<DB_Account>(); // public DB_Account CurAccount // { // get // { // var temp = List.Find((obj) => obj.UserId == UserInfo.Current.ID); // if (temp == null) // { // temp = new DB_Account(); // } // return temp; // } // } // /// <summary> // /// 根目录 // /// </summary> // string RootPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "/"; // /// <summary> // /// 读取userInfo文件 // /// </summary> // /// <returns></returns> // public byte[] ReadUserInfo() // { // var fileName = "UserInfo_File"; // FileStream fs = null; // try // { // if (File.Exists(Path.Combine(RootPath, fileName))) // { // fs = new FileStream(Path.Combine(RootPath, fileName), FileMode.Open, FileAccess.Read); // } // else if (File.Exists(fileName)) // { // fs = new FileStream(fileName, FileMode.Open, FileAccess.Read); // } // else // { // return new byte[0]; // } // byte[] bytes = new byte[fs.Length]; // fs.Read(bytes, 0, bytes.Length); // return bytes; // } // catch // { // return new byte[0]; // } // finally // { // try // { // if (fs != null) // { // fs.Close(); // } // } // catch // { // } // } // } // /// <summary> // /// 保存userInfo // /// </summary> // /// <param name="bytes"></param> // /// <returns></returns> // public bool WirteUserinfo(byte[] bytes) // { // var fileName = "UserInfo_File"; // FileStream fs = null; // try // { // fs = new FileStream(Path.Combine(RootPath, fileName), FileMode.Create, FileAccess.Write); // fs.Write(bytes, 0, bytes.Length); // fs.Flush(); // MainPage.Log("SaveFile:" + fileName); // return true; // } // catch (Exception ex) // { // MainPage.Log("FileUtiles Code 113:" + ex.ToString()); // return false; // } // finally // { // try // { // if (fs != null) // { // fs.Close(); // } // } // catch (Exception ex) // { // MainPage.Log("FileUtils Code 121 :" + ex.ToString()); // } // } // } // } // public class DB_Account // { // /// <summary> // /// 用户ID // /// </summary> // public string UserId = ""; // /// <summary> // /// 用户手机号码 // /// </summary> // public string userMobileInfo = ""; // /// <summary> // /// 用户邮箱信息 // /// </summary> // public string userEmailInfo = ""; // public DateTime lastLogin = DateTime.Now; // public bool ConsentAgreement = false; // #region 新增保存参数 // /// <summary> // /// 账号注册服务器信息 // /// </summary> // public string RequestHttpsHost = "https://china.hdlcontrol.com"; // /// <summary> // /// // /// </summary> // public GlobalRegionListRes GlobalRegion; // /// <summary> // /// 是否同意协议 // /// </summary> // public bool isAgreePrivacyPolicy; // /// <summary> // /// 忽略更新的版本号 // /// </summary> // public string IgnoreUpdateVersion = string.Empty; // /// <summary> // /// 信息推送标记 // /// </summary> // public string PushDeviceToken; // /// <summary> // /// phoneName // /// </summary> // public string PhoneName; // /// <summary> // /// 添加推送Token成功时返回的Id // /// </summary> // public string PushId; // #endregion // } //} HDL_ON/Common/HDLCommon.cs
@@ -278,9 +278,6 @@ /// </summary> public void CheckLogout() { #if DEBUG return; #endif //未登录不用处理 if (!UserInfo.Current.IsLogin) return; HDL_ON/Entity/UserInfo.cs
@@ -47,6 +47,13 @@ return m_Current; } } /// <summary> /// 清除缓存数据 /// </summary> public void ClearUserInfo() { m_Current = null; } #region 新增保存参数 /// <summary> @@ -178,7 +185,7 @@ public void SaveUserInfo() { Common.FileUtlis.Files.WirteUserinfo( Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(this))); Common.FileUtlis.Files.WirteUserinfo(Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(this))); } /// <summary> HDL_ON/HDL_ON.projitems
@@ -256,6 +256,7 @@ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\RoomListManage\AddRoom\AddRoomPage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\RoomListManage\AddRoom\RoomBinglingFloorPage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\BindingResidence\BindingResidencePage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Common\DB_AccountList.cs" /> </ItemGroup> <ItemGroup> <Folder Include="$(MSBuildThisFileDirectory)UI\" />