Merge branch 'dev-hxb' into Dev-Wxr-1.8.1
New file |
| | |
| | | Additions allow you to add arbitrary C# to the generated classes |
| | | before they are compiled. This can be helpful for providing convenience |
| | | methods or adding pure C# classes. |
| | | |
| | | == Adding Methods to Generated Classes == |
| | | |
| | | Let's say the library being bound has a Rectangle class with a constructor |
| | | that takes an x and y position, and a width and length size. It will look like |
| | | this: |
| | | |
| | | public partial class Rectangle |
| | | { |
| | | public Rectangle (int x, int y, int width, int height) |
| | | { |
| | | // JNI bindings |
| | | } |
| | | } |
| | | |
| | | Imagine we want to add a constructor to this class that takes a Point and |
| | | Size structure instead of 4 ints. We can add a new file called Rectangle.cs |
| | | with a partial class containing our new method: |
| | | |
| | | public partial class Rectangle |
| | | { |
| | | public Rectangle (Point location, Size size) : |
| | | this (location.X, location.Y, size.Width, size.Height) |
| | | { |
| | | } |
| | | } |
| | | |
| | | At compile time, the additions class will be added to the generated class |
| | | and the final assembly will a Rectangle class with both constructors. |
| | | |
| | | |
| | | == Adding C# Classes == |
| | | |
| | | Another thing that can be done is adding fully C# managed classes to the |
| | | generated library. In the above example, let's assume that there isn't a |
| | | Point class available in Java or our library. The one we create doesn't need |
| | | to interact with Java, so we'll create it like a normal class in C#. |
| | | |
| | | By adding a Point.cs file with this class, it will end up in the binding library: |
| | | |
| | | public class Point |
| | | { |
| | | public int X { get; set; } |
| | | public int Y { get; set; } |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | <PropertyGroup> |
| | | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
| | | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
| | | <ProductVersion>8.0.30703</ProductVersion> |
| | | <SchemaVersion>2.0</SchemaVersion> |
| | | <ProjectGuid>{3A0E9FF9-56B6-4323-9AE6-2B22975E399B}</ProjectGuid> |
| | | <ProjectTypeGuids>{10368E6C-D01B-4462-8E8B-01FC667A7035};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> |
| | | <TemplateGuid>{77efb91c-a7e9-4b0e-a7c5-31eeec3c6d46}</TemplateGuid> |
| | | <OutputType>Library</OutputType> |
| | | <AppDesignerFolder>Properties</AppDesignerFolder> |
| | | <RootNamespace>AliyuLog</RootNamespace> |
| | | <AssemblyName>AliyuLog</AssemblyName> |
| | | <FileAlignment>512</FileAlignment> |
| | | <Deterministic>True</Deterministic> |
| | | <TargetFrameworkVersion>v8.0</TargetFrameworkVersion> |
| | | <AndroidClassParser>class-parse</AndroidClassParser> |
| | | <AndroidCodegenTarget>XAJavaInterop1</AndroidCodegenTarget> |
| | | <RestoreProjectStyle>PackageReference</RestoreProjectStyle> |
| | | <JavaMaximumHeapSize></JavaMaximumHeapSize> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
| | | <DebugSymbols>true</DebugSymbols> |
| | | <DebugType>portable</DebugType> |
| | | <Optimize>false</Optimize> |
| | | <OutputPath>bin\Debug\</OutputPath> |
| | | <DefineConstants>DEBUG;TRACE</DefineConstants> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | | <AndroidHttpClientHandlerType></AndroidHttpClientHandlerType> |
| | | <JavaMaximumHeapSize></JavaMaximumHeapSize> |
| | | <AndroidHttpClientHandlerType></AndroidHttpClientHandlerType> |
| | | <JavaMaximumHeapSize></JavaMaximumHeapSize> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
| | | <DebugType>portable</DebugType> |
| | | <Optimize>true</Optimize> |
| | | <OutputPath>bin\Release\</OutputPath> |
| | | <DefineConstants>TRACE</DefineConstants> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | | </PropertyGroup> |
| | | <ItemGroup> |
| | | <Reference Include="Mono.Android" /> |
| | | <Reference Include="System" /> |
| | | <Reference Include="System.Core" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Compile Include="Properties\AssemblyInfo.cs" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <None Include="Jars\AboutJars.txt" /> |
| | | <None Include="Additions\AboutAdditions.txt" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <TransformFile Include="Transforms\Metadata.xml" /> |
| | | <TransformFile Include="Transforms\EnumFields.xml" /> |
| | | <TransformFile Include="Transforms\EnumMethods.xml" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <LibraryProjectZip Include="Jars\aliyun-log-android-sdk-2.6.2.aar" /> |
| | | </ItemGroup> |
| | | <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.Bindings.targets" /> |
| | | <!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
| | | Other similar extension points exist, see Microsoft.Common.targets. |
| | | <Target Name="BeforeBuild"> |
| | | </Target> |
| | | <Target Name="AfterBuild"> |
| | | </Target> |
| | | --> |
| | | </Project> |
New file |
| | |
| | | This directory is for Android .jars. |
| | | |
| | | There are 2 types of jars that are supported: |
| | | |
| | | == Input Jar == |
| | | |
| | | This is the jar that bindings should be generated for. |
| | | |
| | | For example, if you were binding the Google Maps library, this would |
| | | be Google's "maps.jar". |
| | | |
| | | Set the build action for these jars in the properties page to "InputJar". |
| | | |
| | | |
| | | == Reference Jars == |
| | | |
| | | These are jars that are referenced by the input jar. C# bindings will |
| | | not be created for these jars. These jars will be used to resolve |
| | | types used by the input jar. |
| | | |
| | | NOTE: Do not add "android.jar" as a reference jar. It will be added automatically |
| | | based on the Target Framework selected. |
| | | |
| | | Set the build action for these jars in the properties page to "ReferenceJar". |
New file |
| | |
| | | using System.Reflection; |
| | | using System.Runtime.CompilerServices; |
| | | using System.Runtime.InteropServices; |
| | | using Android.App; |
| | | |
| | | // General Information about an assembly is controlled through the following |
| | | // set of attributes. Change these attribute values to modify the information |
| | | // associated with an assembly. |
| | | [assembly: AssemblyTitle("AliyuLog")] |
| | | [assembly: AssemblyDescription("")] |
| | | [assembly: AssemblyConfiguration("")] |
| | | [assembly: AssemblyCompany("")] |
| | | [assembly: AssemblyProduct("AliyuLog")] |
| | | [assembly: AssemblyCopyright("Copyright © 2018")] |
| | | [assembly: AssemblyTrademark("")] |
| | | [assembly: AssemblyCulture("")] |
| | | [assembly: ComVisible(false)] |
| | | |
| | | // Version information for an assembly consists of the following four values: |
| | | // |
| | | // Major Version |
| | | // Minor Version |
| | | // Build Number |
| | | // Revision |
| | | [assembly: AssemblyVersion("1.0.0.0")] |
| | | [assembly: AssemblyFileVersion("1.0.0.0")] |
New file |
| | |
| | | <enum-field-mappings> |
| | | <!-- |
| | | This example converts the constants Fragment_id, Fragment_name, |
| | | and Fragment_tag from android.support.v4.app.FragmentActivity.FragmentTag |
| | | to an enum called Android.Support.V4.App.FragmentTagType with values |
| | | Id, Name, and Tag. |
| | | |
| | | <mapping jni-class="android/support/v4/app/FragmentActivity$FragmentTag" clr-enum-type="Android.Support.V4.App.FragmentTagType"> |
| | | <field jni-name="Fragment_name" clr-name="Name" value="0" /> |
| | | <field jni-name="Fragment_id" clr-name="Id" value="1" /> |
| | | <field jni-name="Fragment_tag" clr-name="Tag" value="2" /> |
| | | </mapping> |
| | | --> |
| | | </enum-field-mappings> |
New file |
| | |
| | | <enum-method-mappings> |
| | | <!-- |
| | | This example changes the Java method: |
| | | android.support.v4.app.Fragment.SavedState.writeToParcel (int flags) |
| | | to be: |
| | | android.support.v4.app.Fragment.SavedState.writeToParcel (Android.OS.ParcelableWriteFlags flags) |
| | | when bound in C#. |
| | | |
| | | <mapping jni-class="android/support/v4/app/Fragment.SavedState"> |
| | | <method jni-name="writeToParcel" parameter="flags" clr-enum-type="Android.OS.ParcelableWriteFlags" /> |
| | | </mapping> |
| | | --> |
| | | </enum-method-mappings> |
New file |
| | |
| | | <metadata> |
| | | <!-- |
| | | This sample removes the class: android.support.v4.content.AsyncTaskLoader.LoadTask: |
| | | <remove-node path="/api/package[@name='android.support.v4.content']/class[@name='AsyncTaskLoader.LoadTask']" /> |
| | | |
| | | This sample removes the method: android.support.v4.content.CursorLoader.loadInBackground: |
| | | <remove-node path="/api/package[@name='android.support.v4.content']/class[@name='CursorLoader']/method[@name='loadInBackground']" /> |
| | | --> |
| | | </metadata> |
New file |
| | |
| | | using System; |
| | | using Android.Content; |
| | | using Com.Aliyun.Sls.Android.Producer; |
| | | using Java.IO; |
| | | |
| | | namespace HDL_ON_Android.Aliyu |
| | | { |
| | | public class AliyuLogProducerClient : Java.Lang.Object, ILogProducerCallback |
| | | { |
| | | private static string TAG = "ProducerClient"; |
| | | LogProducerClient client = null; |
| | | private Context context; |
| | | protected string endpoint; |
| | | protected string logProject; |
| | | protected string logStore; |
| | | protected string accessKeyId; |
| | | protected string accessKeySecret; |
| | | protected string accessKeyToken; |
| | | protected string pluginAppId; |
| | | |
| | | public AliyuLogProducerClient(Context context, string endpoint, string logProject, string logStore, string accessKeyId, string accessKeySecret, string accessKeyToken, string pluginAppId) |
| | | { |
| | | this.context = context; |
| | | this.endpoint = endpoint; |
| | | this.logProject = logProject; |
| | | this.logStore = logStore; |
| | | this.accessKeyId = accessKeyId; |
| | | this.accessKeySecret = accessKeySecret; |
| | | this.accessKeyToken = accessKeyToken; |
| | | this.pluginAppId = pluginAppId; |
| | | } |
| | | |
| | | |
| | | public void initProducer() |
| | | { |
| | | try |
| | | { |
| | | // endpoint 必须是以 https:// 或 http:// 开头的链接 |
| | | string endpoint = this.endpoint; |
| | | string project = this.logProject; |
| | | string logstore = this.logStore; |
| | | string accessKeyId = this.accessKeyId; |
| | | string accessKeySecret = this.accessKeySecret; |
| | | string accessKeyToken = this.accessKeyToken; |
| | | |
| | | LogProducerConfig config = new LogProducerConfig(context, endpoint, project, logstore, accessKeyId, accessKeySecret, accessKeyToken); |
| | | // 设置主题 |
| | | config.SetTopic("test_topic"); |
| | | // 设置tag信息,此tag会附加在每条日志上 |
| | | config.AddTag("test", "test_tag"); |
| | | // 每个缓存的日志包的大小上限,取值为1~5242880,单位为字节。默认为1024 * 1024 |
| | | config.SetPacketLogBytes(1024 * 1024); |
| | | // 每个缓存的日志包中包含日志数量的最大值,取值为1~4096,默认为1024 |
| | | config.SetPacketLogCount(1024); |
| | | // 被缓存日志的发送超时时间,如果缓存超时,则会被立即发送,单位为毫秒,默认为3000 |
| | | config.SetPacketTimeout(3000); |
| | | // 单个Producer Client实例可以使用的内存的上限,超出缓存时add_log接口会立即返回失败 |
| | | // 默认为64 * 1024 * 1024 |
| | | config.SetMaxBufferLimit(64 * 1024 * 1024); |
| | | // 发送线程数,默认为1 |
| | | config.SetSendThreadCount(1); |
| | | |
| | | //网络连接超时时间,整数,单位秒,默认为10 |
| | | config.SetConnectTimeoutSec(10); |
| | | //日志发送超时时间,整数,单位秒,默认为15 |
| | | config.SetSendTimeoutSec(10); |
| | | //flusher线程销毁最大等待时间,整数,单位秒,默认为1 |
| | | config.SetDestroyFlusherWaitSec(2); |
| | | //sender线程池销毁最大等待时间,整数,单位秒,默认为1 |
| | | config.SetDestroySenderWaitSec(2); |
| | | //数据上传时的压缩类型,默认为LZ4压缩,0 不压缩,1 LZ4压缩,默认为1 |
| | | config.SetCompressType(1); |
| | | //设备时间与标准时间之差,值为标准时间-设备时间,一般此种情况用户客户端设备时间不同步的场景 |
| | | //整数,单位秒,默认为0;比如当前设备时间为1607064208, 标准时间为1607064308,则值设置为 1607064308 - 1607064208 = 10 |
| | | config.SetNtpTimeOffset(3); |
| | | //日志时间与本机时间之差,超过该大小后会根据 `drop_delay_log` 选项进行处理。 |
| | | //一般此种情况只会在设置persistent的情况下出现,即设备下线后,超过几天/数月启动,发送退出前未发出的日志 |
| | | //整数,单位秒,默认为7*24*3600,即7天 |
| | | config.SetMaxLogDelayTime(7 * 24 * 3600); |
| | | //对于超过 `max_log_delay_time` 日志的处理策略 |
| | | //0 不丢弃,把日志时间修改为当前时间; 1 丢弃,默认为 1 (丢弃) |
| | | config.SetDropDelayLog(0); |
| | | //是否丢弃鉴权失败的日志,0 不丢弃,1丢弃 |
| | | //默认为 0,即不丢弃 |
| | | config.SetDropUnauthorizedLog(0); |
| | | // 是否使用主线程回调 |
| | | // false: 使用主线程回调。回调会在主线程上执行,且每个 client 都有自己单独的回调。 |
| | | // true: 使用 sender 线程回调。回调会在 sender 现呈上执行,每次执行回调时都会 attach 一个新的 java 线程,所有 client 共用一个回调。 |
| | | // 注意:默认使用 sender 线程回调。 |
| | | config.SetCallbackFromSenderThread(false); |
| | | |
| | | /** |
| | | * 以下为开启断点续传的配置, 按照如下配置开启断点续传功能后, 日志会先缓存到本地 |
| | | */ |
| | | // 1 开启断点续传功能, 0 关闭 |
| | | // 每次发送前会把日志保存到本地的binlog文件,只有发送成功才会删除,保证日志上传At Least Once |
| | | config.SetPersistent(1); |
| | | // 持久化的文件名,需要保证文件所在的文件夹已创建。 |
| | | // !!!!!!!!!!!!!!!!!!!注意!!!!!!!!!!!!!!!!!!! |
| | | // 配置多个客户端时,不应设置相同文件 |
| | | config.SetPersistentFilePath(context.FilesDir + string.Format("%slog_data.dat", File.Separator)); |
| | | // 是否每次AddLog强制刷新,高可靠性场景建议打开 |
| | | config.SetPersistentForceFlush(0); |
| | | // 持久化文件滚动个数,建议设置成10。 |
| | | config.SetPersistentMaxFileCount(10); |
| | | // 每个持久化文件的大小,建议设置成1-10M |
| | | config.SetPersistentMaxFileSize(1024 * 1024); |
| | | // 本地最多缓存的日志数,不建议超过1M,通常设置为65536即可 |
| | | config.SetPersistentMaxLogCount(65536); |
| | | |
| | | client = new LogProducerClient(config, this); |
| | | } |
| | | catch (LogProducerException e) |
| | | { |
| | | |
| | | } |
| | | |
| | | } |
| | | public void sendLog(Log log) |
| | | { |
| | | LogProducerResult result = client.AddLog(log); |
| | | } |
| | | //callback为可选配置, 如果不需要关注日志的发送成功或失败状态, 可以不注册 callback |
| | | public void OnCall(int resultCode, string reqId, string errorMessage, int logBytes, int compressedBytes) |
| | | { |
| | | // // resultCode: 状态码, 详见 LogProducerResult |
| | | // // reqId: 请求Id, 已经废弃 |
| | | // // errorMessage: 失败信息 |
| | | // // logBytes: 日志原始字节数 |
| | | // // compressedBytes: 日志压缩字节数 |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using Android.Content; |
| | | using Com.Aliyun.Sls.Android.Producer; |
| | | |
| | | namespace HDL_ON_Android.Aliyu |
| | | { |
| | | public class AliyuLogUtil |
| | | { |
| | | private static AliyuLogProducerClient exceptionProducerClient; |
| | | private static LogBean logBean; |
| | | |
| | | private static AliyuLogProducerClient getExceptionProducerClient() |
| | | { |
| | | lock (exceptionProducerClient) |
| | | { |
| | | if (exceptionProducerClient == null) |
| | | { |
| | | if (Shared.Application.Activity == null) { |
| | | return null; |
| | | } |
| | | exceptionProducerClient = new AliyuLogProducerClient(Shared.Application.Activity, "https://cn-hangzhou.log.aliyuncs.com", "log", "event_tracking", "LTAI5tLzDxrtsFyi3xtK3YWt", "eX31JZrRAvC2wZWPiZU0SYhlfAUMoT", null, null); |
| | | exceptionProducerClient.initProducer(); |
| | | } |
| | | return exceptionProducerClient; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 异常日志 |
| | | * |
| | | * @param title 标题 |
| | | * @param content 附加数据内容 |
| | | * @param level 报警等级 |
| | | */ |
| | | public static void log(string title, string content, Level level) |
| | | { |
| | | log(title, content, level, null); |
| | | } |
| | | /** |
| | | * 异常日志 |
| | | * |
| | | * @param title 标题 |
| | | * @param content 附加数据内容 |
| | | * @param otherMsg 其他附加数据,没有可为空 |
| | | * @param level 报警等级 |
| | | * @param type 异常类型 |
| | | */ |
| | | public static void log(string title, string content, Level level, string type) |
| | | { |
| | | log(title, content, level, null, null); |
| | | } |
| | | /** |
| | | * 异常日志 |
| | | * |
| | | * @param title 标题 |
| | | * @param content 附加数据内容 |
| | | * @param otherMsg 其他附加数据,没有可为空 |
| | | * @param level 报警等级 |
| | | * @param type 异常类型 |
| | | * @param exceptionBlock 异常代码块 |
| | | */ |
| | | public static void log(string title, string content, Level level, string type, string exceptionBlock) |
| | | { |
| | | /** |
| | | * 没有homeId和userId 不允许上传 只上传住宅里面的异常 减少云端压力 |
| | | * 1.点击项目的时候设置 |
| | | * 2.关闭住宅页面的时候去掉 |
| | | */ |
| | | if (string.IsNullOrEmpty(getLogBean.getUserId()) || string.IsNullOrEmpty(getLogBean.getHomeId())) |
| | | { |
| | | return; |
| | | } |
| | | Log log = new Log(); |
| | | log.PutContent("title", title); |
| | | log.PutContent("content", content); |
| | | log.PutContent("level", level.ToString()); |
| | | log.PutContent("userId", getLogBean.getUserId()); |
| | | log.PutContent("homeId", getLogBean.getHomeId()); |
| | | log.PutContent("time", System.DateTime.UtcNow + ""); |
| | | log.PutContent("userAgent", getLogBean.getUserAgent()); |
| | | log.PutContent("appVersion", getLogBean.getAppVersion()); |
| | | log.PutContent("type", type); |
| | | log.PutContent("exceptionBlock", exceptionBlock); |
| | | |
| | | var producerClient = getExceptionProducerClient(); |
| | | if (producerClient == null) |
| | | { |
| | | return; |
| | | } |
| | | producerClient.sendLog(log); |
| | | |
| | | } |
| | | |
| | | public static LogBean getLogBean |
| | | { |
| | | get { |
| | | if (logBean == null) { |
| | | logBean = new LogBean(); |
| | | } |
| | | return logBean; |
| | | } |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | namespace HDL_ON_Android.Aliyu |
| | | { |
| | | public enum Level |
| | | { |
| | | high,//高 |
| | | middle,//中 |
| | | low//低 |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | namespace HDL_ON_Android.Aliyu |
| | | { |
| | | public class LogBean |
| | | { |
| | | /** |
| | | * 用户id,非必填 |
| | | */ |
| | | private string userId; |
| | | /** |
| | | * 住宅id,非必填 |
| | | */ |
| | | private string homeId; |
| | | /** |
| | | * 网关mac,非必填 |
| | | */ |
| | | private string mac; |
| | | /** |
| | | * 系统:IOS、Android、Windows、网关 |
| | | */ |
| | | private string userAgent; |
| | | /** |
| | | * 软件版本 |
| | | */ |
| | | private string appVersion; |
| | | |
| | | public string getUserId() |
| | | { |
| | | return userId == null ? "" : userId; |
| | | } |
| | | |
| | | |
| | | public string getHomeId() |
| | | { |
| | | return homeId == null ? "" : homeId; |
| | | } |
| | | |
| | | public void setUserId(string userId) |
| | | { |
| | | this.userId = userId; |
| | | } |
| | | |
| | | public void setHomeId(string homeId) |
| | | { |
| | | this.homeId = homeId; |
| | | } |
| | | public string getMac() |
| | | { |
| | | return mac; |
| | | } |
| | | |
| | | public void setMac(string mac) |
| | | { |
| | | this.mac = mac; |
| | | } |
| | | |
| | | public string getUserAgent() |
| | | { |
| | | return userAgent; |
| | | } |
| | | |
| | | public void setUserAgent(string userAgent) |
| | | { |
| | | this.userAgent = userAgent; |
| | | } |
| | | |
| | | public string getAppVersion() |
| | | { |
| | | return appVersion; |
| | | } |
| | | |
| | | public void setAppVersion(string appVersion) |
| | | { |
| | | this.appVersion = appVersion; |
| | | } |
| | | } |
| | | } |
| | |
| | | <Compile Include="Zxing\ScanActivity.cs" /> |
| | | <Compile Include="LeChengVideo\LeTest.cs" /> |
| | | <Compile Include="Other\LocationUtils.cs" /> |
| | | <Compile Include="Aliyu\AliyuLogUtil.cs" /> |
| | | <Compile Include="Aliyu\AliyuLogProducerClient.cs" /> |
| | | <Compile Include="Aliyu\LogBean.cs" /> |
| | | <Compile Include="Aliyu\Level.cs" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <AndroidAsset Include="Assets\agconnect-services.json" /> |
| | |
| | | <Folder Include="Assets\Phone\FunctionIcon\Panel\" /> |
| | | <Folder Include="Assets\Phone\FunctionIcon\Inverter\" /> |
| | | <Folder Include="Assets\Phone\FunctionIcon\Electrical\MechanicalArm\" /> |
| | | <Folder Include="Aliyu\" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\AliyuLog\AliyuLog.csproj"> |
| | | <Project>{3A0E9FF9-56B6-4323-9AE6-2B22975E399B}</Project> |
| | | <Name>AliyuLog</Name> |
| | | </ProjectReference> |
| | | </ItemGroup> |
| | | <Import Project="..\HDL_ON\HDL_ON.projitems" Label="Shared" Condition="Exists('..\HDL_ON\HDL_ON.projitems')" /> |
| | | <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" /> |
| | |
| | | EndProject
|
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UMSdk", "UMSdk\UMSdk.csproj", "{5CD1B2DE-1ABD-4B46-8C97-CCB6EA90346A}"
|
| | | EndProject
|
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AliyuLog", "AliyuLog\AliyuLog.csproj", "{3A0E9FF9-56B6-4323-9AE6-2B22975E399B}"
|
| | | EndProject
|
| | | Global
|
| | | GlobalSection(SharedMSBuildProjectFiles) = preSolution
|
| | | HDL_ON\HDL_ON.projitems*{09712674-2a38-407b-b1e2-560b2c352f9a}*SharedItemsImports = 4
|
| | |
| | | {5CD1B2DE-1ABD-4B46-8C97-CCB6EA90346A}.Release|iPhone.Build.0 = Release|Any CPU
|
| | | {5CD1B2DE-1ABD-4B46-8C97-CCB6EA90346A}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
| | | {5CD1B2DE-1ABD-4B46-8C97-CCB6EA90346A}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
| | | {3A0E9FF9-56B6-4323-9AE6-2B22975E399B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
| | | {3A0E9FF9-56B6-4323-9AE6-2B22975E399B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
| | | {3A0E9FF9-56B6-4323-9AE6-2B22975E399B}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
| | | {3A0E9FF9-56B6-4323-9AE6-2B22975E399B}.Debug|iPhone.Build.0 = Debug|Any CPU
|
| | | {3A0E9FF9-56B6-4323-9AE6-2B22975E399B}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
| | | {3A0E9FF9-56B6-4323-9AE6-2B22975E399B}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
| | | {3A0E9FF9-56B6-4323-9AE6-2B22975E399B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
| | | {3A0E9FF9-56B6-4323-9AE6-2B22975E399B}.Release|Any CPU.Build.0 = Release|Any CPU
|
| | | {3A0E9FF9-56B6-4323-9AE6-2B22975E399B}.Release|iPhone.ActiveCfg = Release|Any CPU
|
| | | {3A0E9FF9-56B6-4323-9AE6-2B22975E399B}.Release|iPhone.Build.0 = Release|Any CPU
|
| | | {3A0E9FF9-56B6-4323-9AE6-2B22975E399B}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
| | | {3A0E9FF9-56B6-4323-9AE6-2B22975E399B}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
| | | EndGlobalSection
|
| | | GlobalSection(SolutionProperties) = preSolution
|
| | | HideSolutionNode = FALSE
|
| | |
| | | /// 固定域名,正式环境 |
| | | /// 公共域名就近解析 |
| | | /// </summary> |
| | | //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; |
| | | public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; |
| | | const string APP_KEY = "HDL-HOME-APP-TEST"; |
| | | const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss"; |
| | | //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm |
| | |
| | | } |
| | | }; |
| | | BaseActivity.ShowKeyboardEvent = () => { |
| | | if(this.Y != 0) |
| | | { |
| | | return; |
| | | } |
| | | try |
| | | { |
| | | if (etPassword.Foucs) |
| | | { |
| | | |
| | | new Thread(() => |
| | | { |
| | | Thread.Sleep(100); |
| | | if (this.Y < 0) |
| | | { |
| | | return; |
| | | } |
| | | for (var i = 0; i < 10; i++) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | |
| | | waitPage.RemoveFromParent(); |
| | | waitPage = null; |
| | | } |
| | | Application.HideSoftInput(); |
| | | |
| | | #if __ANDROID__ |
| | | BaseActivity.HideKeyboardEvent = () => { |
| | |
| | | OnAppConfig.Instance.isAgreePrivacyPolicy = true; |
| | | #endif |
| | | this.BackgroundColor = CSS_Color.MainBackgroundColor; |
| | | |
| | | var btnIcon = new Button() |
| | | { |
| | | X = Application.GetRealWidth(28), |
| | |
| | | //etAccount.Text = "13751916353"; |
| | | etAccount.Text = "13549566666"; |
| | | etAccount.Text = "18316672920"; |
| | | etAccount.Text = "13375012446";//测试服务器 |
| | | etAccount.Text = "support7@hdlautomation.com"; |
| | | etAccount.Text = "13375012446";//测试服务器 |
| | | } |
| | | else |
| | | { |
| | |
| | | new FunctionAttributes() { key = "on_off",value =new List<string>(){ "on","off" }, curValue="on",state = "on" }, |
| | | new FunctionAttributes() { key = "brightness",value =new List<string>(){ "0","100" }, curValue="100",state = "100" }, |
| | | new FunctionAttributes() { key = "rgb",value =new List<string>(){ "0","100" }, curValue="0,0,0",state = "0,0,0" }, |
| | | new FunctionAttributes() { key = "fade_time",value =new List<string>(){ "0","100" }, curValue="0",state = "0" }, |
| | | //new FunctionAttributes() { key = "fade_time",value =new List<string>(){ "0","100" }, curValue="0",state = "0" }, |
| | | new FunctionAttributes() { key = "delay",value =new List<string>(){ "0","100" }, curValue="0",state = "0" }, |
| | | //new FunctionAttributes() { key = "colorful",value =new List<string>(){ "on","off" }, curValue="on",state = "on" }, |
| | | //new FunctionAttributes() { key = "colorful_begin",value =new List<string>(){ "0","100" }, curValue="0,0,0",state = "0,0,0" }, |
| | | //new FunctionAttributes() { key = "colorful_end",value =new List<string>(){ "0","100" }, curValue="0,0,0",state = "0,0,0" }, |
| | | //new FunctionAttributes() { key = "colorful_time",value =new List<string>(){ "0","100" }, curValue="0",state = "0" }, |
| | | |
| | | }, |
| | | }; |
| | | lightRgb1.SaveFunctionFile(); |
| | |
| | | {
|
| | | barFadeTime.OnStopTrackingTouchEvent = (sender, e) =>
|
| | | {
|
| | | function.SetAttrState(FunctionAttributeKey.FadeTime, e.ToString());
|
| | | function.SetAttrState(FunctionAttributeKey.FadeTime, e.ToString()); |
| | | var d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.FadeTime, e.ToString()); |
| | | Control.Ins.SendWriteCommand(function, d); |
| | | function.SaveFunctionFile();
|
| | | };
|
| | | }
|
| | |
| | | barFadeTime.OnStopTrackingTouchEvent = (sender, e) => |
| | | { |
| | | function.SetAttrState(FunctionAttributeKey.FadeTime, e.ToString()); |
| | | var d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.FadeTime, e.ToString()); |
| | | Control.Ins.SendWriteCommand(function, d); |
| | | function.SaveFunctionFile(); |
| | | }; |
| | | } |
| | |
| | | barFadeTime.OnStopTrackingTouchEvent = (sender, e) => |
| | | { |
| | | function.SetAttrState(FunctionAttributeKey.FadeTime, e.ToString()); |
| | | var d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.FadeTime, e.ToString()); |
| | | Control.Ins.SendWriteCommand(function, d); |
| | | function.SaveFunctionFile(); |
| | | }; |
| | | } |
| | |
| | | barFadeTime.OnStopTrackingTouchEvent = (sender, e) => |
| | | { |
| | | function.SetAttrState(FunctionAttributeKey.FadeTime, e.ToString()); |
| | | var d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.FadeTime, e.ToString()); |
| | | Control.Ins.SendWriteCommand(function, d); |
| | | function.SaveFunctionFile(); |
| | | }; |
| | | } |
| | |
| | | /// 固定域名,正式环境 |
| | | /// 公共域名就近解析 |
| | | /// </summary> |
| | | //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; |
| | | public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; |
| | | const string APP_KEY = "HDL-HOME-APP-TEST"; |
| | | const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss"; |
| | | //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm |