From 9a2179812611e96b37b4797f17bc304d3cffb820 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期一, 07 十二月 2020 10:59:00 +0800 Subject: [PATCH] 2020-12-07 1.修改图片保存路径 --- HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs | 8 ++-- HDL_ON/Common/Utlis.cs | 17 ++++++++ .vs/HDL_APP_Project/xs/UserPrefs.xml | 42 +++++++-------------- HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditPageBLL.cs | 8 ++-- HDL_ON/Common/ImageUtlis.cs | 21 ++++------ 5 files changed, 47 insertions(+), 49 deletions(-) diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml index 361ae92..e7acd3e 100644 --- a/.vs/HDL_APP_Project/xs/UserPrefs.xml +++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml @@ -1,38 +1,25 @@ -锘�<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default"> +锘�<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default"> <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008030-00014C392121802E" /> - <MonoDevelop.Ide.Workbench> + <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/Common/HDLCommon.cs"> + <Files> + <File FileName="HDL_ON/UI/UI0-Public/AppUnlockPage.cs" Line="100" Column="1" /> + <File FileName="HDL_ON/Entity/OnAppConfig.cs" Line="85" Column="25" /> + <File FileName="HDL-ON_Android/Application.cs" Line="307" Column="34" /> + <File FileName="HDL_ON/Common/ImageUtlis.cs" Line="5" Column="17" /> + <File FileName="HDL_ON/Common/HDLCommon.cs" Line="7" Column="8" /> + </Files> <Pads> <Pad Id="ProjectPad"> <State name="__root__"> <Node name="HDL_APP_Project" expanded="True"> <Node name="HDL_ON" expanded="True"> - <Node name="Common" expanded="True" /> - <Node name="DAL" expanded="True"> - <Node name="Server" expanded="True" /> - </Node> - <Node name="Entity" expanded="True" /> - <Node name="UI" expanded="True"> - <Node name="UI1-Login" expanded="True" /> - <Node name="UI2" expanded="True"> - <Node name="2-Classification" expanded="True" /> - <Node name="3-Intelligence" expanded="True"> - <Node name="Scene" expanded="True"> - <Node name="SceneEditPage.cs" selected="True" /> - </Node> - </Node> - <Node name="4-PersonalCenter" expanded="True"> - <Node name="RoomListManage" expanded="True" /> - </Node> - </Node> + <Node name="Common" expanded="True"> + <Node name="HDLCommon.cs" selected="True" /> </Node> </Node> - <Node name="HDL-ON_Android" expanded="True"> - <Node name="Assets" expanded="True"> - <Node name="Phone" expanded="True" /> - </Node> - <Node name="Resources" expanded="True" /> - </Node> + <Node name="HDL-ON_Android" expanded="True" /> <Node name="HDL-ON_iOS" expanded="True"> + <Node name="References" expanded="True" /> <Node name="Resources" expanded="True" /> </Node> </Node> @@ -47,12 +34,11 @@ <String>Shared.IOS/Shared.IOS.csproj</String> </DisabledProjects> <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" /> - <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.822QECU5228FU" /> + <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.Android_Accelerated_Oreo" /> <MonoDevelop.Ide.DebuggingService.Breakpoints> <BreakpointStore> <Breakpoint file="/Users/jlchen/JLChen/ProjectsCode/HDLGit/ON+/HDL_ON/UI/UI2/4-PersonalCenter/ResidentialManage/RoomEditPageBLL.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/ResidentialManage/RoomEditPageBLL.cs" line="76" column="1" /> <Breakpoint file="/Users/jlchen/JLChen/ProjectsCode/HDLGit/ON+/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs" line="56" column="1" /> - <Breakpoint file="/Users/jlchen/JLChen/ProjectsCode/HDLGit/ON+/HDL_ON/UI/UI0-Public/AppUnlockPage.cs" relfile="HDL_ON/UI/UI0-Public/AppUnlockPage.cs" line="18" column="1" /> <Breakpoint file="/Users/jlchen/JLChen/ProjectsCode/HDLGit/ON+/HDL_ON/DriverLayer/Control_Udp_Bus.cs" relfile="HDL_ON/DriverLayer/Control_Udp_Bus.cs" line="694" column="1" /> <Breakpoint file="/Users/jlchen/JLChen/ProjectsCode/HDLGit/ON+/HDL_ON/DriverLayer/Control_TcpServer.cs" relfile="HDL_ON/DriverLayer/Control_TcpServer.cs" line="197" column="1" /> <Breakpoint file="/Users/jlchen/JLChen/ProjectsCode/HDLGit/ON+/HDL_ON/DAL/DriverLayer/Control_TcpClient.cs" relfile="HDL_ON/DAL/DriverLayer/Control_TcpClient.cs" line="69" column="1" /> diff --git a/HDL_ON/Common/ImageUtlis.cs b/HDL_ON/Common/ImageUtlis.cs index 88f00e1..ce9f33e 100644 --- a/HDL_ON/Common/ImageUtlis.cs +++ b/HDL_ON/Common/ImageUtlis.cs @@ -1,11 +1,6 @@ 锘縰sing System; using Shared; -using HDL_ON; -using HDL_ON.UI.CSS; using HDL_ON.DAL.Server; -using HDL_ON.UI; -using System.Threading; -using HDL_ON.Entity; namespace HDL_ON { @@ -106,7 +101,7 @@ { imageView.ImageBytes = null; imageView.ImagePath = imageKey; - Utlis.WriteLine("imageKey 鍔犺浇鏈湴鍥剧墖鎴愬姛"); + //Utlis.WriteLine("imageKey 鍔犺浇鏈湴鍥剧墖鎴愬姛"); } } else @@ -118,7 +113,7 @@ if (imageView != null) { imageView.ImageBytes = FileUtils.ReadFile(imageKey); - Utlis.WriteLine("imageKey 鍔犺浇鑷畾涔夌紦瀛樺浘鐗囨垚鍔�"); + //Utlis.WriteLine("imageKey 鍔犺浇鑷畾涔夌紦瀛樺浘鐗囨垚鍔�"); } } else @@ -136,14 +131,14 @@ if (imageView != null) { imageView.ImageBytes = imageBytes; - Utlis.WriteLine("imageKey 鍔犺浇浜戠涓嬭浇鍥剧墖鎴愬姛"); + //Utlis.WriteLine("imageKey 鍔犺浇浜戠涓嬭浇鍥剧墖鎴愬姛"); } }); } else { //2.4 涓嬭浇鏄惁锛屾槸鍚︿娇鐢ㄩ粯璁ゅ浘鐗� - Utlis.WriteLine("imageKey 鍔犺浇浜戠鍥剧墖澶辫触"); + //Utlis.WriteLine("imageKey 鍔犺浇浜戠鍥剧墖澶辫触"); } }); } @@ -177,7 +172,7 @@ { //imageView.ImageBytes = null; frameLayout.BackgroundImagePath = imageKey; - Utlis.WriteLine("imageKey 鍔犺浇鏈湴鍥剧墖鎴愬姛"); + //Utlis.WriteLine("imageKey 鍔犺浇鏈湴鍥剧墖鎴愬姛"); } } else @@ -189,7 +184,7 @@ if (frameLayout != null) { frameLayout.BackgroundImagePath = imageKey; - Utlis.WriteLine("imageKey 鍔犺浇鑷畾涔夌紦瀛樺浘鐗囨垚鍔�"); + //Utlis.WriteLine("imageKey 鍔犺浇鑷畾涔夌紦瀛樺浘鐗囨垚鍔�"); } } else @@ -207,14 +202,14 @@ if (frameLayout != null) { frameLayout.BackgroundImagePath = imageKey; - Utlis.WriteLine("imageKey 鍔犺浇浜戠涓嬭浇鍥剧墖鎴愬姛"); + //Utlis.WriteLine("imageKey 鍔犺浇浜戠涓嬭浇鍥剧墖鎴愬姛"); } }); } else { //2.4 涓嬭浇鏄惁锛屾槸鍚︿娇鐢ㄩ粯璁ゅ浘鐗� - Utlis.WriteLine("imageKey 鍔犺浇浜戠鍥剧墖澶辫触"); + //Utlis.WriteLine("imageKey 鍔犺浇浜戠鍥剧墖澶辫触"); } }); } diff --git a/HDL_ON/Common/Utlis.cs b/HDL_ON/Common/Utlis.cs index 6283094..e746173 100644 --- a/HDL_ON/Common/Utlis.cs +++ b/HDL_ON/Common/Utlis.cs @@ -303,6 +303,23 @@ } /// <summary> + /// 鑾峰彇褰撳墠鏃堕棿鎴冲�� + /// </summary> + /// <returns></returns> + public static string GetTimestamp(bool isMilliseconds = true) + { + System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1)); // 褰撳湴鏃跺尯 + if (isMilliseconds) + { + return ((long)(DateTime.Now - startTime).TotalMilliseconds).ToString(); // 鐩稿樊绉掓暟 + } + else + { + return ((long)(DateTime.Now - startTime).TotalSeconds).ToString(); // 鐩稿樊绉掓暟 + } + } + + /// <summary> /// 鑾峰彇璇锋眰鎻愪氦鐨勮瑷�鍙傛暟 /// </summary> public static string GetPostLanguageType() diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs index bfdf1d2..8e4378a 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs @@ -946,7 +946,7 @@ { try { - MainPage.Log("SelectPicture 瑁佸壀鍥剧墖杩斿洖璺緞: " + selectImagePath); + //MainPage.Log("SelectPicture 瑁佸壀鍥剧墖杩斿洖璺緞: " + selectImagePath); //1.璇诲彇瑁佸壀鍚庣殑鍥剧墖锛岀劧鍚庡垹闄� var imageBytes = Shared.IO.FileUtils.ReadFile(selectImagePath); System.IO.File.Delete(selectImagePath); @@ -962,7 +962,7 @@ var newImageName = mScene.name.Trim() + ".png"; var uploadImageObj = new UploadImageObj() { - prefix = "ONS", + prefix = "Scene" + Utlis.GetTimestamp(), fileName = newImageName, uid = mScene.sid, content = imageBytes, @@ -974,11 +974,11 @@ //涓婁紶鎴愬姛 Application.RunOnMainThread(() => { - Utlis.WriteLine("涓婁紶鎴愬姛锛�" + imageUrl); + //Utlis.WriteLine("涓婁紶鎴愬姛锛�" + imageUrl); //1.2濡傛灉鏄嚜瀹氫箟鍥剧墖鍒犻櫎涔嬪墠鐨� if (!string.IsNullOrEmpty(imageView.ImagePath) && !imageView.ImagePath.Contains("Classification/Room/Roombg")) { - Utlis.WriteLine("鍒犻櫎: " + imageView.ImagePath); + //Utlis.WriteLine("鍒犻櫎: " + imageView.ImagePath); System.IO.File.Delete(imageView.ImagePath); } //閲嶅懡鍚嶄繚瀛� diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditPageBLL.cs index c3c4ca3..5c2cbb0 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditPageBLL.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditPageBLL.cs @@ -326,7 +326,7 @@ { try { - MainPage.Log("SelectPicture 瑁佸壀鍥剧墖杩斿洖璺緞: " + selectImagePath); + //MainPage.Log("SelectPicture 瑁佸壀鍥剧墖杩斿洖璺緞: " + selectImagePath); //1.璇诲彇瑁佸壀鍚庣殑鍥剧墖锛岀劧鍚庡垹闄� var imageBytes = Shared.IO.FileUtils.ReadFile(selectImagePath); System.IO.File.Delete(selectImagePath); @@ -342,7 +342,7 @@ var newImageName = mRoom.roomName.Trim() + ".png"; var uploadImageObj = new UploadImageObj() { - prefix = "ONR", + prefix = "Room" + Utlis.GetTimestamp(), fileName = newImageName, uid = mRoom.uid, content = imageBytes, @@ -354,11 +354,11 @@ //涓婁紶鎴愬姛 Application.RunOnMainThread(() => { - Utlis.WriteLine("涓婁紶鎴愬姛锛�" + imageUrl); + //Utlis.WriteLine("涓婁紶鎴愬姛锛�" + imageUrl); //1.2濡傛灉鏄嚜瀹氫箟鍥剧墖鍒犻櫎涔嬪墠鐨� if (!string.IsNullOrEmpty(imageView.ImagePath) && !imageView.ImagePath.Contains("Classification/Room/Roombg")) { - Utlis.WriteLine("鍒犻櫎: " + imageView.ImagePath); + //Utlis.WriteLine("鍒犻櫎: " + imageView.ImagePath); System.IO.File.Delete(imageView.ImagePath); } //閲嶅懡鍚嶄繚瀛� -- Gitblit v1.8.0