2个文件已添加
56个文件已修改
2 文件已重命名
| | |
| | | 16058=我的家 |
| | | 16059=长按“我的家”{0}可切换我的住宅 |
| | | 16060=办公室 |
| | | 16061=电机数据异常,请重置电机 |
| | | 16061=电机数据异常,确认已经安装导轨后,请重置电机 |
| | | 16062=获取空调摆风状态失败 |
| | | 16063=设置空调摆风失败 |
| | | 16064=按住此按键 |
| | |
| | | private RelativeLayout rlUnlock; |
| | | private ImageView imgUnlock; |
| | | private TextView tvUnlock; |
| | | private System.Threading.Thread thread = null; |
| | | |
| | | public MonitorFragment(VideoPhone phone) |
| | | { |
| | |
| | | |
| | | //更新开锁按钮状态 |
| | | private void updataUnlockState() |
| | | { |
| | | //开锁成功,15秒内不给再点击按钮 |
| | | rlUnlock.Enabled = false; |
| | | imgUnlock.SetImageResource(Resource.Drawable.unlock_disable); |
| | | tvUnlock.SetTextColor(new Color(Activity.GetColor(Resource.Color.color_disable))); |
| | | |
| | | new System.Threading.Thread(() => |
| | | { |
| | | System.Threading.Thread.Sleep(15 * 1000); |
| | | Activity.RunOnUiThread(() => |
| | | { |
| | | rlUnlock.Enabled = true; |
| | | imgUnlock.SetImageResource(Resource.Drawable.unlock); |
| | | tvUnlock.SetTextColor(new Color(Activity.GetColor(Resource.Color.text_color))); |
| | | }); |
| | | }).Start(); |
| | | {
|
| | | try
|
| | | {
|
| | | //开锁成功,15秒内不给再点击按钮
|
| | | rlUnlock.Enabled = false;
|
| | | imgUnlock.SetImageResource(Resource.Drawable.unlock_disable);
|
| | | tvUnlock.SetTextColor(new Color(Activity.GetColor(Resource.Color.color_disable)));
|
| | | if (thread != null)
|
| | | {
|
| | | try
|
| | | {
|
| | | thread.Interrupt();
|
| | | }
|
| | | catch { }
|
| | | thread = null;
|
| | | }
|
| | | thread = new System.Threading.Thread(() =>
|
| | | {
|
| | | try
|
| | | {
|
| | | System.Threading.Thread.Sleep(15 * 1000);
|
| | | Activity.RunOnUiThread(() =>
|
| | | {
|
| | | try
|
| | | {
|
| | | rlUnlock.Enabled = true;
|
| | | imgUnlock.SetImageResource(Resource.Drawable.unlock);
|
| | | tvUnlock.SetTextColor(new Color(Activity.GetColor(Resource.Color.text_color)));
|
| | | }
|
| | | catch { }
|
| | | });
|
| | | }
|
| | | catch { }
|
| | | });
|
| | |
|
| | | thread.Start();
|
| | | }
|
| | | catch { } |
| | | } |
| | | |
| | | public void OnClick(View v) |
| | |
| | | // |
| | | if (v.Equals(rlUnlock)) |
| | | { |
| | | unlock(); |
| | | if (mPhone != null) |
| | | unlock(); |
| | | } |
| | | else if (v.Equals(rlScreenshot)) |
| | | { |
| | |
| | | string error = e.Message; |
| | | } |
| | | } |
| | | |
| | | public override void OnDestroy()
|
| | | {
|
| | | base.OnDestroy();
|
| | |
|
| | | if (thread != null)
|
| | | { |
| | | try
|
| | | {
|
| | | thread.Interrupt();
|
| | | }
|
| | | catch { } |
| | | thread = null; |
| | | }
|
| | | } |
| | | } |
| | | } |
| | |
| | | mView = inflater.Inflate(Resource.Layout.fragment_call, container, false); |
| | | |
| | | IniView(); |
| | | |
| | | ReverseCall(param); |
| | | return mView; |
| | | } |
| | | |
| | |
| | | { |
| | | if (v.Equals(rlCall)) |
| | | { |
| | | //TimeStarts(); |
| | | ReverseCall(param); |
| | | //接收来电 |
| | | if (mPhone != null) |
| | | { |
| | | if (mPhone.IsRinging) |
| | | { |
| | | string UserData = "user text"; |
| | | //注意:RequestAudio 请求对方音频,RequestVideo请求对方视频 SendAudio发送本地音频 SendVideo 发送本地视频 一般门口不接收到视频,所以最好设置0,减少流量消耗 |
| | | string param = string.Format("RequestAudio=1\r\n" + "RequestVideo=1\r\n" + "SendAudio=1\r\n" + "SendVideo=1r\n" + "UserData=%s\r\n", UserData); |
| | | mPhone.AcceptRing(param); |
| | | } |
| | | } |
| | | rlCall.Visibility = ViewStates.Gone; |
| | | } |
| | | else if (v.Equals(rlHangup)) |
| | |
| | | |
| | | namespace GateWay.Droid.FengLinVideo.widget |
| | | { |
| | | public class TipDiaglog : Dialog,View.IOnClickListener,View.IOnTouchListener |
| | | public class TipDiaglog : Dialog, View.IOnClickListener, View.IOnTouchListener |
| | | { |
| | | private Context mContext = null; |
| | | |
| | | private string titleText = "提示"; |
| | | private string contentText = ""; |
| | | private string confirmText = "确认"; |
| | | private bool isClose = false; |
| | | |
| | | private TextView contentView = null; |
| | | private TextView titleView = null; |
| | | private TextView okView = null; |
| | | |
| | | public object Tag = null; |
| | | private OnConfirmClickListener onConfirmClickListener; |
| | | |
| | | public TipDiaglog(Context context) : base(context, Resource.Style.DialogTheme) |
| | | { |
| | | this.mContext = context; |
| | | } |
| | | |
| | | public void SetAutoClose(bool bol)
|
| | | { |
| | | this.isClose = bol; |
| | | } |
| | | |
| | | public void SetTitleText(string _titleText) |
| | |
| | | if (v.Equals(okView)) |
| | | { |
| | | if (onConfirmClickListener != null) |
| | | onConfirmClickListener.onSureClick(this, v); |
| | | onConfirmClickListener.onSureClick(this, v, isClose); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | public interface OnConfirmClickListener |
| | | { |
| | | void onSureClick(TipDiaglog dialoog, View v); |
| | | void onSureClick(TipDiaglog dialoog, View v,bool bol); |
| | | } |
| | | |
| | | } |
| | |
| | | <AndroidTlsProvider>btls</AndroidTlsProvider>
|
| | | <AndroidEnableSGenConcurrent>true</AndroidEnableSGenConcurrent>
|
| | | <EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
|
| | | <AndroidSupportedAbis />
|
| | | <AndroidDexTool>d8</AndroidDexTool>
|
| | | <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
|
| | | </PropertyGroup>
|
| | |
| | | <AndroidResource Include="Resources\values\Strings.xml" />
|
| | | <AndroidResource Include="Resources\values\Styles.xml" />
|
| | | <AndroidResource Include="Resources\layout\activity_video_phone.xml">
|
| | | <SubType></SubType>
|
| | | <Generator></Generator>
|
| | | <SubType>
|
| | | </SubType>
|
| | | <Generator>
|
| | | </Generator>
|
| | | </AndroidResource>
|
| | | <AndroidResource Include="Resources\layout\dialog_tip.xml">
|
| | | <SubType></SubType>
|
| | | <Generator></Generator>
|
| | | <SubType>
|
| | | </SubType>
|
| | | <Generator>
|
| | | </Generator>
|
| | | </AndroidResource>
|
| | | <AndroidResource Include="Resources\layout\fragment_call.axml">
|
| | | <SubType></SubType>
|
| | | <Generator></Generator>
|
| | | <SubType>
|
| | | </SubType>
|
| | | <Generator>
|
| | | </Generator>
|
| | | </AndroidResource>
|
| | | <AndroidResource Include="Resources\layout\fragment_monitor.xml">
|
| | | <SubType></SubType>
|
| | | <Generator></Generator>
|
| | | <SubType>
|
| | | </SubType>
|
| | | <Generator>
|
| | | </Generator>
|
| | | </AndroidResource>
|
| | | <AndroidResource Include="Resources\drawable\back.png">
|
| | | <SubType></SubType>
|
| | | <Generator></Generator>
|
| | | <SubType>
|
| | | </SubType>
|
| | | <Generator>
|
| | | </Generator>
|
| | | </AndroidResource>
|
| | | <AndroidResource Include="Resources\drawable\call.png">
|
| | | <SubType></SubType>
|
| | | <Generator></Generator>
|
| | | <SubType>
|
| | | </SubType>
|
| | | <Generator>
|
| | | </Generator>
|
| | | </AndroidResource>
|
| | | <AndroidResource Include="Resources\drawable\dialog_background.xml">
|
| | | <SubType></SubType>
|
| | | <Generator></Generator>
|
| | | <SubType>
|
| | | </SubType>
|
| | | <Generator>
|
| | | </Generator>
|
| | | </AndroidResource>
|
| | | <AndroidResource Include="Resources\drawable\floor.png">
|
| | | <SubType></SubType>
|
| | | <Generator></Generator>
|
| | | <SubType>
|
| | | </SubType>
|
| | | <Generator>
|
| | | </Generator>
|
| | | </AndroidResource>
|
| | | <AndroidResource Include="Resources\drawable\hangup.png">
|
| | | <SubType></SubType>
|
| | | <Generator></Generator>
|
| | | <SubType>
|
| | | </SubType>
|
| | | <Generator>
|
| | | </Generator>
|
| | | </AndroidResource>
|
| | | <AndroidResource Include="Resources\drawable\screenshot_def.png">
|
| | | <SubType></SubType>
|
| | | <Generator></Generator>
|
| | | <SubType>
|
| | | </SubType>
|
| | | <Generator>
|
| | | </Generator>
|
| | | </AndroidResource>
|
| | | <AndroidResource Include="Resources\drawable\screenshot_sel.png">
|
| | | <SubType></SubType>
|
| | | <Generator></Generator>
|
| | | <SubType>
|
| | | </SubType>
|
| | | <Generator>
|
| | | </Generator>
|
| | | </AndroidResource>
|
| | | <AndroidResource Include="Resources\drawable\screenshot.xml">
|
| | | <SubType></SubType>
|
| | | <Generator></Generator>
|
| | | <SubType>
|
| | | </SubType>
|
| | | <Generator>
|
| | | </Generator>
|
| | | </AndroidResource>
|
| | | <AndroidResource Include="Resources\drawable\sure_background_def.xml">
|
| | | <SubType></SubType>
|
| | | <Generator></Generator>
|
| | | <SubType>
|
| | | </SubType>
|
| | | <Generator>
|
| | | </Generator>
|
| | | </AndroidResource>
|
| | | <AndroidResource Include="Resources\drawable\sure_background_sel.xml">
|
| | | <SubType></SubType>
|
| | | <Generator></Generator>
|
| | | <SubType>
|
| | | </SubType>
|
| | | <Generator>
|
| | | </Generator>
|
| | | </AndroidResource>
|
| | | <AndroidResource Include="Resources\drawable\tip_background.xml">
|
| | | <SubType></SubType>
|
| | | <Generator></Generator>
|
| | | <SubType>
|
| | | </SubType>
|
| | | <Generator>
|
| | | </Generator>
|
| | | </AndroidResource>
|
| | | <AndroidResource Include="Resources\drawable\unlock_def.png">
|
| | | <SubType></SubType>
|
| | | <Generator></Generator>
|
| | | <SubType>
|
| | | </SubType>
|
| | | <Generator>
|
| | | </Generator>
|
| | | </AndroidResource>
|
| | | <AndroidResource Include="Resources\drawable\unlock_disable.png">
|
| | | <SubType></SubType>
|
| | | <Generator></Generator>
|
| | | <SubType>
|
| | | </SubType>
|
| | | <Generator>
|
| | | </Generator>
|
| | | </AndroidResource>
|
| | | <AndroidResource Include="Resources\drawable\unlock_sel.png">
|
| | | <SubType></SubType>
|
| | | <Generator></Generator>
|
| | | <SubType>
|
| | | </SubType>
|
| | | <Generator>
|
| | | </Generator>
|
| | | </AndroidResource>
|
| | | <AndroidResource Include="Resources\drawable\unlock.xml">
|
| | | <SubType></SubType>
|
| | | <Generator></Generator>
|
| | | <SubType>
|
| | | </SubType>
|
| | | <Generator>
|
| | | </Generator>
|
| | | </AndroidResource>
|
| | | <AndroidResource Include="Resources\drawable\video_background.xml">
|
| | | <SubType></SubType>
|
| | | <Generator></Generator>
|
| | | <SubType>
|
| | | </SubType>
|
| | | <Generator>
|
| | | </Generator>
|
| | | </AndroidResource>
|
| | | <AndroidResource Include="Resources\color\text_color.xml">
|
| | | <SubType></SubType>
|
| | | <Generator></Generator>
|
| | | <SubType>
|
| | | </SubType>
|
| | | <Generator>
|
| | | </Generator>
|
| | | </AndroidResource>
|
| | | <AndroidResource Include="Resources\values\Color.xml">
|
| | | <SubType></SubType>
|
| | | <Generator></Generator>
|
| | | <SubType>
|
| | | </SubType>
|
| | | <Generator>
|
| | | </Generator>
|
| | | </AndroidResource>
|
| | | </ItemGroup>
|
| | | <ItemGroup>
|
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.evoyo.home" android:versionCode="0120080601" android:installLocation="auto" android:versionName="1.1.0120080601"> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.evoyo.home" android:versionCode="0120081801" android:installLocation="auto" android:versionName="1.1.0120081801"> |
| | | <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="26" /> |
| | | <permission android:name="com.evoyo.home.permission.JPUSH_MESSAGE" android:protectionLevel="signature" /> |
| | | <uses-permission android:name="android.permission.WAKE_LOCK" /> |
| | |
| | | using System; |
| | | using Android.App; |
| | | using Android.Content.PM; |
| | | using System.Threading; |
| | | using Android.Content.Res; |
| | | using Android.Graphics; |
| | | using Android.OS; |
| | |
| | | [Activity(Name = "com.hdl.home.wxapi.VideoActivity", WindowSoftInputMode = SoftInput.AdjustResize, LaunchMode = LaunchMode.SingleInstance, ConfigurationChanges = (ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden | ConfigChanges.LayoutDirection | ConfigChanges.Locale | ConfigChanges.Orientation | ConfigChanges.ScreenSize), Theme = "@style/MyTheme", ScreenOrientation = ScreenOrientation.Portrait)] |
| | | public class VideoActivity : Android.App.Activity, View.IOnClickListener, ISurfaceHolderCallback, VideoPhoneJni.ICallBack,TipDiaglog.OnConfirmClickListener |
| | | { |
| | | private static Activity activity; |
| | | private VideoPhone mPhone; |
| | | private ISurfaceHolder mRemoteSurfaceHolder; |
| | | private FrameLayout mRemoteFrameContainer; |
| | |
| | | public string DeviceName;//室外机的名称,例,室外机 |
| | | public string RoomName;//房间命名,例 8栋1单元0801 |
| | | public bool IsCollect;//是否收藏 |
| | | public int Tpye = 0;//类型,0 监控,1反呼 |
| | | |
| | | public int Tpye = 0;//类型,0 监控,1反呼
|
| | | |
| | | protected override void OnCreate(Bundle savedInstanceState) |
| | | { |
| | |
| | | |
| | | try |
| | | { |
| | | |
| | | activity = this; |
| | | ESVideoUUID = Intent.GetStringExtra("ESVideoUUID");//室外机UUID,例:JJY000007FSEYX |
| | | ESRoomID = Intent.GetIntExtra("ESRoomID", 0);//当前用户的房间 ID 101 |
| | | DeviceName = Intent.GetStringExtra("DeviceName");//室外机的名称,例,室外机 |
| | |
| | | } |
| | | else |
| | | { |
| | | reverseCallFragment = new ReverseCallFragment(mPhone, ESVideoUUID); |
| | | string param = "address=" + ESVideoUUID + ",tag=mobile://123,"; |
| | | reverseCallFragment = new ReverseCallFragment(mPhone, param); |
| | | FragmentManager.BeginTransaction().Replace(Resource.Id.content, reverseCallFragment).Commit(); |
| | | } |
| | | } |
| | |
| | | base.OnPause(); |
| | | if (mPhone != null) |
| | | { |
| | | mPhone.OnActivityPause(); |
| | | //mPhone.OnActivityPause(); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | base.OnDestroy(); |
| | | if (mPhone != null) |
| | | { |
| | | mPhone.OnActivityDestroy(); |
| | | {
|
| | | mPhone.HangUp();
|
| | | mPhone.Release();
|
| | | mPhone = null;
|
| | | //mPhone.OnActivityDestroy();
|
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | public override void OnBackPressed()
|
| | | {
|
| | | if (mPhone != null)
|
| | | mPhone.HangUp();
|
| | | else
|
| | | Finish();
|
| | | }
|
| | |
|
| | | public void OnClick(View v) |
| | | { |
| | | if (v.Equals(ivBack)) |
| | | { |
| | | this.Finish(); |
| | | {
|
| | | if (mPhone != null)
|
| | | mPhone.HangUp();
|
| | | else |
| | | Finish(); |
| | | } |
| | | } |
| | | |
| | |
| | | /// <summary> |
| | | /// 弹出已挂断提示 |
| | | /// </summary> |
| | | private void showTipDialog(string title, string text, string btnText) |
| | | private void showTipDialog(string title, string text, string btnText,bool isClose) |
| | | { |
| | | try |
| | | { |
| | | TipDiaglog diaglog = new TipDiaglog(this); |
| | | diaglog.SetAutoClose(isClose); |
| | | diaglog.SetTitleText(title);//"提示" |
| | | diaglog.SetContentText(text);//"已挂断" |
| | | diaglog.SetConfirmText(btnText);//"确认" |
| | |
| | | |
| | | TextProtocol tp = new TextProtocol(); |
| | | tp.Parse(msg); |
| | | string event1 = tp.GetString("event"); |
| | | |
| | | string event1 = tp.GetString("event");
|
| | |
|
| | | switch (event1) |
| | | { |
| | | case "EVT_Ringing": |
| | |
| | | { |
| | | mPhone.StopStream(); |
| | | } |
| | | showTipDialog("提示","已挂断","确认"); |
| | | showTipDialog("提示", "已挂断", "确认", true); |
| | | break; |
| | | case "EVT_RECV_CUSTOM_DATA": |
| | | string data = tp.GetString("data"); |
| | |
| | | int error = tp.GetInt("error"); |
| | | string filePath = tp.GetString("filePath"); |
| | | if (error == 0) |
| | | { |
| | | showTipDialog("提示", "抓图成功", "确认"); |
| | | {
|
| | | showTipDialog("提示", "抓图成功", "确认", false); |
| | | } |
| | | else |
| | | { |
| | | showTipDialog("提示", "抓图失败\n\r" + error, "确认"); |
| | | {
|
| | | showTipDialog("提示", "抓图失败\n\r" + error, "确认", false); |
| | | } |
| | | break; |
| | | } |
| | |
| | | //throw new NotImplementedException(); |
| | | } |
| | | |
| | | public void onSureClick(TipDiaglog dialoog, View v) |
| | | public void onSureClick(TipDiaglog dialoog, View v, bool bol) |
| | | { |
| | | dialoog.Dismiss(); |
| | | this.Finish(); |
| | | dialoog.Dismiss();
|
| | | if (bol)
|
| | | this.Finish(); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | AppCenter.Start("0ca801a2-742b-42fb-ba10-7ba4391371aa", typeof(Analytics), typeof(Crashes)); |
| | | GDMapKit.setGDApiKey("866fae25f336bc8d9a79b1d19267fffb");//高德地图key |
| | | GDMapKit.setGDApiKey("3889cdfa4ef10c0d43348ffa2c1017c8");//高德地图key |
| | | |
| | | return true; |
| | | } |
| | |
| | | <MtouchLink>None</MtouchLink> |
| | | <MtouchArch>x86_64</MtouchArch> |
| | | <CodesignKey>iPhone Developer</CodesignKey> |
| | | <ConsolePause>true</ConsolePause> |
| | | <MtouchInterpreter></MtouchInterpreter> |
| | | <IpaMetadata></IpaMetadata> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' "> |
| | | <DebugSymbols>true</DebugSymbols> |
| | |
| | | <MtouchDebug>true</MtouchDebug> |
| | | <MtouchExtraArgs>-gcc_flags -dead_strip</MtouchExtraArgs> |
| | | <MtouchI18n>cjk</MtouchI18n> |
| | | <CodesignProvision>Home_Dev</CodesignProvision> |
| | | <CodesignProvision>ComEvoyoHomeDevelopment20200806</CodesignProvision> |
| | | <MtouchHttpClientHandler>CFNetworkHandler</MtouchHttpClientHandler> |
| | | <OnDemandResourcesInitialInstallTags></OnDemandResourcesInitialInstallTags> |
| | | <OnDemandResourcesInitialInstallTags></OnDemandResourcesInitialInstallTags> |
| | | <OnDemandResourcesPrefetchOrder></OnDemandResourcesPrefetchOrder> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' "> |
| | | <DebugType>none</DebugType> |
| | |
| | | <WarningLevel>4</WarningLevel> |
| | | <CodesignEntitlements>Entitlements.plist</CodesignEntitlements> |
| | | <MtouchArch>ARM64</MtouchArch> |
| | | <CodesignKey>iPhone Developer</CodesignKey> |
| | | <CodesignKey>iPhone Developer: xuebiao huang (4P32GXQWWK)</CodesignKey> |
| | | <MtouchI18n>cjk</MtouchI18n> |
| | | <DeviceSpecificBuild>true</DeviceSpecificBuild> |
| | | <MtouchExtraArgs>-gcc_flags -dead_strip</MtouchExtraArgs> |
| | | <CodesignProvision>ComEvoyoHomeDevelopment20200806</CodesignProvision> |
| | | </PropertyGroup> |
| | | <ItemGroup> |
| | | <Reference Include="System" /> |
| | |
| | | <BundleResource Include="Resources\Phone\RoomIcon\3.jpg" /> |
| | | <BundleResource Include="Resources\Phone\RoomIcon\1.jpg" /> |
| | | <BundleResource Include="Resources\Phone\RoomIcon\0.jpg" /> |
| | | <BundleResource Include="Resources\Phone\Account\Logo_WhiteHome.png" /> |
| | | <BundleResource Include="Resources\Phone\Account\Code.png" /> |
| | | <BundleResource Include="Resources\Phone\Account\Cancle.png" /> |
| | | <BundleResource Include="Resources\Phone\Account\HidePwd.png" /> |
| | | <BundleResource Include="Resources\Phone\Account\Account.png" /> |
| | | <BundleResource Include="Resources\Phone\Account\Cat.png" /> |
| | | <BundleResource Include="Resources\Phone\Account\Password.png" /> |
| | | <BundleResource Include="Resources\Phone\Account\Logo_White.png" /> |
| | | <BundleResource Include="Resources\Phone\Account\QQ.png" /> |
| | | <BundleResource Include="Resources\Phone\Account\Logo_Evoyo.png" /> |
| | | <BundleResource Include="Resources\Phone\Account\PhoneEmail_White.png" /> |
| | | <BundleResource Include="Resources\Phone\Account\ChangeSuccess.png" /> |
| | | <BundleResource Include="Resources\Phone\Account\Wechat.png" /> |
| | |
| | | <key>XSAppIconAssets</key> |
| | | <string>Assets.xcassets/AppIcon.appiconset</string> |
| | | <key>CFBundleIdentifier</key> |
| | | <string>com.hdl.home</string> |
| | | <string>com.evoyo.home</string> |
| | | <key>Custom Property</key> |
| | | <string></string> |
| | | <key>CFBundleName</key> |
| | | <string> HDL Home</string> |
| | | <string>Evoyo Home</string> |
| | | <key>XSLaunchImageAssets</key> |
| | | <string>Assets.xcassets/LaunchImage.launchimage</string> |
| | | <key>NSAppleMusicUsageDescription</key> |
| | |
| | | <key>aps-environment</key> |
| | | <string>development</string> |
| | | <key>CFBundleShortVersionString</key> |
| | | <string>1.1.0120072301</string> |
| | | <string>1.1.0120081901</string> |
| | | <key>CFBundleVersion</key> |
| | | <string>2020072301</string> |
| | | <string>2020081901</string> |
| | | <key>CFBundleURLTypes</key> |
| | | <array> |
| | | <dict> |
old mode 100755
new mode 100644
| | |
| | | 16058=我的家 |
| | | 16059=长按“我的家”{0}可切换我的住宅 |
| | | 16060=办公室 |
| | | 16061=电机数据异常,请重置电机 |
| | | 16061=电机数据异常,确认已经安装导轨后,请重置电机 |
| | | 16062=获取空调摆风状态失败 |
| | | 16063=设置空调摆风失败 |
| | | 16064=按住此按键 |
| | |
| | | /// <summary> |
| | | /// 版本号 |
| | | /// </summary> |
| | | public static string CodeIDString = "1.1.0120080401"; |
| | | public static string CodeIDString = "1.1.0120081801"; |
| | | /// <summary> |
| | | /// 注册来源(0:HDL On 1:Zigbee) |
| | | /// </summary> |
| | |
| | | this.dicPictrueShard["ButtonPanel_SimpleTwo"] = "ButtonPanel_Two";//简约2按键面板 沿用 2按键的图标
|
| | | this.dicPictrueShard["IntelligentLocks_Sone"] = "IntelligentLocks_H06C";//S-one的门锁图片 沿用 H06C的图标
|
| | | this.dicPictrueShard["Relay_FangyueFreshAirModul"] = "Relay_ThreeLoad";//方悦新风小模块图片 沿用 3路继电器的图标
|
| | | this.dicPictrueShard["ButtonPanel_FourButtonScene"] = "ButtonPanel_Four";//简约4按键场景面板 沿用 4按键面板的图标
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | } |
| | | }
|
| | | /// <summary>
|
| | | /// 当前楼层ID
|
| | | /// 当前楼层id
|
| | | /// </summary>
|
| | | private string m_CurrentFloorId = string.Empty;
|
| | | /// <summary> |
| | | /// 当前楼层Id |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public string CurrentFloorId = string.Empty; |
| | | public string CurrentFloorId
|
| | | {
|
| | | //来回切换备份,会出现问题,楼层id没清除
|
| | | get
|
| | | {
|
| | | //没有楼层
|
| | | if (this.FloorDics.Count == 0) { return string.Empty; }
|
| | |
|
| | | if (this.FloorDics.ContainsKey(m_CurrentFloorId) == true)
|
| | | {
|
| | | //当前的楼层id没问题
|
| | | return m_CurrentFloorId;
|
| | | }
|
| | | //如果当前设置的楼层id并不存在的话,重新设置
|
| | | m_CurrentFloorId = string.Empty;
|
| | | var dicFloor = HdlRoomLogic.Current.GetFloorSortList();
|
| | | foreach (var floorId in dicFloor.Keys)
|
| | | {
|
| | | //给一个过去即可
|
| | | m_CurrentFloorId = floorId;
|
| | | break;
|
| | | }
|
| | | return m_CurrentFloorId;
|
| | | }
|
| | | set { m_CurrentFloorId = value; }
|
| | | } |
| | | |
| | | #endregion |
| | | |
| | |
| | | �㲥��ַ |
| | | </summary> |
| | | </member> |
| | | <member name="M:Shared.Net.WifiUtil.GetWiFiList"> |
| | | <summary> |
| | | 获取WiFi列表 |
| | | </summary> |
| | | <param name="mWifiManager"></param> |
| | | <returns></returns> |
| | | </member> |
| | | <member name="M:Shared.DensityUtil.Dip2Px(System.Single)"> |
| | | <summary> |
| | | 根据手机的分辨率从 dp 的单位 转成为 px(像素) |
| | |
| | | </member> |
| | | <member name="P:Shared.WaveSeekBar.IsProgressTextShow"> |
| | | <summary> |
| | | 是否可以滑动 |
| | | 是否显示进度文字 |
| | | </summary> |
| | | <value>是否可以滑动</value> |
| | | <value>是否显示进度文字</value> |
| | | </member> |
| | | <member name="P:Shared.WaveSeekBar.WaveBorderWidth"> |
| | | <summary> |
| | |
| | | </summary> |
| | | <value>是否离线</value> |
| | | </member> |
| | | <member name="P:Shared.DiyImageSeekBar.NowProgressX"> |
| | | <summary> |
| | | 当前进度值 X坐标 |
| | | </summary> |
| | | <value>X坐标</value> |
| | | </member> |
| | | <member name="F:Shared.DiyImageSeekBar.OnProgressChangedEvent"> |
| | | <summary> |
| | | EventHandler |
| | |
| | | 是否离线 离线的话禁止滑动并绘制背景遮挡层 |
| | | </summary> |
| | | <value>是否离线</value> |
| | | </member> |
| | | <member name="P:Shared.DiyImageVerticalSeekBar.NowProgressY"> |
| | | <summary> |
| | | 当前进度值 Y坐标 |
| | | </summary> |
| | | <value>Y坐标</value> |
| | | </member> |
| | | <member name="F:Shared.DiyImageVerticalSeekBar.OnProgressChangedEvent"> |
| | | <summary> |
| | |
| | | OnProgressChangeListener 继承响应事件 |
| | | </summary> |
| | | </member> |
| | | <member name="T:Shared.WaveSeekBarOn"> |
| | | <summary> |
| | | HDLOnWaveSeekbar HDLON+调光控件 |
| | | 默认圆角20 拖动按钮默认高度10 白色 |
| | | </summary> |
| | | </member> |
| | | <member name="P:Shared.WaveSeekBarOn.mHDLOnWaveSeekBar"> |
| | | <summary> |
| | | 当前视图 |
| | | </summary> |
| | | <value>The HDLOnWaveSeekBar.</value> |
| | | </member> |
| | | <member name="M:Shared.WaveSeekBarOn.#ctor"> |
| | | <summary> |
| | | 构造函数 |
| | | </summary> |
| | | </member> |
| | | <member name="P:Shared.WaveSeekBarOn.ProgressBarUnitSring"> |
| | | <summary> |
| | | 进度值显示单位 |
| | | </summary> |
| | | <value>单位字符</value> |
| | | </member> |
| | | <member name="P:Shared.WaveSeekBarOn.MaxValue"> |
| | | <summary> |
| | | 进度值最大值 |
| | | </summary> |
| | | <value>最大值</value> |
| | | </member> |
| | | <member name="P:Shared.WaveSeekBarOn.MinValue"> |
| | | <summary> |
| | | 进度值最小值 |
| | | </summary> |
| | | <value>最小值</value> |
| | | </member> |
| | | <member name="P:Shared.WaveSeekBarOn.Progress"> |
| | | <summary> |
| | | 当前进度值 |
| | | </summary> |
| | | <value>进度值</value> |
| | | </member> |
| | | <member name="P:Shared.WaveSeekBarOn.ProgressTextColor"> |
| | | <summary> |
| | | 当前进度值显示的文字颜色 |
| | | </summary> |
| | | <value>文字颜色</value> |
| | | </member> |
| | | <member name="P:Shared.WaveSeekBarOn.ProgressTextSize"> |
| | | <summary> |
| | | 当前进度值显示的文字大小 |
| | | </summary> |
| | | <value>文字大小</value> |
| | | </member> |
| | | <member name="P:Shared.WaveSeekBarOn.IsClickable"> |
| | | <summary> |
| | | 是否可以滑动 |
| | | </summary> |
| | | <value>是否可以滑动</value> |
| | | </member> |
| | | <member name="P:Shared.WaveSeekBarOn.IsProgressTextShow"> |
| | | <summary> |
| | | 是否显示进度文字 |
| | | </summary> |
| | | <value>是否显示</value> |
| | | </member> |
| | | <member name="P:Shared.WaveSeekBarOn.CornerRadius"> |
| | | <summary> |
| | | 矩形的圆角大小 |
| | | </summary> |
| | | <value>圆角</value> |
| | | </member> |
| | | <member name="M:Shared.WaveSeekBarOn.SetProgressBarColors(System.UInt32,System.UInt32)"> |
| | | <summary> |
| | | 设置进度条 渐变颜色的开始颜色和结束颜色 |
| | | </summary> |
| | | <value>开始颜色、结束颜色</value> |
| | | </member> |
| | | <member name="P:Shared.WaveSeekBarOn.NowProgressY"> |
| | | <summary> |
| | | 当前进度值 Y坐标 |
| | | </summary> |
| | | <value>Y坐标</value> |
| | | </member> |
| | | <member name="P:Shared.WaveSeekBarOn.IsOffline"> |
| | | <summary> |
| | | 是否离线 离线的话禁止滑动并绘制灰色背景 |
| | | </summary> |
| | | <value>是否离线</value> |
| | | </member> |
| | | <member name="P:Shared.WaveSeekBarOn.OfflineProgressBarColor"> |
| | | <summary> |
| | | 离线效果时 进度条颜色 单一颜色不渐变 |
| | | </summary> |
| | | <value>单一进度条颜色</value> |
| | | </member> |
| | | <member name="P:Shared.WaveSeekBarOn.IsThumbBtnShow"> |
| | | <summary> |
| | | 是否显示拖动按钮 直线图形 |
| | | </summary> |
| | | <value>是否离线</value> |
| | | </member> |
| | | <member name="P:Shared.WaveSeekBarOn.ThumbBtnHeight"> |
| | | <summary> |
| | | 拖动按钮高度 |
| | | </summary> |
| | | </member> |
| | | <member name="P:Shared.WaveSeekBarOn.ThumbBtnColor"> |
| | | <summary> |
| | | 拖动按钮颜色 |
| | | </summary> |
| | | </member> |
| | | <member name="P:Shared.WaveSeekBarOn.WaveBackgroundColor"> |
| | | <summary> |
| | | 矩形的背景颜色 |
| | | </summary> |
| | | <value>背景颜色</value> |
| | | </member> |
| | | <member name="F:Shared.WaveSeekBarOn.OnProgressChangedEvent"> |
| | | <summary> |
| | | EventHandler |
| | | </summary> |
| | | </member> |
| | | <member name="F:Shared.WaveSeekBarOn.mOnProgressChangeListener"> |
| | | <summary> |
| | | OnProgressChangeListener 继承响应事件 |
| | | </summary> |
| | | </member> |
| | | <member name="T:Shared.MyEchartsViewOn"> |
| | | <summary> |
| | | MyEchartsViewOn |
| | | </summary> |
| | | </member> |
| | | <member name="F:Shared.MyEchartsViewOn.optionJsonString"> |
| | | <summary> |
| | | Option的配置JsonString |
| | | </summary> |
| | | </member> |
| | | <member name="M:Shared.MyEchartsViewOn.ShowWithOptionJsonString(System.String)"> |
| | | <summary> |
| | | 加载Option配置JsonString |
| | | 刷新图表 |
| | | </summary> |
| | | <param name="jsonString"></param> |
| | | </member> |
| | | <member name="M:Shared.MyEchartsViewOn.refreshEcharts"> |
| | | <summary> |
| | | 刷新界面 |
| | | </summary> |
| | | </member> |
| | | <member name="T:Shared.WebView"> |
| | | <summary> |
| | | WebView |
| | | </summary> |
| | | </member> |
| | | <member name="F:Shared.WebView.DidFinishAction"> |
| | | <summary> |
| | | DidFinishAction |
| | | </summary> |
| | | </member> |
| | | <member name="P:Shared.WebView.webView"> |
| | | <summary> |
| | | MyWebView |
| | | </summary> |
| | | </member> |
| | | <member name="M:Shared.WebView.#ctor"> |
| | | <summary> |
| | | WebView |
| | | </summary> |
| | | </member> |
| | | <member name="M:Shared.WebView.LoadRequest(System.String)"> |
| | | <summary> |
| | | 加载网页 |
| | | </summary> |
| | | <param name="url"></param> |
| | | </member> |
| | | <member name="M:Shared.WebView.LoadFileUrl(System.String)"> |
| | | <summary> |
| | | 加载本地HTML |
| | | </summary> |
| | | </member> |
| | | <member name="T:Shared.WebView.MyWebViewClient"> |
| | | <summary> |
| | | MyWebViewClient |
| | | </summary> |
| | | </member> |
| | | <member name="T:Shared.WebView.MyWebView"> |
| | | <summary> |
| | | MyWebView |
| | | </summary> |
| | | </member> |
| | | <member name="T:ViewFlow.ViewSwitchListener"> |
| | | Receives call backs when a new {@link View} has been scrolled to. |
| | | </member> |
| | |
| | | Cancel |
| | | </summary> |
| | | </member> |
| | | <member name="T:Shared.WebView"> |
| | | <summary> |
| | | WebView |
| | | </summary> |
| | | </member> |
| | | <member name="F:Shared.WebView.DidFinishAction"> |
| | | <summary> |
| | | DidFinishAction |
| | | </summary> |
| | | </member> |
| | | <member name="P:Shared.WebView.uiWebView"> |
| | | <summary> |
| | | WKWebView |
| | | </summary> |
| | | </member> |
| | | <member name="M:Shared.WebView.#ctor"> |
| | | <summary> |
| | | WebView |
| | | </summary> |
| | | </member> |
| | | <member name="M:Shared.WebView.LoadRequest(System.String)"> |
| | | <summary> |
| | | 加载网页 |
| | | </summary> |
| | | <param name="url"></param> |
| | | </member> |
| | | <member name="M:Shared.WebView.LoadFileUrl(Foundation.NSUrl)"> |
| | | <summary> |
| | | 加载本地HTML |
| | | </summary> |
| | | </member> |
| | | <member name="T:Shared.WebView.OnWKNavigationDelegate"> |
| | | <summary> |
| | | OnWKNavigationDelegate |
| | | </summary> |
| | | </member> |
| | | <member name="T:Shared.Tip"> |
| | | <summary> |
| | | 信息提示 |
| | |
| | | </summary> |
| | | <value>是否显示进度文字</value> |
| | | </member> |
| | | <member name="P:Shared.DiyImageSeekBar.NowProgressX"> |
| | | <summary> |
| | | 当前进度值 X坐标 |
| | | </summary> |
| | | <value>X坐标</value> |
| | | </member> |
| | | <member name="F:Shared.DiyImageSeekBar.OnProgressChangedEvent"> |
| | | <summary> |
| | | EventHandler |
| | |
| | | </summary> |
| | | <value>是否显示进度文字</value> |
| | | </member> |
| | | <member name="P:Shared.DiyImageVerticalSeekBar.NowProgressY"> |
| | | <summary> |
| | | 当前进度值 Y坐标 |
| | | </summary> |
| | | <value>Y坐标</value> |
| | | </member> |
| | | <member name="F:Shared.DiyImageVerticalSeekBar.OnProgressChangedEvent"> |
| | | <summary> |
| | | EventHandler |
| | |
| | | device.Type == DeviceType.DimmableLight ||//彩灯
|
| | | device.Type == DeviceType.OnOffOutput ||//继电器
|
| | | device.Type == DeviceType.Thermostat ||//空调
|
| | | device.Type == DeviceType.ColorTemperatureLight ||//色温灯
|
| | | device.Type == DeviceType.WindowCoveringDevice)//窗帘
|
| | | {
|
| | | string mainkey = LocalDevice.Current.GetDeviceMainKeys(device);
|
| | |
| | | //先清除吧
|
| | | this.RemoveAll();
|
| | |
|
| | | //初始化默认楼层ID
|
| | | this.InitDefultFloorId();
|
| | |
|
| | | //初始化头部控件
|
| | | this.InitTopControl();
|
| | | //初始化中间控件
|
| | |
| | | timeStr += sec + secondText;
|
| | | }
|
| | | return timeStr;
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 初始化默认楼层ID
|
| | | /// </summary>
|
| | | private void InitDefultFloorId()
|
| | | {
|
| | | if (Config.Instance.Home.CurrentFloorId != string.Empty)
|
| | | {
|
| | | return;
|
| | | }
|
| | | var dicFloor = HdlRoomLogic.Current.GetFloorSortList();
|
| | | foreach (var floorId in dicFloor.Keys)
|
| | | {
|
| | | Config.Instance.Home.CurrentFloorId = floorId;
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | public void SelectedUserID(Send.MembershipIfon user) |
| | | { |
| | | |
| | | //元素超出9个就用上下滑动控件; |
| | | VerticalScrolViewLayout vV = null; |
| | | int count = user.UserIdMode.Count; |
| | | if (count > 9) |
| | | { |
| | | ///元素超出9个; |
| | | count = 6; |
| | | //元素超出9个就用上下滑动控件; |
| | | vV = new VerticalScrolViewLayout |
| | | { |
| | | Y = Application.GetRealHeight(140 + 20), |
| | | Height = Application.GetRealHeight(160 * count), |
| | | }; |
| | | //清除之前的控件; |
| | | vV.RemoveAll(); |
| | | } |
| | | |
| | | int count = user.UserIdMode.Count;
|
| | | #region -------取消 完成 |
| | | var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicTranslucentColor }; |
| | | this.AddChidren(flMain); |
| | |
| | | flMain.RemoveFromParent(); |
| | | }; |
| | | flMain.MouseUpEventHandler += clickcancel; |
| | | completeView.Btncancel.MouseUpEventHandler += clickcancel; |
| | | completeView.Btncancel.MouseUpEventHandler += clickcancel;
|
| | | #endregion |
| | | |
| | | //元素超出9个就用上下滑动控件;
|
| | | VerticalScrolViewLayout vV = null; |
| | | if (count > 9) |
| | | { |
| | | ///元素超出9个; |
| | | count = 6; |
| | | //元素超出9个就用上下滑动控件; |
| | | vV = new VerticalScrolViewLayout |
| | | { |
| | | Y = Application.GetRealHeight(140 + 20), |
| | | Height = Application.GetRealHeight(160 * count), |
| | | }; |
| | | //清除之前的控件; |
| | | vV.RemoveAll();
|
| | | completeView.Show(count).AddChidren(vV); |
| | | } |
| | | ///定两个变量记录之前的只值; |
| | | string userId = ""; |
| | | string openMode = ""; |
| | |
| | | if (user.UserIdMode.Count > 9) |
| | | { |
| | | //元素超出9个就用上下滑动控件; |
| | | completeView.Show(count).AddChidren(vV); |
| | | vV.AddChidren(lockView.Show()); |
| | | } |
| | | else |
| | |
| | | /// </summary> |
| | | /// <param name="user"></param> |
| | | public void User(Send.MembershipIfon user) |
| | | { |
| | | |
| | | //元素超出9个就用上下滑动控件; |
| | | VerticalScrolViewLayout vV = null; |
| | | {
|
| | |
|
| | |
|
| | | |
| | | int count = user.UserIdMode.Count; |
| | | if (count > 9) |
| | | { |
| | | ///元素超出9个; |
| | | count = 6; |
| | | //元素超出9个就用上下滑动控件; |
| | | vV = new VerticalScrolViewLayout |
| | | { |
| | | Y = Application.GetRealHeight(140 + 20), |
| | | Height = Application.GetRealHeight(160 * count), |
| | | }; |
| | | //清除之前的控件; |
| | | vV.RemoveAll(); |
| | | } |
| | | |
| | | #region -------取消 完成 |
| | | var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicTranslucentColor }; |
| | | this.AddChidren(flMain); |
| | |
| | | flMain.RemoveFromParent(); |
| | | }; |
| | | flMain.MouseUpEventHandler += clickcancel; |
| | | completeView.Btncancel.MouseUpEventHandler += clickcancel; |
| | | completeView.Btncancel.MouseUpEventHandler += clickcancel;
|
| | | //元素超出9个就用上下滑动控件;
|
| | | VerticalScrolViewLayout vV = null;
|
| | | if (count > 9) |
| | | { |
| | | ///元素超出9个; |
| | | count = 6; |
| | | //元素超出9个就用上下滑动控件; |
| | | vV = new VerticalScrolViewLayout |
| | | { |
| | | Y = Application.GetRealHeight(140 + 20), |
| | | Height = Application.GetRealHeight(160 * count), |
| | | }; |
| | | //清除之前的控件; |
| | | vV.RemoveAll(); |
| | | completeView.Show(count).AddChidren(vV); |
| | | |
| | | } |
| | | #endregion |
| | | ///定两个变量记录之前的只值; |
| | | string userId = ""; |
| | |
| | | if (user.UserIdMode.Count > 9) |
| | | { |
| | | //元素超出9个就用上下滑动控件; |
| | | completeView.Show(count).AddChidren(vV); |
| | | vV.AddChidren(lockView.Show()); |
| | | } |
| | | else |
| | |
| | | eSVideoInfo.RoomName = videoInfos.RoomName; |
| | | GateWay.Ios.ESVideo.ShowESVideoMonitor(eSVideoInfo); |
| | | #elif Android
|
| | | Shared.Phone.VideoPhone.ESVideoInfo eSVideoInfo = new Shared.Phone.VideoPhone.ESVideoInfo(); |
| | | eSVideoInfo.DeviceName = videoInfos.DeviceName; |
| | | eSVideoInfo.ESVideoUUID = videoInfos.ESVideoUUID; |
| | | eSVideoInfo.ESRoomID = videoInfos.ESRoomID; |
| | | eSVideoInfo.RoomName = videoInfos.RoomName; |
| | | Shared.Phone.VideoPhone.ESVideo.ShowESVideoMonitor(eSVideoInfo); |
| | | ((BaseActivity)Application.Activity).AudioRecord((result) =>
|
| | | {
|
| | | if (result == false) { return; }
|
| | | Shared.Phone.VideoPhone.ESVideoInfo eSVideoInfo = new Shared.Phone.VideoPhone.ESVideoInfo();
|
| | | eSVideoInfo.DeviceName = videoInfos.DeviceName;
|
| | | eSVideoInfo.ESVideoUUID = videoInfos.ESVideoUUID;
|
| | | eSVideoInfo.ESRoomID = videoInfos.ESRoomID;
|
| | | eSVideoInfo.RoomName = videoInfos.RoomName;
|
| | | Shared.Phone.VideoPhone.ESVideo.ShowESVideoMonitor(eSVideoInfo);
|
| | | }); |
| | | #endif |
| | | }; |
| | | |
| | |
| | | UserView.HomePage.Instance.AddChidren(videoMachine); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | videoMachine.Show(videoList); |
| | | |
| | | |
| | | }; |
| | | } |
| | | } |
| | |
| | | //Evoyo Home的图标
|
| | | var btnLogoIcon = new PicViewControl(184, 184);
|
| | | btnLogoIcon.Y = Application.GetRealHeight(230);
|
| | | btnLogoIcon.UnSelectedImagePath = "Account/Logo_White.png";
|
| | | btnLogoIcon.UnSelectedImagePath = "Account/Logo_WhiteHome.png";
|
| | | btnLogoIcon.Gravity = Gravity.CenterHorizontal;
|
| | | this.AddChidren(btnLogoIcon);
|
| | | //Evoyo Home
|
| | |
| | | frameMidBack.AddChidren(btnLoginByCode);
|
| | | btnLoginByCode.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //检测是否同意服务协议
|
| | | if (this.CheckPrivacyPolicy() == false) { return; }
|
| | |
|
| | | if (codeDiv == 1)
|
| | | {
|
| | | //验证码登陆
|
| | |
| | | frameMidBack.AddChidren(btnRegister);
|
| | | btnRegister.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //检测是否同意服务协议
|
| | | if (this.CheckPrivacyPolicy() == false) { return; }
|
| | |
|
| | | var registerPage = new AccountRegister();
|
| | | CommonPage.Instance.AddChidren(registerPage);
|
| | | registerPage.Show();
|
| | |
| | | btnWebChat.Y = frameMidBack.Height - Application.GetRealHeight(69) - btnWebChat.IconSize;
|
| | | btnWebChat.UnSelectedImagePath = "Account/Wechat.png";
|
| | | btnWebChat.Gravity = Gravity.CenterHorizontal;
|
| | | frameMidBack.AddChidren(btnWebChat);
|
| | | //frameMidBack.AddChidren(btnWebChat);
|
| | | btnWebChat.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //微信登陆
|
| | |
| | | frameMidBack.AddChidren(btnTiyan);
|
| | | btnTiyan.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //检测是否同意服务协议
|
| | | if (this.CheckPrivacyPolicy() == false) { return; }
|
| | |
|
| | | btnTiyan.CanClick = false;
|
| | | //显示启动页
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | |
| | | frameWhiteBack.AddChidren(btnForgot);
|
| | | btnForgot.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //检测是否同意服务协议
|
| | | if (this.CheckPrivacyPolicy() == false) { return; }
|
| | |
|
| | | var forgot = new AccountForgetPWD();
|
| | | CommonPage.Instance.AddChidren(forgot);
|
| | | forgot.Show();
|
| | |
| | | rowVerCode.AddChidren(btnSendCode);
|
| | | btnSendCode.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //检测是否同意服务协议
|
| | | if (this.CheckPrivacyPolicy() == false) { return; }
|
| | |
|
| | | //检测输入的账号
|
| | | nowInputAccount = txtAccount.Text.Trim();
|
| | | if (this.CheckInputAccount("86", nowInputAccount, i_div) == false)
|
| | |
| | | frameWhiteBack.AddChidren(btnForgot);
|
| | | btnForgot.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //检测是否同意服务协议
|
| | | if (this.CheckPrivacyPolicy() == false) { return; }
|
| | |
|
| | | var forgot = new AccountForgetPWD();
|
| | | CommonPage.Instance.AddChidren(forgot);
|
| | | forgot.Show();
|
| | |
| | | /// <param name="i_div">1:手机号 2:邮箱</param>
|
| | | private void LoginByAccountAndPsw(string i_account, string i_psw, int i_div)
|
| | | {
|
| | | //检测是否同意服务协议
|
| | | if (this.CheckPrivacyPolicy() == false) { return; }
|
| | | //检测账号
|
| | | if (this.CheckInputAccount(string.Empty, i_account, i_div) == false)
|
| | | {
|
| | |
| | | /// </summary>
|
| | | private void LoginByWechat()
|
| | | {
|
| | | //检测是否同意服务协议
|
| | | if (this.CheckPrivacyPolicy() == false) { return; }
|
| | | #if Android
|
| | | com.hdl.home.Application.WXLogin();
|
| | | com.hdl.home.WXEntryActivity.RespAction = (authStr) =>
|
| | |
| | | /// <param name="i_div">1:手机号 2:邮箱</param>
|
| | | private void LoginByVerCode(string i_account, string i_verCode, int i_div)
|
| | | {
|
| | | //检测是否同意服务协议
|
| | | if (this.CheckPrivacyPolicy() == false) { return; }
|
| | | //登陆中....
|
| | | CommonPage.Loading.Start(Language.StringByID(R.MyInternationalizationString.Logining));
|
| | |
|
| | |
| | | frameWhiteBack.AddChidren(btnColorBack);
|
| | | //进度条(+60的偏移量,色温的范围是 3000~6000)
|
| | | this.seekBarColor = new SeekBarControl(611 + 120);
|
| | | seekBarColor.Y = btnLightLine.Bottom + Application.GetRealHeight(58);
|
| | | seekBarColor.Y = btnLightLine.Bottom + Application.GetRealHeight(88);
|
| | | seekBarColor.X = Application.GetRealWidth(266 - 60);
|
| | | seekBarColor.Height = Application.GetRealHeight(144);
|
| | | seekBarColor.SeekBarViewHeight = Application.GetRealHeight(20);
|
| | | seekBarColor.SeekBarPadding = Application.GetRealWidth(60);
|
| | | seekBarColor.IsProgressTextShow = true;
|
| | | seekBarColor.ProgressBarColor = UserCenterColor.Current.Transparent;
|
| | | seekBarColor.ProgressBarUnEnableColor = UserCenterColor.Current.Transparent;
|
| | | seekBarColor.SeekBarBackgroundColor = UserCenterColor.Current.Transparent;
|
| | | seekBarColor.ProgressTextSize = 14;
|
| | | seekBarColor.ProgressTextColor = UserCenterColor.Current.TextGrayColor2;
|
| | | seekBarColor.Gravity = Gravity.Frame;
|
| | | seekBarColor.ProgressBarUnitSring = "K";
|
| | | seekBarColor.MinValue = 30;
|
| | | seekBarColor.MaxValue = 60;
|
| | | seekBarColor.ProgressChangeDelayTime = 0;
|
| | | frameWhiteBack.AddChidren(seekBarColor);
|
| | | //显示自定义文本
|
| | | seekBarColor.ShowCustomTextView(Application.GetRealWidth(150), 15, UserCenterColor.Current.TextGrayColor3);
|
| | | //设置初始值
|
| | | int colorValue = ((ColorTemperatureLight)this.device).ColorTemperature;
|
| | | if (colorValue == 0) { colorValue = 3000; }
|
| | | seekBarColor.Progress = colorValue / 100;
|
| | | seekBarColor.SetCustomText(seekBarColor.Progress * 100 + "K");
|
| | |
|
| | | //蜂鸣器开关:
|
| | | var btnBuzzerView = new NormalViewControl(300, 60, true);
|
| | |
| | | int nowColorValue = oldColorValue;//变更的值
|
| | | seekBarColor.OnProgressChangedEvent += (sender, value) =>
|
| | | {
|
| | | //设置自定义的文本
|
| | | seekBarColor.SetCustomText(value * 100 + "K");
|
| | | if (Common.Config.Instance.Home.IsVirtually == false)
|
| | | {
|
| | | if (this.canSetProgressValue == true)
|
| | |
| | | {
|
| | | //当进度值在手动变更中时,不接收推送
|
| | | seekBarColor.Progress = (int)(((ColorTemperatureLight)this.device).ColorTemperature / 100);
|
| | | //设置自定义的文本
|
| | | seekBarColor.SetCustomText(seekBarColor.Progress * 100 + "K");
|
| | | }
|
| | | if (this.btnMiniSwitch.IsSelected == false)
|
| | | {
|
| | |
| | | listBodyContr.RecoverTableHeight();
|
| | | }
|
| | |
|
| | | //初始化默认楼层ID
|
| | | this.InitDefultFloorId();
|
| | |
|
| | | //初始化头部控件
|
| | | this.InitTopFrameLayoutControl();
|
| | | //初始化中间控件
|
| | |
| | | return false;
|
| | | }
|
| | | return true;
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 初始化默认楼层ID
|
| | | /// </summary>
|
| | | private void InitDefultFloorId()
|
| | | {
|
| | | if (Config.Instance.Home.CurrentFloorId != string.Empty)
|
| | | {
|
| | | return;
|
| | | }
|
| | | var dicFloor = HdlRoomLogic.Current.GetFloorSortList();
|
| | | foreach (var floorId in dicFloor.Keys)
|
| | | {
|
| | | Config.Instance.Home.CurrentFloorId = floorId;
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | /// </summary>
|
| | | public void RefreshListRoom()
|
| | | {
|
| | | if (Config.Instance.Home.FloorDics.Count == 0)
|
| | | {
|
| | | //来回切换备份,会出现问题,楼层id没清除
|
| | | this.curFloorId = string.Empty;
|
| | | }
|
| | | //保险起见,这里要关闭未分配界面
|
| | | this.CloseUnallocatedRoomForm();
|
| | |
|
| | |
| | | //读取模板Bin文件
|
| | | if (templateBinFile != string.Empty)
|
| | | {
|
| | | bool hadRoom = HdlRoomLogic.Current.GetAllListRooms().Count > 1;
|
| | | bool hadRoom = HdlRoomLogic.Current.GetAllListRooms().Count > 1 && Common.Config.Instance.Home.FloorDics.Count == 0;
|
| | | //开始读取文件内容
|
| | | this.ReadTemplateFileMethord((strData, saveDiv, deviceType) =>
|
| | | {
|
| | |
| | | {
|
| | | //只初始化一次,有房间时代表已经不是第一次加载了
|
| | | Common.Config.Instance.Home.FloorDics = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<string, string>>(this.strTempContentData);
|
| | | Common.Config.Instance.Home.Save(false);
|
| | | }
|
| | | this.strTempContentData = string.Empty;
|
| | | return true;
|
| | |
| | |
|
| | | //再次初始化房间
|
| | | HdlRoomLogic.Current.InitAllRoom();
|
| | |
|
| | | //无模板模式时,恢复备份的时候,把备份文件删除
|
| | | if (Common.Config.Instance.Home.TemplateMode != 2)
|
| | | {
|
| | | //存放的路径
|
| | | string fullFile = System.IO.Path.Combine(DirNameResourse.LocalTemplateDirectory, TemplateFileName);
|
| | | HdlFileLogic.Current.DeleteFile(fullFile);
|
| | | }
|
| | | //覆盖物理设备所在的房间数据
|
| | | HdlFileLogic.Current.SaveFileContent(DirNameResourse.DeviceRoomIdFile, this.modelData.dicDeviceTemplateRealRoom);
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | else if (strData == "#FloorInfo END#")
|
| | | {
|
| | | Common.Config.Instance.Home.FloorDics = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<string, string>>(this.strTempContentData);
|
| | | Common.Config.Instance.Home.Save(false);
|
| | | this.strTempContentData = string.Empty;
|
| | | return true;
|
| | | }
|
| | |
| | | /// 获取需要升级的网关对象(key:本地网关的id value:升级固件地址,第一位是Linux,第二位是协调器,之后都是虚拟驱动)
|
| | | /// </summary>
|
| | | /// <returns></returns>
|
| | | public Dictionary<string, List<string>> GetNeedToUpdateGateway()
|
| | | public Dictionary<string, List<GatewayNeedUpdateInfo>> GetNeedToUpdateGateway()
|
| | | {
|
| | | var dicGateway = new Dictionary<string, List<string>>();
|
| | | var dicGateway = new Dictionary<string, List<GatewayNeedUpdateInfo>>();
|
| | | //循环网关匹配的模板
|
| | | foreach (var localId in this.modelData.dicGatewayTemplateSelect.Keys)
|
| | | {
|
| | |
| | | }
|
| | | var tempGateway = this.modelData.dicGatewayInfo[tempId];
|
| | | //初始化容器
|
| | | dicGateway[localId] = new List<string>() { null, null };
|
| | | var listUpdateInfo = new List<GatewayNeedUpdateInfo>() { null, null };
|
| | |
|
| | | bool needUpdate = false;
|
| | | //Linux版本比较
|
| | | if (tempGateway.LinuxFirmwareVersion != localGateway.LinuxFirmwareVersion)
|
| | | {
|
| | |
| | | if (System.IO.File.Exists(updateFile) == true)
|
| | | {
|
| | | //如果存在的话
|
| | | dicGateway[localId][0] = updateFile;
|
| | | var info = new GatewayNeedUpdateInfo();
|
| | | info.Div = 1;
|
| | | info.FullFileName = updateFile;
|
| | | listUpdateInfo[0] = info;
|
| | | needUpdate = true;
|
| | | }
|
| | | }
|
| | | //协调器版本比较
|
| | |
| | | if (System.IO.File.Exists(updateFile) == true)
|
| | | {
|
| | | //如果存在的话
|
| | | dicGateway[localId][1] = updateFile;
|
| | | var info = new GatewayNeedUpdateInfo();
|
| | | info.Div = 2;
|
| | | info.FullFileName = updateFile;
|
| | | listUpdateInfo[1] = info;
|
| | | needUpdate = true;
|
| | | }
|
| | | }
|
| | | //虚拟驱动比较
|
| | |
| | | foreach (var tempCode in tempGateway.DriveCodeList)
|
| | | {
|
| | | //防止它放的顺序不样
|
| | | if (localCode.DriveId == tempCode.DriveId && localCode.DriveFwVersion != tempCode.DriveFwVersion)
|
| | | if (localCode.DriveCode == tempCode.DriveCode && localCode.DriveFwVersion != tempCode.DriveFwVersion)
|
| | | {
|
| | | //虚拟驱动升级固件文件全路径
|
| | | string updateFile = HdlFirmwareUpdateLogic.GetGatewayDriveCodeFirmwareFile(tempCode);
|
| | | if (System.IO.File.Exists(updateFile) == true)
|
| | | {
|
| | | //如果存在的话
|
| | | dicGateway[localId].Add(updateFile);
|
| | | var info = new GatewayNeedUpdateInfo();
|
| | | info.Div = 3;
|
| | | info.DriveCode = tempCode.DriveCode;
|
| | | info.FullFileName = updateFile;
|
| | | listUpdateInfo.Add(info);
|
| | | needUpdate = true;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | //添加目标缓存
|
| | | if (needUpdate == true)
|
| | | {
|
| | | dicGateway[localId] = listUpdateInfo;
|
| | | }
|
| | | }
|
| | |
|
| | | return dicGateway;
|
| | |
| | | {
|
| | | return 0;
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 变更Mac缓存(在网关执行完成导入之后执行)
|
| | | /// </summary>
|
| | | public virtual void ChangedMacMemmory()
|
| | | {
|
| | | }
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | /// 绑定列表
|
| | | /// </summary>
|
| | | public List<ZigBee.Device.BindObj.BindListResponseObj> BindList = new List<ZigBee.Device.BindObj.BindListResponseObj>();
|
| | | |
| | |
|
| | | /// <summary>
|
| | | /// 获取更改设备配置的命令字符
|
| | | /// </summary>
|
| | |
| | | //执行这个命令大约需要15秒
|
| | | return 15;
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 变更绑定目标的Mac
|
| | | /// </summary>
|
| | | public override void ChangedMacMemmory()
|
| | | {
|
| | | //当前选择的模板对象
|
| | | var dicChangedMac = new Dictionary<string, string>();
|
| | | var dicNowSelect = TemplateCommonLogic.Current.modelData.dicDeviceTemplateSelect;
|
| | | foreach (var localMac in dicNowSelect.Keys)
|
| | | {
|
| | | dicChangedMac[dicNowSelect[localMac]] = localMac;
|
| | | }
|
| | | foreach (var data in BindList)
|
| | | {
|
| | | //设备
|
| | | if (data.BindType != 2)
|
| | | {
|
| | | if (dicChangedMac.ContainsKey(data.BindMacAddr) == false)
|
| | | {
|
| | | //这个东西没有选择模板,则不执行
|
| | | continue;
|
| | | }
|
| | | //替换mac
|
| | | data.BindMacAddr = dicChangedMac[data.BindMacAddr];
|
| | | }
|
| | | }
|
| | | var localDevice = Common.LocalDevice.Current.GetDevice(this.DeviceMac, this.DeviceEpoint);
|
| | | if (localDevice != null)
|
| | | {
|
| | | //变更缓存
|
| | | TemplateCommonLogic.Current.SaveDeviceMemmoryData(localDevice);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | //获取对象
|
| | | var classData = new ModelDeviceBindData();
|
| | | var memoryData = (ModelDeviceBindData)this.GetDeviceModelDataClass(device, ModelDeviceSaveEnum.A设备绑定列表, classData);
|
| | |
|
| | | //清空绑定表的返回值
|
| | | string clearResult = "{"
|
| | | + SetDouMarks("Device_ID") + ":" + (int)device.Type + ","
|
| | | + SetDouMarks("DeviceAddr") + ":" + SetDouMarks(device.DeviceAddr) + ","
|
| | | + SetDouMarks("Epoint") + ":" + device.DeviceEpoint + ","
|
| | | + SetDouMarks("Data_ID") + ":5006,"
|
| | | + SetDouMarks("Data") + ": {"
|
| | | + SetDouMarks("Result") + ": 0,"
|
| | | + SetDouMarks("ResultRemark") + ":" + SetDouMarks("Success") + "}"
|
| | | + "}";
|
| | |
|
| | | if (memoryData.ListReceiveResult.Count == 1)
|
| | | {
|
| | | //设备绑定有三条命令 第一条为清空
|
| | | memoryData.ListReceiveResult.Insert(0, "{" + SetDouMarks("Result") + ": 0," + SetDouMarks("ResultRemark") + ": " + SetDouMarks("Success") + " }");
|
| | | memoryData.ListReceiveResult.Insert(0, clearResult);
|
| | | memoryData.ListReceiveTopic.Insert(0, "Bind/ClearBindInfo_Respon");
|
| | | memoryData.ListSendTopic.Insert(0, "Bind/ClearBindInfo");
|
| | |
|
| | |
| | | memoryData.ListReceiveTopic.Add(string.Empty);
|
| | | memoryData.ListSendTopic.Add(string.Empty);
|
| | | }
|
| | | else
|
| | | {
|
| | | memoryData.ListReceiveResult[0] = clearResult;
|
| | | memoryData.ListReceiveTopic[0] = "Bind/ClearBindInfo_Respon";
|
| | | memoryData.ListSendTopic[0] = "Bind/ClearBindInfo";
|
| | | }
|
| | |
|
| | | memoryData.ListSendTopic[2] = "Bind/SetBind";
|
| | | memoryData.ListReceiveTopic[2] = "Bind/SetBind_Respon";
|
| | | memoryData.ListReceiveResult[2] = receiveResult;
|
| | |
| | | if (memoryData.ListReceiveResult.Count == 1)
|
| | | {
|
| | | //设备绑定有三条命令 第一条为清空
|
| | | memoryData.ListReceiveResult.Insert(0, "{" + SetDouMarks("Result") + ": 0," + SetDouMarks("ResultRemark") + ": " + SetDouMarks("Success") + " }");
|
| | | memoryData.ListReceiveTopic.Insert(0, "Bind/ClearBindInfo_Respon");
|
| | | memoryData.ListSendTopic.Insert(0, "Bind/ClearBindInfo");
|
| | | memoryData.ListReceiveResult.Insert(0, string.Empty);
|
| | | memoryData.ListReceiveTopic.Insert(0, string.Empty);
|
| | | memoryData.ListSendTopic.Insert(0, string.Empty);
|
| | |
|
| | | memoryData.ListReceiveResult.Add(string.Empty);
|
| | | memoryData.ListReceiveTopic.Add(string.Empty);
|
| | |
| | | + SetDouMarks("Data_ID") + ": 100,"
|
| | | + SetDouMarks("Data") + ": {"
|
| | | + SetDouMarks("Result") + ": 0,"
|
| | | + SetDouMarks("MacName") + ":" + macName+ "}"
|
| | | + SetDouMarks("MacName") + ":" + SetDouMarks(macName) + "}"
|
| | | + "}";
|
| | |
|
| | | memoryData.ListSendTopic[0] = "MacRename";
|
| | |
| | |
|
| | | //设备返回的结果
|
| | | var receiveResult = "{"
|
| | | + SetDouMarks("Device_ID") + ": 2,"
|
| | | + SetDouMarks("Device_ID") + ": " + (int)device.Type + ","
|
| | | + SetDouMarks("DeviceAddr") + ": " + SetDouMarks(device.DeviceAddr) + ","
|
| | | + SetDouMarks("Epoint") + ": " + device.DeviceEpoint + ","
|
| | | + SetDouMarks("Data_ID") + ": 96,"
|
| | | + SetDouMarks("Data") + ": {"
|
| | | + SetDouMarks("Result") + ": 0,"
|
| | | + SetDouMarks("DeviceName") + ":" + deviceName + "}"
|
| | | + SetDouMarks("DeviceName") + ":" + SetDouMarks(deviceName) + "}"
|
| | | + "}";
|
| | |
|
| | | memoryData.ListSendTopic[0] = "DeviceRename";
|
| | |
| | | frameLogo.Height = Application.GetRealHeight(484);
|
| | | frameLogo.BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
|
| | | bodyFrameLayout.AddChidren(frameLogo);
|
| | | //图标的容器
|
| | | var frameLogoBackground = new FrameLayoutBase();
|
| | | frameLogoBackground.Y = Application.GetRealHeight(104);
|
| | | frameLogoBackground.Width = this.GetPictrueRealSize(167);
|
| | | frameLogoBackground.Height = this.GetPictrueRealSize(167);
|
| | | frameLogoBackground.Gravity = Gravity.CenterHorizontal;
|
| | | frameLogoBackground.BackgroundColor = ZigbeeColor.Current.GXCButtonBlackSelectedColor;
|
| | | frameLogoBackground.Radius = (uint)Application.GetRealHeight(37);
|
| | | frameLogo.AddChidren(frameLogoBackground);
|
| | | //图标
|
| | | var btnLogo = new IconViewControl(144);
|
| | | btnLogo.UnSelectedImagePath = "Account/Logo_White.png";
|
| | | btnLogo.Gravity = Gravity.Center;
|
| | | frameLogoBackground.AddChidren(btnLogo);
|
| | | var btnLogo = new ImageView();
|
| | | btnLogo.Y = Application.GetRealHeight(104);
|
| | | btnLogo.Width = this.GetPictrueRealSize(167);
|
| | | btnLogo.Height = this.GetPictrueRealSize(167);
|
| | | btnLogo.Radius = (uint)Application.GetRealHeight(37);
|
| | | btnLogo.ImagePath = "Account/Logo_Evoyo.png";
|
| | | btnLogo.Gravity = Gravity.CenterHorizontal;
|
| | | frameLogo.AddChidren(btnLogo);
|
| | | //Evoyo Home
|
| | | var btnName = new NormalViewControl(700, 60, true);
|
| | | btnName.Y = Application.GetRealHeight(294);
|
| | |
| | | /// </summary>
|
| | | private void InitMiddleFrame()
|
| | | {
|
| | | //打开进度条
|
| | | this.ShowProgressBar(); |
| | | HdlThreadLogic.Current.RunThread(() => |
| | | {
|
| | | var strUrl = "https://hdlcontrol.com/%E6%B2%B3%E4%B8%9C%E9%9A%90%E7%A7%81%E6%9D%83%E6%94%BF%E7%AD%9620200331.txt";
|
| | | var byteData = Common.CommonPage.Instance.DoRequestZigbeeHttpsInterface(strUrl, null, null, "GET");
|
| | | if (byteData == null)
|
| | | {
|
| | | this.CloseProgressBar(ShowReLoadMode.YES);
|
| | | return;
|
| | | }
|
| | | this.CloseProgressBar();
|
| | | var receipData = System.Text.Encoding.UTF8.GetString(byteData);
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | var btnText = new EditTextView();
|
| | | btnText.Height = bodyFrameLayout.Height;
|
| | | btnText.TextSize = 12;
|
| | | btnText.TextColor = UserCenterColor.Current.TextGrayColor3;
|
| | | btnText.TextAlignment = TextAlignment.TopLeft;
|
| | | btnText.Foucs = false;
|
| | | bodyFrameLayout.AddChidren(btnText);
|
| | | btnText.Text = receipData;
|
| | | });
|
| | | }); |
| | | var btnControl = new WebView();
|
| | | btnControl.Width = bodyFrameLayout.Width;
|
| | | btnControl.Height = bodyFrameLayout.Height;
|
| | | bodyFrameLayout.AddChidren(btnControl);
|
| | |
|
| | | //加载网址
|
| | | btnControl.LoadRequest("https://www.baidu.com"); |
| | | } |
| | | } |
| | | } |
| | |
| | | public string CreatedOnUtc = string.Empty;
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 网关需要升级的信息
|
| | | /// </summary>
|
| | | public class GatewayNeedUpdateInfo
|
| | | {
|
| | | /// <summary>
|
| | | /// 升级固件的全路径
|
| | | /// </summary>
|
| | | public string FullFileName = string.Empty;
|
| | | /// <summary>
|
| | | /// 虚拟驱动号
|
| | | /// </summary>
|
| | | public int DriveCode = -1;
|
| | | /// <summary>
|
| | | /// 1:Linux的升级固件 2:协调器的升级固件 3:虚拟驱动的升级固件
|
| | | /// </summary>
|
| | | public int Div = -1;
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 数据备份类__________________________
|
| | |
| | | #region ■ 变量声明___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 进度值改变,如果要设置初始进度值,此变量要在设置初始进度值之前进行设置(第一个参数0:滑动的时候,1:手指弹起的时候)
|
| | | /// </summary>
|
| | | public Action<int, int> ProgressChangedEvent = null;
|
| | | /// <summary>
|
| | | /// 进度条可用时的背景色
|
| | | /// </summary>
|
| | | private uint ProgressBarEnableColor = 0;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private int m_SeekBarPadding = Application.GetRealWidth(20);
|
| | | /// <summary>
|
| | | /// 进度值改变,如果要设置初始进度值,此变量要在设置初始进度值之前进行设置(第一个参数0:滑动的时候,1:手指弹起的时候)
|
| | | /// 进度条与左右两边的边框的边距(重写底层属性)
|
| | | /// </summary>
|
| | | public Action<int, int> ProgressChangedEvent = null;
|
| | | public new int SeekBarPadding
|
| | | {
|
| | | set
|
| | | {
|
| | | m_SeekBarPadding = value;
|
| | | base.SeekBarPadding = value;
|
| | | }
|
| | | }
|
| | |
|
| | | private int m_MaxValue = 0;
|
| | | /// <summary>
|
| | | /// 进度条事件的触发时间间隔(默认没有间隔,单位为毫秒)
|
| | | /// 进度条最大值(重写底层属性)
|
| | | /// </summary>
|
| | | public int EventWaitTime = -1;
|
| | | public new int MaxValue
|
| | | {
|
| | | set
|
| | | {
|
| | | m_MaxValue = value;
|
| | | base.MaxValue = value;
|
| | | }
|
| | | }
|
| | |
|
| | | private int m_MinValue = 0;
|
| | | /// <summary>
|
| | | /// 前回时间
|
| | | /// 进度条最小值(重写底层属性)
|
| | | /// </summary>
|
| | | private DateTime oldTime = DateTime.Now;
|
| | | public new int MinValue
|
| | | {
|
| | | set
|
| | | {
|
| | | m_MinValue = value;
|
| | | base.MinValue = value;
|
| | | }
|
| | | }
|
| | | /// <summary>
|
| | | /// 上方显示的文本
|
| | | /// </summary>
|
| | | private NormalViewControl btnTopView = null;
|
| | |
|
| | | #endregion
|
| | |
|
| | |
| | | this.OnProgressChangedEvent -= this.MyProgressChangedEvent;
|
| | | return;
|
| | | }
|
| | | //时间间隔
|
| | | if (EventWaitTime != -1)
|
| | | {
|
| | | if ((DateTime.Now - oldTime).TotalMilliseconds < EventWaitTime) { return; }
|
| | | oldTime = DateTime.Now;
|
| | | }
|
| | |
|
| | | this.ProgressChangedEvent(0, value);
|
| | | }
|
| | |
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 自定义上方显示文本_________________
|
| | |
|
| | | /// <summary>
|
| | | /// 在上方显示自定义文本
|
| | | /// </summary>
|
| | | /// <param name="i_width">宽度(真实值)</param>
|
| | | /// <param name="textSize">文字大小</param>
|
| | | /// <param name="textColor">文字颜色</param>
|
| | | public void ShowCustomTextView(int i_width, int textSize, uint textColor)
|
| | | {
|
| | | if (this.btnTopView != null) { return; }
|
| | |
|
| | | int contrHeight = Application.GetRealHeight(60);
|
| | | this.btnTopView = new NormalViewControl(i_width, contrHeight, false);
|
| | | btnTopView.TextColor = textColor;
|
| | | btnTopView.TextSize = textSize;
|
| | | btnTopView.TextAlignment = TextAlignment.Center;
|
| | | btnTopView.Y = this.Y - contrHeight + Application.GetRealHeight(20);
|
| | | //初始化时,X轴可以不用理会
|
| | |
|
| | | this.Parent.AddChidren(btnTopView);
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 设置自定义文本信息
|
| | | /// </summary>
|
| | | /// <param name="i_text"></param>
|
| | | public void SetCustomText(string i_text)
|
| | | {
|
| | | if (this.btnTopView == null) { return; }
|
| | |
|
| | | this.btnTopView.Text = i_text;
|
| | | //滑条最左边的距离
|
| | | int XX = this.X + this.m_SeekBarPadding;
|
| | | //当前滑条所在的大致百分比
|
| | | decimal persent = (decimal)(this.Progress - this.m_MinValue) / (this.m_MaxValue - this.m_MinValue);
|
| | | //当前滑条所在的大致位置
|
| | | XX += (int)((this.Width - this.m_SeekBarPadding * 2) * persent);
|
| | | //因为要居中,所以减掉自定义控件的宽度的一般
|
| | | XX = XX - this.btnTopView.Width / 2;
|
| | |
|
| | | this.btnTopView.X = XX;
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 一般方法___________________________
|
| | |
|
| | | /// <summary>
|
| | |
| | | {
|
| | | //删除检测文件
|
| | | System.IO.File.Delete(checkFile);
|
| | | //关闭进度条
|
| | | ProgressFormBar.Current.Close();
|
| | | //同步失败
|
| | | return -1;
|
| | | }
|
| | |
| | | //重新刷新住宅对象
|
| | | UserCenterLogic.RefreshHomeObject();
|
| | |
|
| | | //关闭进度条
|
| | | ProgressFormBar.Current.Close();
|
| | |
|
| | | return 1;
|
| | | }
|
| | |
|
| | |
| | | //设置进度值
|
| | | ProgressFormBar.Current.SetValue(i + 1, listFileCount);
|
| | | }
|
| | | //关闭进度条
|
| | | ProgressFormBar.Current.Close();
|
| | |
|
| | | //允许按系统的返回键
|
| | | Shared.Common.CommonPage.BackKeyCanClick = true;
|
| | | UserCenterResourse.AccountOption.AppCanSignout = true;
|
| | |
| | | ProgressFormBar.Current.Close();
|
| | | return false;
|
| | | }
|
| | | //关闭进度条
|
| | | ProgressFormBar.Current.Close();
|
| | |
|
| | | //清空全部房间
|
| | | HdlRoomLogic.Current.DeleteAllRoom();
|
| | |
| | | //刷新本地缓存
|
| | | UserCenterLogic.RefreshAllMemory();
|
| | |
|
| | | //关闭进度条
|
| | | ProgressFormBar.Current.Close();
|
| | |
|
| | | return true;
|
| | | }
|
| | |
|
| | |
| | | //将网关的数据设置到本地缓存中
|
| | | this.SetGatewayDataToLocalMemmory(gateway, result);
|
| | | }
|
| | | if (gateway.HomeId == string.Empty)
|
| | | {
|
| | | gateway.HomeId = Config.Instance.Home.Id;
|
| | | }
|
| | | return gateway;
|
| | | }
|
| | | catch (Exception ex)
|
| | |
| | | /// </summary>
|
| | | public static void RefreshHomeObject()
|
| | | {
|
| | | //备份的数据,有可能是主人自己上传的,如果管理员登陆时,他获取的备份数据有点特殊
|
| | | //比如下面这三个东西在主账号那里是不需要的
|
| | | bool isOthreShare = Config.Instance.Home.IsOthreShare;
|
| | | int accountType = Config.Instance.Home.AccountType;
|
| | | string mainMark = Config.Instance.Home.MainUserDistributedMark;
|
| | | double Longitude = Config.Instance.Home.Longitude;
|
| | | double Latitude = Config.Instance.Home.Latitude;
|
| | | //还原住宅对象
|
| | | Config.Instance.Home = HdlResidenceLogic.Current.GetHouseByHouseId(Config.Instance.Home.Id);
|
| | | Config.Instance.Home.IsOthreShare = isOthreShare;
|
| | | Config.Instance.Home.AccountType = accountType;
|
| | | Config.Instance.Home.MainUserDistributedMark = mainMark;
|
| | | Config.Instance.Home.Longitude = Longitude;
|
| | | Config.Instance.Home.Latitude = Latitude;
|
| | | var home = HdlResidenceLogic.Current.GetHouseByHouseId(Config.Instance.Home.Id);
|
| | |
|
| | | //变更楼层
|
| | | Config.Instance.Home.FloorDics = home.FloorDics;
|
| | | Config.Instance.Home.CurrentFloorId = string.Empty;
|
| | | Config.Instance.Home.Save(false);
|
| | |
|
| | | //主页需要重新刷新
|
| | | UserView.UserPage.Instance.RefreshAllForm = true;
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | btnValue.Y = Application.GetRealHeight(58);
|
| | | btnValue.X = frameTable.Width - Application.GetRealWidth(300 + 58);
|
| | | btnValue.TextAlignment = TextAlignment.CenterRight;
|
| | | btnValue.TextID = R.MyInternationalizationString.uGetting;
|
| | | frameTable.AddChidren(btnValue, ChidrenBindMode.BindEvent);
|
| | | rowInfo.btnValue = btnValue;
|
| | | //室内温度
|
| | | if (device.currentLocalTemperature == 0)
|
| | | {
|
| | | //0℃
|
| | | btnValue.Text = "0.0℃";
|
| | | }
|
| | | else
|
| | | {
|
| | | btnValue.Text = device.currentLocalTemperature + ".0℃";
|
| | | }
|
| | |
|
| | | //警告图标
|
| | | var btnWarningIcon = new IconViewControl(69);
|
| | | btnWarningIcon.X = btnIconBack.X;
|
| | |
| | | {
|
| | | if (btnSwitch.IsSelected == false)
|
| | | {
|
| | | //打开空调
|
| | | var result = await HdlDeviceAirConditionerLogic.Current.OpenAirConditioner(device);
|
| | | if (result == false)
|
| | | //如果不是虚拟住宅的话
|
| | | if (Common.Config.Instance.Home.IsVirtually == false)
|
| | | {
|
| | | return;
|
| | | //打开空调
|
| | | var result = await HdlDeviceAirConditionerLogic.Current.OpenAirConditioner(device);
|
| | | if (result == false)
|
| | | {
|
| | | return;
|
| | | }
|
| | | }
|
| | | btnIcon.IsSelected = true;
|
| | | btnIconBack.BackgroundColor = 0xfffef1ed;
|
| | | }
|
| | | else
|
| | | {
|
| | | //关闭空调
|
| | | var result = await HdlDeviceAirConditionerLogic.Current.CloseAirConditioner(device);
|
| | | if (result == false)
|
| | | //如果不是虚拟住宅的话
|
| | | if (Common.Config.Instance.Home.IsVirtually == false)
|
| | | {
|
| | | return;
|
| | | //关闭空调
|
| | | var result = await HdlDeviceAirConditionerLogic.Current.CloseAirConditioner(device);
|
| | | if (result == false)
|
| | | {
|
| | | return;
|
| | | }
|
| | | }
|
| | | btnIcon.IsSelected = false;
|
| | | btnIconBack.BackgroundColor = 0xfff5f6fa;
|
| | | }
|
| | | btnSwitch.IsSelected = !btnSwitch.IsSelected;
|
| | | //如果是虚拟住宅的话
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | device.currentSystemMode = btnSwitch.IsSelected == true ? 3 : 0;
|
| | | }
|
| | | };
|
| | | //如果是展示模板的话
|
| | | if (Common.Config.Instance.Home.IsShowTemplate == true)
|
| | | {
|
| | | btnSwitch.CanClick = false;
|
| | | }
|
| | |
|
| | | frameTable.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | |
| | | /// </summary>
|
| | | private void SetReadAttributeComand()
|
| | | {
|
| | | //如果是虚拟住宅或者展示模板的话
|
| | | if (Common.Config.Instance.Home.IsShowTemplate == true || Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | return;
|
| | | }
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | for (int i = 0; i < listDevice.Count; i++)
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | var localDevice = Common.LocalDevice.Current.GetDevice(mainkeys);
|
| | | if (localDevice == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | var rowInfo = dicControl[mainkeys];
|
| | | for (int i = 0; i < device.DeviceStatusReport.AttriBute.Count; i++)
|
| | |
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | //室内温度
|
| | | if (data.AttriButeData == 0)
|
| | | if (((AC)localDevice).currentLocalTemperature == 0)
|
| | | {
|
| | | //0℃
|
| | | rowInfo.btnValue.Text = "0.0℃";
|
| | | }
|
| | | else if (data.AttriButeData > 32767)
|
| | | {
|
| | | //负数(特殊处理)
|
| | | string strValue = (data.AttriButeData - 65536).ToString();
|
| | | //小数点需要一位
|
| | | strValue = strValue.Substring(0, strValue.Length - 1);
|
| | | rowInfo.btnValue.Text = strValue.Insert(strValue.Length - 1, ".") + "℃";
|
| | | }
|
| | | else
|
| | | {
|
| | | //小数点需要一位
|
| | | string strValue = data.AttriButeData.ToString();
|
| | | strValue = strValue.Substring(0, strValue.Length - 1);
|
| | | rowInfo.btnValue.Text = strValue.Insert(strValue.Length - 1, ".") + "℃";
|
| | | rowInfo.btnValue.Text = ((AC)localDevice).currentLocalTemperature + ".0℃";
|
| | | }
|
| | | });
|
| | | }
|
| | |
| | | //导轨长度为0时
|
| | | if (curtainData.CurtainLength <= 0)
|
| | | {
|
| | | //电机数据异常,请重置电机
|
| | | //电机数据异常,确认已经安装导轨后,请重置电机
|
| | | this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uCurtainDataIsErrorPleaseResetCurtain));
|
| | | try
|
| | | {
|
| | |
| | | //Log出力
|
| | | string msg = "当前激活的界面[" + UserCenterResourse.NowActionFormID + "]";
|
| | | HdlLogLogic.Current.WriteLog(ex, msg);
|
| | | //电机数据异常,请重置电机
|
| | | //电机数据异常,确认已经安装导轨后,请重置电机
|
| | | this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uCurtainDataIsErrorPleaseResetCurtain));
|
| | | try
|
| | | {
|
| | |
| | | ProgressBar.Close();
|
| | | if (result2 == -1)
|
| | | {
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | //隐藏下拉刷新特效
|
| | | listView.EndHeaderRefreshing();
|
| | | });
|
| | | return;
|
| | | }
|
| | | }
|
old mode 100755
new mode 100644
| | |
| | | listview.AddChidren(rowVersion);
|
| | | rowVersion.AddLeftCaption(caption, 600);
|
| | | //版本
|
| | | this.btnAirConditionerVersion = rowVersion.AddMostRightView("", 800);
|
| | | this.btnAirConditionerVersion = rowVersion.AddMostRightView(((AC)this.listNewDevice[0]).AcModelVersion, 800);
|
| | | //底线
|
| | | rowVersion.AddBottomLine();
|
| | |
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | //获取中....
|
| | | this.btnAirConditionerVersion.TextID = R.MyInternationalizationString.uGetting;
|
| | | //如果是虚拟住宅或者展示模板的话
|
| | | if (Config.Instance.Home.IsShowTemplate == true || Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | bool notVersion = ((AC)this.listNewDevice[0]).AcModelVersion == string.Empty;
|
| | | if (notVersion == true)
|
| | | {
|
| | | //获取中
|
| | | btnAirConditionerVersion.Text = Language.StringByID(R.MyInternationalizationString.uGetting);
|
| | | }
|
| | | HdlThreadLogic.Current.RunThread(async () =>
|
| | | {
|
| | | //读取空调模块版本
|
| | | var result = await HdlDeviceAirConditionerLogic.Current.ReadACFirewareVersionAsync(listNewDevice[0]);
|
| | | if (result == null || result.readACFirewareVersionResponData == null || result.readACFirewareVersionResponData.Status != 0)
|
| | | {
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | //获取失败
|
| | | btnAirConditionerVersion.TextID = R.MyInternationalizationString.uGettingFail;
|
| | | });
|
| | | { |
| | | if (notVersion == true) |
| | | { |
| | | //获取失败 |
| | | HdlThreadLogic.Current.RunMain(() => |
| | | { |
| | | btnAirConditionerVersion.Text = Language.StringByID(R.MyInternationalizationString.uGettingFail); |
| | | }); |
| | | }
|
| | | return;
|
| | | }
|
| | | else
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | btnAirConditionerVersion.Text = result.readACFirewareVersionResponData.FirewareVersion.Replace("-", string.Empty);
|
| | | });
|
| | | }
|
| | | ((AC)this.listNewDevice[0]).AcModelVersion = result.readACFirewareVersionResponData.FirewareVersion.Replace("-", string.Empty);
|
| | | btnAirConditionerVersion.Text = ((AC)this.listNewDevice[0]).AcModelVersion;
|
| | | });
|
| | | });
|
| | | }
|
| | |
|
| | |
| | |
|
| | | //设置设备功能类型 (不能在接收回路的地方写入,不然网关可能会超负荷)
|
| | | Common.LocalDevice.Current.RefreshDeviceFunctionType(device, device, true);
|
| | | System.Threading.Thread.Sleep(100);
|
| | | //获取设备的固定属性
|
| | | HdlDeviceFixedAttributeLogic.Current.SetAllFixedAttributeToDevice(device);
|
| | | System.Threading.Thread.Sleep(100);
|
| | | }
|
| | |
|
| | | //目前就弄一个
|
| | |
| | | btnDrop.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //显示Wifi下拉列表
|
| | | this.ShowWifiListView(rowWifi);
|
| | | //this.ShowWifiListView(rowWifi);
|
| | | };
|
| | |
|
| | | //密码
|
| | |
| | | btnDrop.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //显示Wifi下拉列表
|
| | | this.ShowWifiListView(rowWifi);
|
| | | //this.ShowWifiListView(rowWifi);
|
| | | };
|
| | |
|
| | | //密码
|
| | |
| | | rowProtuct.UseClickStatu = false;
|
| | | listView.AddChidren(rowProtuct);
|
| | | rowProtuct.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uManufacturerName), 300);
|
| | | rowProtuct.AddMostRightView("HDL", 600);
|
| | | rowProtuct.AddMostRightView("广州河东科技有限公司", 600);
|
| | |
|
| | | listView.AdjustRealHeight(Application.GetRealHeight(23));
|
| | |
|
| | |
| | | {
|
| | | keys = Guid.NewGuid().ToString();
|
| | | }
|
| | | Common.Config.Instance.Home.FloorDics[keys] = textValue;
|
| | | Common.Config.Instance.Home.Save();
|
| | | if (Common.Config.Instance.Home.CurrentFloorId == string.Empty)
|
| | | {
|
| | | //创建第一个新的楼层的话,需要去刷新主页左边的房间列表
|
| | | HdlRoomLogic.Current.RefreshRoomListView();
|
| | | }
|
| | | Common.Config.Instance.Home.FloorDics[keys] = textValue;
|
| | | Common.Config.Instance.Home.Save();
|
| | |
|
| | | if (btnFloor != null)
|
| | | {
|
| | | btnFloor.Text = textValue;
|
| | |
| | | || device.Type == DeviceType.DimmableLight//调光器
|
| | | || device.Type == DeviceType.ColorDimmableLight//彩灯
|
| | | || device.Type == DeviceType.OnOffOutput//继电器
|
| | | || device.Type == DeviceType.ColorTemperatureLight//色温灯
|
| | | || device.Type == DeviceType.WindowCoveringDevice)//窗帘
|
| | | {
|
| | | string unSelectPath = string.Empty;
|
| | |
| | | |
| | | namespace Shared.Phone.UserView |
| | | { |
| | | /// <summary>
|
| | | /// 该类已经废弃
|
| | | /// </summary> |
| | | public class LoginLoading : FrameLayout |
| | | { |
| | | public LoginLoading() |
| | |
| | | if (Shared.Application.IsFullScreen == true)
|
| | | {
|
| | | //高版本的苹果机型,屏幕底部会有一个黑色的杠
|
| | | ControlCommonResourse.BottomFrameHeight = Application.GetRealHeight(242);
|
| | | ControlCommonResourse.BottomFrameHeight = Application.GetRealHeight(180);
|
| | | }
|
| | | #endif
|
| | | //用户主体界面(中间部分)
|
| | |
| | | intent.PutExtra("ESVideoUUID", mESVideoInfo.ESVideoUUID);//室外机UUID,例:JJY000007FSEYX |
| | | intent.PutExtra("IsCollect", mESVideoInfo.IsCollect);//是否收藏 |
| | | intent.PutExtra("RoomName", mESVideoInfo.RoomName);//房间命名,例 8栋1单元0801 |
| | | intent.AddFlags(Android.Content.ActivityFlags.NewTask); |
| | | intent.PutExtra("Type", 0);//类型,0 监控,1反呼 |
| | | Application.Activity.StartActivity(intent); |
| | | #endif |
| | |
| | | /// 是否启用摆风功能 false:不使用摆风功能 true:使用摆风功能
|
| | | /// </summary> |
| | | public bool UseSwingFunction = true; |
| | | /// <summary>
|
| | | /// 空调模块版本
|
| | | /// </summary> |
| | | public string AcModelVersion = string.Empty; |
| | | /// <summary> |
| | | /// 过滤网清洗状态 |
| | | /// </summary> |
| | |
| | | /// </summary>
|
| | | public const int uWorkRoom = 16060;
|
| | | /// <summary>
|
| | | /// 电机数据异常,请重置电机
|
| | | /// 电机数据异常,确认已经安装导轨后,请重置电机
|
| | | /// </summary>
|
| | | public const int uCurtainDataIsErrorPleaseResetCurtain = 16061;
|
| | | /// <summary>
|