xiongzhu 5 ani în urmă
părinte
comite
c510cc15ae

+ 0 - 5
App.xaml.cs

@@ -1,11 +1,6 @@
 using DeviceCenter.model;
 using Newtonsoft.Json;
 using System;
-using System.Collections.Generic;
-using System.Configuration;
-using System.Data;
-using System.Linq;
-using System.Threading.Tasks;
 using System.Windows;
 
 namespace DeviceCenter

+ 3 - 3
AscDemoPublic.cs

@@ -1,9 +1,9 @@
 using System;
-using System.Runtime.InteropServices;
 using System.Collections.Generic;
-using System.Text;
-using System.IO;
 using System.Diagnostics;
+using System.IO;
+using System.Runtime.InteropServices;
+using System.Text;
 using System.Web.Script.Serialization;
 
 namespace DeviceCenter

+ 0 - 11
AskDate.xaml.cs

@@ -1,16 +1,5 @@
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Shapes;
 
 namespace DeviceCenter
 {

+ 0 - 5
Converter.cs

@@ -1,10 +1,5 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Globalization;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 using System.Windows.Data;
 
 namespace DeviceCenter

+ 1 - 5
GetAcsEventType.cs

@@ -1,8 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.Collections.Generic;
 
 namespace DeviceCenter
 {

+ 0 - 2
Properties/AssemblyInfo.cs

@@ -1,6 +1,4 @@
 using System.Reflection;
-using System.Resources;
-using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 using System.Windows;
 

+ 1 - 6
enums/DeviceEnums.cs

@@ -1,9 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.ComponentModel;
 
 namespace DeviceCenter
 {

+ 3 - 4
libs/CarCamSDK.cs

@@ -1,7 +1,6 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Runtime.InteropServices;
+using System.Text;
 
 namespace DeviceCenter
 {
@@ -36,7 +35,7 @@ namespace DeviceCenter
         public static extern int Net_StopVideo(int tHandle);
 
         [DllImport("NetSDK.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
-        public static extern int Net_GetSdkVersion([MarshalAs(UnmanagedType.LPStr)]StringBuilder szVersion, ref int ptLen);
+        public static extern int Net_GetSdkVersion([MarshalAs(UnmanagedType.LPStr)] StringBuilder szVersion, ref int ptLen);
 
         [DllImport("NetSDK.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
         public static extern int Net_ReadGPIOState(int tHandle, Byte ucIndex, ref Byte pucValue);
@@ -311,7 +310,7 @@ namespace DeviceCenter
         public static extern int Net_SetDrawFunCallBack(int tHandle, FDrawFunCallBack fCb, IntPtr obj);
 
         [DllImport("NetSDK.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
-        public static extern int Net_ReadTwoEncpyption(int tHandle, [MarshalAs(UnmanagedType.LPStr)]StringBuilder pBuff, uint uiSizeBuff);
+        public static extern int Net_ReadTwoEncpyption(int tHandle, [MarshalAs(UnmanagedType.LPStr)] StringBuilder pBuff, uint uiSizeBuff);
 
         [DllImport("NetSDK.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
         public static extern int Net_WriteTwoEncpyption(int tHandle, string pUserData, uint uiDataLen);

+ 0 - 1
model/AcsDevice.cs

@@ -8,7 +8,6 @@ using System.Runtime.InteropServices;
 using System.Threading;
 using System.Threading.Tasks;
 using System.Windows;
-using System.Windows.Interop;
 
 namespace DeviceCenter
 {

+ 1 - 7
model/Area.cs

@@ -1,10 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace DeviceCenter.model
+namespace DeviceCenter.model
 {
     class Area
     {

+ 1 - 7
model/Building.cs

@@ -1,10 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace DeviceCenter.model
+namespace DeviceCenter.model
 {
     class Building
     {

+ 0 - 3
model/CarCamDevice.cs

@@ -1,11 +1,8 @@
 using log4net;
 using System;
-using System.Collections.Generic;
 using System.IO;
-using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
-using System.Windows;
 
 namespace DeviceCenter
 {

+ 0 - 3
model/Config.cs

@@ -2,9 +2,6 @@
 using System;
 using System.Collections.Generic;
 using System.IO;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 
 namespace DeviceCenter.model
 {

+ 1 - 7
model/Floor.cs

@@ -1,10 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace DeviceCenter.model
+namespace DeviceCenter.model
 {
     class Floor
     {

+ 1 - 5
model/GetAreasResponse.cs

@@ -1,8 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.Collections.Generic;
 
 namespace DeviceCenter.model
 {

+ 1 - 5
model/GetBuildingResponse.cs

@@ -1,8 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.Collections.Generic;
 
 namespace DeviceCenter.model
 {

+ 1 - 5
model/GetFloorResponse.cs

@@ -1,8 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.Collections.Generic;
 
 namespace DeviceCenter.model
 {

+ 1 - 2
utils/AcsUtil.cs

@@ -1,5 +1,4 @@
-using System;
-using System.Text.RegularExpressions;
+using System.Text.RegularExpressions;
 
 namespace DeviceCenter
 {

+ 0 - 4
utils/AppUtil.cs

@@ -1,9 +1,5 @@
 using Microsoft.Win32;
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 using System.Windows;
 
 namespace DeviceCenter

+ 2 - 9
utils/ConfigUtil.cs

@@ -1,14 +1,7 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Newtonsoft.Json;
-
-namespace DeviceCenter.utils
+namespace DeviceCenter.utils
 {
     class ConfigUtil
     {
-        
+
     }
 }

+ 1 - 4
utils/EnumItemsSource.cs

@@ -1,12 +1,9 @@
 using System;
 using System.Collections.Generic;
-using System.Collections.ObjectModel;
 using System.ComponentModel;
 using System.Globalization;
 using System.Linq;
 using System.Reflection;
-using System.Text;
-using System.Threading.Tasks;
 using System.Windows.Data;
 
 namespace DeviceCenter
@@ -43,7 +40,7 @@ namespace DeviceCenter
         }
 
         void Initialize()
-        { 
+        {
             this.valueToNameMap = this.type
               .GetFields(BindingFlags.Static | BindingFlags.Public)
               .ToDictionary(fi => fi.GetValue(null), GetDescription);

+ 0 - 3
utils/EnumerationExtension.cs

@@ -1,9 +1,6 @@
 using System;
-using System.Collections.Generic;
 using System.ComponentModel;
 using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 using System.Windows.Markup;
 
 namespace DeviceCenter.utils

+ 0 - 2
utils/PortUtil.cs

@@ -3,9 +3,7 @@ using System;
 using System.Collections.Generic;
 using System.IO.Ports;
 using System.Linq;
-using System.Text;
 using System.Text.RegularExpressions;
-using System.Threading.Tasks;
 
 namespace DeviceCenter
 {

+ 1 - 6
utils/ProcessUtil.cs

@@ -1,9 +1,4 @@
 using log4net;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 
 namespace DeviceCenter
 {
@@ -23,7 +18,7 @@ namespace DeviceCenter
             p.StartInfo.WorkingDirectory = System.AppDomain.CurrentDomain.BaseDirectory;
             p.Start();//启动程序
 
-            log.Info("run command: "+ cmd + "&exit");
+            log.Info("run command: " + cmd + "&exit");
             //向cmd窗口发送输入信息
             p.StandardInput.WriteLine(cmd + "&exit");
 

+ 0 - 4
utils/VehicleUtil.cs

@@ -1,11 +1,7 @@
 using log4net;
 using System;
-using System.Collections.Generic;
 using System.IO;
-using System.Linq;
 using System.Runtime.InteropServices;
-using System.Text;
-using System.Threading.Tasks;
 
 namespace DeviceCenter
 {

+ 0 - 5
utils/http.cs

@@ -4,12 +4,7 @@ using RestSharp;
 using RSG;
 using System;
 using System.Collections.Generic;
-using System.Linq;
 using System.Net;
-using System.Text;
-using System.Threading;
-using System.Threading.Tasks;
-using System.Windows.Input;
 
 namespace DeviceCenter.utils
 {

+ 1 - 13
views/ExitConfirm.xaml.cs

@@ -1,16 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Shapes;
+using System.Windows;
 
 namespace DeviceCenter.views
 {

+ 0 - 13
views/Login.xaml.cs

@@ -1,21 +1,8 @@
 using DeviceCenter.model;
 using DeviceCenter.utils;
-using RestSharp;
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Net;
-using System.Text;
-using System.Threading.Tasks;
 using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
 
 namespace DeviceCenter
 {

+ 0 - 1
views/MainWindow.xaml.cs

@@ -12,7 +12,6 @@ using System.IO;
 using System.Linq;
 using System.Runtime.InteropServices;
 using System.Text;
-using System.Threading;
 using System.Threading.Tasks;
 using System.Windows;
 using System.Windows.Interop;

+ 0 - 10
views/Splash.xaml.cs

@@ -1,17 +1,7 @@
 using Notifications.Wpf;
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using System.Threading.Tasks;
 using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Shapes;
 
 namespace DeviceCenter
 {