| | |
| | | 537=Humidity statistics |
| | | 538=Uint |
| | | 539=Smart panel |
| | | 540=In Alarm |
| | | |
| | | |
| | | 1000=Room Humidity |
| | | 1001=V-chip |
| | |
| | | 537=湿度统计图 |
| | | 538=单位 |
| | | 539=智能面板 |
| | | 540=报警中 |
| | | |
| | | 1000=室内湿度 |
| | | 1001=童锁 |
| | |
| | | 537=Humidity statistics |
| | | 538=Uint |
| | | 539=Smart panel |
| | | 419=Нормальный |
| | | |
| | | |
| | | |
| | |
| | | 537=Humidity statistics |
| | | 538=Uint |
| | | 539=Smart panel |
| | | 540=En alarma |
| | | |
| | | |
| | | 1000=Humedad de ambiente |
| | |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\sensorhelp_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Panel\PanelHelpAlarmBgIcon.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Panel\PanelHelpNormalBgIcon.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\screenpanel.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Panel\PanelEnviBg.png" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <AndroidResource Include="Resources\values\colors.xml" /> |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.5.6" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202204201"> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.5.6" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202205051"> |
| | | <uses-sdk android:minSdkVersion="28" android:targetSdkVersion="30" /> |
| | | <!--友盟--> |
| | | <!--<uses-sdk android:minSdkVersion="8"></uses-sdk>--> |
| | |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\sensorhelp_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Panel\PanelHelpAlarmBgIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Panel\PanelHelpNormalBgIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\screenpanel.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Panel\PanelEnviBg.png" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ITunesArtwork Include="iTunesArtwork" /> |
| | |
| | | 536=Temperature statistics |
| | | 537=Humidity statistics |
| | | 538=Uint |
| | | 539=Smart panel |
| | | 540=In Alarm |
| | | 541=Monitoring |
| | | |
| | | |
| | | 1000=Room Humidity |
| | |
| | | 7154=Arrive |
| | | 7155=Distress/Normal |
| | | 7156=Distress |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | 536=温度统计图 |
| | | 537=湿度统计图 |
| | | 538=单位 |
| | | 539=智能面板 |
| | | 540=报警中 |
| | | 541=监控中 |
| | | |
| | | 1000=室内湿度 |
| | | 1001=童锁 |
| | |
| | | 7154=到达 |
| | | 7155=求救/正常 |
| | | 7156=求救 |
| | | |
| | | |
| | | |
| | | |
| | |
| | | 536=Temperature statistics |
| | | 537=Humidity statistics |
| | | 538=Uint |
| | | 539=Smart panel |
| | | 540=Нормальный |
| | | 541=Monitoring |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | [Spanish] |
| | | 1=Ingresar |
| | | 2=Número de teléfono |
| | | 3=Luz |
| | | 4=Correo |
| | | 5=Por favor ingrese numero de cuenta |
| | | 6=Contraseña |
| | | 7=Olvidar |
| | | 8=Registrarse |
| | | 9=Iniciar sesión |
| | | 10=Espere… |
| | | 11=Cerrar |
| | | 12=Código de verificación |
| | | 13=Contraseña de acceso |
| | | 14=Registrarse |
| | | 15=Número de teléfono |
| | | 16=Ingrese la contraseña |
| | | 17=Ingrese la contraseña nuevamente |
| | | 18=Código de verificación |
| | | 19=Número de teléfono incorrecto, ingrese nuevamente |
| | | 20=L a contraseña y la confirmación no coinciden. Ingrese la contraseña nuevamente |
| | | 21=El formato de la contraseña no cumple con los requisitos. Ingrese la contraseña nuevamente |
| | | 22=El usuario ya existe. Puede ingresar directamete |
| | | 23=Código de verificación incorrecto, vuelva a ingresarlo. |
| | | 24=Número de cuenta incorrrecta, por favor ingrese el correo correcto |
| | | 25=Correo |
| | | 26=Residencia |
| | | 27=Miembro |
| | | 28=Desarmar |
| | | 29=Armar |
| | | 30=Copia de seguridad |
| | | 31=Función auxiliar |
| | | 32=Añadir funciones |
| | | 33=Modo noche |
| | | 34=Configuración general |
| | | 35=Soporte |
| | | 36=Casa |
| | | 37=Categoría |
| | | 38=Inteligente |
| | | 39=Individual |
| | | 40=Inicio de sesión fallido, número de cuenta o contraseña incorrectos |
| | | 41=Error al enviar el codigo de verificación |
| | | 42=Error de red |
| | | 43=Error en el registo, inténtelo de nuevo |
| | | 44=Confirmar reinicio |
| | | 45=El numero de cuenta no existe, por favor asegúrese de estar registrado |
| | | 46=Inicio de sesion inválido, iniciar sesion nuevamente |
| | | 47=Centro Personal |
| | | 48=Nombre |
| | | 49=Código QR |
| | | 50=Teléfono |
| | | 51=Correo |
| | | 52=No enlazado |
| | | 53=Autorización de terceros |
| | | 54=Cambiar contraseña |
| | | 55=Configuración de desbloqueo |
| | | 56=Establecer contraseña, gesto, huella digital o identificación facil para proteger su provacidad |
| | | 57=Salir |
| | | 58=Habitación |
| | | 59=Equipo |
| | | 60=Función |
| | | 61=Brillo |
| | | 62=Configuración |
| | | 63=Locación |
| | | 64=Compartir |
| | | 65=Añadir acceso directo al escritorio |
| | | 66=Cambiar nombre |
| | | 67=Cancelar |
| | | 68=Confirmar |
| | | 69=Todo |
| | | 70=Cortina |
| | | 71=Nombre |
| | | 72=Address |
| | | 73=Gestión de plantas |
| | | 74=Gestión de habitaciones |
| | | 75=Migración de administrador |
| | | 76=Migración de privilegios |
| | | 77=Priviligio de depuración |
| | | 78=El administrador migra a otro usuario |
| | | 79=Toda los datos de la residencia migran al nuevo usuario |
| | | 80=Permitir que el personal visite su casa de forma remota |
| | | 81=Piso |
| | | 82=Añadir piso |
| | | 83=Cambiar nombre de piso |
| | | 84=Error al añadir, el piso ya existe |
| | | 85=Escena |
| | | 86=Borrar |
| | | 87=Inmediata |
| | | 88=Eliminar el piso o no? |
| | | 89=Añadir habitación |
| | | 90=Cmabiar la informacion de la habitación |
| | | 91=Información de la habitanción |
| | | 92=Nombre |
| | | 93=Piso |
| | | 94=Gestión funcionamiento |
| | | 95=Guardar |
| | | 96=Eliminar la habitación |
| | | 97=Galeria por defecto |
| | | 98=Camara |
| | | 99=Seleccionar de la galeria |
| | | 100=No asignado |
| | | 101=Asignado |
| | | 102=No asignado |
| | | 103=Eliminar la habitación o no? |
| | | 104=Tiempo de transición |
| | | 105=Temperatura interna |
| | | 106=AC |
| | | 107=Videoportero |
| | | 108=Sensor |
| | | 109=Monitor de seguridad |
| | | 110=Panel Inteligente |
| | | 111=Musica |
| | | 112=Aire fresco |
| | | 113=Ambiental |
| | | 114=Monitoreo de energía |
| | | 115=Electrodomésticos |
| | | 116=Bloqueo inteligente |
| | | 117=Calefacción |
| | | 118=Abrir |
| | | 119=Refrigeración |
| | | 120=Calefacción |
| | | 121=Deshumidificar |
| | | 122=Auto |
| | | 123=Suministro de aire |
| | | 124=Alto |
| | | 125=Medio |
| | | 126=Bajo |
| | | 127=Modo |
| | | 128=Velocidad del ventilador |
| | | 129=Estas seguro de apagar todas las funciones de la habitación? |
| | | 130=Abierta |
| | | 131=Añadido a favoritos |
| | | 132=Felicitaciones! Registro exitoso |
| | | 133=Inicio de sesion automático pronto…. |
| | | 134=El numero de no esta registrado, por favor registrese e ingrese nuevamente |
| | | 135=Por favor, obtener codigo de verificación |
| | | 136=La contraseña ha sido cambiada |
| | | 137=La direccion rsidencial no puede estar en blanco |
| | | 138=El nombre de la residencia no puede estar en blanco |
| | | 139=El nombre de la habitación no puede estar en blanco |
| | | 140=El nombre del piso no puede estar en blanco |
| | | 141=No se pudo revisar, el piso ya existe |
| | | 142=El nombre del equipo no puede estar en blanco |
| | | 143=El nombre del usuario no puede estar en blanco |
| | | 144=Nombre de usuario |
| | | 145=Seleccione la página para bloquear |
| | | 146=Puede seleccionar varias paginas que le gustaria mantener |
| | | 147=Error en codigo de verificación |
| | | 148=No protegido |
| | | 149=Cuando empieza |
| | | 150=Armar/Desarmar |
| | | 151=Desbloquear remotamente |
| | | 152=No se necesita contraseña/gesto al iniciar el software |
| | | 153=Iniciar sesión 5 minutos despues de salir de la página, se requiere el método de desbloqueo correspondiente. |
| | | 154=Centro de miembros - utiliza para debloquear la función de seguridad como armar/desarmar |
| | | 155=Usado para desbloquear la cerradura inteligente |
| | | 156=Configuración de desbloqueo |
| | | 157=Solo valido para host |
| | | 158=Desbloquear con contraseña |
| | | 159=Desbloquear con gesto |
| | | 160=Desbloquear con huella |
| | | 161=Desbloquear con identificación facial |
| | | 162=Configuración de contraseña numérica |
| | | 163=Configuración exitosa |
| | | 164=Configuración de gestos |
| | | 165=Por favor dibuja tu patron de desbloqueo |
| | | 166=Requiere al menos una conexión de 4 puntos, dibuje nuevamente |
| | | 167=El patron y la corfirmacion que dibujaste no coincide, dibuje nuevamente |
| | | 168=Por favor dibuje su patrón nuevamente |
| | | 169=Desbloquear con huella o no? |
| | | 170=Desbloquar con identificacion facial o no? |
| | | 171=Verificar la contraseña numérica |
| | | 172=Verificar el gesto |
| | | 173=Por favor ingrese el gesto original |
| | | 174=Por favor ingrese la contraseña numérica original |
| | | 175=Verificación fallida, error en la contraseña |
| | | 176=Cambiar la contraseña numérica |
| | | 177=Cambiar el gesto |
| | | 178=Cerrar la configuración de desbloqueo o no? |
| | | 179=Por favor verifique la huella |
| | | 180=Verificación fallida, error en el gesto |
| | | 181=General |
| | | 182=Dia |
| | | 183=Noche |
| | | 184=Abandonar |
| | | 185=Por favor enlace el piso |
| | | 186=Ajuste de la velocidad del ventilador |
| | | 187=Ventilador |
| | | 188=Enchufe |
| | | 189=Nivel |
| | | 190=Chl |
| | | 191=Vol |
| | | 192=TV |
| | | 193=La habitanción existe, error al cambiar |
| | | 194=Medio Ambiente |
| | | 195=Contaminación fuerte |
| | | 196=Contaminación leve |
| | | 197=Bueno |
| | | 198=Excelente |
| | | 199=Frio helado |
| | | 200=Frio |
| | | 201=Frio |
| | | 202=Confort |
| | | 203=Tibio |
| | | 204=Caliente |
| | | 205=Extremadamente caliente |
| | | 206=Hasta el estandar |
| | | 207=Contaminación leve |
| | | 208=Contaminación media |
| | | 209=Contaminación fuerte |
| | | 210=Fresco |
| | | 211=Turbidez |
| | | 212=Hipoxia |
| | | 213=Hipoxia severa |
| | | 214=Húmedo |
| | | 215=Húmedo |
| | | 216=Seco |
| | | 217=Temperatura |
| | | 218=Humedad |
| | | 219=Rango |
| | | 220=Nivel |
| | | 221=Valor de color |
| | | 222=PM1.0 |
| | | 223=PM2.5 |
| | | 224=Ruido |
| | | 225=Fuerza del viento |
| | | 226=CO2 |
| | | 227=TV02 |
| | | 228=Dia |
| | | 229=Semana |
| | | 230=Mes |
| | | 231=Otra región |
| | | 232=Administración de miembros |
| | | 233=Apodo |
| | | 234=Autoridad Administrativa |
| | | 235=Crear una escena |
| | | 236=Apodo no puede quedar en blanco |
| | | 237=Editar apodo |
| | | 238=La región utilizada |
| | | 239=Añadir miembro |
| | | 240=Por favor ingrese el número de cuenta del miembro |
| | | |
| | | 241=Escanear codigo QR |
| | | 242=Confirmar la invitación |
| | | 243=Error en número de cuenta, por favor chequear |
| | | 244=Agregue correctamente al miembro |
| | | 245=Error de datos, por favor intente de nuevo |
| | | 246=Error al añadir, el numero de cuenta del miembro no esta registrada |
| | | |
| | | 247=No puedes agregarte a ti mismo. |
| | | 248=El usuario no existe en esta residencia |
| | | 249=Se ha agregado el número de cuenta del miembro, por lo que no se puede volver a agregar. |
| | | |
| | | 250=Error de operación |
| | | 251=Error al agregar, autoridad no valida |
| | | 252=Guardado correctamente |
| | | 253=Guardando…espere un momento. |
| | | 254=Adopo editado |
| | | 255=Eliminar este miembro |
| | | 256=Sin favoritos |
| | | 257=Introduzca el contenido |
| | | 258=Bienvenido al nuevo miembro |
| | | 259=Esta seguro de elimianr este miembro? |
| | | 260=Introduzca la contraseña de inicio de sesión |
| | | 261=Cambio de residencia exitoso |
| | | 262=Seleccionar todo |
| | | 263=Compartir la selección funcional |
| | | 264=Confirmar uso compartido |
| | | 265=Compartir en |
| | | 266=Error de uso compartido funcional |
| | | 267=Uso compartido funcional exitoso |
| | | 268=Correo |
| | | 269=Cambiar el enlace |
| | | 270=Eliminar el enlace |
| | | 271=Correo |
| | | 272=Cambiar la dirección de correo |
| | | 273=Cambiar el método de verificación |
| | | 274=El código de verificación ha sido enviado, por favor ingrese |
| | | 275=Reenviar |
| | | 276=Verificación correcta |
| | | 277=Correo |
| | | 278=Por favor ingrese el nuevo correo |
| | | 279=Enlazar correctamente su correo electrónico a su cuenta |
| | | 280=No vincular su correo electrónica a su cuenta |
| | | 281=Eliminar el enlace de correo electrónico |
| | | 282=Eliminación correcta de enlace |
| | | 283=Número de telefono |
| | | 284=Número de telefono |
| | | 285=Número de telefono |
| | | 286=Vincular correctamente su numero de teléfono a su cuenta |
| | | 287=No puede vincular su numero de teléfono a su cuenta |
| | | 288=Cambiar el enlace |
| | | 289=Quitar el enlace |
| | | 290=No se puede obtener el historial |
| | | 291=Sin favoritos |
| | | 292=Acerca de ON+ |
| | | 293=Miembro |
| | | 294=Administrador |
| | | 295=Cambiar la contraseña |
| | | 296=Antes de cambiar la contraseña iniciar sesion |
| | | 297=Por favor verifique ID |
| | | 298=Verificación telefonica |
| | | 299=Verificación de correo electronico |
| | | 300=No se ha enlazado a la dirección de correo electronico, no puede verificar |
| | | 301=No se ha enlazado a un numero telefonico, no se puede verificar |
| | | 302=Proceder al enlace |
| | | 303=Eliminado correctamente el enlace a su numero de telefono |
| | | 304=El codigo de verificación se ha enviado a: |
| | | 305=Telefono |
| | | 306=Correo |
| | | 307=Recibió nuevos datos, esta seguro de anularlos? |
| | | 308=Automatización |
| | | 309=Crear una escena |
| | | 310=Añadir escena |
| | | 311=Configuración basica |
| | | 312=Nombre |
| | | 313=Region |
| | | 314=Completo |
| | | 315=Vista completa de la residencia |
| | | 316=Sleccionar |
| | | 317=Ya añadido |
| | | 318=Conmutador |
| | | 319=Velocidad del ventilador |
| | | 320=Modo |
| | | 321=Encendido |
| | | 322=Apagado |
| | | 323=Escena |
| | | 324=Retardo de escena |
| | | 325=Configuración de retardo |
| | | 326=Retardo |
| | | 327=Capturar la escena |
| | | 328=Escena de pelicula |
| | | 329=General |
| | | 330=Modo automático |
| | | 331=Potencia calentamiento suelo |
| | | 332=Refrigeración suelo |
| | | 333=Potencia de refrigeración del suelo |
| | | 334=Ajustar el porcentaje |
| | | 335=Sin retardo |
| | | 336=No hay escena disponible. Añade uno! |
| | | 337=Editar la escena |
| | | 338=El nombre de la escena no puede estar en blanco |
| | | 339=El nombre de la escena ya existe, por favor revise |
| | | 340=El nombre de la habitación ya existe, por favor revise |
| | | 341=Eliminar esta escena o no? |
| | | 342=La puerta de enlace esta fuera de linea, falla de conexión remota |
| | | 343=Error MAC, error de conexión remota. |
| | | 344=Error de conexión remota. |
| | | 345=Telefono |
| | | 346=Correo |
| | | 347=Ingrese el nuevo numero de telefono ceular |
| | | 348=Ya se ha utilizado el numero de telefono celular |
| | | 349=Ya se ha utilizado la direccion de correo electronico |
| | | 350=La dirección de correo electrónico es la misma que la actual, sin necesidad de cambiar. |
| | | 351=El número de teléfono es la mismo que la actual, sin necesidad de cambiar. |
| | | 352=Asignación de piso |
| | | 353=Separar |
| | | 354=Cerrar |
| | | 355=Acerca de |
| | | 356=Numero de version |
| | | 357=Esta funcion no esta disponible! |
| | | 358=Telefono |
| | | 359=Correo |
| | | 360=Escena de panel |
| | | 361=No añadido |
| | | 362=Seleccionar todo |
| | | 363=No se puede comunicar con el servidor, no se puede editar la información del dispositivo |
| | | 364=No se puede comunicar con el servidor, no se puede editar la información de la habitación |
| | | 365=No se puede comunicar con el servidor, no se puede editar la información de la escena |
| | | 366=No se puede comunicar con el servidor, no se puede eliminar la escena |
| | | 367=No se puede comunicar con el servidor, no se puede eliminar el piso |
| | | 368=Bienvenido a disfrutar de ON+ |
| | | 369=Añadir residencia |
| | | 370=Conviértete en miembro de la familia |
| | | 371=No se puede utilizar la funcion, por favor verifique su conexión |
| | | 372=No se puede crear una escena, por favro verifique su conexión |
| | | 373=Error al agregar un piso |
| | | 374=Los datos residenciales se han eliminado, APP cambiará automáticamente a otra residencia. |
| | | 375=El gateway no esta conectado al servidor, no se puede crear la escena |
| | | 376=No se puede introducir un carácter especial |
| | | 377=Toda la residencia |
| | | 378=Tiempo de transición |
| | | 379=Velocidad de transicion |
| | | 380=Esta funcion no esta disponible! |
| | | 381=Recargar |
| | | 400=Bienvenido a casa |
| | | 401=Codigo de barras no válido, intentelo de nuevo |
| | | 402=Inténtelo de nuevo |
| | | 403=Temperatura de color |
| | | 404=Ajuste rápido |
| | | 405=Acogedor |
| | | 406=Reunión |
| | | 407=Lectura |
| | | 408=Añadir |
| | | 409=Marca de función |
| | | 410=No ha agregado ningun dispositov de pataforma en la actualidad |
| | | 411=Otros dispositivos de plataforma son compatibles con proveedores de serviciso externos |
| | | 412=Añadir |
| | | 413=Controlador no activado |
| | | 414=Controlador activado |
| | | 415=Alguien |
| | | 416=Registro |
| | | 417=Fuga de agua |
| | | 418=En alarma |
| | | 419=Normal |
| | | 420=Seco caliente |
| | | 421=Secado al aire |
| | | 422=Desinfectar |
| | | 423=Iluminación |
| | | 424=Tiempo |
| | | 425=Tiempo seco caliente |
| | | 426=Tiempo de secado al aire |
| | | 427=Tiempo de desinfección |
| | | 428=Tiempo Anión |
| | | 429=H |
| | | 430=Min |
| | | 431=Actualmente esta agregando cualquier dispositivos de plataforma a |
| | | 432=Otros dispositivos de plataforma son compatibles con proveedores de serviciso externos |
| | | 433=Valvula de agua |
| | | 434=Interruptor de tiempo |
| | | 435=Control remoto |
| | | 436=Dispositivos añadido |
| | | 437=Lista de dispositivos |
| | | 438=humedad:{0}% aire:viento {1}:{2} |
| | | 439=Tiempo real: {0} kw |
| | | 440=Siguiente paso |
| | | 441=Seleccione todas las áreas de estado de captura |
| | | 442=Generar escena |
| | | 443=Implementación personalizada |
| | | 444=Centro de seguridad |
| | | 445=Defensa de la casa |
| | | 446=Defensa en casa |
| | | 447=Defensa de vacaciones |
| | | 448=Implementación fija |
| | | 449=*Deshacer defensa no afecta |
| | | 450=Defensa contra desastres |
| | | 451=Defensa de 24 horas |
| | | 452=Alarma antirrobo |
| | | 453=Silenciar alarma |
| | | 454=Información de implementación |
| | | 455=El nombre no puede estar en blanco |
| | | 456=Lienzo |
| | | 457=Consumo de energía |
| | | 458=Fecha |
| | | 459=Consumo de energía en tiempo real |
| | | 460=Consumo energético de este mes |
| | | 461=Exterior/Interior |
| | | 462=Aun no has añadido ningun dispositivo |
| | | |
| | | 463=Introduzca el código SN del dispositivo |
| | | 464=Puede empezar a usar la onda milimétrica Zhaoguan |
| | | 465=Eliminar dispositivo |
| | | 466=STB |
| | | 467=Proyector |
| | | 468=Alguien cayó |
| | | 469=Alguien está en |
| | | |
| | | 470=Bajo protección |
| | | 471=Sensor de onda milimétrica |
| | | 472=Exterior |
| | | 473=Columpio |
| | | 474=Oscilación hacia arriba y hacia abajo |
| | | 475=Gira a izquierda y derecha |
| | | 476=Añadir residencia |
| | | 477=Columpio |
| | | 478=Patrón |
| | | 479=Velocidad |
| | | 480=Sensor ambiental |
| | | 481=Puede empezar a usar el sensor ambiental |
| | | 482=Sensor de gas |
| | | 483=Introduzca el código MAC del dispositivo |
| | | 484=Abierto |
| | | 485=Comprobar/Modificar |
| | | 486=Función de defensa/Estado de alarma |
| | | 487=Objetivo de alarma despues de la activación |
| | | 488=Paso de rostro |
| | | 489=Aplicar identificación facil a: |
| | | 490=Control de acceso a la comunidad |
| | | 491=Acerda de identificacion facil y privacidad |
| | | 492=Borrar datos |
| | | 493=Resetear identificación facial |
| | | 494=Establecer identificación facial |
| | | 495=Configuración paso de rostro |
| | | 496=No hay ningun estado de implementacion de tareas asociado |
| | | 497=Personalizado |
| | | 498=Implementación retrasada |
| | | 499=Agregar función de defensa |
| | | 500=Agregar destino de alarma |
| | | 501=Alarma de seguridad: se activa en {0} |
| | | 502=Borrar la alarma de seguridad? |
| | | 503=Exceso de estandar |
| | | 504=Bueno |
| | | 505=Excelente |
| | | 506=Indentificacion facil ingresada correctamente |
| | | 507=Ingreso identificación facil fallida |
| | | 508=Formaldehído |
| | | 509=Introduzca el nombre de seguridad |
| | | 510=Seleccione el destino de implementación |
| | | 511=Atenuación combinada |
| | | 512=Mensajes no estan habilitados, vaya a configuración |
| | | 513=Introduzca el codigo de emparejamiento |
| | | 514=La información de la ubicación del gateway no está configurada |
| | | 515=Agregar seguridad |
| | | 516=Withdrawal |
| | | ------ |
| | | 517=Instantaneous value |
| | | 518=Cumulative power consumption |
| | | 519=Voltage (V) |
| | | 520=Electric Current (A) |
| | | 521=Power (W) |
| | | 522=Refresh |
| | | 523=Delay alarm |
| | | 524=Bypass |
| | | 525=Enable |
| | | 526=Cancel account |
| | | 527=Homekit support notes |
| | | 528=Firmware update |
| | | 529= |
| | | 530=In order to prevent the wrong touch and click of opening and closing the door and ensure family safety, please enter your door lock password. |
| | | 531=Password free unlocking within five minutes |
| | | 532=The device is offline and cannot be operated temporarily |
| | | 533=Statistical Chart |
| | | 534=Data |
| | | 535=Dew point temperature |
| | | 536=Temperature statistics |
| | | 537=Humidity statistics |
| | | 538=Uint |
| | | 539=Smart panel |
| | | 540=En alarma |
| | | 541=Monitoring |
| | | |
| | | |
| | | 1000=Humedad de ambiente |
| | | 1001=V-chip |
| | | 1002=Anión |
| | | 1003=Estirilización |
| | | 1004=Humidificar |
| | | 1005=Restablecimiento del elemento de filtro |
| | | 1006=Iluminación |
| | | 1007=Automático |
| | | 1008=Manual |
| | | 1009=Fuerte |
| | | 1010=Dormir |
| | | 1011=Tiempo |
| | | 1012=Velocidad del viento |
| | | 1013=Engranaje |
| | | 1014=Confirme si el elemento filtrante se ha restablecido y opere el equipo de acuerdo con el manual de instrucciones para que la vida útil del elemento filtrante se vuelva a cronometrar |
| | | 1015=Marcha baja |
| | | 1016=Engranaje medio |
| | | 1017=Marcha alta |
| | | 1018=Configuración de temportización |
| | | 1019=Hora |
| | | 1020=Tiempo del elemento de filtro: |
| | | 1021=Filtro de aire |
| | | 1022=Velocidad actual del viento |
| | | 1023=Cancelar tiempo |
| | | 1024=Robot de barrido de pisos |
| | | 1025=Succión |
| | | 1026=1° Marcha |
| | | 1027=2° Marcha |
| | | 1028=3° Marcha |
| | | 1029=Carga |
| | | 1030=Voz |
| | | 1031=Silenciar |
| | | 1032=Modo de limpieza |
| | | 1033=Gestion de consumibles |
| | | 1034=Historia |
| | | 1035=Automático |
| | | 1036=Aleatorio |
| | | 1037=Muro |
| | | 1038=Espiral |
| | | 1039=Área total limpia |
| | | 1040=Tiempo total de limpieza |
| | | 1041=Vida útil restante del cepillo lateral |
| | | 1042=Vida útil residual del cepillo de rodillos |
| | | 1043=Vida útil restante de la pantalla de filtro |
| | | 1044=Restablecer pincel de bordes |
| | | 1045=Restablecer cepillo de rollo |
| | | 1046=Restablecer pantalla |
| | | 1047=Confirmar para restablecer el pincel de bordes? |
| | | 1048=Confirmar para restablecer el cepillo de rollo? |
| | | 1049=Confirmar para restablecer la pantalla? |
| | | 1050=Agregar dispositivo |
| | | 1051=Mini control remoto inteligente |
| | | 1052=Agregar control remoto por infrarrojos |
| | | 1053=Presione el botón del control remoto infrarrojo{0} durante 3 segundos y la luz indicadora{0} se enciende en azul rápidamente |
| | | 1054=Asegúrese de que su Bluetooth{0} esté activado y se pueda buscar |
| | | 1055=Siguiente paso |
| | | 1056=Buscando dispositivo… |
| | | 1057=No se ha encontrado ningún mando a distancia por infrarrojos |
| | | 1058=1.Compruebe si el dispositivo está{0} encendido normalmente{0}2.Compruebe si la función Bluetooth{0} está activada normalmente{0}3.Compruebe si el indicador{0} luz parpadea en azul |
| | | 1059=Buscar de nuevo |
| | | 1060=Conectar WiFi |
| | | 1061=En la actualidad, solo es compatible con la red WiFi 2.4G{0} y no admite nombres WiFi{0} con caracteres chinos |
| | | 1062=Contraseña |
| | | 1063=Conectando… |
| | | 1064=Haga que el control remoto por infrarrojos{0} lo más cerca posible del enrutador WiFi |
| | | 1065=Enlace de red |
| | | 1066=Subir a nube |
| | | 1067=Conectado con éxito |
| | | 1068=1.Compruebe si el dispositivo está{0} encendido normalmente{0}2.Active la función Bluetooth{0}3.Presione el botón durante 10 s y el indicador{0} luz estará encendida |
| | | 1069=Error al agregar |
| | | 1070=Agregado con éxito |
| | | 1071=¡Puedes empezar a usar el control infrarrojo{0}remote! |
| | | 1072=Empezar a usar |
| | | 1073=Por favor encender Bluethooth |
| | | 1074=Información de ubicación (GBS) no disponible |
| | | 1075=Red no disponible |
| | | 1076=Seleccione el mando a distancia por infrarrojos |
| | | 1077=Aire fresco |
| | | 1078=Pantalla de filtro residual |
| | | 1079=Energia |
| | | 1080=Ventilado |
| | | ;别 |
| | | 1081=1° Marcha |
| | | 1082=2° Marcha |
| | | 1083=3° Marcha |
| | | 1084=1° Marcha |
| | | 1085=2° Marcha |
| | | 1086=3° Marcha |
| | | 1087=Desbloquear |
| | | 1088=Temp. Contraseña |
| | | 1089=Conectado |
| | | 1090=Desconectado |
| | | 1091=Generar |
| | | 1092=Tiempo efectivo |
| | | 1093=Tiempo de caducidad |
| | | 1094=Seleccionar hora |
| | | 1095=Seleccionar fecha |
| | | 1096=Generar |
| | | 1097=Se ha copiado la contraseña actual |
| | | 1098=Borrar contraseña? |
| | | 1099=El tiempo de caducidad debe ser posterior al tiempo efectivo |
| | | 1100=Método de desbloqueo |
| | | 1101=Se sincronizará con el bloqueo real, ¿confirmar para eliminar? |
| | | 1102=Borrar |
| | | 1103=Comentar |
| | | 1104=El comentario no puede estar en blanco |
| | | 1105=Asignar a: |
| | | 1106=Escena de destino no existe |
| | | 1107=Seleccionar escena |
| | | 1108=Desbloquear |
| | | 1109=Siempre encendido |
| | | 1110=Configuración |
| | | 1111=Automatización |
| | | 1112=Activar el modo "Siempre encendido" |
| | | 1113=Desactivar el modo "Siempre encendido" |
| | | 1114=Editar |
| | | 1115=Siempre Encendido estará apagado {0} |
| | | 1116=Condición |
| | | 1117=Movimiento |
| | | 1118=Siempre encendido |
| | | 1119=Bloquear |
| | | 1120=Usuario |
| | | 1121=Método de desbloqueo |
| | | 1122=Huella digital |
| | | 1123=Tarjeta |
| | | 1124=Clave |
| | | 1125=Información |
| | | 1126=Desbloquear |
| | | 1127=Alarma |
| | | 1128=Sin conexión |
| | | 1129=Para el primer usuario, introduzca la contraseña. |
| | | 1130=Introduzca la contraseña de administrador |
| | | 1131=Enlace correcto |
| | | 1132=Saltar a la contraseña personal para desbloquear |
| | | 1133=Saltar |
| | | 1134=Por favor, dibuja tu patrón |
| | | 1135=El bloqueo estará siempre encendido después de la configuración, confirme para continuar |
| | | 1136=Confirmar |
| | | 1137=Caducar |
| | | 1138=Siempre Encendido caducará despues de {0} horas |
| | | 1139=Introduzca el tiempo de caducidad |
| | | 1140=El tiempo de caducidad no debe ser superior a 72 horas |
| | | 1141=El tiempo de caducidad no debe ser inferior a 1 hora |
| | | 1142=Error al establecer conexión, intentelo de nuevo |
| | | 1143=No se puede verificar el ID de administrador, vuelva a iniciar sesión en la cuenta |
| | | 1144=Su residencia está siendo migrada a otro HDL |
| | | 1145=Nota: |
| | | 1. Todos sus datos de residencia se migrarán a un nuevo usuario. {0} 2. Después de la migración, el miembro original será{0}automáticamente desvinculado de esta residencia. {0} 3. La nueva cuenta es una HDL válida. {0} 4. La cuenta del receptor no puede ser la misma{0} que la del lado de la migración. |
| | | 1147=Confirmar |
| | | 1148=Cuenta del receptor de entrada |
| | | 1149=Perfil |
| | | 1150=Confirmar migración de administrador de {0} a {1} |
| | | 1151=La cuenta no existe |
| | | 1152=No transferir la propiedad a usted mismo |
| | | 1153=Terminar |
| | | 1154=Transferir al usuario, por favor espere... |
| | | 1155={0} se ha convertido en administrador residencial |
| | | 1156=Los datos de residencia se eliminarán de su cuenta |
| | | 1157=No se puede migrar |
| | | 1158=Inténtelo de nuevo |
| | | 1159=Migración de la autoridad de administración |
| | | 1160=Su autoridad de administración se está migrando a otros miembros |
| | | 1161=1.Sus datos (datos en la nube) de la residencia serán{0}migrabados al nuevo administrador{0}2.Sus datos se intercambiarán con el miembro objetivo{0}y su permiso se cambiará al miembro objetivo{0} |
| | | 1162=Confirmar |
| | | 1163=No hay miembros para elegir |
| | | 1164=Confirmar la migración de la autoridad de administración de {0} a {1} |
| | | 1165=Migrar correctamente |
| | | 1166=No se puede migrar |
| | | 1167=Migrar correctamente, y sus permisos se convertirán en miembros normales |
| | | |
| | | 4000=Videoportero |
| | | 4001=Registro de llamadas |
| | | 4002=*Los registros en la nube solo se conservan durante 30 días |
| | | 4003=Llamada telefónica a domicilio |
| | | 4004=Contestado |
| | | 4005=Desbloqueado |
| | | 4006=Año |
| | | 4007=De |
| | | 4008=Llamada |
| | | 4009=Desbloqueado |
| | | 4010=Perdido |
| | | 4011=Rechazado |
| | | 4012=¡Los parámetros de configuración son anormales! |
| | | 4013=Código QR de control de acceso |
| | | 4014=Contraseña temporal |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | 5000=Musica |
| | | 5001=Grupo |
| | | 5002=Configuracion |
| | | 5003=Información general |
| | | 5004=Reproductor multimedia |
| | | 5005=Bluetooth |
| | | 5006=Region |
| | | 5007=Lista de canciones |
| | | 5008=Mis favoritos |
| | | 5009=Mi lista |
| | | 5010=Seleccionar fuente |
| | | 5011=Local |
| | | 5012=USB |
| | | 5013=Radio en linea |
| | | 5014=QQ musica |
| | | 5015=Bluetooth |
| | | 5016=Entrada de linea |
| | | 5017=Revisar el nombre |
| | | 5018=Individual |
| | | 5019=Juego aleatorio |
| | | 5020=Lista |
| | | 5021=Ha cambiado a: |
| | | 5022=Cancelar |
| | | 5023=Borrar |
| | | 5024=Editar |
| | | 5025=El nombre de la lista es el mismo |
| | | 5026=El nombre de la lista esta en blanco |
| | | 5027=Introduzca el nombre de la lista |
| | | 5028=Agregar nueva lista |
| | | 5029=Preguntar |
| | | 5030=Eliminar la carpeta o no? |
| | | 5031=Confirmar |
| | | 5032=El nombre está en blanco |
| | | 5033=Añadido a la lista de canciones |
| | | 5034=Radio |
| | | 5035=Seleccionar grupo |
| | | 5036=Play |
| | | 5037=Seleccione al menos mas de 2 reproductores multimedia |
| | | 5038=No se pueden seleccionar 2 o más de 2 reproductores multimedia principales para convertirse en un grupo |
| | | 5039=No ha seleccionado el reproductor multimedia |
| | | 5040=Seleccione esta opción para quitar el reproductor multimedia |
| | | 5041=No se ha seleccionado quitar el reproductor multimedia |
| | | 5042=Configurando |
| | | 5043=Borrando… |
| | | 5044=Volumen |
| | | 5045=Volumen general |
| | | 5046=Ajustar volumen |
| | | 5047="QQ music" no se ha instalado en su teléfono celular, proceda en el Centro de aplicaciones. |
| | | |
| | | 6000=Normal |
| | | 6001=Estado del dispositivo |
| | | 6002=piezas |
| | | 6003=Dispositivo de control IR actual |
| | | 6004=Se ha añadido el mando a distancia |
| | | 6005=AC |
| | | 6006=TV |
| | | 6007=Ventilador |
| | | 6008=Decodificador |
| | | 6009=DVD |
| | | 6010=Proyector |
| | | 6011=Personalizado |
| | | 6012=IR Control |
| | | 6013=Administración de dispositivos |
| | | 6014=Agregar mando de distancia |
| | | 6015=En linea |
| | | 6016=Sin conexión |
| | | 6017=Número de version |
| | | 6018=Introduzca el nombre de mando a distancia |
| | | 6019=Recordatorio: Después de crear el mando a distancia, se puede encontrar y utilizar en Function-Electrical Category{\r\n} |
| | | 6020=Boton recomendado |
| | | 6021=Introduzca el nombre del botón |
| | | 6022=Siguiente |
| | | 6023=Potencia |
| | | 6024=Volumen+ |
| | | 6025=Volumen- |
| | | 6026=Channel+ |
| | | 6027=Channel- |
| | | 6028=Subir |
| | | 6029=Bajar |
| | | 6030=Izquierda |
| | | 6031=Derecha |
| | | 6032=Silenciar |
| | | 6034=Confirmar |
| | | 6035=Reproducir |
| | | 6037=Salir |
| | | 6038=Menu |
| | | 6039=Pausar |
| | | 6040=Volver |
| | | 6041=Detener |
| | | 6042=Pagina de inicio |
| | | 6043=Avance rápido |
| | | 6044=Rebobinar |
| | | 6045=Tiempo |
| | | 6046=Copiar funcion de control remoto |
| | | 6047=Apunta al centro del mando a distancia y pulsa el mismo botón |
| | | 6048=Mando a distancia inteligente |
| | | 6049=Agregar botón |
| | | 6050=*Pulsación larga para la clasificación personalizada |
| | | 6051=Hecho |
| | | 6052=Agregado correctmente |
| | | 6053=Se puede clasificar -funcion-operación electrica y uso |
| | | 6054=Clasificación |
| | | 6055=Nombre del mando a distancia |
| | | 6056=Región |
| | | 6057=Continuar agregando |
| | | 6058=Eléctrico |
| | | 6059=Error al agregar |
| | | 6060=Reintentar |
| | | 6061=Hacer coincidir el mando a distancia |
| | | 6062=Haga clic en el botón de abajo |
| | | 6063=Confirmar si el dispositivo esta respondiendo |
| | | 6064=Error de control |
| | | 6065=Control exitoso |
| | | 6066=Encendido |
| | | 6067=Modo de enfriamiento |
| | | 6068= |
| | | 6069=Temperatura 26° |
| | | 6070=Eliminar dispositivo |
| | | 6071=Modificar nombre |
| | | 6072=Confirmar eliminación |
| | | 6073=Cancelar |
| | | 6074=El mando a distancia no puede superar los 10 puntos |
| | | 6075=El área donde pertenece el control remoto: |
| | | 6076=Editar información |
| | | 6077=Actualización de la versión |
| | | 6078=El sistema está en mantenimiento ~ Inténtelo de nuevo más tarde ~ |
| | | 6079=Error al obtener datos |
| | | 6080=Esta funcion no se admite temporalmente |
| | | 6081=Seleccionar banda IR |
| | | 6082= |
| | | 6083=Baja velocidad |
| | | 6084=Interruptor de velocidad del viento |
| | | 6085=Alta velocidad |
| | | 6086=Auto |
| | | 6087=Temperatura+ |
| | | 6088=Temperatura- |
| | | 6089=Purificador de aire |
| | | 6090=Calentador de agua |
| | | 6091=Producto no existe |
| | | 6092=El dispositivo no existe |
| | | 6093=El dispositivo no esta en linea |
| | | 6094=El dispositivo de puerta de enlace no existe |
| | | 6095=Mas de 30 botondes de adición |
| | | 6000=Renombrar |
| | | 6001=Introduzca el nombre |
| | | 6002=Xiaodu |
| | | 6003=aispeech |
| | | 6004=El sistema está en mantenimiento ~ Inténtelo de nuevo más tarde ~ |
| | | 6005=Desvinculado |
| | | 6006=Altavoz inteligente |
| | | 6007=Controlar contenido |
| | | 6008=Error al cagar datos |
| | | 6009=Error al configurar datos |
| | | 6010="Todavía no hay altavoz", "Vaya a la aplicación de terceros para vincular el altavoz inteligente". |
| | | 6011=La modificación de los comentarios no tiene éxito |
| | | 6012=Quieres desvincularte? |
| | | 6013=Desvinculación |
| | | 6014=transferir a app de terceros |
| | | 6015=Añadir altavoces |
| | | 7000=Crear automatización |
| | | 7001=Etidar automatización |
| | | 7002=Si |
| | | 7003=Cuando cumple las siguientes condiciones al mismo tiempo |
| | | 7004=Cundo cumple una de las condiciones siguintes |
| | | 7005=Continuar con la ejecución |
| | | 7006=L asiguiente acción |
| | | 7007=Método de reciclaje |
| | | 7008=Ejecutar una vez |
| | | 7009=Todos los días |
| | | 7010=Cada semana |
| | | 7011=Cada mes |
| | | 7012=Guardar |
| | | 7013=Mensaje push |
| | | 7014=Enviar notificación |
| | | 7015=Seleccionar la condición |
| | | 7016=Momento |
| | | 7017=Seleccione la condición de tiempo |
| | | 7018=Hora |
| | | 7019=Intervalo de tiempo |
| | | 7020=Hora |
| | | 7021=Minuto |
| | | 7022=Segundo |
| | | 7023=Cancelar |
| | | 7024=Seguro |
| | | 7025=*Debe ejecutar la automatización que establezca una vez durante el intervalo de tiempo establecido. |
| | | 7026=Hora de inicio |
| | | 7027=Hora de finalización |
| | | 7028=Función |
| | | 7029=Seleccionar condición funcional |
| | | 7030=Toda la región |
| | | 7031=Toda la función |
| | | 7032=Encendido |
| | | 7033=Apagado |
| | | 7034=Conmutador |
| | | 7035=Completo |
| | | 7036=Agregar ejecución |
| | | 7037=Lunes |
| | | 7038=Martes |
| | | 7039=Miércoles |
| | | 7040=Jueves |
| | | 7041=Viernes |
| | | 7042=Sábado |
| | | 7043=Domingo |
| | | 7044=Cumplir con la condición |
| | | 7045=Configuración |
| | | 7046=Nombre |
| | | 7047=Cambiar el nombre |
| | | 7048=El nombre de la automatización ya existe |
| | | 7049=Eliminar automatización o no? |
| | | 7050=Agregar escena |
| | | 7051=Retraso |
| | | 7052=No se puede guardar, inténtelo de nuevo |
| | | 7053=No se puede eliminar, inténtelo de nuevo |
| | | 7054=Pausar |
| | | 7055=Brillo |
| | | 7056=Porcentaje |
| | | 7057=Modo |
| | | 7058=Enfriamiento |
| | | 7059=Calefacción |
| | | 7060=Automático |
| | | 7061=Deshumidificar |
| | | 7062=Temperatura |
| | | 7063=Velocidad de ventilador |
| | | 7064=Día |
| | | 7065=Noche |
| | | 7066=Abandonar |
| | | 7067=General |
| | | 7068=Tiempo |
| | | 7069=No ha configurado la automatización, procesa a configurar |
| | | 7070=Nada está aquí |
| | | 7071=No se ha establecido la hora de inicio, por favor configurar |
| | | 7072=La hora de finalización no se ha establecido, por favor estableza |
| | | 7073=La hora de inicio y la hora de finalizacion no deben ser las mismas |
| | | 7074=La hora de inicio no debe ser mayor a la hora de finalización |
| | | 7075=La condicion no debe estar en blanco |
| | | 7076=Target no debe estar en blanco |
| | | 7077=La hora no se ha establecido, por favor establezca |
| | | 7078=L a condición o el objetivo no deben estar en blanco |
| | | 7079=L a puerta de enlace esta fuera de línea |
| | | 7080=Salida/Puesta de sol/Mediodía |
| | | 7081=Amanecer |
| | | 7082=Puesta de sol |
| | | 7083=Mediodía |
| | | 7084=A tiempo |
| | | 7085=Avance |
| | | 7086=Minutos |
| | | 7087=Cambio exterior |
| | | 7088=Seleccionar condicion de cambio al aire libre |
| | | 7089=Temperatura exterior, humedad, cambio de PM2.5 |
| | | 7090=Cambio de clima (clima urbano) |
| | | 7091=Cambio en el entorno exterior |
| | | 7092=Temperatura superior a |
| | | 7093=Temperatura inferior |
| | | 7094=Humedad superior a |
| | | 7095=Humedad por debajo |
| | | 7096=PM2.5 supeior a |
| | | 7097=PM2.5 por debajo |
| | | 7098=Día soleado |
| | | 7099=Nublado |
| | | 7100= |
| | | 7101=*Establezca el valor en este rango (1 ~ 100). |
| | | 7102=Sin valor establecido |
| | | 7103=Excelente: 0 ~ 35ug/m3 |
| | | 7104=Bueno: 36 ~ 75ug/m3 |
| | | 7105=Contaminación lumínica: 76 ~ 115ug/m3 |
| | | 7106=Contaminación moderada: 116 ~ 150ug/m3 |
| | | 7107=Contaminación intensa: > 150ug/m3 |
| | | 7108=Fuga/Sin fuga |
| | | 7109=Fuga |
| | | 7110=Sin fuga |
| | | 7111=Fuga de agua/sin fugas de agua |
| | | 7112=Fuga de agua |
| | | 7113=Sin fuga de agua |
| | | 7114=Alguien/Nadie |
| | | 7115=Alguien |
| | | 7116=Nadie |
| | | 7117=Abierto/Cerrado |
| | | 7118=Activado |
| | | 7119=Cerrar |
| | | 7120=Función anti-desmantelamiento |
| | | 7121=En linea |
| | | 7122=Fuera de linea |
| | | 7123=Calidad del aire |
| | | 7124=Excelente |
| | | 7125=Bueno |
| | | 7126=Pobre |
| | | 7127=Enviar notificación |
| | | 7128=Contenido de la notificación |
| | | 7129=(dentro de los 100 caracteres) |
| | | 7130=Selección de cuenta |
| | | 7131=Aplicación push |
| | | 7132=Automatización |
| | | 7133=Ejecutado |
| | | 7134=Estado de destino |
| | | 7135=Caída |
| | | 7136=Temperatura |
| | | 7137=Humedad |
| | | 7138=PM2.5 |
| | | 7139=CO2 |
| | | 7140=TVOC |
| | | 7141=Exceder |
| | | 7142=Grave |
| | | 7143=Alto |
| | | 7144=Excelencia |
| | | 7145=Seguridad |
| | | 7146=Añadir seguridad |
| | | 7147=Armado |
| | | 7148=Desarmado |
| | | 7149=Manualmente |
| | | 7150=Inteligente |
| | | 7151=Bueno |
| | | 7152=Dejar o Arrivar a un lugar |
| | | 7153=Salir |
| | | 7154=Llegar |
| | | 9000=Inicio sesión con un nuevo número de teléfono celular |
| | | 9001=Inicie sesión con una nueva dirección de correo eléctrónico |
| | | 9002=Nuevo numero de celular revisado |
| | | 9003=Nuevo numero de celular enlazado |
| | | 9004=Nueva dirección de correo electrónico revisado |
| | | 9005=Nueva dirección de correo electrónico enlazado |
| | | 9006=El código de verificación puede enviarse más tarde, espere. |
| | | 9007=Por favor, espere |
| | | 9008=Volver |
| | | 9009=El usuario no desea ser nombrado |
| | | 9010=Nueva contraseña |
| | | 9011=Introduzca la nueva contraseña nuevamente |
| | | 9012=De acuerdo |
| | | 9013=Acuerdo de servicio |
| | | 9014=Normativa de protección de la información del usuario |
| | | 9015=y |
| | | 9016=Lea y acepte el Acuerdo de servicio del usuario y las regulaciones de protección de la información del usuario. |
| | | 9017=Esta seguro de cerrar sesión? |
| | | 9018=Seleccione pais/región |
| | | 9019=Actualizar ahora |
| | | 9020=Ahora no |
| | | 9021=País/región |
| | | 9022=Información del servidor |
| | | 9023=Servidor actual |
| | | 9024=*El servidor hace referencia a la base de datos para la nube, sin necesidad alguna, no se recomienda realizar migración de datos. |
| | | 9025=Si es necesaria la migración de datos, marque |
| | | 9026=Introducción a la función |
| | | 9027=Quejas |
| | | 9028=Actualización de la versión |
| | | 9029=(por favor indique "quejas" en el título, luego procesaremos en prioridad.) |
| | | 9030=Copia realizada |
| | | 9031=No hay nada aquí |
| | | 9032=Obtener nueva versión |
| | | 9033=Última versión |
| | | 9034=Que puedo hacer por ti? |
| | | 9035=Problema de función |
| | | 9036=Problema de escena |
| | | 9037=Soporte de aplicaciones |
| | | 9038=(Preguntas frecuentes) |
| | | 9039=Compartir y función |
| | | 9040=Alertas |
| | | 9041=Información del sistema |
| | | 9042=Centro de información |
| | | 9043=Tenga en cuenta que su número de cuenta ha iniciado sesión en otro lugar. Si no lo hace usted mismo, cambie la contraseña de inmediato. |
| | | 9044=Cargado correctamente |
| | | 9045=No se puede cargar |
| | | 9046=Revisado correctamente |
| | | 9047=La contraseña que ha revisado ha entrado en vigor, vuelva a iniciar sesión. |
| | | 9048=Iniciar sesion con la contraseña del numero de cuenta |
| | | 9049=Contraseña incorrecta para muchas veces, ¡el número de cuenta está bloqueado! |
| | | 9050=Verificar la identificación facial |
| | | 9051=Error al guardar la identificación facial del usuario |
| | | 9052=La notificación push de registro esta disponible |
| | | 9053=La notificación push de registro es anormal |
| | | 9054=Verificación numerica de contraseña |
| | | 9055=Verificación de gestos |
| | | 9056=Año |
| | | 9057=Sin función regional |
| | | 9058=Guardar o no? |
| | | 9059=No compartir ahora |
| | | 9060=Usos-permiso |
| | | 9061=Encuentra tu contraseña haciendo clic en "Olvidé mi contraseña", o inténtalo de nuevo en {0} minuto. |
| | | 9062=Comprobar |
| | | 9063=Todavía tienes {0} veces. |
| | | 9064=Altavoz inteligente |
| | | 9065=Gestión de datos |
| | | 9066=Comentarios |
| | | 9067=Los comentarios no pueden estar en blanco |
| | | 9068=Desea desvincularse? |
| | | 9069=Aviso de propiedad |
| | | 10000=Contrasela no válida, vuelva a iniciar sesión |
| | | 10001=Error al solicitar el servidor, inténtelo de nuevo más tarde. |
| | | 10002=Mantenimiento del sistema, inténtalo de nuevo mas tarde |
| | | 10003=No puede iniciar sesión, agregue la residencia al principio. |
| | | 10004=El número de cuenta ya existe |
| | | 10005=Envías el código de verificación con demasiada frecuencia, inténtalo de nuevo más tarde. |
| | | 10006=Error de firma |
| | | 10007=Sistema ocupado, intentelo de nuevo mas tarde! |
| | | 10008=Contrasea no válida para iniciar sesión |
| | | 10009=El usuario ha sido deshabilitado |
| | | 10010=Error de contraseña original |
| | | 10011=El número de subcuenta ya existe |
| | | 10012=El npumero de subcuenta no existe |
| | | 10013=No esta permitido agregarse como miembro |
| | | 10014=La residencia actual no pertenece al este número de cuenta |
| | | 10015=El nombre de la residencia ya existe |
| | | 10016=La residencia no existe |
| | | 10017=Error de solicitud, parámetro anormal! |
| | | 10018=El número que enlazaste es duplicado |
| | | 10019=Enlazar el gateway primero |
| | | 10020=El gateway no existe |
| | | 10021=El gateway esta fuera de línea |
| | | 10022=El dispositivo está fuera de línea |
| | | 10023=Error de control |
| | | 10024=La escena ya existe |
| | | 10025=La automatización ya existe |
| | | 10026=Spk no admite esta función |
| | | 10027=Spk no admite este valor funcional |
| | | 10028=No tienes permiso |
| | | 10029=El destino del dispositivo está duplicado |
| | | 10030=No tiene permiso para el control remoto |
| | | 10031=El dispositivo no debe estar en blanco |
| | | 10032=El usuario no tiene permiso |
| | | 10033=El dispositivo no existe |
| | |
| | | EndProject
|
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UMSdk", "UMSdk\UMSdk.csproj", "{5CD1B2DE-1ABD-4B46-8C97-CCB6EA90346A}"
|
| | | EndProject
|
| | | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{510DDCFF-AA25-4C6E-B578-B3B7A2EFBB96}"
|
| | | ProjectSection(SolutionItems) = preProject
|
| | | LogicMethod.cs = LogicMethod.cs
|
| | | EndProjectSection
|
| | | EndProject
|
| | | Global
|
| | | GlobalSection(SharedMSBuildProjectFiles) = preSolution
|
| | | HDL_ON\HDL_ON.projitems*{09712674-2a38-407b-b1e2-560b2c352f9a}*SharedItemsImports = 4
|
| | |
| | | public static class StringId |
| | | { |
| | | /// <summary> |
| | | /// 监控中 |
| | | /// </summary> |
| | | public const int Monitoring = 541; |
| | | /// <summary> |
| | | /// 报警中 |
| | | /// </summary> |
| | | public const int InAlarming = 540; |
| | | /// <summary> |
| | | /// 智能面板 |
| | | /// </summary> |
| | | public const int SmartPanel = 539; |
| | |
| | | gatewayId = DB_ResidenceData.Instance.HomeGateway.gatewayId, |
| | | sid = securityAlarm.sid, status = state, userSecurityId = securityAlarm.userSecurityId |
| | | } }); |
| | | MainPage.Log($"安防控制结果:{result.Code}"); |
| | | MainPage.Log($"安防控制结果:code:{result.Code};msg:{result.message}"); |
| | | } |
| | | else |
| | | { |
| | |
| | | /// 固定域名,正式环境 |
| | | /// 公共域名就近解析 |
| | | /// </summary> |
| | | public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm |
| | | //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm |
| | | /// <summary> |
| | | /// RegionMark |
| | | /// </summary> |
| | |
| | | { |
| | | var attrs = new List<string>(); |
| | | |
| | | foreach(var attr in attributes) |
| | | foreach (var attr in attributes) |
| | | { |
| | | attrs.Add(attr.key); |
| | | } |
| | |
| | | public List<string> roomIds = new List<string>(); |
| | | |
| | | /// <summary> |
| | | /// 存储属性配置 |
| | | /// 环境传感器的等级 |
| | | /// </summary> |
| | | public List<AttrKeyConfig> attrKeyConfigs = new List<AttrKeyConfig>(); |
| | | |
| | | public List<AttrKeyConfig> GetAttrKeyConfigs(string key) |
| | | { |
| | | if (attrKeyConfigs.Count == 0) |
| | | { |
| | | switch (key) |
| | | { |
| | | case "pm2.5": |
| | | |
| | | break; |
| | | } |
| | | } |
| | | return attrKeyConfigs; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// bus协议数据格式 |
| | | /// 使用A协议控制时,改属性为空 |
| | | /// </summary> |
| | |
| | | /// 是否在线 |
| | | /// </summary> |
| | | public bool online = true; |
| | | |
| | | /// <summary> |
| | | /// 环境面板 绑定的 设备目标sid列表 |
| | | /// </summary> |
| | | public List<string> targetSids = new List<string>(); |
| | | /// <summary> |
| | | /// 云端数据创建的时间 |
| | | /// </summary> |
| | |
| | | _trait_on_off.curValue = "off"; |
| | | } |
| | | } |
| | | if(_trait_on_off.curValue.ToString() != "on"&& _trait_on_off.curValue.ToString() != "off" && _trait_on_off.curValue.ToString() != "stop") |
| | | if (_trait_on_off.curValue.ToString() != "on" && _trait_on_off.curValue.ToString() != "off" && _trait_on_off.curValue.ToString() != "stop") |
| | | { |
| | | _trait_on_off.curValue = "off"; |
| | | } |
| | |
| | | collect = !collect; |
| | | IMessageCommon.Current.ShowErrorInfoAlter(result); |
| | | }); |
| | | }else |
| | | } else |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | result = ApiUtlis.Ins.HttpRequest.UnbindDeviceToRoom(deviceId,roomId); |
| | | result = ApiUtlis.Ins.HttpRequest.UnbindDeviceToRoom(deviceId, roomId); |
| | | } |
| | | //提示错误 |
| | | if (result != StateCode.SUCCESS) |
| | |
| | | { |
| | | roomNameList += ","; |
| | | } |
| | | roomNameList += findRoom.floorName +"-"+ findRoom.roomName; |
| | | roomNameList += findRoom.floorName + "-" + findRoom.roomName; |
| | | } |
| | | if (roomNameList == "" ) |
| | | if (roomNameList == "") |
| | | { |
| | | roomNameList = Language.StringByID(StringId.WholeZone); |
| | | } |
| | |
| | | case FunctionAttributeKey.Percent: |
| | | case FunctionAttributeKey.CCT: |
| | | case FunctionAttributeKey.RGB: |
| | | //case FunctionAttributeKey.FadeTime: |
| | | //case FunctionAttributeKey.FadeTime: |
| | | if (attr.curValue.ToString() == "{}") |
| | | { |
| | | if (attr.key == FunctionAttributeKey.OnOff) |
| | | { |
| | | attr.curValue = "off"; |
| | | } |
| | | else if (attr.key == FunctionAttributeKey.Mode ) |
| | | else if (attr.key == FunctionAttributeKey.Mode) |
| | | { |
| | | if (DB_ResidenceData.Instance.GatewayType == 0) |
| | | { |
| | |
| | | } |
| | | } |
| | | } |
| | | else |
| | | else |
| | | { |
| | | attr.curValue = "0"; |
| | | } |
| | |
| | | return sendDataObj; |
| | | } |
| | | |
| | | public AlinkDoorlockObj GetGatewayAlinkDoorlockData(string userId,string extStr) |
| | | public AlinkDoorlockObj GetGatewayAlinkDoorlockData(string userId, string extStr) |
| | | { |
| | | var sendDataObj = new AlinkDoorlockObj(); |
| | | sendDataObj.id = Control.Ins.msg_id.ToString(); |
| | |
| | | try |
| | | { |
| | | return Convert.ToByte(loopId, 16); |
| | | }catch |
| | | } catch |
| | | { |
| | | return 0; |
| | | } |
| | |
| | | /// <summary> |
| | | /// (红外空调) |
| | | /// </summary> |
| | | public const string AcIr= "ir.ac"; |
| | | public const string AcIr = "ir.ac"; |
| | | /// <summary> |
| | | /// 空调 |
| | | /// </summary> |
| | |
| | | spkList.Add(SenesorMegahealth2); |
| | | return spkList; |
| | | } |
| | | #endregion |
| | | |
| | | public const string PanelEnvironment = "screen.panel"; |
| | | /// <summary> |
| | | /// 面板spk列表 |
| | | /// </summary> |
| | |
| | | { |
| | | var spkList = new List<string>(); |
| | | spkList.Add(SensorHelp); |
| | | spkList.Add(PanelEnvironment); |
| | | return spkList; |
| | | } |
| | | #endregion |
| | | |
| | | #region 环境传感器 |
| | | /// <summary> |
| | |
| | | //} |
| | | |
| | | |
| | | public class VersionInfo |
| | | { |
| | | public string module = ""; |
| | | public string version = ""; |
| | | } |
| | | public class VersionInfo |
| | | { |
| | | public string module = ""; |
| | | public string version = ""; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 功能属性相关配置信息 |
| | | /// 环境传感器等级使用 |
| | | /// </summary> |
| | | public class AttrKeyConfig |
| | | { |
| | | public string key = string.Empty; |
| | | /// <summary> |
| | | /// 配置类型 |
| | | /// interval 区间 |
| | | /// 目前只支持:interval |
| | | /// </summary> |
| | | public string type = string.Empty; |
| | | |
| | | public string unit = string.Empty; |
| | | |
| | | public List<AttrKeyInfo> configs = new List<AttrKeyInfo>(); |
| | | |
| | | } |
| | | |
| | | public class AttrKeyInfo |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public string start = string.Empty; |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public string end = string.Empty; |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public uint color = 0x00000000; |
| | | /// <summary> |
| | | /// 描述 |
| | | /// </summary> |
| | | public string desc = string.Empty; |
| | | } |
| | | } |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON.Entity |
| | | { |
| | |
| | | /// <summary> |
| | | /// 每个等级对区间值 |
| | | /// </summary> |
| | | public List<string> GetIntervalValue(string spk) |
| | | public List<string> GetIntervalValue(Function function) |
| | | { |
| | | var _intervalValue = new List<string>(); |
| | | |
| | | |
| | | if (function.attrKeyConfigs.Count > 0) |
| | | { |
| | | |
| | | foreach (var attrKey in function.attrKeyConfigs) |
| | | { |
| | | if (function.spk.Replace(".", "").Contains(attrKey.key.Replace(".", ""))) |
| | | { |
| | | foreach (var info in attrKey.configs) |
| | | { |
| | | _intervalValue.Add(info.start + " ~ " + info.end); |
| | | } |
| | | } |
| | | } |
| | | return _intervalValue; |
| | | } |
| | | |
| | | |
| | | string spk = function.spk; |
| | | switch (spk) |
| | | { |
| | | case SPK.SensorPm25: |
| | |
| | | return _intervalValue; |
| | | } |
| | | |
| | | public string Unit(Function function) |
| | | { |
| | | string unit = ""; |
| | | |
| | | if (function.attrKeyConfigs.Count > 0) |
| | | { |
| | | |
| | | foreach (var attrKey in function.attrKeyConfigs) |
| | | { |
| | | if (function.spk.Replace(".", "").Contains(attrKey.key.Replace(".", ""))) |
| | | { |
| | | return attrKey.unit; |
| | | } |
| | | } |
| | | } |
| | | |
| | | switch (function.spk) |
| | | { |
| | | case SPK.SensorPm25: |
| | | unit = "ug/m²"; |
| | | break; |
| | | case SPK.SensorTemperature: |
| | | unit = "°C"; |
| | | break; |
| | | case SPK.SensorTVOC: |
| | | unit = "PPB"; |
| | | break; |
| | | case SPK.SensorCO2: |
| | | unit = "PPM"; |
| | | break; |
| | | case SPK.SensorHumidity: |
| | | unit = "%"; |
| | | break; |
| | | case SPK.SensorHcho: |
| | | unit = "mg/m3"; |
| | | break; |
| | | } |
| | | |
| | | return unit; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 每个等级的颜色值 |
| | | /// </summary> |
| | | public List<uint> GetLevelColorList(string spk) |
| | | public List<uint> GetLevelColorList(Function function) |
| | | { |
| | | var _levelColorList = new List<uint>(); |
| | | if (function.attrKeyConfigs.Count > 0) |
| | | { |
| | | |
| | | foreach (var attrKey in function.attrKeyConfigs) |
| | | { |
| | | if (function.spk.Replace(".", "").Contains(attrKey.key.Replace(".", ""))) |
| | | { |
| | | foreach (var info in attrKey.configs) |
| | | { |
| | | _levelColorList.Add(info.color); |
| | | } |
| | | } |
| | | } |
| | | return _levelColorList; |
| | | } |
| | | |
| | | string spk = function.spk; |
| | | switch (spk) |
| | | { |
| | | case SPK.SensorPm25: |
| | |
| | | /// <summary> |
| | | /// 每个等级的名称 |
| | | /// </summary> |
| | | public List<int> GetLevelTextList(string spk) |
| | | public List<string> GetLevelTextList(Function function) |
| | | { |
| | | var _levelTextList = new List<int>(); |
| | | var _levelTextList = new List<string>(); |
| | | |
| | | if (function.attrKeyConfigs.Count > 0) |
| | | { |
| | | |
| | | foreach (var attrKey in function.attrKeyConfigs) |
| | | { |
| | | if (function.spk.Replace(".", "").Contains(attrKey.key.Replace(".", ""))) |
| | | { |
| | | foreach (var info in attrKey.configs) |
| | | { |
| | | _levelTextList.Add(info.desc); |
| | | } |
| | | } |
| | | } |
| | | return _levelTextList; |
| | | } |
| | | |
| | | string spk = function.spk; |
| | | switch (spk) |
| | | { |
| | | case SPK.SensorPm25: |
| | | _levelTextList.Add(StringId.Great); |
| | | _levelTextList.Add(StringId.Good); |
| | | _levelTextList.Add(StringId.MildPollution); |
| | | _levelTextList.Add(StringId.HeavyPollution); |
| | | _levelTextList.Add(Language.StringByID(StringId.Great)); |
| | | _levelTextList.Add(Language.StringByID(StringId.Good)); |
| | | _levelTextList.Add(Language.StringByID(StringId.MildPollution)); |
| | | _levelTextList.Add(Language.StringByID(StringId.HeavyPollution)); |
| | | break; |
| | | case SPK.SensorCO2: |
| | | _levelTextList.Add(StringId.SensorReferenceTipCO2Level1); |
| | | _levelTextList.Add(StringId.SensorReferenceTipCO2Level2); |
| | | _levelTextList.Add(StringId.SensorReferenceTipCO2Level3); |
| | | _levelTextList.Add(StringId.SensorReferenceTipCO2Level4); |
| | | _levelTextList.Add(Language.StringByID(StringId.SensorReferenceTipCO2Level1)); |
| | | _levelTextList.Add(Language.StringByID(StringId.SensorReferenceTipCO2Level2)); |
| | | _levelTextList.Add(Language.StringByID(StringId.SensorReferenceTipCO2Level3)); |
| | | _levelTextList.Add(Language.StringByID(StringId.SensorReferenceTipCO2Level4)); |
| | | break; |
| | | case SPK.SensorTemperature: |
| | | _levelTextList.Add(StringId.ExtremelyCold); |
| | | _levelTextList.Add(StringId.Cold); |
| | | _levelTextList.Add(StringId.SlightlyCold); |
| | | _levelTextList.Add(StringId.Comfortable); |
| | | _levelTextList.Add(StringId.TepidFever); |
| | | _levelTextList.Add(StringId.Heat_SensorTip); |
| | | _levelTextList.Add(StringId.ExtremeHeat); |
| | | _levelTextList.Add(Language.StringByID(StringId.ExtremelyCold)); |
| | | _levelTextList.Add(Language.StringByID(StringId.Cold)); |
| | | _levelTextList.Add(Language.StringByID(StringId.SlightlyCold)); |
| | | _levelTextList.Add(Language.StringByID(StringId.Comfortable)); |
| | | _levelTextList.Add(Language.StringByID(StringId.TepidFever)); |
| | | _levelTextList.Add(Language.StringByID(StringId.Heat_SensorTip)); |
| | | _levelTextList.Add(Language.StringByID(StringId.ExtremeHeat)); |
| | | break; |
| | | case SPK.SensorTVOC: |
| | | _levelTextList.Add(StringId.SensorReferenceTVOCTipLevel1); |
| | | _levelTextList.Add(StringId.SensorReferenceTVOCTipLevel2); |
| | | _levelTextList.Add(StringId.SensorReferenceTVOCTipLevel3); |
| | | _levelTextList.Add(StringId.SensorReferenceTVOCTipLevel4); |
| | | _levelTextList.Add(Language.StringByID(StringId.SensorReferenceTVOCTipLevel1)); |
| | | _levelTextList.Add(Language.StringByID(StringId.SensorReferenceTVOCTipLevel2)); |
| | | _levelTextList.Add(Language.StringByID(StringId.SensorReferenceTVOCTipLevel3)); |
| | | _levelTextList.Add(Language.StringByID(StringId.SensorReferenceTVOCTipLevel4)); |
| | | break; |
| | | case SPK.SensorHumidity: |
| | | _levelTextList.Add(StringId.SensorReferenceHumidityTipLevel1); |
| | | _levelTextList.Add(StringId.SensorReferenceHumidityTipLevel2); |
| | | _levelTextList.Add(StringId.SensorReferenceHumidityTipLevel3); |
| | | _levelTextList.Add(Language.StringByID(StringId.SensorReferenceHumidityTipLevel1)); |
| | | _levelTextList.Add(Language.StringByID(StringId.SensorReferenceHumidityTipLevel2)); |
| | | _levelTextList.Add(Language.StringByID(StringId.SensorReferenceHumidityTipLevel3)); |
| | | break; |
| | | case SPK.SensorHcho: |
| | | _levelTextList.Add(StringId.Class_I_BuildingStandard); |
| | | _levelTextList.Add(StringId.SecondaryBuildingStandard); |
| | | _levelTextList.Add(StringId.ExceedingTheStandard); |
| | | _levelTextList.Add(Language.StringByID(StringId.Class_I_BuildingStandard)); |
| | | _levelTextList.Add(Language.StringByID(StringId.SecondaryBuildingStandard)); |
| | | _levelTextList.Add(Language.StringByID(StringId.ExceedingTheStandard)); |
| | | break; |
| | | default: |
| | | _levelTextList.Add(99999999); |
| | | _levelTextList.Add(99999999); |
| | | _levelTextList.Add(99999999); |
| | | _levelTextList.Add(""); |
| | | _levelTextList.Add(""); |
| | | _levelTextList.Add(""); |
| | | break; |
| | | } |
| | | return _levelTextList; |
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\CacHistoryChoosePage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicMethod.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Panel\PanelHelpPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Panel\EnvironmentPanelPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Stan\Form\DeviceFunction4CardCommonForm.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\ContentView\FhContentView.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\ContentView\AcContentView.cs" />
|
| | | </ItemGroup>
|
| | | <ItemGroup>
|
| | | <Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" />
|
| | |
| | | <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddDevice\SenesorEnvironment\" />
|
| | | <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Light\LightScene\" />
|
| | | <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\FaceManagement\" />
|
| | | <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\ContentView\" />
|
| | | </ItemGroup>
|
| | | </Project> |
| | |
| | | doorLockPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor); |
| | | break; |
| | | case SPK.SensorHelp: |
| | | var panelHelpPage = new HDL_ON.UI.UI2.FuntionControlView.Panel.PanelHelpPage(); |
| | | var panelHelpPage = new UI2.FuntionControlView.Panel.PanelHelpPage(); |
| | | panelHelpPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor); |
| | | break; |
| | | case SPK.PanelEnvironment: |
| | | var panelEnvironmentPage = new EnvironmentPanelPage(); |
| | | panelEnvironmentPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor); |
| | | break; |
| | | |
| | | } |
| | | }; |
New file |
| | |
| | | using HDL_ON.Entity;
|
| | | using HDL_ON.UI.CSS;
|
| | | using Shared;
|
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using System.Text;
|
| | |
|
| | | namespace HDL_ON.Stan
|
| | | {
|
| | | /// <summary>
|
| | | /// 设备功能卡片的底层界面
|
| | | /// </summary>
|
| | | public class DeviceFunction4CardCommonForm : EditorCommonForm
|
| | | {
|
| | | #region ■ 变量声明___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 当前回路对象
|
| | | /// </summary>
|
| | | public Function device = null;
|
| | | /// <summary>
|
| | | /// 右上角配置结束的事件
|
| | | /// </summary>
|
| | | public Action SettionFinishEvent = null;
|
| | | /// <summary>
|
| | | /// 左右翻页的控件的事件
|
| | | /// </summary>
|
| | | public Action<int> PageChangeEvent = null;
|
| | | /// <summary>
|
| | | /// 左右整个翻页的控件
|
| | | /// </summary>
|
| | | private PageLayout pageLayout = null;
|
| | | /// <summary>
|
| | | /// 设备名字控件(刷新用到)
|
| | | /// </summary>
|
| | | public NormalViewControl btnDeviceName = null;
|
| | | /// <summary>
|
| | | /// 房间名字控件(刷新用到)
|
| | | /// </summary>
|
| | | public NormalViewControl btnRoomName = null;
|
| | | /// <summary>
|
| | | /// 底部快捷按钮1
|
| | | /// </summary>
|
| | | private NormalViewControl btnBottomOne = null;
|
| | | /// <summary>
|
| | | /// 底部快捷按钮2
|
| | | /// </summary>
|
| | | private NormalViewControl btnBottomTwo = null;
|
| | | private NormalViewControl btnBottom3 = null;
|
| | | private NormalViewControl btnBottom4 = null;
|
| | | /// <summary>
|
| | | /// 第一索引的白色区域的桌布控件
|
| | | /// </summary>
|
| | | public NormalFrameLayout FrameWhiteCentet1 = null;
|
| | | /// <summary>
|
| | | /// 第二索引的白色区域的桌布控件(请先调用AddSecondPage函数完成添加)
|
| | | /// </summary>
|
| | | public NormalFrameLayout FrameWhiteCentet2 = null;
|
| | | public NormalFrameLayout FrameWhiteCentet3 = null;
|
| | | public NormalFrameLayout FrameWhiteCentet4 = null;
|
| | |
|
| | | /// <summary>
|
| | | /// 是否显示收藏按钮
|
| | | /// </summary>
|
| | | public bool ShowColltionButton = true;
|
| | | #endregion
|
| | |
|
| | | #region ■ 初始化_____________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 画面显示(底层会固定调用此方法,借以完成画面创建)
|
| | | /// </summary>
|
| | | /// <param name="i_device">设备对象</param>
|
| | | /// <param name="btnHigherCollection">上一级界面的收藏控件(原来on的框架太坑)</param>
|
| | | /// <param name="btnHigherDeviceName">上一级界面的设备名字控件(原来on的框架太坑)</param>
|
| | | /// <param name="btnHigherRoom">上一级界面的房间名字控件(原来on的框架太坑)</param>
|
| | | public void ShowForm(Function i_device, Button btnHigherCollection, Button btnHigherDeviceName, Button btnHigherRoom)
|
| | | {
|
| | | this.device = i_device;
|
| | |
|
| | | //添加头部【设置】图标
|
| | | this.AddTopSettingIcon(btnHigherDeviceName, btnHigherRoom);
|
| | |
|
| | | //初始化中部信息
|
| | | this.InitMiddleFrame(btnHigherCollection);
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 初始化中部信息
|
| | | /// </summary>
|
| | | /// <param name="btnHigherCollection">上一级界面的收藏控件</param>
|
| | | private void InitMiddleFrame(Button btnHigherCollection)
|
| | | {
|
| | | //清空bodyFrame
|
| | | this.ClearBodyFrame();
|
| | |
|
| | | //左右整个翻页的控件
|
| | | this.pageLayout = new PageLayout();
|
| | | pageLayout.IsShowPoint = false;
|
| | | pageLayout.ScrollEnabled = false;
|
| | | bodyFrameLayout.AddChidren(pageLayout);
|
| | | pageLayout.PageChange += (sender, index) =>
|
| | | {
|
| | | //设置底部两个按钮的状态
|
| | | this.SetBottomTwoButtonStatu();
|
| | | this.PageChangeEvent?.Invoke(index);
|
| | | };
|
| | |
|
| | | //初始化第一个索引的桌布
|
| | | this.InitFrameWhiteContent1(btnHigherCollection);
|
| | | //初始化白色内容(需要自主实现)
|
| | | this.InitFrameWhiteContent();
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 初始化第一个索引的桌布
|
| | | /// </summary>
|
| | | /// <param name="btnHigherCollection">上一级界面的收藏控件</param>
|
| | | private void InitFrameWhiteContent1(Button btnHigherCollection)
|
| | | {
|
| | | //第一个索引桌布是必定存在的
|
| | | var frameTable1 = new FrameLayout();
|
| | | frameTable1.Width = pageLayout.Width;
|
| | | frameTable1.Height = pageLayout.Height;
|
| | | pageLayout.AddChidren(frameTable1);
|
| | | //第一个索引的白色桌布
|
| | | this.FrameWhiteCentet1 = new NormalFrameLayout();
|
| | | FrameWhiteCentet1.Gravity = Gravity.CenterHorizontal;
|
| | | FrameWhiteCentet1.Y = Application.GetRealHeight(22);
|
| | | FrameWhiteCentet1.Width = Application.GetRealWidth(327);
|
| | | FrameWhiteCentet1.Height = Application.GetRealHeight(526);
|
| | | FrameWhiteCentet1.BackgroundImagePath = "Public/Fragmentbg.png";
|
| | | frameTable1.AddChidren(FrameWhiteCentet1);
|
| | | //设备名字
|
| | | this.btnDeviceName = new NormalViewControl(270, 37, true);
|
| | | btnDeviceName.X = Application.GetRealWidth(16);
|
| | | btnDeviceName.Y = Application.GetRealHeight(18);
|
| | | btnDeviceName.TextColor = CSS_Color.FirstLevelTitleColor;
|
| | | btnDeviceName.TextSize = CSS_FontSize.EmphasisFontSize_FirstLevel;
|
| | | btnDeviceName.Text = device.name;
|
| | | btnDeviceName.Width = btnDeviceName.GetRealWidthByText();
|
| | | FrameWhiteCentet1.AddChidren(btnDeviceName);
|
| | | //房间名字
|
| | | this.btnRoomName = new NormalViewControl(270, 21, true);
|
| | | btnRoomName.X = Application.GetRealWidth(16);
|
| | | btnRoomName.Y = btnDeviceName.Bottom;
|
| | | btnRoomName.TextColor = CSS_Color.PromptingColor1;
|
| | | btnRoomName.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
|
| | | btnRoomName.Text = device.GetRoomListName();
|
| | | btnRoomName.Width = btnRoomName.GetRealWidthByText();
|
| | | FrameWhiteCentet1.AddChidren(btnRoomName);
|
| | | if (ShowColltionButton)
|
| | | {
|
| | | var btnCollection = new IconViewControl(40);
|
| | | btnCollection.X = Application.GetRealWidth(273);
|
| | | btnCollection.Y = Application.GetRealHeight(16);
|
| | | btnCollection.SelectedImagePath = "Collection/CollectionIcon.png";
|
| | | btnCollection.UnSelectedImagePath = "Collection/CollectionGrayIcon.png";
|
| | | btnCollection.IsSelected = device.collect;
|
| | | FrameWhiteCentet1.AddChidren(btnCollection);
|
| | | btnCollection.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | btnCollection.IsSelected = !btnCollection.IsSelected;
|
| | | device.collect = btnCollection.IsSelected;
|
| | | btnHigherCollection.IsSelected = device.collect;
|
| | |
|
| | | device.CollectFunction();
|
| | | };
|
| | | }
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 初始化第二个索引的桌布
|
| | | /// </summary>
|
| | | private void InitFrameWhiteContent2()
|
| | | {
|
| | | this.pageLayout.ScrollEnabled = true;
|
| | | //第一个索引桌布是必定存在的
|
| | | var frameTable2 = new FrameLayout();
|
| | | frameTable2.Width = pageLayout.Width;
|
| | | frameTable2.Height = pageLayout.Height;
|
| | | pageLayout.AddChidren(frameTable2);
|
| | | //第一个索引的白色桌布
|
| | | this.FrameWhiteCentet2 = new NormalFrameLayout();
|
| | | FrameWhiteCentet2.Gravity = Gravity.CenterHorizontal;
|
| | | FrameWhiteCentet2.Y = Application.GetRealHeight(22);
|
| | | FrameWhiteCentet2.Width = Application.GetRealWidth(327);
|
| | | FrameWhiteCentet2.Height = Application.GetRealHeight(526);
|
| | | FrameWhiteCentet2.BackgroundImagePath = "Public/Fragmentbg.png";
|
| | | frameTable2.AddChidren(FrameWhiteCentet2);
|
| | | } |
| | | |
| | | /// <summary>
|
| | | /// 初始化第3个索引的桌布
|
| | | /// </summary>
|
| | | private void InitFrameWhiteContent3()
|
| | | {
|
| | | var frameTable3 = new FrameLayout();
|
| | | frameTable3.Width = pageLayout.Width;
|
| | | frameTable3.Height = pageLayout.Height;
|
| | | pageLayout.AddChidren(frameTable3);
|
| | | //第一个索引的白色桌布
|
| | | this.FrameWhiteCentet3 = new NormalFrameLayout();
|
| | | FrameWhiteCentet3.Gravity = Gravity.CenterHorizontal;
|
| | | FrameWhiteCentet3.Y = Application.GetRealHeight(22);
|
| | | FrameWhiteCentet3.Width = Application.GetRealWidth(327);
|
| | | FrameWhiteCentet3.Height = Application.GetRealHeight(526);
|
| | | FrameWhiteCentet3.BackgroundImagePath = "Public/Fragmentbg.png";
|
| | | frameTable3.AddChidren(FrameWhiteCentet3);
|
| | | } |
| | | /// <summary>
|
| | | /// 初始化第4个索引的桌布
|
| | | /// </summary>
|
| | | private void InitFrameWhiteContent4()
|
| | | {
|
| | | var frameTable4 = new FrameLayout();
|
| | | frameTable4.Width = pageLayout.Width;
|
| | | frameTable4.Height = pageLayout.Height;
|
| | | pageLayout.AddChidren(frameTable4);
|
| | | //第一个索引的白色桌布
|
| | | this.FrameWhiteCentet4 = new NormalFrameLayout();
|
| | | FrameWhiteCentet4.Gravity = Gravity.CenterHorizontal;
|
| | | FrameWhiteCentet4.Y = Application.GetRealHeight(22);
|
| | | FrameWhiteCentet4.Width = Application.GetRealWidth(327);
|
| | | FrameWhiteCentet4.Height = Application.GetRealHeight(526);
|
| | | FrameWhiteCentet4.BackgroundImagePath = "Public/Fragmentbg.png";
|
| | | frameTable4.AddChidren(FrameWhiteCentet4);
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 初始化白色内容(需要自主实现)
|
| | | /// </summary>
|
| | | public virtual void InitFrameWhiteContent()
|
| | | {
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 添加第二索引页_____________________
|
| | |
|
| | | /// <summary>
|
| | | /// 添加第二索引页
|
| | | /// </summary>
|
| | | public void AddSecondPage()
|
| | | {
|
| | | //初始化第二个索引的桌布
|
| | | this.InitFrameWhiteContent2();
|
| | |
|
| | | //底部添加两个按钮
|
| | | this.btnBottomOne = new NormalViewControl(14, 6, true);
|
| | | btnBottomOne.X = Application.GetRealWidth(170);
|
| | | btnBottomOne.Y = FrameWhiteCentet1.Bottom + Application.GetRealHeight(30);
|
| | | btnBottomOne.BackgroundColor = CSS_Color.MainColor;
|
| | | btnBottomOne.Radius = (uint)Application.GetRealHeight(6) / 2;
|
| | | bodyFrameLayout.AddChidren(btnBottomOne);
|
| | |
|
| | | this.btnBottomTwo = new NormalViewControl(14, 6, true);
|
| | | btnBottomTwo.X = btnBottomOne.Right + Application.GetRealWidth(8);
|
| | | btnBottomTwo.Y = btnBottomOne.Y;
|
| | | btnBottomTwo.BackgroundColor = 0xffadc7f7;
|
| | | btnBottomTwo.Radius = (uint)Application.GetRealHeight(6) / 2;
|
| | | bodyFrameLayout.AddChidren(btnBottomTwo);
|
| | |
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 添加第3索引页
|
| | | /// </summary>
|
| | | public void Add3thPage()
|
| | | {
|
| | | this.InitFrameWhiteContent2();
|
| | | this.InitFrameWhiteContent3();
|
| | |
|
| | | //底部添加两个按钮
|
| | | this.btnBottomOne = new NormalViewControl(14, 6, true);
|
| | | btnBottomOne.X = Application.GetRealWidth(160);
|
| | | btnBottomOne.Y = FrameWhiteCentet1.Bottom + Application.GetRealHeight(30);
|
| | | btnBottomOne.BackgroundColor = CSS_Color.MainColor;
|
| | | btnBottomOne.Radius = (uint)Application.GetRealHeight(6) / 2;
|
| | | bodyFrameLayout.AddChidren(btnBottomOne);
|
| | | this.btnBottomTwo = new NormalViewControl(14, 6, true);
|
| | | btnBottomTwo.X = btnBottomOne.Right + Application.GetRealWidth(8);
|
| | | btnBottomTwo.Y = btnBottomOne.Y;
|
| | | btnBottomTwo.BackgroundColor = 0xffadc7f7;
|
| | | btnBottomTwo.Radius = (uint)Application.GetRealHeight(6) / 2;
|
| | | bodyFrameLayout.AddChidren(btnBottomTwo);
|
| | | this.btnBottom3 = new NormalViewControl(14, 6, true);
|
| | | btnBottom3.X = btnBottomTwo.Right + Application.GetRealWidth(8);
|
| | | btnBottom3.Y = btnBottomTwo.Y;
|
| | | btnBottom3.BackgroundColor = 0xffadc7f7;
|
| | | btnBottom3.Radius = (uint)Application.GetRealHeight(6) / 2;
|
| | | bodyFrameLayout.AddChidren(btnBottom3);
|
| | | }
|
| | | /// <summary>
|
| | | /// 添加第3索引页
|
| | | /// </summary>
|
| | | public void Add4Page()
|
| | | {
|
| | | this.InitFrameWhiteContent2();
|
| | | this.InitFrameWhiteContent3();
|
| | | this.InitFrameWhiteContent4();
|
| | |
|
| | | //底部添加两个按钮
|
| | | this.btnBottomOne = new NormalViewControl(14, 6, true);
|
| | | btnBottomOne.X = Application.GetRealWidth(150);
|
| | | btnBottomOne.Y = FrameWhiteCentet1.Bottom + Application.GetRealHeight(30);
|
| | | btnBottomOne.BackgroundColor = CSS_Color.MainColor;
|
| | | btnBottomOne.Radius = (uint)Application.GetRealHeight(6) / 2;
|
| | | bodyFrameLayout.AddChidren(btnBottomOne);
|
| | | this.btnBottomTwo = new NormalViewControl(14, 6, true);
|
| | | btnBottomTwo.X = btnBottomOne.Right + Application.GetRealWidth(8);
|
| | | btnBottomTwo.Y = btnBottomOne.Y;
|
| | | btnBottomTwo.BackgroundColor = 0xffadc7f7;
|
| | | btnBottomTwo.Radius = (uint)Application.GetRealHeight(6) / 2;
|
| | | bodyFrameLayout.AddChidren(btnBottomTwo);
|
| | | this.btnBottom3 = new NormalViewControl(14, 6, true);
|
| | | btnBottom3.X = btnBottomTwo.Right + Application.GetRealWidth(8);
|
| | | btnBottom3.Y = btnBottomTwo.Y;
|
| | | btnBottom3.BackgroundColor = 0xffadc7f7;
|
| | | btnBottom3.Radius = (uint)Application.GetRealHeight(6) / 2;
|
| | | bodyFrameLayout.AddChidren(btnBottom3);
|
| | | this.btnBottom4 = new NormalViewControl(14, 6, true);
|
| | | btnBottom4.X = btnBottom3.Right + Application.GetRealWidth(8);
|
| | | btnBottom4.Y = btnBottom3.Y;
|
| | | btnBottom4.BackgroundColor = 0xffadc7f7;
|
| | | btnBottom4.Radius = (uint)Application.GetRealHeight(6) / 2;
|
| | | bodyFrameLayout.AddChidren(btnBottom4);
|
| | | }
|
| | |
|
| | |
|
| | | /// <summary>
|
| | | /// 设置底部两个按钮的状态
|
| | | /// </summary>
|
| | | private void SetBottomTwoButtonStatu()
|
| | | {
|
| | | if (this.btnBottomTwo == null) { return; }
|
| | |
|
| | | if (this.pageLayout.PageIndex == 0)
|
| | | {
|
| | | this.btnBottomOne.BackgroundColor = CSS_Color.MainColor;
|
| | | this.btnBottomTwo.BackgroundColor = 0xffadc7f7;
|
| | | this.btnBottom3.BackgroundColor = 0xffadc7f7;
|
| | | this.btnBottom4.BackgroundColor = 0xffadc7f7;
|
| | | }
|
| | | else if (this.pageLayout.PageIndex == 1)
|
| | | {
|
| | | this.btnBottomOne.BackgroundColor = 0xffadc7f7;
|
| | | this.btnBottomTwo.BackgroundColor = CSS_Color.MainColor;
|
| | | this.btnBottom3.BackgroundColor = 0xffadc7f7;
|
| | | this.btnBottom4.BackgroundColor = 0xffadc7f7;
|
| | | }
|
| | | else if (this.pageLayout.PageIndex == 2)
|
| | | {
|
| | | this.btnBottomOne.BackgroundColor = 0xffadc7f7;
|
| | | this.btnBottomTwo.BackgroundColor = 0xffadc7f7;
|
| | | this.btnBottom3.BackgroundColor = CSS_Color.MainColor;
|
| | | this.btnBottom4.BackgroundColor = 0xffadc7f7;
|
| | | }
|
| | | else if (this.pageLayout.PageIndex == 3)
|
| | | {
|
| | | this.btnBottomOne.BackgroundColor = 0xffadc7f7;
|
| | | this.btnBottomTwo.BackgroundColor = 0xffadc7f7;
|
| | | this.btnBottom4.BackgroundColor = CSS_Color.MainColor;
|
| | | this.btnBottom3.BackgroundColor = 0xffadc7f7;
|
| | | }
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 界面关闭___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 界面关闭
|
| | | /// </summary>
|
| | | public override void CloseFormBefore()
|
| | | {
|
| | | base.CloseFormBefore();
|
| | |
|
| | | this.SettionFinishEvent = null;
|
| | | this.PageChangeEvent = null;
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 一般方法___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 获取头部右边的【设置】图标控件
|
| | | /// </summary>
|
| | | /// <returns></returns>
|
| | | public PicViewControl GetTopSettingIcon()
|
| | | {
|
| | | for (int i = 0; i < topFrameLayout.ChildrenCount; i++)
|
| | | {
|
| | | var myView = topFrameLayout.GetChildren(i);
|
| | | if (myView == null || myView.Name != "btnSetting")
|
| | | {
|
| | | continue;
|
| | | }
|
| | | return myView as PicViewControl;
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 添加头部【设置】的图标
|
| | | /// </summary>
|
| | | /// <param name="btnHigherCollection">上一级界面的收藏控件(原来on的框架太坑)</param>
|
| | | /// <param name="btnHigherDeviceName">上一级界面的设备名字控件(原来on的框架太坑)</param>
|
| | | private void AddTopSettingIcon(Button btnHigherDeviceName, Button btnHigherRoom)
|
| | | {
|
| | | //设置图标(门锁界面需要借用这个图标的X轴和Y轴,所以加进来)
|
| | | var btnSetting = new PicViewControl(28, 28);
|
| | | btnSetting.X = Application.GetRealWidth(337);
|
| | | btnSetting.Y = Application.GetRealHeight(9);
|
| | | btnSetting.UnSelectedImagePath = "Public/FuncInfoSetIcon.png";
|
| | | btnSetting.Name = "btnSetting";
|
| | | topFrameLayout.AddChidren(btnSetting);
|
| | |
|
| | | //如果是成员没有功能
|
| | | if (DB_ResidenceData.Instance.CurrentRegion.isOtherShare == true)
|
| | | {
|
| | | btnSetting.Visible = false;
|
| | | }
|
| | |
|
| | | btnSetting.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var infoView = new UI.FunctionBaseInfoSetPage(this.device, () =>
|
| | | {
|
| | | //刷新显示
|
| | | btnHigherDeviceName.Text = this.device.name;
|
| | | btnHigherRoom.Text = this.device.GetRoomListName();
|
| | |
|
| | | //从新计算宽度
|
| | | this.btnDeviceName.Text = btnHigherDeviceName.Text;
|
| | | this.btnDeviceName.Width = this.btnDeviceName.GetRealWidthByText();
|
| | |
|
| | | this.btnRoomName.Text = btnHigherRoom.Text;
|
| | | this.btnRoomName.Width = this.btnRoomName.GetRealWidthByText();
|
| | |
|
| | | //回调事件
|
| | | this.SettionFinishEvent?.Invoke();
|
| | | });
|
| | | MainPage.BasePageView.AddChidren(infoView);
|
| | | infoView.LoadPage();
|
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
|
| | | };
|
| | | }
|
| | |
|
| | | #endregion
|
| | | }
|
| | | }
|
| | |
| | | |
| | | #if DEBUG |
| | | |
| | | //FunctionList.List.Functions.Add(new Function |
| | | //{ |
| | | // name = "门锁", |
| | | // spk = SPK.DoorLock, |
| | | // sid = "12345", |
| | | // attributes = new List<FunctionAttributes> { |
| | | // new FunctionAttributes(){ key = "door_status",curValue= "open",state = "open" }, |
| | | // new FunctionAttributes(){ key = "normal_open",curValue= "true",state = "true" }, |
| | | // new FunctionAttributes(){ key = "normal_open_countdown",curValue= "10",state = "10" }, |
| | | // new FunctionAttributes(){ key = "local_id",curValue= "10",state = "10" }, |
| | | // new FunctionAttributes(){ key = "door_volume",curValue= "10",state = "10" }, |
| | | // new FunctionAttributes(){ key = "door_volume_step",curValue= "up",state = "up" }, |
| | | // new FunctionAttributes(){ key = "battery_value",curValue= "100",state = "100" }, |
| | | // new FunctionAttributes(){ key = "battery_percentage",curValue= "100",state = "100" }, |
| | | // new FunctionAttributes(){ key = "battery_state",curValue= "high",state = "high" }, |
| | | // } |
| | | //}); |
| | | //FunctionList.List.Functions.Add(new Function |
| | | //{ |
| | | // name = "门锁1", |
| | | // spk = SPK.DoorLock, |
| | | // sid = "123", |
| | | // attributes = new List<FunctionAttributes> { |
| | | // new FunctionAttributes(){ key = "door_status",curValue= "open",state = "open" }, |
| | | // new FunctionAttributes(){ key = "normal_open",curValue= "true",state = "true" }, |
| | | // new FunctionAttributes(){ key = "normal_open_countdown",curValue= "10",state = "10" }, |
| | | // new FunctionAttributes(){ key = "local_id",curValue= "10",state = "10" }, |
| | | // new FunctionAttributes(){ key = "door_volume",curValue= "10",state = "10" }, |
| | | // new FunctionAttributes(){ key = "door_volume_step",curValue= "up",state = "up" }, |
| | | // new FunctionAttributes(){ key = "battery_value",curValue= "100",state = "100" }, |
| | | // new FunctionAttributes(){ key = "battery_percentage",curValue= "100",state = "100" }, |
| | | // new FunctionAttributes(){ key = "battery_state",curValue= "high",state = "high" }, |
| | | // } |
| | | //}); |
| | | FunctionList.List.Functions.Add(new Function |
| | | { |
| | | name = "测试门锁", |
| | | spk = SPK.DoorLock, |
| | | sid = "12345", |
| | | attributes = new List<FunctionAttributes> { |
| | | new FunctionAttributes(){ key = "door_status",curValue= "open",state = "open" }, |
| | | new FunctionAttributes(){ key = "normal_open",curValue= "true",state = "true" }, |
| | | new FunctionAttributes(){ key = "normal_open_countdown",curValue= "10",state = "10" }, |
| | | new FunctionAttributes(){ key = "local_id",curValue= "10",state = "10" }, |
| | | new FunctionAttributes(){ key = "door_volume",curValue= "10",state = "10" }, |
| | | new FunctionAttributes(){ key = "door_volume_step",curValue= "up",state = "up" }, |
| | | new FunctionAttributes(){ key = "battery_value",curValue= "100",state = "100" }, |
| | | new FunctionAttributes(){ key = "battery_percentage",curValue= "100",state = "100" }, |
| | | new FunctionAttributes(){ key = "battery_state",curValue= "high",state = "high" }, |
| | | } |
| | | }); |
| | | FunctionList.List.Functions.Add(new Function |
| | | { |
| | | name = "门锁1", |
| | | spk = SPK.DoorLock, |
| | | sid = "123", |
| | | attributes = new List<FunctionAttributes> { |
| | | new FunctionAttributes(){ key = "door_status",curValue= "open",state = "open" }, |
| | | new FunctionAttributes(){ key = "normal_open",curValue= "true",state = "true" }, |
| | | new FunctionAttributes(){ key = "normal_open_countdown",curValue= "10",state = "10" }, |
| | | new FunctionAttributes(){ key = "local_id",curValue= "10",state = "10" }, |
| | | new FunctionAttributes(){ key = "door_volume",curValue= "10",state = "10" }, |
| | | new FunctionAttributes(){ key = "door_volume_step",curValue= "up",state = "up" }, |
| | | new FunctionAttributes(){ key = "battery_value",curValue= "100",state = "100" }, |
| | | new FunctionAttributes(){ key = "battery_percentage",curValue= "100",state = "100" }, |
| | | new FunctionAttributes(){ key = "battery_state",curValue= "high",state = "high" }, |
| | | } |
| | | }); |
| | | |
| | | //FunctionList.List.Functions.Add(new Function() |
| | | //{ |
| | | // spk = SPK.PanelSocket, |
| | | // name = "面板插座", |
| | | // attributes = new List<FunctionAttributes> |
| | | // { |
| | | // new FunctionAttributes(){ key = "on_off",curValue= "on",state = "on" }, |
| | | // new FunctionAttributes(){ key = "on_off_usb",curValue= "on",state = "on" }, |
| | | // new FunctionAttributes(){ key = "active_power",curValue= "220",state = "220" }, |
| | | // new FunctionAttributes(){ key = "voltage",curValue= "5",state = "5" }, |
| | | // new FunctionAttributes(){ key = "current",curValue= "110",state = "110" }, |
| | | // new FunctionAttributes(){ key = "total_electricity",curValue= "123.33",state = "123.33" }, |
| | | // } |
| | | //}); |
| | | FunctionList.List.Functions.Add(new Function() |
| | | { |
| | | spk = SPK.PanelSocket, |
| | | name = "面板插座", |
| | | attributes = new List<FunctionAttributes> |
| | | { |
| | | new FunctionAttributes(){ key = "on_off",curValue= "on",state = "on" }, |
| | | new FunctionAttributes(){ key = "on_off_usb",curValue= "on",state = "on" }, |
| | | new FunctionAttributes(){ key = "active_power",curValue= "220",state = "220" }, |
| | | new FunctionAttributes(){ key = "voltage",curValue= "5",state = "5" }, |
| | | new FunctionAttributes(){ key = "current",curValue= "110",state = "110" }, |
| | | new FunctionAttributes(){ key = "total_electricity",curValue= "123.33",state = "123.33" }, |
| | | } |
| | | }); |
| | | |
| | | //FunctionList.List.Functions.Add(new Function() |
| | | //{ |
| | | // spk = SPK.SensorDryContact, |
| | | // name = "干接点", |
| | | // attributes = new List<FunctionAttributes>() |
| | | // { |
| | | // new FunctionAttributes(){ key = "status",curValue= "on",state = "on" }, |
| | | // }, |
| | | //}); |
| | | FunctionList.List.Functions.Add(new Function() |
| | | { |
| | | spk = SPK.SensorDryContact, |
| | | name = "干接点", |
| | | attributes = new List<FunctionAttributes>() |
| | | { |
| | | new FunctionAttributes(){ key = "status",curValue= "on",state = "on" }, |
| | | }, |
| | | }); |
| | | |
| | | FunctionList.List.Functions.Add(new Function() |
| | | { |
| | | spk = SPK.SensorPm25, |
| | | name = "测试Pm2.5", |
| | | attributes = new List<FunctionAttributes>() |
| | | { |
| | | new FunctionAttributes(){ key = "pm25",curValue= "70",state = "70" }, |
| | | }, |
| | | attrKeyConfigs = new List<AttrKeyConfig>() |
| | | { |
| | | new AttrKeyConfig (){ |
| | | key = "pm2.5", |
| | | type = "interval" , |
| | | unit = "ug/m²", |
| | | configs = new List<AttrKeyInfo>(){ |
| | | new AttrKeyInfo(){ start = "0",end = "75",color = 0xFFADE764, desc = "良好"}, |
| | | new AttrKeyInfo(){ start = "76",end = "150",color = 0xFFFFD154,desc = "轻/中度污染"}, |
| | | new AttrKeyInfo(){ start = "151",end = "500",color = 0xFFFF9D54,desc = "重度/严重污染"}, |
| | | } |
| | | } |
| | | }, |
| | | }); |
| | | |
| | | FunctionList.List.Functions.Add(new Function() |
| | | { |
| | | spk = SPK.SensorHelp, |
| | |
| | | // }, |
| | | //}); |
| | | |
| | | //FunctionList.List.Functions.Add(new Function() |
| | | //{ |
| | | // spk = SPK.AirFreshStandard, |
| | | // name = "测试新风", |
| | | // attributes = new List<FunctionAttributes>() |
| | | // { |
| | | // new FunctionAttributes(){ key = "on_off",curValue= "on",state = "on" }, |
| | | // new FunctionAttributes(){ key = "fan",curValue= "low",state = "low" ,value = new List<string>(){ "high", "medium", "low" } }, |
| | | // }, |
| | | //}); |
| | | FunctionList.List.Functions.Add(new Function() |
| | | { |
| | | spk = SPK.AirFreshStandard, |
| | | name = "测试新风", |
| | | sid = "098765433242342342", |
| | | attributes = new List<FunctionAttributes>() |
| | | { |
| | | new FunctionAttributes(){ key = "on_off",curValue= "on",state = "on" }, |
| | | new FunctionAttributes(){ key = "fan",curValue= "low",state = "low" ,value = new List<string>(){ "high", "medium", "low" } }, |
| | | }, |
| | | }); |
| | | |
| | | FunctionList.List.Functions.Add(new Function() |
| | | { |
| | | spk = SPK.PanelEnvironment, |
| | | name = "测试环境面板", |
| | | targetSids = new List<string> { |
| | | "098765433242342342", |
| | | "ac1", |
| | | "floorheat1" |
| | | } |
| | | }); |
| | | |
| | | |
| | | //FunctionList.List.Functions.Add(new Function() |
| | |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | Tag = "AlarmStatus" |
| | | }; |
| | | if(alarmStatusAttr.state == "alarm") |
| | | if (alarmStatusAttr.state == "alarm") |
| | | { |
| | | btnAlarmStatus.TextID = StringId.InAlarm; |
| | | btnAlarmStatus.TextColor = CSS_Color.WarningColor; |
| | | } |
| | | else |
| | | { |
| | | btnAlarmStatus.TextID = StringId.Normal; |
| | | btnAlarmStatus.TextColor = CSS_Color.MainColor; |
| | | } |
| | | |
| | | bodyDiv.AddChidren(btnAlarmStatus); |
| | | } |
| | | |
| | | //var tipScrView1 = new HorizontalScrolViewLayout() { |
| | | // X = Application.GetRealWidth(10), |
| | | // Y = Application.GetRealHeight(56), |
| | | // Height = Application.GetRealHeight(20), |
| | | // Width = Application.GetRealWidth(330), |
| | | // BackgroundColor = 0x22220022, |
| | | //}; |
| | | //var tipScrView2 = new HorizontalScrolViewLayout() |
| | | //{ |
| | | // X = Application.GetRealWidth(10), |
| | | // Y = Application.GetRealHeight(83), |
| | | // Height = Application.GetRealHeight(20), |
| | | // Width = Application.GetRealWidth(330), |
| | | // BackgroundColor = 0x22220022, |
| | | //}; |
| | | |
| | | |
| | | foreach (var target in function.targetSids) |
| | | { |
| | | //bodyDiv.AddChidren(tipScrView1); |
| | | //bodyDiv.AddChidren(tipScrView2); |
| | | var targetObj = FunctionList.List.Functions.Find((obj) => target == obj.sid); |
| | | if(targetObj == null) |
| | | { |
| | | continue; |
| | | } |
| | | if (SPK.AcSpkList().Contains(targetObj.spk)) |
| | | { |
| | | bodyDiv.Height = Application.GetRealHeight(126); |
| | | |
| | | AC acDevice = new AC(); |
| | | var btnAcMode = new Button() |
| | | { |
| | | X = Application.GetRealWidth(10), |
| | | Y = Application.GetRealHeight(56), |
| | | Width = Application.GetRealWidth(62), |
| | | Height = Application.GetRealHeight(19), |
| | | BackgroundColor = 0x334484F4, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize = 10, |
| | | TextColor = 0xFF4484F4, |
| | | Text = Language.StringByID(StringId.AC) + acDevice.GetModeAttrText(targetObj.GetAttrState(FunctionAttributeKey.Mode)), |
| | | Tag = target + "screen.panel.ac.mode", |
| | | Radius = (uint)Application.GetRealWidth(4), |
| | | }; |
| | | bodyDiv.AddChidren(btnAcMode); |
| | | //tipScrView1.AddChidren(new Button() { Width = Application.GetRealWidth(16)}); |
| | | |
| | | var btnAcTemp = new Button() |
| | | { |
| | | X = Application.GetRealWidth(10 + 72), |
| | | Y = Application.GetRealHeight(56), |
| | | Width = Application.GetRealWidth(62), |
| | | Height = Application.GetRealHeight(19), |
| | | BackgroundColor = 0x334484F4, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize = 10, |
| | | TextColor = 0xFF4484F4, |
| | | Text = Language.StringByID(StringId.AC) + targetObj.GetAttrState(FunctionAttributeKey.Temperature) + "°C", |
| | | Radius = (uint)Application.GetRealWidth(4), |
| | | Tag = target + "screen.panel.ac.temp" |
| | | }; |
| | | bodyDiv.AddChidren(btnAcTemp); |
| | | //tipScrView1.AddChidren(new Button() { Width = Application.GetRealWidth(6) }); |
| | | } |
| | | else if (SPK.FhSpkList().Contains(targetObj.spk)) |
| | | { |
| | | |
| | | FloorHeating fhDevice = new FloorHeating(); |
| | | var btnFhMode = new Button() |
| | | { |
| | | X = Application.GetRealWidth(10 + 72*2), |
| | | Y = Application.GetRealHeight(56), |
| | | Radius = (uint)Application.GetRealWidth(4), |
| | | Width = Application.GetRealWidth(62), |
| | | Height = Application.GetRealHeight(19), |
| | | BackgroundColor = 0x33ff9d54, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize = 10, |
| | | TextColor = 0xFFff9d54, |
| | | Text = Language.StringByID(StringId.FloorHeating) + fhDevice.GetModeAttrText(targetObj.GetAttrState(FunctionAttributeKey.Mode)), |
| | | Tag = target + "screen.panel.fh.mode" |
| | | }; |
| | | bodyDiv.AddChidren(btnFhMode); |
| | | //tipScrView1.AddChidren(new Button() { Width = Application.GetRealWidth(6) }); |
| | | |
| | | var btnFhTemp = new Button() |
| | | { |
| | | X = Application.GetRealWidth(10 + 72 * 3), |
| | | Y = Application.GetRealHeight(56), |
| | | Radius = (uint)Application.GetRealWidth(4), |
| | | Width = Application.GetRealWidth(62), |
| | | Height = Application.GetRealHeight(19), |
| | | BackgroundColor = 0x33ff9d54, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize = 10, |
| | | TextColor = 0xFFff9d54, |
| | | Text = Language.StringByID(StringId.FloorHeating) + targetObj.GetAttrState(FunctionAttributeKey.Temperature) + "°C", |
| | | Tag = target + "screen.panel.fh.temp" |
| | | }; |
| | | bodyDiv.AddChidren(btnFhTemp); |
| | | //tipScrView1.AddChidren(new Button() { Width = Application.GetRealWidth(6) }); |
| | | } |
| | | else if (SPK.AirFreshSpkList().Contains(targetObj.spk)) |
| | | { |
| | | |
| | | AC acDevice = new AC(); |
| | | var btnAirFreshFanSpeed = new Button() |
| | | { |
| | | X = Application.GetRealWidth(10), |
| | | Y = Application.GetRealHeight(83), |
| | | Width = Application.GetRealWidth(62), |
| | | Height = Application.GetRealHeight(19), |
| | | BackgroundColor = 0x3309bb07, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize = 10, |
| | | TextColor = 0xFF09bb07, |
| | | Radius = (uint)Application.GetRealWidth(4), |
| | | Text = Language.StringByID(StringId.AirFresh) + acDevice.GetFanAttrText(targetObj.GetAttrState(FunctionAttributeKey.FanSpeed)), |
| | | Tag = target + "screen.panel.airFresh.mode" |
| | | }; |
| | | bodyDiv.AddChidren(btnAirFreshFanSpeed); |
| | | } |
| | | } |
| | | |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | continue; |
| | | } |
| | | if (!string.IsNullOrEmpty(roomId) && roomId == "ALLSELECT") |
| | | if (!string.IsNullOrEmpty(roomId) && roomId != "ALLSELECT") |
| | | { |
| | | if (!function.roomIds.Contains(roomId)) |
| | | { |
| | |
| | | { |
| | | continue; |
| | | } |
| | | if (!string.IsNullOrEmpty(roomId)) |
| | | if (!string.IsNullOrEmpty(roomId) && roomId != "ALLSELECT") |
| | | { |
| | | if (!scene.roomIds.Contains(roomId)) |
| | | { |
| | |
| | | void LoadFunctionListRow() |
| | | { |
| | | functionListView.RemoveAll(); |
| | | foreach (var function in allocatedList) |
| | | new System.Threading.Thread(() => |
| | | { |
| | | //var output = alarm.output.Find((obj) => obj.sid == function.sid); |
| | | //if (output == null) |
| | | //{ |
| | | // output = new SecurityOutput(); |
| | | // output.sid = function.sid; |
| | | //} |
| | | |
| | | FrameLayout functionRow = new FrameLayout() |
| | | System.Threading.Thread.Sleep(50); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | Height = Application.GetRealHeight(65), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | functionListView.AddChidren(functionRow); |
| | | |
| | | var btnFunctionName = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(200), |
| | | Height = Application.GetRealHeight(44), |
| | | Text = function.name, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | }; |
| | | functionRow.AddChidren(btnFunctionName); |
| | | |
| | | var btnFunctionFloorName = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(24), |
| | | Width = Application.GetRealWidth(200), |
| | | Height = Application.GetRealHeight(41), |
| | | Text = function.RoomName, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }; |
| | | functionRow.AddChidren(btnFunctionFloorName); |
| | | |
| | | Button btnState = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(317), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | Text = function.StateText() |
| | | }; |
| | | functionRow.AddChidren(btnState); |
| | | |
| | | Button btnChooseIcon = new Button() |
| | | { |
| | | X = Application.GetRealWidth(333), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(32), |
| | | Height = Application.GetMinRealAverage(32), |
| | | UnSelectedImagePath = "Public/ChooseIcon.png", |
| | | SelectedImagePath = "Public/ChooseOnIcon.png", |
| | | }; |
| | | functionRow.AddChidren(btnChooseIcon); |
| | | |
| | | btnChooseIcon.MouseUpEventHandler = (sender, e) => { |
| | | btnChooseIcon.IsSelected = !btnChooseIcon.IsSelected; |
| | | var tempLocal = alarm.output.Find((obj) => |
| | | obj.sid == function.sid |
| | | ); |
| | | //if (tempLocal == null && !string.IsNullOrEmpty(output.spk)) |
| | | //{ |
| | | // ShowStateDialog(output, btnState, btnChooseIcon); |
| | | //} |
| | | if (btnChooseIcon.IsSelected) |
| | | foreach (var function in allocatedList) |
| | | { |
| | | if (tempLocal == null) |
| | | alarm.output.Add(function); |
| | | ShowStateDialog(function, btnState, btnChooseIcon); |
| | | } |
| | | else |
| | | { |
| | | if (tempLocal != null) |
| | | //var output = alarm.output.Find((obj) => obj.sid == function.sid); |
| | | //if (output == null) |
| | | //{ |
| | | // output = new SecurityOutput(); |
| | | // output.sid = function.sid; |
| | | //} |
| | | |
| | | FrameLayout functionRow = new FrameLayout() |
| | | { |
| | | alarm.output.Remove(function); |
| | | Height = Application.GetRealHeight(65), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | functionListView.AddChidren(functionRow); |
| | | |
| | | var btnFunctionName = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(200), |
| | | Height = Application.GetRealHeight(44), |
| | | Text = function.name, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | }; |
| | | functionRow.AddChidren(btnFunctionName); |
| | | |
| | | var btnFunctionFloorName = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(24), |
| | | Width = Application.GetRealWidth(200), |
| | | Height = Application.GetRealHeight(41), |
| | | Text = function.RoomName, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }; |
| | | functionRow.AddChidren(btnFunctionFloorName); |
| | | |
| | | Button btnState = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(317), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | Text = function.StateText() |
| | | }; |
| | | functionRow.AddChidren(btnState); |
| | | |
| | | Button btnChooseIcon = new Button() |
| | | { |
| | | X = Application.GetRealWidth(333), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(32), |
| | | Height = Application.GetMinRealAverage(32), |
| | | UnSelectedImagePath = "Public/ChooseIcon.png", |
| | | SelectedImagePath = "Public/ChooseOnIcon.png", |
| | | }; |
| | | functionRow.AddChidren(btnChooseIcon); |
| | | |
| | | btnChooseIcon.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnChooseIcon.IsSelected = !btnChooseIcon.IsSelected; |
| | | var tempLocal = alarm.output.Find((obj) => |
| | | obj.sid == function.sid |
| | | ); |
| | | //if (tempLocal == null && !string.IsNullOrEmpty(output.spk)) |
| | | //{ |
| | | // ShowStateDialog(output, btnState, btnChooseIcon); |
| | | //} |
| | | if (btnChooseIcon.IsSelected) |
| | | { |
| | | if (tempLocal == null) |
| | | alarm.output.Add(function); |
| | | ShowStateDialog(function, btnState, btnChooseIcon); |
| | | } |
| | | else |
| | | { |
| | | if (tempLocal != null) |
| | | { |
| | | alarm.output.Remove(function); |
| | | } |
| | | } |
| | | }; |
| | | btnState.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnChooseIcon.IsSelected = true; |
| | | var tempLocal = alarm.output.Find((obj) => |
| | | obj.sid == function.sid |
| | | ); |
| | | if (tempLocal == null) |
| | | alarm.output.Add(function); |
| | | ShowStateDialog(function, btnState, btnChooseIcon); |
| | | }; |
| | | |
| | | var localOutput = alarm.output.Find((obj) => obj.sid == function.sid); |
| | | |
| | | if (localOutput != null) |
| | | { |
| | | btnChooseIcon.IsSelected = true; |
| | | btnState.Text = function.StateText(); |
| | | } |
| | | |
| | | |
| | | functionListView.AddChidren(new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealWidth(1), |
| | | BackgroundColor = CSS_Color.DividingLineColor, |
| | | }); |
| | | |
| | | |
| | | } |
| | | }; |
| | | btnState.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnChooseIcon.IsSelected = true; |
| | | var tempLocal = alarm.output.Find((obj) => |
| | | obj.sid == function.sid |
| | | ); |
| | | if (tempLocal == null) |
| | | alarm.output.Add(function); |
| | | ShowStateDialog(function, btnState, btnChooseIcon); |
| | | }; |
| | | |
| | | var localOutput = alarm.output.Find((obj) => obj.sid == function.sid); |
| | | |
| | | if (localOutput != null) |
| | | { |
| | | btnChooseIcon.IsSelected = true; |
| | | btnState.Text = function.StateText(); |
| | | } |
| | | |
| | | |
| | | functionListView.AddChidren(new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealWidth(1), |
| | | BackgroundColor = CSS_Color.DividingLineColor, |
| | | }); |
| | | |
| | | |
| | | } |
| | | }).Start(); |
| | | } |
| | | |
| | | |
| | |
| | | var form = new FloorRoomSelectPopupView(); |
| | | form.ShowDeviceFunctionView(btnFloor, listAllFun, (selectId, listFun) => |
| | | { |
| | | SetData(selectId); |
| | | var selecteRoom = SpatialInfo.CurrentSpatial.RoomList.Find((obj) => obj.uid == selectId); |
| | | SetData(selecteRoom.roomId); |
| | | //重新刷新设备列表 |
| | | this.LoadFunctionListRow(); |
| | | }, nowSelectId); |
| | |
| | | VerticalScrolViewLayout histroyView = new VerticalScrolViewLayout() |
| | | { |
| | | Y = btnTitle.Bottom, |
| | | Height = Application.GetRealHeight(450), |
| | | Height = Application.GetRealHeight(0), |
| | | }; |
| | | FrameWhiteCentet2.AddChidren(histroyView); |
| | | |
| | |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | var startTime = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)); // 当地时区 |
| | | if (revData.list.Count > 9) |
| | | { |
| | | histroyView.Height = Application.GetRealHeight(450); |
| | | } |
| | | else |
| | | { |
| | | histroyView.Height = Application.GetRealHeight(50*revData.list.Count); |
| | | } |
| | | foreach (var data in revData.list) |
| | | { |
| | | var yearString = startTime.AddMilliseconds(Convert.ToDouble(data.createTime)).ToString("yyyy") + Language.StringByID(StringId.Years); |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using HDL_ON.DriverLayer; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.Stan; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON.UI.UI2.FuntionControlView.Panel |
| | | { |
| | | public class AcContentView : FrameLayout |
| | | { |
| | | |
| | | #region ■ 变量声明___________________________ |
| | | /// <summary> |
| | | /// 空调温度控制控件 |
| | | /// </summary> |
| | | DiyArcSeekBar arcBar; |
| | | /// <summary> |
| | | /// 减号按钮 |
| | | /// </summary> |
| | | Button btnMinus; |
| | | /// <summary> |
| | | /// 加号按钮 |
| | | /// </summary> |
| | | Button btnPlus; |
| | | /// <summary> |
| | | /// 温度按钮 |
| | | /// </summary> |
| | | Button btnTemp; |
| | | Button btnTempUint; |
| | | /// <summary> |
| | | /// 室内温度按钮 |
| | | /// </summary> |
| | | Button btnIndoorTemp; |
| | | /// <summary> |
| | | /// 模式按钮 |
| | | /// </summary> |
| | | Button btnMode; |
| | | /// <summary> |
| | | /// 扫风按钮 |
| | | /// </summary> |
| | | Button btnSwing; |
| | | /// <summary> |
| | | /// 风速按钮 |
| | | /// </summary> |
| | | Button btnWindSpeed; |
| | | /// <summary> |
| | | /// 开关按钮 |
| | | /// </summary> |
| | | Button btnSwitch; |
| | | |
| | | AC acFunction = new AC(); |
| | | |
| | | /// <summary> |
| | | /// 控制时间 |
| | | /// </summary> |
| | | DateTime controlTime = DateTime.MinValue.AddDays(10); |
| | | /// <summary> |
| | | /// 控制温度 |
| | | /// </summary> |
| | | int temp = 16; |
| | | |
| | | #endregion |
| | | Function device; |
| | | public AcContentView(Function function) |
| | | { |
| | | device = function; |
| | | |
| | | var sk = device.GetAttribute(FunctionAttributeKey.SetTemp); |
| | | if (sk != null) |
| | | { |
| | | if (sk.min == 0) |
| | | { |
| | | sk.min = 16; |
| | | } |
| | | if (sk.max == 0) |
| | | { |
| | | sk.max = 32; |
| | | } |
| | | } |
| | | |
| | | } |
| | | #region ■ 初始化_____________________________ |
| | | |
| | | /// <summary> |
| | | /// 初始化白色区域的内容 |
| | | /// </summary> |
| | | public void InitContent(bool initStandard = true) |
| | | { |
| | | if (initStandard) |
| | | { |
| | | //设备名字 |
| | | var btnDeviceName = new NormalViewControl(270, 37, true); |
| | | btnDeviceName.X = Application.GetRealWidth(16); |
| | | btnDeviceName.Y = Application.GetRealHeight(18); |
| | | btnDeviceName.TextColor = CSS_Color.FirstLevelTitleColor; |
| | | btnDeviceName.TextSize = CSS_FontSize.EmphasisFontSize_FirstLevel; |
| | | btnDeviceName.Text = device.name; |
| | | btnDeviceName.Width = btnDeviceName.GetRealWidthByText(); |
| | | AddChidren(btnDeviceName); |
| | | //房间名字 |
| | | var btnRoomName = new NormalViewControl(270, 21, true); |
| | | btnRoomName.X = Application.GetRealWidth(16); |
| | | btnRoomName.Y = btnDeviceName.Bottom; |
| | | btnRoomName.TextColor = CSS_Color.PromptingColor1; |
| | | btnRoomName.TextSize = CSS_FontSize.PromptFontSize_FirstLevel; |
| | | btnRoomName.Text = device.GetRoomListName(); |
| | | btnRoomName.Width = btnRoomName.GetRealWidthByText(); |
| | | AddChidren(btnRoomName); |
| | | |
| | | } |
| | | |
| | | //初始化第一个索引页的内容 |
| | | this.InitFrameWhiteContent(); |
| | | |
| | | //刷新界面状态 |
| | | this.RefreshFormStatu(); |
| | | //读取状态 |
| | | new System.Threading.Thread(() => |
| | | { |
| | | while (true) |
| | | { |
| | | if (controlTime == DateTime.MinValue) |
| | | { |
| | | |
| | | } |
| | | else if (controlTime.AddSeconds(2) < DateTime.Now) |
| | | { |
| | | Control.Ins.SendReadCommand(device); |
| | | controlTime = DateTime.MinValue; |
| | | } |
| | | System.Threading.Thread.Sleep(1000); |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 初始化第一个索引页的内容 |
| | | /// </summary> |
| | | private void InitFrameWhiteContent() |
| | | { |
| | | temp = (int)Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")); |
| | | arcBar = new DiyArcSeekBar() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | OpenAngle = 160, |
| | | ThumbImageHeight = Application.GetRealWidth(50), |
| | | ProgressBarColor = CSS_Color.MainColor, |
| | | OfflineProgressBarColor = CSS_Color.PromptingColor2, |
| | | ArcColor = CSS_Color.BackgroundColor, |
| | | #if __IOS__ |
| | | Y = Application.GetRealHeight(120 + 25), |
| | | Width = Application.GetRealWidth(260 - 40), |
| | | Height = Application.GetRealWidth(260 - 40), |
| | | SeekBarPadding = Application.GetRealWidth(8), |
| | | #else |
| | | Y = Application.GetRealHeight(120 + 40), |
| | | Width = Application.GetRealWidth(260 - 40), |
| | | Height = Application.GetRealWidth(260 - 40), |
| | | SeekBarPadding = Application.GetRealWidth(7), |
| | | #endif |
| | | |
| | | }; |
| | | this.AddChidren(arcBar); |
| | | |
| | | |
| | | arcBar.ThumbImagePath = device.GetAttrState(FunctionAttributeKey.OnOff) == "on" ? "FunctionIcon/AC/DiyThumbIconOn.png" : "FunctionIcon/AC/DiyThumbIcon.png"; |
| | | arcBar.IsOffline = device.GetAttrState(FunctionAttributeKey.OnOff) == "off"; |
| | | arcBar.MinValue = device.GetAttribute(FunctionAttributeKey.SetTemp).min; |
| | | arcBar.MaxValue = device.GetAttribute(FunctionAttributeKey.SetTemp).max; |
| | | arcBar.Progress = (int)Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")); |
| | | |
| | | btnTemp = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(206), |
| | | Width = Application.GetRealWidth(71), |
| | | Height = Application.GetRealWidth(60), |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = 50, |
| | | IsBold = true, |
| | | Text = Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")).ToString(), |
| | | TextAlignment = TextAlignment.Center, |
| | | }; |
| | | this.AddChidren(btnTemp); |
| | | |
| | | btnTempUint = new Button() |
| | | { |
| | | X = btnTemp.Right, |
| | | Y = btnTemp.Y, |
| | | Width = Application.GetRealWidth(30), |
| | | Height = Application.GetRealHeight(30), |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.EmphasisFontSize_Secondary, |
| | | IsBold = true, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = "°C", |
| | | }; |
| | | this.AddChidren(btnTempUint); |
| | | |
| | | btnIndoorTemp = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = btnTemp.Bottom, |
| | | Width = Application.GetRealWidth(120), |
| | | Height = Application.GetRealHeight(20), |
| | | Text = Language.StringByID(StringId.IndoorTemp) + "20°C", |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | }; |
| | | this.AddChidren(btnIndoorTemp); |
| | | |
| | | btnMinus = new Button() |
| | | { |
| | | X = Application.GetRealWidth(21), |
| | | Y = Application.GetRealHeight(263), |
| | | Width = Application.GetRealWidth(32), |
| | | Height = Application.GetRealWidth(32), |
| | | UnSelectedImagePath = "Public/MinusSignIcon.png", |
| | | }; |
| | | this.AddChidren(btnMinus); |
| | | |
| | | btnPlus = new Button() |
| | | { |
| | | X = Application.GetRealWidth(275), |
| | | Y = Application.GetRealHeight(263), |
| | | Width = Application.GetRealWidth(32), |
| | | Height = Application.GetRealWidth(32), |
| | | UnSelectedImagePath = "Public/PlusSignIcon.png", |
| | | }; |
| | | this.AddChidren(btnPlus); |
| | | |
| | | btnMode = new Button() |
| | | { |
| | | X = Application.GetRealWidth(60), |
| | | Y = Application.GetRealHeight(334), |
| | | Width = Application.GetRealWidth(30), |
| | | Height = Application.GetRealWidth(30), |
| | | UnSelectedImagePath = acFunction.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode)), |
| | | }; |
| | | this.AddChidren(btnMode); |
| | | |
| | | |
| | | btnSwing = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(330), |
| | | Width = Application.GetRealWidth(40), |
| | | Height = Application.GetRealWidth(40), |
| | | UnSelectedImagePath = "FunctionIcon/AC/SweepIconNullOn.png", |
| | | }; |
| | | if (device.GetAttribute(FunctionAttributeKey.Swing) != null) |
| | | { |
| | | this.AddChidren(btnSwing); |
| | | } |
| | | |
| | | |
| | | btnWindSpeed = new Button() |
| | | { |
| | | X = Application.GetRealWidth(235), |
| | | Y = Application.GetRealHeight(337), |
| | | Width = Application.GetRealWidth(30), |
| | | Height = Application.GetRealWidth(30), |
| | | UnSelectedImagePath = acFunction.GetFanIconPath(device.GetAttrState(FunctionAttributeKey.FanSpeed)), |
| | | }; |
| | | this.AddChidren(btnWindSpeed); |
| | | |
| | | btnSwitch = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(466), |
| | | Width = Application.GetRealWidth(32), |
| | | Height = Application.GetRealWidth(32), |
| | | UnSelectedImagePath = "Public/PowerClose.png", |
| | | SelectedImagePath = "Public/PowerOpen.png", |
| | | IsSelected = device.GetAttrState(FunctionAttributeKey.OnOff) == "on" |
| | | }; |
| | | this.AddChidren(btnSwitch); |
| | | |
| | | LoadEvent_TempChange(); |
| | | LoadEvent_AcStatesChange(); |
| | | |
| | | LoadDiv_IrView(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 加载修改模式区域 |
| | | /// </summary> |
| | | void LoadDiv_ChangeModeView() |
| | | { |
| | | Dialog dialog = new Dialog(); |
| | | |
| | | FrameLayout dialogView = new FrameLayout() |
| | | { |
| | | BackgroundColor = CSS_Color.DialogTransparentColor1, |
| | | }; |
| | | dialog.AddChidren(dialogView); |
| | | |
| | | FrameLayout modeChangeView; |
| | | modeChangeView = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(30), |
| | | Y = Application.GetRealHeight(128), |
| | | Width = Application.GetRealWidth(160), |
| | | Height = Application.GetRealHeight(287), |
| | | BackgroundImagePath = "FunctionIcon/AC/DivBg1.png", |
| | | }; |
| | | dialogView.AddChidren(modeChangeView); |
| | | |
| | | Button btnTitle; |
| | | btnTitle = new Button() |
| | | { |
| | | X = Application.GetRealWidth(8 + 16), |
| | | Y = Application.GetRealHeight(8), |
| | | Width = Application.GetRealWidth(112), |
| | | Height = Application.GetRealHeight(44), |
| | | TextID = StringId.ChooseMode, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.EmphasisFontSize_Secondary, |
| | | }; |
| | | modeChangeView.AddChidren(btnTitle); |
| | | |
| | | Button btnLine = new Button() |
| | | { |
| | | X = btnTitle.X, |
| | | Y = btnTitle.Bottom, |
| | | Width = Application.GetRealWidth(112), |
| | | Height = Application.GetRealHeight(1), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | }; |
| | | modeChangeView.AddChidren(btnLine); |
| | | |
| | | var modeList = device.GetAttribute(FunctionAttributeKey.Mode).value; |
| | | foreach (var m in modeList) |
| | | { |
| | | Button btnModeIcon = new Button() |
| | | { |
| | | X = btnTitle.X, |
| | | Y = Application.GetRealHeight(44 * (modeList.IndexOf(m) + 1) + 10 + 8), |
| | | Width = Application.GetRealWidth(24), |
| | | Height = Application.GetRealWidth(24), |
| | | IsSelected = device.GetAttrState(FunctionAttributeKey.Mode) == m, |
| | | }; |
| | | modeChangeView.AddChidren(btnModeIcon); |
| | | |
| | | Button btnModeText = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12) + btnModeIcon.Right, |
| | | Y = Application.GetRealHeight(44 * (modeList.IndexOf(m) + 1) + 8), |
| | | Height = Application.GetRealHeight(44), |
| | | Width = Application.GetRealWidth(90), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | SelectedTextColor = CSS_Color.MainColor, |
| | | IsSelected = device.GetAttrState(FunctionAttributeKey.Mode) == m, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | }; |
| | | modeChangeView.AddChidren(btnModeText); |
| | | |
| | | btnModeIcon.UnSelectedImagePath = acFunction.GetModeIconPath(m, false); |
| | | btnModeIcon.SelectedImagePath = acFunction.GetModeIconPath(m); |
| | | btnModeText.Text = acFunction.GetModeAttrText(m); |
| | | |
| | | if (modeList.IndexOf(m) < modeList.Count - 1) |
| | | { |
| | | modeChangeView.AddChidren(new Button() |
| | | { |
| | | X = btnTitle.X, |
| | | Y = btnModeText.Bottom, |
| | | Width = Application.GetRealWidth(112), |
| | | Height = Application.GetRealHeight(1), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | }); |
| | | } |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | dialog.Close(); |
| | | }; |
| | | EventHandler<MouseEventArgs> eventHandler1 = (sender, e) => |
| | | { |
| | | //if (!device.online) |
| | | //{ |
| | | // new Tip() |
| | | // { |
| | | // CloseTime = 1, |
| | | // Text = Language.StringByID(StringId.DeviceOfflineCannotOption), |
| | | // Direction = AMPopTipDirection.None, |
| | | // }.Show(MainPage.BaseView); |
| | | //} |
| | | btnModeIcon.IsSelected = btnModeText.IsSelected = true; |
| | | device.SetAttrState(FunctionAttributeKey.Mode, m); |
| | | btnMode.UnSelectedImagePath = acFunction.GetModeIconPath(m); |
| | | Dictionary<string, string> d = new Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.Mode, m); |
| | | Control.Ins.SendWriteCommand(device, d); |
| | | dialog.Close(); |
| | | if (device.GetAttrState(FunctionAttributeKey.Mode) == "fan") |
| | | { |
| | | arcBar.IsClickable = false; |
| | | arcBar.IsOffline = true; |
| | | } |
| | | else |
| | | { |
| | | arcBar.IsOffline = false; |
| | | arcBar.IsClickable = true; |
| | | } |
| | | }; |
| | | btnModeIcon.MouseUpEventHandler = eventHandler1; |
| | | btnModeText.MouseUpEventHandler = eventHandler1; |
| | | dialogView.MouseUpEventHandler = eventHandler; |
| | | |
| | | } |
| | | |
| | | dialogView.MouseUpEventHandler = (sender, e) => { |
| | | dialog.Close(); |
| | | }; |
| | | dialog.Show(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 加载修改扫风模式区域 |
| | | /// </summary> |
| | | void LoadDiv_ChangeSwingView() |
| | | { |
| | | Dialog dialog = new Dialog(); |
| | | |
| | | FrameLayout dialogView = new FrameLayout() |
| | | { |
| | | BackgroundColor = CSS_Color.DialogTransparentColor1, |
| | | }; |
| | | dialog.AddChidren(dialogView); |
| | | |
| | | FrameLayout modeChangeView; |
| | | modeChangeView = new FrameLayout() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(128), |
| | | Width = Application.GetRealWidth(160), |
| | | Height = Application.GetRealHeight(287), |
| | | BackgroundImagePath = "FunctionIcon/AC/DivBg2.png", |
| | | }; |
| | | dialogView.AddChidren(modeChangeView); |
| | | |
| | | Button btnTitle; |
| | | btnTitle = new Button() |
| | | { |
| | | X = Application.GetRealWidth(8 + 16), |
| | | Y = Application.GetRealHeight(8), |
| | | Width = Application.GetRealWidth(112), |
| | | Height = Application.GetRealHeight(44), |
| | | TextID = StringId.Swing, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.EmphasisFontSize_Secondary, |
| | | }; |
| | | modeChangeView.AddChidren(btnTitle); |
| | | |
| | | Button btnLine = new Button() |
| | | { |
| | | X = btnTitle.X, |
| | | Y = btnTitle.Bottom, |
| | | Width = Application.GetRealWidth(112), |
| | | Height = Application.GetRealHeight(1), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | }; |
| | | modeChangeView.AddChidren(btnLine); |
| | | |
| | | var modeList = device.GetAttribute(FunctionAttributeKey.Swing).value; |
| | | foreach (var m in modeList) |
| | | { |
| | | Button btnModeIcon = new Button() |
| | | { |
| | | X = btnTitle.X, |
| | | Y = Application.GetRealHeight(44 * (modeList.IndexOf(m) + 1) + 10 + 8), |
| | | Width = Application.GetRealWidth(24), |
| | | Height = Application.GetRealWidth(24), |
| | | IsSelected = device.GetAttrState(FunctionAttributeKey.Swing) == m, |
| | | }; |
| | | modeChangeView.AddChidren(btnModeIcon); |
| | | |
| | | Button btnModeText = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12) + btnModeIcon.Right, |
| | | Y = Application.GetRealHeight(44 * (modeList.IndexOf(m) + 1) + 8), |
| | | Height = Application.GetRealHeight(44), |
| | | Width = Application.GetRealWidth(90), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | SelectedTextColor = CSS_Color.MainColor, |
| | | IsSelected = device.GetAttrState(FunctionAttributeKey.Swing) == m, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | }; |
| | | modeChangeView.AddChidren(btnModeText); |
| | | |
| | | if (modeList.IndexOf(m) < modeList.Count - 1) |
| | | { |
| | | modeChangeView.AddChidren(new Button() |
| | | { |
| | | X = btnTitle.X, |
| | | Y = btnModeText.Bottom, |
| | | Width = Application.GetRealWidth(112), |
| | | Height = Application.GetRealHeight(1), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | }); |
| | | } |
| | | |
| | | btnModeIcon.UnSelectedImagePath = acFunction.GetSwingIconPath(m, false); |
| | | btnModeIcon.SelectedImagePath = acFunction.GetSwingIconPath(m); |
| | | btnModeText.Text = acFunction.GetSwingAttrText(m); |
| | | |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | dialog.Close(); |
| | | }; |
| | | EventHandler<MouseEventArgs> eventHandler1 = (sender, e) => |
| | | { |
| | | //if (!device.online) |
| | | //{ |
| | | // new Tip() |
| | | // { |
| | | // CloseTime = 1, |
| | | // Text = Language.StringByID(StringId.DeviceOfflineCannotOption), |
| | | // Direction = AMPopTipDirection.None, |
| | | // }.Show(MainPage.BaseView); |
| | | //} |
| | | btnModeIcon.IsSelected = btnModeText.IsSelected = true; |
| | | device.SetAttrState(FunctionAttributeKey.Swing, m); |
| | | btnSwing.UnSelectedImagePath = acFunction.GetSwingIconPath(m); |
| | | Dictionary<string, string> d = new Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.Swing, m); |
| | | Control.Ins.SendWriteCommand(device, d); |
| | | dialog.Close(); |
| | | }; |
| | | btnModeIcon.MouseUpEventHandler = eventHandler1; |
| | | btnModeText.MouseUpEventHandler = eventHandler1; |
| | | dialogView.MouseUpEventHandler = eventHandler; |
| | | |
| | | } |
| | | |
| | | dialogView.MouseUpEventHandler = (sender, e) => { |
| | | dialog.Close(); |
| | | }; |
| | | dialog.Show(); |
| | | } |
| | | /// <summary> |
| | | /// 加载修改模式区域 |
| | | /// </summary> |
| | | void LoadDiv_ChangeFanView() |
| | | { |
| | | Dialog dialog = new Dialog(); |
| | | |
| | | FrameLayout dialogView = new FrameLayout() |
| | | { |
| | | BackgroundColor = CSS_Color.DialogTransparentColor1, |
| | | }; |
| | | dialog.AddChidren(dialogView); |
| | | |
| | | FrameLayout modeChangeView; |
| | | modeChangeView = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(185), |
| | | Y = Application.GetRealHeight(172), |
| | | Width = Application.GetRealWidth(160), |
| | | Height = Application.GetRealHeight(243), |
| | | BackgroundImagePath = "FunctionIcon/AC/DivBg2.png", |
| | | }; |
| | | dialogView.AddChidren(modeChangeView); |
| | | |
| | | Button btnTitle; |
| | | btnTitle = new Button() |
| | | { |
| | | X = Application.GetRealWidth(8 + 16), |
| | | Y = Application.GetRealHeight(8), |
| | | Width = Application.GetRealWidth(112), |
| | | Height = Application.GetRealHeight(44), |
| | | TextID = StringId.ChooseFan, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.EmphasisFontSize_Secondary, |
| | | }; |
| | | modeChangeView.AddChidren(btnTitle); |
| | | |
| | | Button btnLine = new Button() |
| | | { |
| | | X = btnTitle.X, |
| | | Y = btnTitle.Bottom, |
| | | Width = Application.GetRealWidth(112), |
| | | Height = Application.GetRealHeight(1), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | }; |
| | | modeChangeView.AddChidren(btnLine); |
| | | |
| | | var modeList = device.GetAttribute(FunctionAttributeKey.FanSpeed).value; |
| | | foreach (var m in modeList) |
| | | { |
| | | Button btnFanIcon = new Button() |
| | | { |
| | | X = btnTitle.X, |
| | | Y = Application.GetRealHeight(44 * (modeList.IndexOf(m) + 1) + 10 + 8), |
| | | Width = Application.GetRealWidth(24), |
| | | Height = Application.GetRealWidth(24), |
| | | IsSelected = device.GetAttrState(FunctionAttributeKey.FanSpeed) == m, |
| | | }; |
| | | modeChangeView.AddChidren(btnFanIcon); |
| | | |
| | | Button btnFanText = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12) + btnFanIcon.Right, |
| | | Y = Application.GetRealHeight(44 * (modeList.IndexOf(m) + 1) + 8), |
| | | Height = Application.GetRealHeight(44), |
| | | Width = Application.GetRealWidth(70), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | SelectedTextColor = CSS_Color.MainColor, |
| | | IsSelected = device.GetAttrState(FunctionAttributeKey.FanSpeed) == m, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | }; |
| | | modeChangeView.AddChidren(btnFanText); |
| | | btnFanIcon.UnSelectedImagePath = acFunction.GetFanIconPath(m, false); |
| | | btnFanIcon.SelectedImagePath = acFunction.GetFanIconPath(m); |
| | | btnFanText.Text = acFunction.GetFanAttrText(m); |
| | | |
| | | if (modeList.IndexOf(m) < modeList.Count - 1) |
| | | { |
| | | modeChangeView.AddChidren(new Button() |
| | | { |
| | | X = btnTitle.X, |
| | | Y = btnFanText.Bottom, |
| | | Width = Application.GetRealWidth(112), |
| | | Height = Application.GetRealHeight(1), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | }); |
| | | } |
| | | |
| | | EventHandler<MouseEventArgs> closeDialogEvent = (sender, e) => |
| | | { |
| | | dialog.Close(); |
| | | }; |
| | | EventHandler<MouseEventArgs> eventHandler1 = (sender, e) => |
| | | { |
| | | //if (!device.online) |
| | | //{ |
| | | // new Tip() |
| | | // { |
| | | // CloseTime = 1, |
| | | // Text = Language.StringByID(StringId.DeviceOfflineCannotOption), |
| | | // Direction = AMPopTipDirection.None, |
| | | // }.Show(MainPage.BaseView); |
| | | //} |
| | | btnFanIcon.IsSelected = btnFanText.IsSelected = true; |
| | | device.SetAttrState(FunctionAttributeKey.FanSpeed, m); |
| | | btnWindSpeed.UnSelectedImagePath = acFunction.GetFanIconPath(m); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.FanSpeed, m); |
| | | Control.Ins.SendWriteCommand(device, d); |
| | | //btnWindSpeed.UnSelectedImagePath = btnFanIcon.UnSelectedImagePath; |
| | | dialog.Close(); |
| | | }; |
| | | btnFanIcon.MouseUpEventHandler = eventHandler1; |
| | | btnFanText.MouseUpEventHandler = eventHandler1; |
| | | dialogView.MouseUpEventHandler = closeDialogEvent; |
| | | } |
| | | |
| | | dialog.Show(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 加载红外遥控器,额外按钮 |
| | | /// </summary> |
| | | void LoadDiv_IrView() |
| | | { |
| | | if (device.spk == SPK.AcIr) |
| | | { |
| | | var btnMore = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(334 + 80), |
| | | Width = Application.GetRealWidth(35), |
| | | Height = Application.GetRealWidth(35), |
| | | UnSelectedImagePath = "FunctionIcon/AC/More.png", |
| | | }; |
| | | this.AddChidren(btnMore); |
| | | |
| | | btnMore.MouseUpEventHandler = (sender, e) => { |
| | | LoadDialog_IrMoreView(); |
| | | }; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 加载额外对红外按钮界面 |
| | | /// </summary> |
| | | void LoadDialog_IrMoreView() |
| | | { |
| | | Dialog dialog = new Dialog(); |
| | | |
| | | var div = new FrameLayout(); |
| | | dialog.AddChidren(div); |
| | | div.MouseUpEventHandler = (sender, e) => { |
| | | dialog.Close(); |
| | | }; |
| | | |
| | | var bodyView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(427),//667 |
| | | Height = Application.GetRealHeight(240), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | div.AddChidren(bodyView); |
| | | |
| | | var contentView = new VerticalScrolViewLayout() |
| | | { |
| | | Y = Application.GetRealHeight(16), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(296 + 200), |
| | | }; |
| | | bodyView.AddChidren(contentView); |
| | | |
| | | |
| | | var row = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(60), |
| | | Width = Application.GetRealWidth(296), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | }; |
| | | contentView.AddChidren(row); |
| | | |
| | | int index = 0; |
| | | List<FunctionAttributes> attrList = new List<FunctionAttributes>(); |
| | | attrList.AddRange(device.attributes); |
| | | attrList.Add(new FunctionAttributes() |
| | | { |
| | | key = "+", |
| | | }); |
| | | |
| | | foreach (var attr in attrList) |
| | | { |
| | | if (attr.key == FunctionAttributeKey.Mode |
| | | || attr.key == FunctionAttributeKey.OnOff |
| | | || attr.key == FunctionAttributeKey.SetTemp |
| | | || attr.key == FunctionAttributeKey.SetTempStep |
| | | || attr.key == FunctionAttributeKey.FanSpeed |
| | | || attr.key == FunctionAttributeKey.FanManual |
| | | || attr.key == FunctionAttributeKey.FanAuto |
| | | ) |
| | | { |
| | | continue; |
| | | } |
| | | if (index != 0 && index % 3 == 0) |
| | | { |
| | | row = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(56), |
| | | Width = Application.GetRealWidth(296), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | }; |
| | | contentView.AddChidren(row); |
| | | } |
| | | if (attr.key == "+") |
| | | { |
| | | var addView = new FrameLayout() |
| | | { |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetRealWidth(88), |
| | | Height = Application.GetRealHeight(40), |
| | | Radius = (uint)Application.GetRealHeight(18), |
| | | BorderColor = CSS_Color.PromptingColor1, |
| | | BorderWidth = (uint)Application.GetRealWidth(2), |
| | | }; |
| | | |
| | | |
| | | if (index % 3 == 1) |
| | | { |
| | | addView.Gravity = Gravity.Center; |
| | | } |
| | | else if (index % 3 == 2) |
| | | { |
| | | addView.X = Application.GetRealWidth(208); |
| | | } |
| | | row.AddChidren(addView); |
| | | |
| | | var btnAdd = new Button() |
| | | { |
| | | Gravity = Gravity.Center, |
| | | UnSelectedImagePath = "Public/PlusSignIcon.png", |
| | | Width = Application.GetRealWidth(32), |
| | | Height = Application.GetRealWidth(32), |
| | | }; |
| | | addView.AddChidren(btnAdd); |
| | | |
| | | btnAdd.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | dialog.Close(); |
| | | Action action = () => { |
| | | LoadDialog_IrMoreView(); |
| | | }; |
| | | var addButton = new AcControlPage_AddIrButton(action); |
| | | MainPage.BasePageView.AddChidren(addButton); |
| | | addButton.Show(device); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | |
| | | |
| | | } |
| | | else |
| | | { |
| | | |
| | | var btn = new Button() |
| | | { |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetRealWidth(88), |
| | | Height = Application.GetRealHeight(40), |
| | | Radius = (uint)Application.GetRealHeight(18), |
| | | BorderColor = CSS_Color.PromptingColor1, |
| | | BorderWidth = (uint)Application.GetRealWidth(2), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | SelectedTextColor = CSS_Color.MainBackgroundColor, |
| | | SelectedBackgroundColor = CSS_Color.MainColor, |
| | | }; |
| | | if (attr.value.Count > 0) |
| | | { |
| | | btn.Text = attr.value[0]; |
| | | } |
| | | if (index % 3 == 1) |
| | | { |
| | | btn.Gravity = Gravity.Center; |
| | | } |
| | | else if (index % 3 == 2) |
| | | { |
| | | btn.X = Application.GetRealWidth(208); |
| | | } |
| | | row.AddChidren(btn); |
| | | |
| | | btn.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | //if (!device.online) |
| | | //{ |
| | | // new Tip() |
| | | // { |
| | | // CloseTime = 1, |
| | | // Text = Language.StringByID(StringId.DeviceOfflineCannotOption), |
| | | // Direction = AMPopTipDirection.None, |
| | | // }.Show(MainPage.BaseView); |
| | | //} |
| | | Dictionary<string, string> d = new Dictionary<string, string>(); |
| | | d.Add(attr.key, ""); |
| | | Control.Ins.SendWriteCommand(device, d); |
| | | |
| | | new System.Threading.Thread(() => |
| | | { |
| | | System.Threading.Thread.Sleep(2000); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | btn.IsSelected = false; |
| | | }); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | | |
| | | } |
| | | |
| | | index++; |
| | | } |
| | | |
| | | dialog.Show(); |
| | | } |
| | | |
| | | |
| | | #endregion |
| | | |
| | | #region ■ 发送各种命令_______________________ |
| | | |
| | | /// <summary> |
| | | /// 温度改变模式 |
| | | /// </summary> |
| | | void LoadEvent_TempChange() |
| | | { |
| | | btnMinus.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | //if (!device.online) |
| | | //{ |
| | | // new Tip() |
| | | // { |
| | | // CloseTime = 1, |
| | | // Text = Language.StringByID(StringId.DeviceOfflineCannotOption), |
| | | // Direction = AMPopTipDirection.None, |
| | | // }.Show(MainPage.BaseView); |
| | | //} |
| | | if (device.trait_on_off.curValue.ToString() == "off" || device.GetAttrState(FunctionAttributeKey.Mode) == "fan") |
| | | { |
| | | return; |
| | | } |
| | | |
| | | if (temp <= device.GetAttribute(FunctionAttributeKey.SetTemp).min) |
| | | { |
| | | return; |
| | | } |
| | | --temp; |
| | | Console.WriteLine($"temp == {temp}"); |
| | | controlTime = DateTime.Now; |
| | | arcBar.Progress = temp; |
| | | btnTemp.Text = temp.ToString(); |
| | | device.SetAttrState(FunctionAttributeKey.SetTemp, temp.ToString()); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.SetTemp, temp.ToString()); |
| | | Control.Ins.SendWriteCommand(device, d); |
| | | }; |
| | | btnPlus.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | //if (!device.online) |
| | | //{ |
| | | // new Tip() |
| | | // { |
| | | // CloseTime = 1, |
| | | // Text = Language.StringByID(StringId.DeviceOfflineCannotOption), |
| | | // Direction = AMPopTipDirection.None, |
| | | // }.Show(MainPage.BaseView); |
| | | //} |
| | | if (device.trait_on_off.curValue.ToString() == "off" || device.GetAttrState(FunctionAttributeKey.Mode) == "fan") |
| | | { |
| | | return; |
| | | } |
| | | if (temp >= device.GetAttribute(FunctionAttributeKey.SetTemp).max) |
| | | { |
| | | return; |
| | | } |
| | | ++temp; |
| | | controlTime = DateTime.Now; |
| | | arcBar.Progress = temp; |
| | | btnTemp.Text = temp.ToString(); |
| | | device.SetAttrState(FunctionAttributeKey.SetTemp, temp.ToString()); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.SetTemp, temp.ToString()); |
| | | Control.Ins.SendWriteCommand(device, d); |
| | | }; |
| | | //if (device.online) |
| | | { |
| | | arcBar.OnStopTrackingTouchEvent = (sender, e) => |
| | | { |
| | | temp = arcBar.Progress; |
| | | device.SetAttrState(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString()); |
| | | btnTemp.Text = arcBar.Progress.ToString(); |
| | | controlTime = DateTime.Now; |
| | | Dictionary<string, string> d = new Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString()); |
| | | Control.Ins.SendWriteCommand(device, d); |
| | | }; |
| | | arcBar.OnProgressChangedEvent = (sender, e) => |
| | | { |
| | | device.SetAttrState(FunctionAttributeKey.SetTemp, e.ToString()); |
| | | btnTemp.Text = e.ToString(); |
| | | }; |
| | | //arcBar.MouseDownEventHandler = (sender, e) => { |
| | | // Console.WriteLine("ddd"); |
| | | // MainPage.BasePageView.ScrollEnabled =false; |
| | | //}; |
| | | //arcBar.MouseUpEventHandler = (sender, e) => { |
| | | // Console.WriteLine("ddd2"); |
| | | // MainPage.BasePageView.ScrollEnabled = true; |
| | | //}; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 控制模式事件 |
| | | /// </summary> |
| | | void LoadEvent_AcStatesChange() |
| | | { |
| | | btnMode.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | if (device.trait_on_off.curValue.ToString() == "off") |
| | | { |
| | | return; |
| | | } |
| | | LoadDiv_ChangeModeView(); |
| | | }; |
| | | //扫风改变模式 |
| | | btnSwing.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | if (device.trait_on_off.curValue.ToString() == "off") |
| | | { |
| | | return; |
| | | } |
| | | LoadDiv_ChangeSwingView(); |
| | | }; |
| | | btnWindSpeed.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | if (device.trait_on_off.curValue.ToString() == "off") |
| | | { |
| | | return; |
| | | } |
| | | LoadDiv_ChangeFanView(); |
| | | }; |
| | | |
| | | btnSwitch.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | //if (!device.online) |
| | | //{ |
| | | // new Tip() |
| | | // { |
| | | // CloseTime = 1, |
| | | // Text = Language.StringByID(StringId.DeviceOfflineCannotOption), |
| | | // Direction = AMPopTipDirection.None, |
| | | // }.Show(MainPage.BaseView); |
| | | //} |
| | | btnSwitch.IsSelected = !btnSwitch.IsSelected; |
| | | device.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off"; |
| | | if (device.trait_on_off.curValue.ToString() == "on") |
| | | { |
| | | arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIconOn.png"; |
| | | btnSwitch.IsSelected = true; |
| | | arcBar.IsOffline = false; |
| | | } |
| | | else |
| | | { |
| | | arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIcon.png"; |
| | | btnSwitch.IsBold = false; |
| | | arcBar.IsOffline = true; |
| | | } |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.OnOff, device.trait_on_off.curValue.ToString()); |
| | | Control.Ins.SendWriteCommand(device, d); |
| | | }; |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region ■ 刷新界面状态_______________________ |
| | | |
| | | /// <summary> |
| | | /// 刷新界面状态 |
| | | /// </summary> |
| | | public void RefreshFormStatu() |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | //app自己控制的不用更新,会造成跳动 |
| | | if (controlTime.AddSeconds(2) > DateTime.Now) |
| | | { |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + "°C"; |
| | | btnMode.SelectedImagePath = acFunction.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode)); |
| | | btnSwing.SelectedImagePath = acFunction.GetSwingIconPath(device.GetAttrState(FunctionAttributeKey.Swing)); |
| | | btnWindSpeed.SelectedImagePath = acFunction.GetFanIconPath(device.GetAttrState(FunctionAttributeKey.FanSpeed)); |
| | | btnMode.UnSelectedImagePath = acFunction.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode), false); |
| | | btnSwing.UnSelectedImagePath = acFunction.GetSwingIconPath(device.GetAttrState(FunctionAttributeKey.Swing), false); |
| | | btnWindSpeed.UnSelectedImagePath = acFunction.GetFanIconPath(device.GetAttrState(FunctionAttributeKey.FanSpeed), false); |
| | | temp = Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", "."))); |
| | | |
| | | |
| | | arcBar.Progress = temp; |
| | | btnTemp.Text = temp.ToString(); |
| | | |
| | | if (device.trait_on_off.curValue.ToString() == "on") |
| | | { |
| | | btnMode.IsSelected = btnSwing.IsSelected = btnWindSpeed.IsSelected = true; |
| | | arcBar.IsOffline = false; |
| | | btnSwitch.IsSelected = true; |
| | | arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIconOn.png"; |
| | | if (device.GetAttrState(FunctionAttributeKey.Mode) == "fan") |
| | | { |
| | | arcBar.IsClickable = false; |
| | | } |
| | | else |
| | | { |
| | | arcBar.IsClickable = true; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | btnMode.IsSelected = btnSwing.IsSelected = btnWindSpeed.IsSelected = false; |
| | | arcBar.IsOffline = true; |
| | | btnSwitch.IsSelected = false; |
| | | arcBar.IsClickable = false; |
| | | arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIcon.png"; |
| | | } |
| | | |
| | | if (device.GetAttrState(FunctionAttributeKey.Mode) == "dry") |
| | | { |
| | | arcBar.IsOffline = true; |
| | | arcBar.IsClickable = false; |
| | | |
| | | } |
| | | } |
| | | |
| | | }); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region ■ 一般方法___________________________ |
| | | |
| | | /// <summary> |
| | | /// 刷新当前设备的状态缓存 |
| | | /// </summary> |
| | | private void RefreshNowDeviceStatuMemory(Function i_LocalDevice) |
| | | { |
| | | } |
| | | |
| | | #endregion |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using HDL_ON.DriverLayer; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.Stan; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | | namespace HDL_ON.UI |
| | | { |
| | | public class FhContentView : FrameLayout |
| | | { |
| | | #region ■ 变量声明___________________________ |
| | | /// <summary> |
| | | /// 空调温度控制控件 |
| | | /// </summary> |
| | | DiyArcSeekBar arcBar; |
| | | /// <summary> |
| | | /// 减号按钮 |
| | | /// </summary> |
| | | Button btnMinus; |
| | | /// <summary> |
| | | /// 加号按钮 |
| | | /// </summary> |
| | | Button btnPlus; |
| | | /// <summary> |
| | | /// 温度按钮 |
| | | /// </summary> |
| | | Button btnTemp; |
| | | Button btnTempUint; |
| | | /// <summary> |
| | | /// 室内温度按钮 |
| | | /// </summary> |
| | | Button btnIndoorTemp; |
| | | /// <summary> |
| | | /// 模式按钮 |
| | | /// </summary> |
| | | Button btnMode; |
| | | /// <summary> |
| | | /// 开关按钮 |
| | | /// </summary> |
| | | Button btnSwitch; |
| | | |
| | | FloorHeating fhTemp = new FloorHeating(); |
| | | |
| | | Function device; |
| | | |
| | | #endregion |
| | | |
| | | public FhContentView(Function function) |
| | | { |
| | | device = function; |
| | | } |
| | | |
| | | #region ■ 初始化_____________________________ |
| | | |
| | | /// <summary> |
| | | /// 初始化白色区域的内容 |
| | | /// </summary> |
| | | public void InitContentView(bool initStandard) |
| | | { |
| | | |
| | | if (initStandard) |
| | | { |
| | | //设备名字 |
| | | var btnDeviceName = new NormalViewControl(270, 37, true); |
| | | btnDeviceName.X = Application.GetRealWidth(16); |
| | | btnDeviceName.Y = Application.GetRealHeight(18); |
| | | btnDeviceName.TextColor = CSS_Color.FirstLevelTitleColor; |
| | | btnDeviceName.TextSize = CSS_FontSize.EmphasisFontSize_FirstLevel; |
| | | btnDeviceName.Text = device.name; |
| | | btnDeviceName.Width = btnDeviceName.GetRealWidthByText(); |
| | | AddChidren(btnDeviceName); |
| | | //房间名字 |
| | | var btnRoomName = new NormalViewControl(270, 21, true); |
| | | btnRoomName.X = Application.GetRealWidth(16); |
| | | btnRoomName.Y = btnDeviceName.Bottom; |
| | | btnRoomName.TextColor = CSS_Color.PromptingColor1; |
| | | btnRoomName.TextSize = CSS_FontSize.PromptFontSize_FirstLevel; |
| | | btnRoomName.Text = device.GetRoomListName(); |
| | | btnRoomName.Width = btnRoomName.GetRealWidthByText(); |
| | | AddChidren(btnRoomName); |
| | | |
| | | } |
| | | //初始化第一个索引页的内容 |
| | | this.InitFrameWhiteContent1(); |
| | | |
| | | //刷新界面状态 |
| | | this.RefreshFormStatu(); |
| | | //读取状态 |
| | | new System.Threading.Thread(() => |
| | | { |
| | | Control.Ins.SendReadCommand(device); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 初始化第一个索引页的内容 |
| | | /// </summary> |
| | | private void InitFrameWhiteContent1() |
| | | { |
| | | |
| | | arcBar = new DiyArcSeekBar() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | OpenAngle = 160, |
| | | //ThumbImagePath = device.trait_on_off.curValue.ToString() == "on" ? "FunctionIcon/FloorHeating/DiyThumbIconOn.png" : "FunctionIcon/AC/DiyThumbIcon.png", |
| | | ThumbImageHeight = Application.GetRealWidth(50), |
| | | ProgressBarColor = CSS_Color.AuxiliaryColor1, // 0xFFFC9C04, |
| | | OfflineProgressBarColor = CSS_Color.PromptingColor2, |
| | | MinValue = device.GetAttribute(FunctionAttributeKey.SetTemp).min, |
| | | MaxValue = device.GetAttribute(FunctionAttributeKey.SetTemp).max, |
| | | ArcColor = CSS_Color.BackgroundColor, |
| | | Progress = Convert.ToInt32(device.GetAttrState(FunctionAttributeKey.SetTemp)), |
| | | #if __IOS__ |
| | | Y = Application.GetRealHeight(120 + 25), |
| | | Width = Application.GetRealWidth(260 - 40), |
| | | Height = Application.GetRealWidth(260 - 40), |
| | | SeekBarPadding = Application.GetRealWidth(8), |
| | | #else |
| | | Y = Application.GetRealHeight(120 + 40), |
| | | Width = Application.GetRealWidth(260 - 40), |
| | | Height = Application.GetRealWidth(260 - 40), |
| | | SeekBarPadding = Application.GetRealWidth(7), |
| | | #endif |
| | | |
| | | }; |
| | | AddChidren(arcBar); |
| | | |
| | | |
| | | arcBar.ThumbImagePath = device.GetAttrState(FunctionAttributeKey.OnOff) == "on" ? "FunctionIcon/AC/DiyThumbIconOn.png" : "FunctionIcon/AC/DiyThumbIcon.png"; |
| | | arcBar.IsOffline = device.GetAttrState(FunctionAttributeKey.OnOff) == "off"; |
| | | arcBar.MinValue = device.GetAttribute(FunctionAttributeKey.SetTemp).min; |
| | | arcBar.MaxValue = device.GetAttribute(FunctionAttributeKey.SetTemp).max; |
| | | arcBar.Progress = Convert.ToInt32(device.GetAttrState(FunctionAttributeKey.SetTemp)); |
| | | |
| | | |
| | | |
| | | btnTemp = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(200), |
| | | Width = Application.GetRealWidth(80), |
| | | Height = Application.GetRealWidth(60), |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = 56, |
| | | IsBold = true, |
| | | Text = device.GetAttrState(FunctionAttributeKey.SetTemp), |
| | | TextAlignment = TextAlignment.Center, |
| | | }; |
| | | AddChidren(btnTemp); |
| | | |
| | | btnTempUint = new Button() |
| | | { |
| | | X = btnTemp.Right, |
| | | Y = btnTemp.Y, |
| | | Width = Application.GetRealWidth(30), |
| | | Height = Application.GetRealWidth(25), |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.EmphasisFontSize_Secondary, |
| | | IsBold = true, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = fhTemp.GetTempUnitString(device) |
| | | }; |
| | | AddChidren(btnTempUint); |
| | | |
| | | btnIndoorTemp = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = btnTemp.Bottom + Application.GetRealWidth(10), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealHeight(20), |
| | | Text = Language.StringByID(StringId.IndoorTemp) + "20°C", |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | }; |
| | | AddChidren(btnIndoorTemp); |
| | | |
| | | btnMinus = new Button() |
| | | { |
| | | X = Application.GetRealWidth(21), |
| | | Y = Application.GetRealHeight(263), |
| | | Width = Application.GetRealWidth(32), |
| | | Height = Application.GetRealWidth(32), |
| | | UnSelectedImagePath = "Public/MinusSignIcon.png", |
| | | }; |
| | | AddChidren(btnMinus); |
| | | |
| | | btnPlus = new Button() |
| | | { |
| | | X = Application.GetRealWidth(275), |
| | | Y = Application.GetRealHeight(263), |
| | | Width = Application.GetRealWidth(32), |
| | | Height = Application.GetRealWidth(32), |
| | | UnSelectedImagePath = "Public/PlusSignIcon.png", |
| | | }; |
| | | AddChidren(btnPlus); |
| | | |
| | | if (device.GetAttribute(FunctionAttributeKey.Mode) != null) |
| | | { |
| | | btnMode = new Button() |
| | | { |
| | | X = Application.GetRealWidth(235), |
| | | Y = Application.GetRealHeight(337), |
| | | Width = Application.GetRealWidth(30), |
| | | Height = Application.GetRealWidth(30), |
| | | UnSelectedImagePath = fhTemp.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode)) |
| | | }; |
| | | AddChidren(btnMode); |
| | | if (device.GetAttribute(FunctionAttributeKey.Mode).value.Count > 1) |
| | | { |
| | | btnMode.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | LoadDiv_ChangeModeView(); |
| | | }; |
| | | } |
| | | } |
| | | |
| | | btnSwitch = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(466), |
| | | Width = Application.GetRealWidth(32), |
| | | Height = Application.GetRealWidth(32), |
| | | UnSelectedImagePath = "Public/PowerClose.png", |
| | | SelectedImagePath = "Public/PowerOpen.png", |
| | | IsSelected = device.trait_on_off.curValue.ToString() == "on" |
| | | }; |
| | | AddChidren(btnSwitch); |
| | | |
| | | LoadEvent_TempChange(); |
| | | LoadEvent_AcStatesChange(); |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 加载修改模式区域 |
| | | /// </summary> |
| | | void LoadDiv_ChangeModeView() |
| | | { |
| | | Dialog dialog = new Dialog(); |
| | | |
| | | FrameLayout dialogView = new FrameLayout() |
| | | { |
| | | BackgroundColor = CSS_Color.DialogTransparentColor1, |
| | | }; |
| | | dialog.AddChidren(dialogView); |
| | | |
| | | FrameLayout modeChangeView; |
| | | modeChangeView = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(30), |
| | | Y = Application.GetRealHeight(128), |
| | | Width = Application.GetRealWidth(160), |
| | | Height = Application.GetRealHeight(287), |
| | | BackgroundImagePath = "FunctionIcon/AC/DivBg1.png", |
| | | }; |
| | | dialogView.AddChidren(modeChangeView); |
| | | |
| | | Button btnTitle; |
| | | btnTitle = new Button() |
| | | { |
| | | X = Application.GetRealWidth(8 + 16), |
| | | Y = Application.GetRealHeight(8), |
| | | Width = Application.GetRealWidth(112), |
| | | Height = Application.GetRealHeight(44), |
| | | TextID = StringId.ChooseMode, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.EmphasisFontSize_Secondary, |
| | | }; |
| | | modeChangeView.AddChidren(btnTitle); |
| | | |
| | | Button btnLine = new Button() |
| | | { |
| | | X = btnTitle.X, |
| | | Y = btnTitle.Bottom, |
| | | Width = Application.GetRealWidth(112), |
| | | Height = Application.GetRealHeight(1), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | }; |
| | | modeChangeView.AddChidren(btnLine); |
| | | |
| | | var modeList = device.GetAttribute(FunctionAttributeKey.Mode).value; |
| | | foreach (var m in modeList) |
| | | { |
| | | Button btnModeIcon = new Button() |
| | | { |
| | | X = btnTitle.X, |
| | | Y = Application.GetRealHeight(44 * (modeList.IndexOf(m) + 1) + 10 + 8), |
| | | Width = Application.GetRealWidth(24), |
| | | Height = Application.GetRealWidth(24), |
| | | IsSelected = device.GetAttrState(FunctionAttributeKey.Mode) == m, |
| | | }; |
| | | modeChangeView.AddChidren(btnModeIcon); |
| | | |
| | | Button btnModeText = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12) + btnModeIcon.Right, |
| | | Y = Application.GetRealHeight(44 * (modeList.IndexOf(m) + 1) + 8), |
| | | Height = Application.GetRealHeight(44), |
| | | Width = Application.GetRealWidth(90), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | SelectedTextColor = CSS_Color.MainColor, |
| | | IsSelected = device.GetAttrState(FunctionAttributeKey.Mode) == m, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | }; |
| | | modeChangeView.AddChidren(btnModeText); |
| | | |
| | | btnModeIcon.UnSelectedImagePath = fhTemp.GetModeIconPath(m, false); |
| | | btnModeIcon.SelectedImagePath = fhTemp.GetModeIconPath(m); |
| | | btnModeText.Text = fhTemp.GetModeAttrText(m); |
| | | |
| | | if (modeList.IndexOf(m) < modeList.Count - 1) |
| | | { |
| | | modeChangeView.AddChidren(new Button() |
| | | { |
| | | X = btnTitle.X, |
| | | Y = btnModeText.Bottom, |
| | | Width = Application.GetRealWidth(112), |
| | | Height = Application.GetRealHeight(1), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | }); |
| | | } |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | dialog.Close(); |
| | | }; |
| | | EventHandler<MouseEventArgs> eventHandler1 = (sender, e) => |
| | | { |
| | | //if (!device.online) |
| | | //{ |
| | | // new Tip() |
| | | // { |
| | | // CloseTime = 1, |
| | | // Text = Language.StringByID(StringId.DeviceOfflineCannotOption), |
| | | // Direction = AMPopTipDirection.None, |
| | | // }.Show(MainPage.BaseView); |
| | | //} |
| | | btnModeIcon.IsSelected = btnModeText.IsSelected = true; |
| | | device.SetAttrState(FunctionAttributeKey.Mode, m); |
| | | btnMode.UnSelectedImagePath = fhTemp.GetModeIconPath(m); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | btnMode.UnSelectedImagePath = btnModeIcon.UnSelectedImagePath; |
| | | d.Add(FunctionAttributeKey.Mode, m); |
| | | Control.Ins.SendWriteCommand(device, d); |
| | | dialog.Close(); |
| | | if (device.GetAttrState(FunctionAttributeKey.Mode) == "fan") |
| | | { |
| | | arcBar.IsClickable = false; |
| | | } |
| | | else |
| | | { |
| | | arcBar.IsClickable = true; |
| | | } |
| | | }; |
| | | btnModeIcon.MouseUpEventHandler = eventHandler1; |
| | | btnModeText.MouseUpEventHandler = eventHandler1; |
| | | dialogView.MouseUpEventHandler = eventHandler; |
| | | |
| | | } |
| | | |
| | | dialogView.MouseUpEventHandler = (sender, e) => { |
| | | dialog.Close(); |
| | | }; |
| | | dialog.Show(); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region ■ 发送各种命令_______________________ |
| | | |
| | | /// <summary> |
| | | /// 温度改变模式 |
| | | /// </summary> |
| | | void LoadEvent_TempChange() |
| | | { |
| | | btnMinus.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | //if (!device.online) |
| | | //{ |
| | | // new Tip() |
| | | // { |
| | | // CloseTime = 1, |
| | | // Text = Language.StringByID(StringId.DeviceOfflineCannotOption), |
| | | // Direction = AMPopTipDirection.None, |
| | | // }.Show(MainPage.BaseView); |
| | | // return; |
| | | //} |
| | | if (device.trait_on_off.curValue.ToString() == "off" || device.GetAttrState(FunctionAttributeKey.Mode) == "fan") |
| | | { |
| | | return; |
| | | } |
| | | var temp = Convert.ToInt32(device.GetAttrState(FunctionAttributeKey.SetTemp)); |
| | | if (temp <= device.GetAttribute(FunctionAttributeKey.Mode).min) |
| | | { |
| | | return; |
| | | } |
| | | temp--; |
| | | arcBar.Progress = temp; |
| | | btnTemp.Text = temp.ToString(); |
| | | device.SetAttrState(FunctionAttributeKey.SetTemp, temp.ToString()); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.SetTemp, temp.ToString()); |
| | | Control.Ins.SendWriteCommand(device, d); |
| | | }; |
| | | btnPlus.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | //if (!device.online) |
| | | //{ |
| | | // new Tip() |
| | | // { |
| | | // CloseTime = 1, |
| | | // Text = Language.StringByID(StringId.DeviceOfflineCannotOption), |
| | | // Direction = AMPopTipDirection.None, |
| | | // }.Show(MainPage.BaseView); |
| | | // return; |
| | | //} |
| | | if (device.trait_on_off.curValue.ToString() == "off" || device.GetAttrState(FunctionAttributeKey.Mode) == "fan") |
| | | { |
| | | return; |
| | | } |
| | | var temp = Convert.ToInt32(device.GetAttrState(FunctionAttributeKey.SetTemp)); |
| | | if (temp >= device.GetAttribute(FunctionAttributeKey.SetTemp).max) |
| | | { |
| | | return; |
| | | } |
| | | temp++; |
| | | arcBar.Progress = temp; |
| | | btnTemp.Text = temp.ToString(); |
| | | device.SetAttrState(FunctionAttributeKey.SetTemp, temp.ToString()); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.SetTemp, temp.ToString()); |
| | | Control.Ins.SendWriteCommand(device, d); |
| | | }; |
| | | |
| | | //if (device.online) |
| | | { |
| | | arcBar.OnStopTrackingTouchEvent = (sender, e) => |
| | | { |
| | | device.SetAttrState(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString()); |
| | | btnTemp.Text = arcBar.Progress.ToString(); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString()); |
| | | Control.Ins.SendWriteCommand(device, d); |
| | | }; |
| | | arcBar.OnProgressChangedEvent = (sender, e) => |
| | | { |
| | | device.SetAttrState(FunctionAttributeKey.SetTemp, e.ToString()); |
| | | btnTemp.Text = e.ToString(); |
| | | }; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 控制模式事件 |
| | | /// </summary> |
| | | void LoadEvent_AcStatesChange() |
| | | { |
| | | btnMode.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | if (device.trait_on_off.curValue.ToString() == "off") |
| | | { |
| | | return; |
| | | } |
| | | LoadDiv_ChangeModeView(); |
| | | }; |
| | | |
| | | btnSwitch.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnSwitch.IsSelected = !btnSwitch.IsSelected; |
| | | device.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off"; |
| | | if (device.trait_on_off.curValue.ToString() == "on") |
| | | { |
| | | arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIconOn.png"; |
| | | btnSwitch.IsSelected = true; |
| | | arcBar.IsOffline = false; |
| | | } |
| | | else |
| | | { |
| | | arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIcon.png"; |
| | | btnSwitch.IsBold = false; |
| | | arcBar.IsOffline = true; |
| | | } |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.OnOff, device.trait_on_off.curValue.ToString()); |
| | | Control.Ins.SendWriteCommand(device, d); |
| | | }; |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region ■ 刷新界面状态_______________________ |
| | | |
| | | /// <summary> |
| | | /// 刷新界面状态 |
| | | /// </summary> |
| | | private void RefreshFormStatu() |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | btnTemp.Text = device.GetAttrState(FunctionAttributeKey.SetTemp); |
| | | btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + "°C"; |
| | | btnMode.UnSelectedImagePath = fhTemp.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode)); |
| | | arcBar.Progress = Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", "."))); |
| | | if (device.trait_on_off.curValue.ToString() == "on") |
| | | { |
| | | arcBar.IsOffline = false; |
| | | btnSwitch.IsSelected = true; |
| | | arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIconOn.png"; |
| | | if (device.GetAttrState(FunctionAttributeKey.Mode) == "fan") |
| | | { |
| | | arcBar.IsClickable = false; |
| | | } |
| | | else |
| | | { |
| | | arcBar.IsClickable = true; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | arcBar.IsOffline = true; |
| | | btnSwitch.IsSelected = false; |
| | | arcBar.IsClickable = false; |
| | | arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIcon.png"; |
| | | } |
| | | //自动模式不允许调温度 2021-10-27 09:41:35 wxr 陈琳反馈 |
| | | if (device.GetAttrState(FunctionAttributeKey.Mode) == "auto") |
| | | { |
| | | btnPlus.Enable = false; |
| | | btnMinus.Enable = false; |
| | | arcBar.IsClickable = false; |
| | | arcBar.IsOffline = true; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using HDL_ON.DriverLayer; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | | //using System; |
| | | //using System.Collections.Generic; |
| | | //using HDL_ON.DriverLayer; |
| | | //using HDL_ON.Entity; |
| | | //using HDL_ON.UI.CSS; |
| | | //using Shared; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | | public class A_EnvironmentalDataCenter : FrameLayout |
| | | { |
| | | //namespace HDL_ON.UI |
| | | //{ |
| | | // public class A_EnvironmentalDataCenter : FrameLayout |
| | | // { |
| | | |
| | | #region 控件集合 |
| | | static A_EnvironmentalDataCenter bodyView; |
| | | /// <summary> |
| | | /// 楼层显示 |
| | | /// </summary> |
| | | Button btnRoom; |
| | | /// <summary> |
| | | /// 房间选择下拉图标 |
| | | /// </summary> |
| | | Button btnFoorDownIcon; |
| | | /// <summary> |
| | | /// 房间选择触发区域 |
| | | /// </summary> |
| | | Button btnRoomClickRow; |
| | | /// <summary> |
| | | /// 传感器列表区域 |
| | | /// </summary> |
| | | FrameLayout sensorListView; |
| | | // #region 控件集合 |
| | | // static A_EnvironmentalDataCenter bodyView; |
| | | // /// <summary> |
| | | // /// 楼层显示 |
| | | // /// </summary> |
| | | // Button btnRoom; |
| | | // /// <summary> |
| | | // /// 房间选择下拉图标 |
| | | // /// </summary> |
| | | // Button btnFoorDownIcon; |
| | | // /// <summary> |
| | | // /// 房间选择触发区域 |
| | | // /// </summary> |
| | | // Button btnRoomClickRow; |
| | | // /// <summary> |
| | | // /// 传感器列表区域 |
| | | // /// </summary> |
| | | // FrameLayout sensorListView; |
| | | |
| | | VerticalScrolViewLayout sensorListContentView; |
| | | // VerticalScrolViewLayout sensorListContentView; |
| | | |
| | | /// <summary> |
| | | /// 天气名称文本 |
| | | /// </summary> |
| | | Button btnWatherText; |
| | | /// <summary> |
| | | /// 湿度数据文本 |
| | | /// </summary> |
| | | Button btnHumidityText; |
| | | /// <summary> |
| | | /// pm25数据文本 |
| | | /// </summary> |
| | | Button btnPm25Values; |
| | | /// <summary> |
| | | /// 风速数据文本 |
| | | /// </summary> |
| | | Button btnFanSpeedValues; |
| | | // /// <summary> |
| | | // /// 天气名称文本 |
| | | // /// </summary> |
| | | // Button btnWatherText; |
| | | // /// <summary> |
| | | // /// 湿度数据文本 |
| | | // /// </summary> |
| | | // Button btnHumidityText; |
| | | // /// <summary> |
| | | // /// pm25数据文本 |
| | | // /// </summary> |
| | | // Button btnPm25Values; |
| | | // /// <summary> |
| | | // /// 风速数据文本 |
| | | // /// </summary> |
| | | // Button btnFanSpeedValues; |
| | | |
| | | |
| | | |
| | | List<SensorView> sensorViewList = new List<SensorView>(); |
| | | #endregion |
| | | #region 区域变量 |
| | | Room room; |
| | | // List<SensorView> sensorViewList = new List<SensorView>(); |
| | | // #endregion |
| | | // #region 区域变量 |
| | | // Room room; |
| | | |
| | | Sensor sensorTemp = new Sensor(); |
| | | /// <summary> |
| | | /// 传感器分类列表 |
| | | /// </summary> |
| | | Dictionary<string, List<Function>> sensorList = new Dictionary<string, List<Function>>(); |
| | | #endregion |
| | | // Sensor sensorTemp = new Sensor(); |
| | | // /// <summary> |
| | | // /// 传感器分类列表 |
| | | // /// </summary> |
| | | // Dictionary<string, List<Function>> sensorList = new Dictionary<string, List<Function>>(); |
| | | // #endregion |
| | | |
| | | |
| | | public A_EnvironmentalDataCenter() |
| | | { |
| | | bodyView = this; |
| | | } |
| | | // public A_EnvironmentalDataCenter() |
| | | // { |
| | | // bodyView = this; |
| | | // } |
| | | |
| | | /// <summary> |
| | | /// 加载界面 |
| | | /// </summary> |
| | | /// <param name="btnCollectionIcon">收藏按钮</param> |
| | | /// <param name="btnFunctionName">功能名称信息按钮</param> |
| | | /// <param name="btnFromFloor">功能楼层信息按钮</param> |
| | | public void LoadPage() |
| | | { |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | // /// <summary> |
| | | // /// 加载界面 |
| | | // /// </summary> |
| | | // /// <param name="btnCollectionIcon">收藏按钮</param> |
| | | // /// <param name="btnFunctionName">功能名称信息按钮</param> |
| | | // /// <param name="btnFromFloor">功能楼层信息按钮</param> |
| | | // public void LoadPage() |
| | | // { |
| | | // bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | |
| | | #region 顶部天气部分 |
| | | var topWeatherView = new FrameLayout() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(73), |
| | | Width = Application.GetRealWidth(361), |
| | | Height = Application.GetRealWidth(166), |
| | | BackgroundImagePath = "FunctionIcon/EnvirSensor/0.png", |
| | | }; |
| | | bodyView.AddChidren(topWeatherView); |
| | | LoadEvent_ChangeWeatherIcon(topWeatherView); |
| | | // #region 顶部天气部分 |
| | | // var topWeatherView = new FrameLayout() |
| | | // { |
| | | // Gravity = Gravity.CenterHorizontal, |
| | | // Y = Application.GetRealHeight(73), |
| | | // Width = Application.GetRealWidth(361), |
| | | // Height = Application.GetRealWidth(166), |
| | | // BackgroundImagePath = "FunctionIcon/EnvirSensor/0.png", |
| | | // }; |
| | | // bodyView.AddChidren(topWeatherView); |
| | | // LoadEvent_ChangeWeatherIcon(topWeatherView); |
| | | |
| | | var btnLocationText = new Button() |
| | | { |
| | | X = Application.GetRealWidth(27), |
| | | Width = Application.GetRealWidth(74), |
| | | Height = Application.GetRealWidth(44), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | Text = MainPage.cityInfo.location, |
| | | }; |
| | | topWeatherView.AddChidren(btnLocationText); |
| | | // var btnLocationText = new Button() |
| | | // { |
| | | // X = Application.GetRealWidth(27), |
| | | // Width = Application.GetRealWidth(74), |
| | | // Height = Application.GetRealWidth(44), |
| | | // TextAlignment = TextAlignment.CenterLeft, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // Text = MainPage.cityInfo.location, |
| | | // }; |
| | | // topWeatherView.AddChidren(btnLocationText); |
| | | |
| | | |
| | | var btnTemp = new Button() |
| | | { |
| | | X = Application.GetRealWidth(21), |
| | | Y = Application.GetRealWidth(53), |
| | | Width = Application.GetRealWidth(78), |
| | | Height = Application.GetRealWidth(68), |
| | | TextSize = 60, |
| | | IsBold = true, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | Text = MainPage.cityInfo.temperature, |
| | | }; |
| | | topWeatherView.AddChidren(btnTemp); |
| | | // var btnTemp = new Button() |
| | | // { |
| | | // X = Application.GetRealWidth(21), |
| | | // Y = Application.GetRealWidth(53), |
| | | // Width = Application.GetRealWidth(78), |
| | | // Height = Application.GetRealWidth(68), |
| | | // TextSize = 60, |
| | | // IsBold = true, |
| | | // TextAlignment = TextAlignment.CenterLeft, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // Text = MainPage.cityInfo.temperature, |
| | | // }; |
| | | // topWeatherView.AddChidren(btnTemp); |
| | | |
| | | var btnTempUint = new Button() |
| | | { |
| | | X = Application.GetRealWidth(109), |
| | | Y = Application.GetRealWidth(60), |
| | | Width = Application.GetRealWidth(20), |
| | | Height = Application.GetRealWidth(20), |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | TextColor = CSS_Color.TextualColor, |
| | | Text = "°C", |
| | | }; |
| | | topWeatherView.AddChidren(btnTempUint); |
| | | // var btnTempUint = new Button() |
| | | // { |
| | | // X = Application.GetRealWidth(109), |
| | | // Y = Application.GetRealWidth(60), |
| | | // Width = Application.GetRealWidth(20), |
| | | // Height = Application.GetRealWidth(20), |
| | | // TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | // TextColor = CSS_Color.TextualColor, |
| | | // Text = "°C", |
| | | // }; |
| | | // topWeatherView.AddChidren(btnTempUint); |
| | | |
| | | |
| | | btnWatherText = new Button() |
| | | { |
| | | X = Application.GetRealWidth(109), |
| | | Y = Application.GetRealWidth(82), |
| | | Width = Application.GetRealWidth(200), |
| | | Height = Application.GetRealWidth(20), |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = MainPage.cityInfo.weather |
| | | }; |
| | | topWeatherView.AddChidren(btnWatherText); |
| | | // btnWatherText = new Button() |
| | | // { |
| | | // X = Application.GetRealWidth(109), |
| | | // Y = Application.GetRealWidth(82), |
| | | // Width = Application.GetRealWidth(200), |
| | | // Height = Application.GetRealWidth(20), |
| | | // TextColor = CSS_Color.TextualColor, |
| | | // TextSize = CSS_FontSize.TextFontSize, |
| | | // TextAlignment = TextAlignment.CenterLeft, |
| | | // Text = MainPage.cityInfo.weather |
| | | // }; |
| | | // topWeatherView.AddChidren(btnWatherText); |
| | | |
| | | var btnTempUpperLimit = new Button() |
| | | { |
| | | X = Application.GetRealWidth(107), |
| | | Y = Application.GetRealWidth(101), |
| | | Width = Application.GetRealWidth(16), |
| | | Height = Application.GetRealWidth(16), |
| | | UnSelectedImagePath = "FunctionIcon/EnvirSensor/UpperLimit.png", |
| | | }; |
| | | topWeatherView.AddChidren(btnTempUpperLimit); |
| | | // var btnTempUpperLimit = new Button() |
| | | // { |
| | | // X = Application.GetRealWidth(107), |
| | | // Y = Application.GetRealWidth(101), |
| | | // Width = Application.GetRealWidth(16), |
| | | // Height = Application.GetRealWidth(16), |
| | | // UnSelectedImagePath = "FunctionIcon/EnvirSensor/UpperLimit.png", |
| | | // }; |
| | | // topWeatherView.AddChidren(btnTempUpperLimit); |
| | | |
| | | var btnTempUpperLimitText = new Button() |
| | | { |
| | | X = btnTempUpperLimit.Right, |
| | | Y = Application.GetRealWidth(101), |
| | | Width = Application.GetRealWidth(42), |
| | | Height = Application.GetRealWidth(20), |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | Text = $"{MainPage.cityInfo.highestTemperature}°C", |
| | | }; |
| | | topWeatherView.AddChidren(btnTempUpperLimitText); |
| | | // var btnTempUpperLimitText = new Button() |
| | | // { |
| | | // X = btnTempUpperLimit.Right, |
| | | // Y = Application.GetRealWidth(101), |
| | | // Width = Application.GetRealWidth(42), |
| | | // Height = Application.GetRealWidth(20), |
| | | // TextColor = CSS_Color.TextualColor, |
| | | // TextAlignment = TextAlignment.CenterLeft, |
| | | // TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | // Text = $"{MainPage.cityInfo.highestTemperature}°C", |
| | | // }; |
| | | // topWeatherView.AddChidren(btnTempUpperLimitText); |
| | | |
| | | var btnTempLowerLimit = new Button() |
| | | { |
| | | X = Application.GetRealWidth(156), |
| | | Y = Application.GetRealWidth(101), |
| | | Width = Application.GetRealWidth(16), |
| | | Height = Application.GetRealWidth(16), |
| | | UnSelectedImagePath = "FunctionIcon/EnvirSensor/LowerLimit.png", |
| | | }; |
| | | topWeatherView.AddChidren(btnTempLowerLimit); |
| | | // var btnTempLowerLimit = new Button() |
| | | // { |
| | | // X = Application.GetRealWidth(156), |
| | | // Y = Application.GetRealWidth(101), |
| | | // Width = Application.GetRealWidth(16), |
| | | // Height = Application.GetRealWidth(16), |
| | | // UnSelectedImagePath = "FunctionIcon/EnvirSensor/LowerLimit.png", |
| | | // }; |
| | | // topWeatherView.AddChidren(btnTempLowerLimit); |
| | | |
| | | var btnTempLowerLimitText = new Button() |
| | | { |
| | | X = btnTempLowerLimit.Right, |
| | | Y = Application.GetRealWidth(101), |
| | | Width = Application.GetRealWidth(42), |
| | | Height = Application.GetRealWidth(20), |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | Text = $"{MainPage.cityInfo.lowestTemperature}°C", |
| | | }; |
| | | topWeatherView.AddChidren(btnTempLowerLimitText); |
| | | // var btnTempLowerLimitText = new Button() |
| | | // { |
| | | // X = btnTempLowerLimit.Right, |
| | | // Y = Application.GetRealWidth(101), |
| | | // Width = Application.GetRealWidth(42), |
| | | // Height = Application.GetRealWidth(20), |
| | | // TextColor = CSS_Color.TextualColor, |
| | | // TextAlignment = TextAlignment.CenterLeft, |
| | | // TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | // Text = $"{MainPage.cityInfo.lowestTemperature}°C", |
| | | // }; |
| | | // topWeatherView.AddChidren(btnTempLowerLimitText); |
| | | |
| | | |
| | | var btnValue = new Button() |
| | | { |
| | | X = Application.GetRealWidth(27), |
| | | Y = Application.GetRealWidth(119), |
| | | Width = Application.GetRealWidth(300), |
| | | Height = Application.GetRealWidth(34), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | TextColor = CSS_Color.TextualColor, |
| | | }; |
| | | topWeatherView.AddChidren(btnValue); |
| | | var valueText = Language.StringByID(StringId.EnvirSensorValueTip); |
| | | btnValue.Text = valueText.Replace("{0}", $"{MainPage.cityInfo.humidity}").Replace("{1}", $"{MainPage.cityInfo.pm25}").Replace("{2}", $"{MainPage.cityInfo.windLevel}"); |
| | | #endregion |
| | | // var btnValue = new Button() |
| | | // { |
| | | // X = Application.GetRealWidth(27), |
| | | // Y = Application.GetRealWidth(119), |
| | | // Width = Application.GetRealWidth(300), |
| | | // Height = Application.GetRealWidth(34), |
| | | // TextAlignment = TextAlignment.CenterLeft, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // TextColor = CSS_Color.TextualColor, |
| | | // }; |
| | | // topWeatherView.AddChidren(btnValue); |
| | | // var valueText = Language.StringByID(StringId.EnvirSensorValueTip); |
| | | // btnValue.Text = valueText.Replace("{0}", $"{MainPage.cityInfo.humidity}").Replace("{1}", $"{MainPage.cityInfo.pm25}").Replace("{2}", $"{MainPage.cityInfo.windLevel}"); |
| | | // #endregion |
| | | |
| | | #region contentView |
| | | FrameLayout contentView = new FrameLayout() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealWidth(239), |
| | | Height = Application.GetRealHeight(450), |
| | | }; |
| | | bodyView.AddChidren(contentView); |
| | | // #region contentView |
| | | // FrameLayout contentView = new FrameLayout() |
| | | // { |
| | | // Gravity = Gravity.CenterHorizontal, |
| | | // Y = Application.GetRealWidth(239), |
| | | // Height = Application.GetRealHeight(450), |
| | | // }; |
| | | // bodyView.AddChidren(contentView); |
| | | |
| | | #region 房间顶部切换显示区域 |
| | | room = new Room() { roomName = Language.StringByID(StringId.All) }; |
| | | btnFoorDownIcon = new Button() |
| | | { |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(18), |
| | | UnSelectedImagePath = "Public/DownIcon.png", |
| | | }; |
| | | contentView.AddChidren(btnFoorDownIcon); |
| | | // #region 房间顶部切换显示区域 |
| | | // room = new Room() { roomName = Language.StringByID(StringId.All) }; |
| | | // btnFoorDownIcon = new Button() |
| | | // { |
| | | // Width = Application.GetMinRealAverage(16), |
| | | // Height = Application.GetMinRealAverage(16), |
| | | // X = Application.GetRealWidth(16), |
| | | // Y = Application.GetRealHeight(18), |
| | | // UnSelectedImagePath = "Public/DownIcon.png", |
| | | // }; |
| | | // contentView.AddChidren(btnFoorDownIcon); |
| | | |
| | | btnRoom = new Button() |
| | | { |
| | | X = btnFoorDownIcon.Right, |
| | | Y = Application.GetRealHeight(18), |
| | | Width = Application.GetRealWidth(200), |
| | | Height = Application.GetMinRealAverage(16), |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = room.roomName, |
| | | }; |
| | | contentView.AddChidren(btnRoom); |
| | | // btnRoom = new Button() |
| | | // { |
| | | // X = btnFoorDownIcon.Right, |
| | | // Y = Application.GetRealHeight(18), |
| | | // Width = Application.GetRealWidth(200), |
| | | // Height = Application.GetMinRealAverage(16), |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | // TextAlignment = TextAlignment.CenterLeft, |
| | | // Text = room.roomName, |
| | | // }; |
| | | // contentView.AddChidren(btnRoom); |
| | | |
| | | btnRoomClickRow = new Button() |
| | | { |
| | | Height = Application.GetRealHeight(40), |
| | | }; |
| | | contentView.AddChidren(btnRoomClickRow); |
| | | // btnRoomClickRow = new Button() |
| | | // { |
| | | // Height = Application.GetRealHeight(40), |
| | | // }; |
| | | // contentView.AddChidren(btnRoomClickRow); |
| | | |
| | | #endregion |
| | | sensorListContentView = new VerticalScrolViewLayout() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(50), |
| | | Height = Application.GetRealHeight(400), |
| | | Radius = (uint)Application.GetRealWidth(12), |
| | | BorderColor = 0x00000000, |
| | | BorderWidth = 0, |
| | | }; |
| | | contentView.AddChidren(sensorListContentView); |
| | | sensorListView = new FrameLayout(); |
| | | sensorListContentView.AddChidren(sensorListView); |
| | | // #endregion |
| | | // sensorListContentView = new VerticalScrolViewLayout() |
| | | // { |
| | | // Gravity = Gravity.CenterHorizontal, |
| | | // Y = Application.GetRealHeight(50), |
| | | // Height = Application.GetRealHeight(400), |
| | | // Radius = (uint)Application.GetRealWidth(12), |
| | | // BorderColor = 0x00000000, |
| | | // BorderWidth = 0, |
| | | // }; |
| | | // contentView.AddChidren(sensorListContentView); |
| | | // sensorListView = new FrameLayout(); |
| | | // sensorListContentView.AddChidren(sensorListView); |
| | | |
| | | LoadSenesorList(); |
| | | // LoadSenesorList(); |
| | | |
| | | |
| | | |
| | | #endregion |
| | | // #endregion |
| | | |
| | | //LoadEventList(); |
| | | LoadDialog_ChangeRoom(); |
| | | // //LoadEventList(); |
| | | // LoadDialog_ChangeRoom(); |
| | | |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.EnvironmentalScience)).LoadTopView(); |
| | | // new TopViewDiv(bodyView, Language.StringByID(StringId.EnvironmentalScience)).LoadTopView(); |
| | | |
| | | } |
| | | // } |
| | | |
| | | /// <summary> |
| | | /// 加载传感器列表 |
| | | /// </summary> |
| | | void LoadSenesorList() |
| | | { |
| | | sensorListView.RemoveAll(); |
| | | sensorViewList.Clear(); |
| | | // /// <summary> |
| | | // /// 加载传感器列表 |
| | | // /// </summary> |
| | | // void LoadSenesorList() |
| | | // { |
| | | // sensorListView.RemoveAll(); |
| | | // sensorViewList.Clear(); |
| | | |
| | | sensorList = new Dictionary<string, List<Function>>(); |
| | | int index = 0; |
| | | foreach (var sensor in FunctionList.List.GetEnvirSensorsList()) |
| | | { |
| | | foreach (var sensorAttr in sensor.attributes) |
| | | { |
| | | if (SPK.EnvironSpkList().Contains(sensorAttr.key) || sensorAttr.key == "value") |
| | | { |
| | | var flag = sensorAttr.key; |
| | | if (flag == "value") |
| | | { |
| | | flag = sensor.spk.Replace("sensor.", ""); |
| | | } |
| | | var newTemp = new Function() |
| | | { |
| | | name = sensor.name, |
| | | sid = sensor.sid, |
| | | deviceId = sensor.deviceId, |
| | | roomIds = sensor.roomIds, |
| | | spk = "sensor."+ flag, |
| | | attributes = new List<FunctionAttributes> { new FunctionAttributes { key = "value", state = sensorAttr.state, curValue = sensorAttr.curValue } |
| | | , new FunctionAttributes {key = "spk",state = sensorAttr.key,curValue = sensorAttr.key } } |
| | | }; |
| | | //分类加入集合 |
| | | if (sensorList.ContainsKey(flag)) |
| | | { |
| | | sensorList[flag].Add(newTemp); |
| | | } |
| | | else |
| | | { |
| | | sensorList.Add(flag, new List<Function>() { newTemp }); |
| | | } |
| | | } |
| | | } |
| | | // sensorList = new Dictionary<string, List<Function>>(); |
| | | // int index = 0; |
| | | // foreach (var sensor in FunctionList.List.GetEnvirSensorsList()) |
| | | // { |
| | | // foreach (var sensorAttr in sensor.attributes) |
| | | // { |
| | | // if (SPK.EnvironSpkList().Contains(sensorAttr.key) || sensorAttr.key == "value") |
| | | // { |
| | | // var flag = sensorAttr.key; |
| | | // if (flag == "value") |
| | | // { |
| | | // flag = sensor.spk.Replace("sensor.", ""); |
| | | // } |
| | | // var newTemp = new Function() |
| | | // { |
| | | // name = sensor.name, |
| | | // sid = sensor.sid, |
| | | // deviceId = sensor.deviceId, |
| | | // roomIds = sensor.roomIds, |
| | | // spk = "sensor."+ flag, |
| | | // attributes = new List<FunctionAttributes> { new FunctionAttributes { key = "value", state = sensorAttr.state, curValue = sensorAttr.curValue } |
| | | // , new FunctionAttributes {key = "spk",state = sensorAttr.key,curValue = sensorAttr.key } } |
| | | // }; |
| | | // //分类加入集合 |
| | | // if (sensorList.ContainsKey(flag)) |
| | | // { |
| | | // sensorList[flag].Add(newTemp); |
| | | // } |
| | | // else |
| | | // { |
| | | // sensorList.Add(flag, new List<Function>() { newTemp }); |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | new System.Threading.Thread(() => |
| | | { |
| | | Control.Ins.SendReadCommand(sensor); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | // new System.Threading.Thread(() => |
| | | // { |
| | | // Control.Ins.SendReadCommand(sensor); |
| | | // }) |
| | | // { IsBackground = true }.Start(); |
| | | // } |
| | | |
| | | |
| | | foreach(var sensorAssemble in sensorList) |
| | | { |
| | | var showList = sensorAssemble.Value; |
| | | if(room.roomId != "") |
| | | { |
| | | showList = sensorAssemble.Value.FindAll((obj) => obj.roomIds.Contains(room.roomId)); |
| | | } |
| | | if (showList != null && showList.Count > 0) |
| | | { |
| | | var sensorView = new SensorView(showList,index); |
| | | sensorListView.AddChidren(sensorView); |
| | | sensorViewList.Add(sensorView); |
| | | sensorView.LoadView(); |
| | | // foreach(var sensorAssemble in sensorList) |
| | | // { |
| | | // var showList = sensorAssemble.Value; |
| | | // if(room.roomId != "") |
| | | // { |
| | | // showList = sensorAssemble.Value.FindAll((obj) => obj.roomIds.Contains(room.roomId)); |
| | | // } |
| | | // if (showList != null && showList.Count > 0) |
| | | // { |
| | | // var sensorView = new SensorView(showList,index); |
| | | // sensorListView.AddChidren(sensorView); |
| | | // sensorViewList.Add(sensorView); |
| | | // sensorView.LoadView(); |
| | | |
| | | index++; |
| | | } |
| | | } |
| | | sensorListView.Height = Application.GetRealWidth(124 * (index + 1) / 2); |
| | | } |
| | | // index++; |
| | | // } |
| | | // } |
| | | // sensorListView.Height = Application.GetRealWidth(124 * (index + 1) / 2); |
| | | // } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 房间列表点击事件 |
| | | /// </summary> |
| | | void LoadDialog_ChangeRoom() |
| | | { |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | var dialog = new Dialog(); |
| | | var dialogBody = new FrameLayout(); |
| | | dialog.AddChidren(dialogBody); |
| | | dialogBody.MouseUpEventHandler += (sender1, e1) => |
| | | { |
| | | dialog.Close(); |
| | | }; |
| | | // /// <summary> |
| | | // /// 房间列表点击事件 |
| | | // /// </summary> |
| | | // void LoadDialog_ChangeRoom() |
| | | // { |
| | | // EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | // { |
| | | // var dialog = new Dialog(); |
| | | // var dialogBody = new FrameLayout(); |
| | | // dialog.AddChidren(dialogBody); |
| | | // dialogBody.MouseUpEventHandler += (sender1, e1) => |
| | | // { |
| | | // dialog.Close(); |
| | | // }; |
| | | |
| | | var dispalyView = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(10), |
| | | Y = Application.GetRealHeight(266), |
| | | Width = Application.GetRealWidth(160), |
| | | Height = Application.GetRealHeight(110), |
| | | BackgroundImagePath = "PersonalCenter/HomeList1bg.png", |
| | | }; |
| | | dialogBody.AddChidren(dispalyView); |
| | | // var dispalyView = new FrameLayout() |
| | | // { |
| | | // X = Application.GetRealWidth(10), |
| | | // Y = Application.GetRealHeight(266), |
| | | // Width = Application.GetRealWidth(160), |
| | | // Height = Application.GetRealHeight(110), |
| | | // BackgroundImagePath = "PersonalCenter/HomeList1bg.png", |
| | | // }; |
| | | // dialogBody.AddChidren(dispalyView); |
| | | |
| | | var contentView = new VerticalScrolViewLayout() |
| | | { |
| | | X = Application.GetRealWidth(8), |
| | | Y = Application.GetRealHeight(15), |
| | | Width = Application.GetRealWidth(150), |
| | | Height = Application.GetRealHeight(45 * 2), |
| | | ScrollEnabled = false |
| | | }; |
| | | dispalyView.AddChidren(contentView); |
| | | // var contentView = new VerticalScrolViewLayout() |
| | | // { |
| | | // X = Application.GetRealWidth(8), |
| | | // Y = Application.GetRealHeight(15), |
| | | // Width = Application.GetRealWidth(150), |
| | | // Height = Application.GetRealHeight(45 * 2), |
| | | // ScrollEnabled = false |
| | | // }; |
| | | // dispalyView.AddChidren(contentView); |
| | | |
| | | if (SpatialInfo.CurrentSpatial.RoomList.Count < 2) |
| | | { |
| | | } |
| | | else if (SpatialInfo.CurrentSpatial.RoomList.Count < 3) |
| | | { |
| | | dispalyView = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(10), |
| | | Y = Application.GetRealHeight(266), |
| | | Width = Application.GetRealWidth(160), |
| | | Height = Application.GetRealHeight(155), |
| | | BackgroundImagePath = "PersonalCenter/HomeList2bg.png", |
| | | }; |
| | | dialogBody.AddChidren(dispalyView); |
| | | // if (SpatialInfo.CurrentSpatial.RoomList.Count < 2) |
| | | // { |
| | | // } |
| | | // else if (SpatialInfo.CurrentSpatial.RoomList.Count < 3) |
| | | // { |
| | | // dispalyView = new FrameLayout() |
| | | // { |
| | | // X = Application.GetRealWidth(10), |
| | | // Y = Application.GetRealHeight(266), |
| | | // Width = Application.GetRealWidth(160), |
| | | // Height = Application.GetRealHeight(155), |
| | | // BackgroundImagePath = "PersonalCenter/HomeList2bg.png", |
| | | // }; |
| | | // dialogBody.AddChidren(dispalyView); |
| | | |
| | | contentView.Height = Application.GetRealHeight(45 * 3); |
| | | dispalyView.AddChidren(contentView); |
| | | } |
| | | else if (SpatialInfo.CurrentSpatial.RoomList.Count < 4) |
| | | { |
| | | dispalyView = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(10), |
| | | Y = Application.GetRealHeight(266), |
| | | Width = Application.GetRealWidth(160), |
| | | Height = Application.GetRealHeight(200), |
| | | BackgroundImagePath = "PersonalCenter/HomeList3bg.png", |
| | | }; |
| | | dialogBody.AddChidren(dispalyView); |
| | | // contentView.Height = Application.GetRealHeight(45 * 3); |
| | | // dispalyView.AddChidren(contentView); |
| | | // } |
| | | // else if (SpatialInfo.CurrentSpatial.RoomList.Count < 4) |
| | | // { |
| | | // dispalyView = new FrameLayout() |
| | | // { |
| | | // X = Application.GetRealWidth(10), |
| | | // Y = Application.GetRealHeight(266), |
| | | // Width = Application.GetRealWidth(160), |
| | | // Height = Application.GetRealHeight(200), |
| | | // BackgroundImagePath = "PersonalCenter/HomeList3bg.png", |
| | | // }; |
| | | // dialogBody.AddChidren(dispalyView); |
| | | |
| | | contentView.Height = Application.GetRealHeight(45 * 4); |
| | | dispalyView.AddChidren(contentView); |
| | | } |
| | | else |
| | | { |
| | | dispalyView = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(10), |
| | | Y = Application.GetRealHeight(266), |
| | | Width = Application.GetRealWidth(160), |
| | | Height = Application.GetRealHeight(245), |
| | | BackgroundImagePath = "PersonalCenter/HomeList4bg.png", |
| | | }; |
| | | dialogBody.AddChidren(dispalyView); |
| | | // contentView.Height = Application.GetRealHeight(45 * 4); |
| | | // dispalyView.AddChidren(contentView); |
| | | // } |
| | | // else |
| | | // { |
| | | // dispalyView = new FrameLayout() |
| | | // { |
| | | // X = Application.GetRealWidth(10), |
| | | // Y = Application.GetRealHeight(266), |
| | | // Width = Application.GetRealWidth(160), |
| | | // Height = Application.GetRealHeight(245), |
| | | // BackgroundImagePath = "PersonalCenter/HomeList4bg.png", |
| | | // }; |
| | | // dialogBody.AddChidren(dispalyView); |
| | | |
| | | contentView.Height = Application.GetRealHeight(45 * 5); |
| | | contentView.ScrollEnabled = true; |
| | | dispalyView.AddChidren(contentView); |
| | | } |
| | | // contentView.Height = Application.GetRealHeight(45 * 5); |
| | | // contentView.ScrollEnabled = true; |
| | | // dispalyView.AddChidren(contentView); |
| | | // } |
| | | |
| | | |
| | | var showListRoom = new List<Room>(); |
| | | showListRoom.Add(new Room() { roomName = Language.StringByID(StringId.All) }); |
| | | showListRoom.AddRange(SpatialInfo.CurrentSpatial.RoomList); |
| | | // var showListRoom = new List<Room>(); |
| | | // showListRoom.Add(new Room() { roomName = Language.StringByID(StringId.All) }); |
| | | // showListRoom.AddRange(SpatialInfo.CurrentSpatial.RoomList); |
| | | |
| | | foreach (var roomTemp in showListRoom) |
| | | { |
| | | string roomName = roomTemp.roomName; |
| | | var btnRoomName = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(112), |
| | | Height = Application.GetRealHeight(44), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | SelectedTextColor = CSS_Color.MainColor, |
| | | Text = roomName, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | IsSelected = btnRoom.Text == roomName, |
| | | IsMoreLines = true, |
| | | Tag = roomName |
| | | }; |
| | | contentView.AddChidren(btnRoomName); |
| | | // foreach (var roomTemp in showListRoom) |
| | | // { |
| | | // string roomName = roomTemp.roomName; |
| | | // var btnRoomName = new Button() |
| | | // { |
| | | // Gravity = Gravity.CenterHorizontal, |
| | | // Width = Application.GetRealWidth(112), |
| | | // Height = Application.GetRealHeight(44), |
| | | // TextAlignment = TextAlignment.CenterLeft, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // SelectedTextColor = CSS_Color.MainColor, |
| | | // Text = roomName, |
| | | // TextSize = CSS_FontSize.SubheadingFontSize, |
| | | // IsSelected = btnRoom.Text == roomName, |
| | | // IsMoreLines = true, |
| | | // Tag = roomName |
| | | // }; |
| | | // contentView.AddChidren(btnRoomName); |
| | | |
| | | btnRoomName.MouseUpEventHandler += (senderH, en) => |
| | | { |
| | | dialog.Close(); |
| | | btnRoom.Text = roomName; |
| | | room = roomTemp; |
| | | LoadSenesorList(); |
| | | }; |
| | | } |
| | | // btnRoomName.MouseUpEventHandler += (senderH, en) => |
| | | // { |
| | | // dialog.Close(); |
| | | // btnRoom.Text = roomName; |
| | | // room = roomTemp; |
| | | // LoadSenesorList(); |
| | | // }; |
| | | // } |
| | | |
| | | dialog.Show(); |
| | | }; |
| | | // dialog.Show(); |
| | | // }; |
| | | |
| | | btnRoomClickRow.MouseUpEventHandler = eventHandler; |
| | | //btnFoorDownIcon.MouseUpEventHandler = eventHandler; |
| | | } |
| | | // btnRoomClickRow.MouseUpEventHandler = eventHandler; |
| | | // //btnFoorDownIcon.MouseUpEventHandler = eventHandler; |
| | | // } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | #region event |
| | | // #region event |
| | | |
| | | public static void LoadEvent_UpdataStatus(Function updateTemp) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | try |
| | | { |
| | | if (bodyView != null) |
| | | { |
| | | foreach (var sensorAttr in updateTemp.attributes) |
| | | { |
| | | if (SPK.EnvironSpkList().Contains(sensorAttr.key) || sensorAttr.key == "value") |
| | | { |
| | | var flag = sensorAttr.key; |
| | | if (flag == "value") |
| | | { |
| | | flag = updateTemp.spk.Replace("sensor.", ""); |
| | | } |
| | | // public static void LoadEvent_UpdataStatus(Function updateTemp) |
| | | // { |
| | | // Application.RunOnMainThread(() => |
| | | // { |
| | | // try |
| | | // { |
| | | // if (bodyView != null) |
| | | // { |
| | | // foreach (var sensorAttr in updateTemp.attributes) |
| | | // { |
| | | // if (SPK.EnvironSpkList().Contains(sensorAttr.key) || sensorAttr.key == "value") |
| | | // { |
| | | // var flag = sensorAttr.key; |
| | | // if (flag == "value") |
| | | // { |
| | | // flag = updateTemp.spk.Replace("sensor.", ""); |
| | | // } |
| | | |
| | | foreach (var view in bodyView.sensorViewList) |
| | | { |
| | | if (view.Tag.ToString() == flag) |
| | | { |
| | | view.UpdataStatus(flag,updateTemp.sid, sensorAttr.state); |
| | | } |
| | | } |
| | | // foreach (var view in bodyView.sensorViewList) |
| | | // { |
| | | // if (view.Tag.ToString() == flag) |
| | | // { |
| | | // view.UpdataStatus(flag,updateTemp.sid, sensorAttr.state); |
| | | // } |
| | | // } |
| | | |
| | | } |
| | | } |
| | | // } |
| | | // } |
| | | |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log($"更新环境传感器界面异常:{ex.Message}"); |
| | | } |
| | | }); |
| | | } |
| | | // } |
| | | // } |
| | | // catch (Exception ex) |
| | | // { |
| | | // MainPage.Log($"更新环境传感器界面异常:{ex.Message}"); |
| | | // } |
| | | // }); |
| | | // } |
| | | |
| | | void LoadEvent_ChangeWeatherIcon(FrameLayout view) |
| | | { |
| | | // void LoadEvent_ChangeWeatherIcon(FrameLayout view) |
| | | // { |
| | | |
| | | switch (MainPage.cityInfo.weather) |
| | | { |
| | | case "晴": |
| | | case "Sunny": |
| | | case "晴天": |
| | | case "天晴": |
| | | case "Clear": |
| | | case "大部晴朗": |
| | | case "Mostly Sunny": |
| | | case "晴時多雲": |
| | | case "陽光充沛": |
| | | case "Mostly Clear": |
| | | view.BackgroundImagePath = "FunctionIcon/EnvirSensor/0.png"; |
| | | break; |
| | | case "多云": |
| | | case "Cloudy": |
| | | case "多雲": |
| | | case "少云": |
| | | case "Partly Cloudy": |
| | | case "少雲": |
| | | view.BackgroundImagePath = "FunctionIcon/EnvirSensor/1.png"; |
| | | break; |
| | | case "阴": |
| | | case "Overcast": |
| | | case "陰天": |
| | | view.BackgroundImagePath = "FunctionIcon/EnvirSensor/2.png"; |
| | | break; |
| | | case "阵雨": |
| | | case "Showers": |
| | | case "陣雨": |
| | | case "驟雨": |
| | | case "局部阵雨": |
| | | case "Scattered Showers": |
| | | case "局地陣雨": |
| | | case "局部地區性驟雨": |
| | | case "小阵雨": |
| | | case "Light Showers": |
| | | case "小陣雨": |
| | | case "零散驟雨": |
| | | case "强阵雨": |
| | | case "Heavy Showers": |
| | | case "強陣雨": |
| | | case "間中有驟雨": |
| | | view.BackgroundImagePath = "FunctionIcon/EnvirSensor/3.png"; |
| | | break; |
| | | case "阵雪": |
| | | case "Snow Showers": |
| | | case "陣雪": |
| | | case "驟雪": |
| | | case "小阵雪": |
| | | case "Light Snow Showers": |
| | | case "小陣雪": |
| | | case "零散驟雪": |
| | | view.BackgroundImagePath = "FunctionIcon/EnvirSensor/13.png"; |
| | | break; |
| | | case "雾": |
| | | case "Fog": |
| | | case "霧": |
| | | case "薄霧": |
| | | case "冻雾": |
| | | case "Freezing Fog": |
| | | case "凍霧": |
| | | view.BackgroundImagePath = "FunctionIcon/EnvirSensor/18.png"; |
| | | break; |
| | | case "沙尘暴": |
| | | case "Sandstorm": |
| | | case "沙塵暴": |
| | | case "强沙尘暴": |
| | | case "Heavy Sandstorm": |
| | | case "強沙塵暴": |
| | | view.BackgroundImagePath = "FunctionIcon/EnvirSensor/20.png"; |
| | | break; |
| | | case "浮尘": |
| | | case "Dust": |
| | | case "浮塵": |
| | | case "尘卷风": |
| | | case "Dust Storm": |
| | | case "塵捲風": |
| | | case "扬沙": |
| | | case "Sand": |
| | | case "揚沙": |
| | | view.BackgroundImagePath = "FunctionIcon/EnvirSensor/29.png"; |
| | | break; |
| | | case "霾": |
| | | case "Haze": |
| | | case "煙霞": |
| | | view.BackgroundImagePath = "FunctionIcon/EnvirSensor/45.png"; |
| | | break; |
| | | case "雷阵雨": |
| | | case "Thundershower": |
| | | case "雷陣雨": |
| | | case "雷雨": |
| | | case "雷电": |
| | | case "Lightning": |
| | | case "雷電": |
| | | case "雷暴": |
| | | case "Thunderstorm": |
| | | view.BackgroundImagePath = "FunctionIcon/EnvirSensor/4.png"; |
| | | break; |
| | | case "雷阵雨伴有冰雹": |
| | | case "Thundershower with Hail": |
| | | case "雷陣雨伴有冰雹": |
| | | case "雷雨伴有冰雹": |
| | | case "冰雹": |
| | | case "Hail": |
| | | case "冰针": |
| | | case "Needle Ice": |
| | | case "冰針": |
| | | case "冰粒": |
| | | case "Icy": |
| | | view.BackgroundImagePath = "FunctionIcon/EnvirSensor/5.png"; |
| | | break; |
| | | case "雨夹雪": |
| | | case "Sleet": |
| | | case "雨夾雪": |
| | | view.BackgroundImagePath = "FunctionIcon/EnvirSensor/6.png"; |
| | | break; |
| | | case "小雨": |
| | | case "Light Rain": |
| | | view.BackgroundImagePath = "FunctionIcon/EnvirSensor/3.png"; |
| | | break; |
| | | case "中雨": |
| | | case "Rain": |
| | | case "小到中雨": |
| | | case "雨": |
| | | view.BackgroundImagePath = "FunctionIcon/EnvirSensor/3.png"; |
| | | break; |
| | | case "大雨": |
| | | case "Heavy Rain": |
| | | case "中到大雨": |
| | | view.BackgroundImagePath = "FunctionIcon/EnvirSensor/3.png"; |
| | | break; |
| | | case "暴雨": |
| | | case "Rainstorm": |
| | | case "豪雨": |
| | | case "大暴雨": |
| | | case "Heavy Rainstorm": |
| | | case "大豪雨": |
| | | case "特大暴雨": |
| | | case "Extreme Rainstorm": |
| | | case "超大豪雨": |
| | | case "大到暴雨": |
| | | view.BackgroundImagePath = "FunctionIcon/EnvirSensor/3.png"; |
| | | break; |
| | | case "小雪": |
| | | case "Light Snow": |
| | | view.BackgroundImagePath = "FunctionIcon/EnvirSensor/13.png"; |
| | | break; |
| | | case "雪": |
| | | case "中雪": |
| | | case "小到中雪": |
| | | case "Snow": |
| | | view.BackgroundImagePath = "FunctionIcon/EnvirSensor/13.png"; |
| | | break; |
| | | case "大雪": |
| | | case "Heavy Snow": |
| | | view.BackgroundImagePath = "FunctionIcon/EnvirSensor/13.png"; |
| | | break; |
| | | case "暴雪": |
| | | case "Blizzard": |
| | | view.BackgroundImagePath = "FunctionIcon/EnvirSensor/13.png"; |
| | | break; |
| | | case "冻雨": |
| | | case "Freezing Rain": |
| | | case "凍雨": |
| | | view.BackgroundImagePath = "FunctionIcon/EnvirSensor/6.png"; |
| | | break; |
| | | } |
| | | } |
| | | // switch (MainPage.cityInfo.weather) |
| | | // { |
| | | // case "晴": |
| | | // case "Sunny": |
| | | // case "晴天": |
| | | // case "天晴": |
| | | // case "Clear": |
| | | // case "大部晴朗": |
| | | // case "Mostly Sunny": |
| | | // case "晴時多雲": |
| | | // case "陽光充沛": |
| | | // case "Mostly Clear": |
| | | // view.BackgroundImagePath = "FunctionIcon/EnvirSensor/0.png"; |
| | | // break; |
| | | // case "多云": |
| | | // case "Cloudy": |
| | | // case "多雲": |
| | | // case "少云": |
| | | // case "Partly Cloudy": |
| | | // case "少雲": |
| | | // view.BackgroundImagePath = "FunctionIcon/EnvirSensor/1.png"; |
| | | // break; |
| | | // case "阴": |
| | | // case "Overcast": |
| | | // case "陰天": |
| | | // view.BackgroundImagePath = "FunctionIcon/EnvirSensor/2.png"; |
| | | // break; |
| | | // case "阵雨": |
| | | // case "Showers": |
| | | // case "陣雨": |
| | | // case "驟雨": |
| | | // case "局部阵雨": |
| | | // case "Scattered Showers": |
| | | // case "局地陣雨": |
| | | // case "局部地區性驟雨": |
| | | // case "小阵雨": |
| | | // case "Light Showers": |
| | | // case "小陣雨": |
| | | // case "零散驟雨": |
| | | // case "强阵雨": |
| | | // case "Heavy Showers": |
| | | // case "強陣雨": |
| | | // case "間中有驟雨": |
| | | // view.BackgroundImagePath = "FunctionIcon/EnvirSensor/3.png"; |
| | | // break; |
| | | // case "阵雪": |
| | | // case "Snow Showers": |
| | | // case "陣雪": |
| | | // case "驟雪": |
| | | // case "小阵雪": |
| | | // case "Light Snow Showers": |
| | | // case "小陣雪": |
| | | // case "零散驟雪": |
| | | // view.BackgroundImagePath = "FunctionIcon/EnvirSensor/13.png"; |
| | | // break; |
| | | // case "雾": |
| | | // case "Fog": |
| | | // case "霧": |
| | | // case "薄霧": |
| | | // case "冻雾": |
| | | // case "Freezing Fog": |
| | | // case "凍霧": |
| | | // view.BackgroundImagePath = "FunctionIcon/EnvirSensor/18.png"; |
| | | // break; |
| | | // case "沙尘暴": |
| | | // case "Sandstorm": |
| | | // case "沙塵暴": |
| | | // case "强沙尘暴": |
| | | // case "Heavy Sandstorm": |
| | | // case "強沙塵暴": |
| | | // view.BackgroundImagePath = "FunctionIcon/EnvirSensor/20.png"; |
| | | // break; |
| | | // case "浮尘": |
| | | // case "Dust": |
| | | // case "浮塵": |
| | | // case "尘卷风": |
| | | // case "Dust Storm": |
| | | // case "塵捲風": |
| | | // case "扬沙": |
| | | // case "Sand": |
| | | // case "揚沙": |
| | | // view.BackgroundImagePath = "FunctionIcon/EnvirSensor/29.png"; |
| | | // break; |
| | | // case "霾": |
| | | // case "Haze": |
| | | // case "煙霞": |
| | | // view.BackgroundImagePath = "FunctionIcon/EnvirSensor/45.png"; |
| | | // break; |
| | | // case "雷阵雨": |
| | | // case "Thundershower": |
| | | // case "雷陣雨": |
| | | // case "雷雨": |
| | | // case "雷电": |
| | | // case "Lightning": |
| | | // case "雷電": |
| | | // case "雷暴": |
| | | // case "Thunderstorm": |
| | | // view.BackgroundImagePath = "FunctionIcon/EnvirSensor/4.png"; |
| | | // break; |
| | | // case "雷阵雨伴有冰雹": |
| | | // case "Thundershower with Hail": |
| | | // case "雷陣雨伴有冰雹": |
| | | // case "雷雨伴有冰雹": |
| | | // case "冰雹": |
| | | // case "Hail": |
| | | // case "冰针": |
| | | // case "Needle Ice": |
| | | // case "冰針": |
| | | // case "冰粒": |
| | | // case "Icy": |
| | | // view.BackgroundImagePath = "FunctionIcon/EnvirSensor/5.png"; |
| | | // break; |
| | | // case "雨夹雪": |
| | | // case "Sleet": |
| | | // case "雨夾雪": |
| | | // view.BackgroundImagePath = "FunctionIcon/EnvirSensor/6.png"; |
| | | // break; |
| | | // case "小雨": |
| | | // case "Light Rain": |
| | | // view.BackgroundImagePath = "FunctionIcon/EnvirSensor/3.png"; |
| | | // break; |
| | | // case "中雨": |
| | | // case "Rain": |
| | | // case "小到中雨": |
| | | // case "雨": |
| | | // view.BackgroundImagePath = "FunctionIcon/EnvirSensor/3.png"; |
| | | // break; |
| | | // case "大雨": |
| | | // case "Heavy Rain": |
| | | // case "中到大雨": |
| | | // view.BackgroundImagePath = "FunctionIcon/EnvirSensor/3.png"; |
| | | // break; |
| | | // case "暴雨": |
| | | // case "Rainstorm": |
| | | // case "豪雨": |
| | | // case "大暴雨": |
| | | // case "Heavy Rainstorm": |
| | | // case "大豪雨": |
| | | // case "特大暴雨": |
| | | // case "Extreme Rainstorm": |
| | | // case "超大豪雨": |
| | | // case "大到暴雨": |
| | | // view.BackgroundImagePath = "FunctionIcon/EnvirSensor/3.png"; |
| | | // break; |
| | | // case "小雪": |
| | | // case "Light Snow": |
| | | // view.BackgroundImagePath = "FunctionIcon/EnvirSensor/13.png"; |
| | | // break; |
| | | // case "雪": |
| | | // case "中雪": |
| | | // case "小到中雪": |
| | | // case "Snow": |
| | | // view.BackgroundImagePath = "FunctionIcon/EnvirSensor/13.png"; |
| | | // break; |
| | | // case "大雪": |
| | | // case "Heavy Snow": |
| | | // view.BackgroundImagePath = "FunctionIcon/EnvirSensor/13.png"; |
| | | // break; |
| | | // case "暴雪": |
| | | // case "Blizzard": |
| | | // view.BackgroundImagePath = "FunctionIcon/EnvirSensor/13.png"; |
| | | // break; |
| | | // case "冻雨": |
| | | // case "Freezing Rain": |
| | | // case "凍雨": |
| | | // view.BackgroundImagePath = "FunctionIcon/EnvirSensor/6.png"; |
| | | // break; |
| | | // } |
| | | // } |
| | | |
| | | #endregion |
| | | } |
| | | // #endregion |
| | | // } |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 加载传感器列表 |
| | | /// </summary> |
| | | public class SensorView :FrameLayout |
| | | { |
| | | Button btnSensorValues; |
| | | Button btnLevel; |
| | | // /// <summary> |
| | | // /// 加载传感器列表 |
| | | // /// </summary> |
| | | // public class SensorView :FrameLayout |
| | | // { |
| | | // Button btnSensorValues; |
| | | // Button btnLevel; |
| | | |
| | | List<Function> sensorList = new List<Function>(); |
| | | string imagePath = ""; |
| | | string iconPath = ""; |
| | | string sensorSPK = ""; |
| | | Sensor sensorTemp = new Sensor(); |
| | | double assembleValues = 0.0; |
| | | // List<Function> sensorList = new List<Function>(); |
| | | // string imagePath = ""; |
| | | // string iconPath = ""; |
| | | // string sensorSPK = ""; |
| | | // Sensor sensorTemp = new Sensor(); |
| | | // double assembleValues = 0.0; |
| | | |
| | | public SensorView(List<Function> showList, int index)//,,string spk,double value) |
| | | { |
| | | sensorList = showList; |
| | | sensorSPK = showList[0].spk; |
| | | foreach (var s in showList) |
| | | { |
| | | assembleValues += Convert.ToDouble(s.GetAttrState("value").Replace(",", ".")); |
| | | } |
| | | // public SensorView(List<Function> showList, int index)//,,string spk,double value) |
| | | // { |
| | | // sensorList = showList; |
| | | // sensorSPK = showList[0].spk; |
| | | // foreach (var s in showList) |
| | | // { |
| | | // assembleValues += Convert.ToDouble(s.GetAttrState("value").Replace(",", ".")); |
| | | // } |
| | | |
| | | |
| | | this.X = Application.GetRealWidth(7); |
| | | this.Width = Application.GetRealWidth(182); |
| | | this.Height = Application.GetRealWidth(124); |
| | | this.Y = Application.GetRealWidth(124 * (index / 2)); |
| | | this.Tag = sensorSPK; |
| | | // this.X = Application.GetRealWidth(7); |
| | | // this.Width = Application.GetRealWidth(182); |
| | | // this.Height = Application.GetRealWidth(124); |
| | | // this.Y = Application.GetRealWidth(124 * (index / 2)); |
| | | // this.Tag = sensorSPK; |
| | | |
| | | if (index % 2 != 0) |
| | | { |
| | | this.X = Application.GetRealWidth(189); |
| | | } |
| | | // if (index % 2 != 0) |
| | | // { |
| | | // this.X = Application.GetRealWidth(189); |
| | | // } |
| | | |
| | | |
| | | switch (sensorSPK) |
| | | { |
| | | case SPK.SensorCO2: |
| | | imagePath = "FunctionIcon/EnvirSensor/Co2Bg.png"; |
| | | iconPath = "FunctionIcon/EnvirSensor/Co2Icon.png"; |
| | | break; |
| | | case SPK.SensorPm25: |
| | | imagePath = "FunctionIcon/EnvirSensor/Pm25Bg.png"; |
| | | iconPath = "FunctionIcon/EnvirSensor/Pm25Icon.png"; |
| | | break; |
| | | case SPK.SensorTVOC: |
| | | imagePath = "FunctionIcon/EnvirSensor/TvocBg.png"; |
| | | iconPath = "FunctionIcon/EnvirSensor/TvocIcon.png"; |
| | | break; |
| | | case SPK.SensorHumidity: |
| | | imagePath = "FunctionIcon/EnvirSensor/HumidityBg.png"; |
| | | iconPath = "FunctionIcon/EnvirSensor/HumidityIcon.png"; |
| | | break; |
| | | case SPK.SensorTemperature: |
| | | imagePath = "FunctionIcon/EnvirSensor/TempBg.png"; |
| | | iconPath = "FunctionIcon/EnvirSensor/TempIcon.png"; |
| | | break; |
| | | case SPK.SensorHcho: |
| | | imagePath = "FunctionIcon/EnvirSensor/HchoBg.png"; |
| | | iconPath = "FunctionIcon/EnvirSensor/HchoIcon.png"; |
| | | break; |
| | | } |
| | | } |
| | | // switch (sensorSPK) |
| | | // { |
| | | // case SPK.SensorCO2: |
| | | // imagePath = "FunctionIcon/EnvirSensor/Co2Bg.png"; |
| | | // iconPath = "FunctionIcon/EnvirSensor/Co2Icon.png"; |
| | | // break; |
| | | // case SPK.SensorPm25: |
| | | // imagePath = "FunctionIcon/EnvirSensor/Pm25Bg.png"; |
| | | // iconPath = "FunctionIcon/EnvirSensor/Pm25Icon.png"; |
| | | // break; |
| | | // case SPK.SensorTVOC: |
| | | // imagePath = "FunctionIcon/EnvirSensor/TvocBg.png"; |
| | | // iconPath = "FunctionIcon/EnvirSensor/TvocIcon.png"; |
| | | // break; |
| | | // case SPK.SensorHumidity: |
| | | // imagePath = "FunctionIcon/EnvirSensor/HumidityBg.png"; |
| | | // iconPath = "FunctionIcon/EnvirSensor/HumidityIcon.png"; |
| | | // break; |
| | | // case SPK.SensorTemperature: |
| | | // imagePath = "FunctionIcon/EnvirSensor/TempBg.png"; |
| | | // iconPath = "FunctionIcon/EnvirSensor/TempIcon.png"; |
| | | // break; |
| | | // case SPK.SensorHcho: |
| | | // imagePath = "FunctionIcon/EnvirSensor/HchoBg.png"; |
| | | // iconPath = "FunctionIcon/EnvirSensor/HchoIcon.png"; |
| | | // break; |
| | | // } |
| | | // } |
| | | |
| | | public void LoadView() |
| | | { |
| | | Function sensor = sensorList[0]; |
| | | this.BackgroundImagePath = imagePath; |
| | | // public void LoadView() |
| | | // { |
| | | // Function sensor = sensorList[0]; |
| | | // this.BackgroundImagePath = imagePath; |
| | | |
| | | var btnIcon = new Button() |
| | | { |
| | | X = Application.GetRealWidth(23), |
| | | Y = Application.GetRealHeight(17), |
| | | Width = Application.GetRealWidth(32), |
| | | Height = Application.GetRealWidth(32), |
| | | UnSelectedImagePath = iconPath |
| | | }; |
| | | this.AddChidren(btnIcon); |
| | | // var btnIcon = new Button() |
| | | // { |
| | | // X = Application.GetRealWidth(23), |
| | | // Y = Application.GetRealHeight(17), |
| | | // Width = Application.GetRealWidth(32), |
| | | // Height = Application.GetRealWidth(32), |
| | | // UnSelectedImagePath = iconPath |
| | | // }; |
| | | // this.AddChidren(btnIcon); |
| | | |
| | | btnIcon.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | #region |
| | | var esp = new EnvironmentalSensorPage(sensor,sensorList); |
| | | MainPage.BasePageView.AddChidren(esp); |
| | | esp.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | #endregion |
| | | }; |
| | | // btnIcon.MouseUpEventHandler = (sender, e) => |
| | | // { |
| | | // #region |
| | | // var esp = new EnvironmentalSensorPage(sensor,sensorList); |
| | | // MainPage.BasePageView.AddChidren(esp); |
| | | // esp.LoadPage(); |
| | | // MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | // #endregion |
| | | // }; |
| | | |
| | | var btnInfoIcon = new Button() |
| | | { |
| | | X = Application.GetRealWidth(139), |
| | | Y = Application.GetRealHeight(21), |
| | | Width = Application.GetRealWidth(24), |
| | | Height = Application.GetRealWidth(24), |
| | | UnSelectedImagePath = "FunctionIcon/EnvirSensor/InfoIcon.png", |
| | | }; |
| | | this.AddChidren(btnInfoIcon); |
| | | btnInfoIcon.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | LoadInfo(sensorSPK); |
| | | }; |
| | | // var btnInfoIcon = new Button() |
| | | // { |
| | | // X = Application.GetRealWidth(139), |
| | | // Y = Application.GetRealHeight(21), |
| | | // Width = Application.GetRealWidth(24), |
| | | // Height = Application.GetRealWidth(24), |
| | | // UnSelectedImagePath = "FunctionIcon/EnvirSensor/InfoIcon.png", |
| | | // }; |
| | | // this.AddChidren(btnInfoIcon); |
| | | // btnInfoIcon.MouseUpEventHandler = (sender, e) => |
| | | // { |
| | | // LoadInfo(sensorSPK); |
| | | // }; |
| | | |
| | | var curLevel = sensorTemp.GetCurLevel(sensorSPK, assembleValues); |
| | | var levelTextList = sensorTemp.GetLevelTextList(sensorSPK); |
| | | btnLevel = new Button() |
| | | { |
| | | X = Application.GetRealWidth(25), |
| | | Y = Application.GetRealWidth(59), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(32), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = sensorTemp.GetLevelColorList(sensorSPK)[curLevel - 1], |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextID = levelTextList[curLevel - 1], |
| | | Tag = "SensorLevel", |
| | | }; |
| | | this.AddChidren(btnLevel); |
| | | // var curLevel = sensorTemp.GetCurLevel(sensorSPK, assembleValues); |
| | | // var levelTextList = sensorTemp.GetLevelTextList(sensor); |
| | | // btnLevel = new Button() |
| | | // { |
| | | // X = Application.GetRealWidth(25), |
| | | // Y = Application.GetRealWidth(59), |
| | | // Width = Application.GetRealWidth(100), |
| | | // Height = Application.GetRealWidth(32), |
| | | // TextAlignment = TextAlignment.CenterLeft, |
| | | // TextColor = sensorTemp.GetLevelColorList(sensor)[curLevel - 1], |
| | | // TextSize = CSS_FontSize.SubheadingFontSize, |
| | | // Text = levelTextList[curLevel - 1], |
| | | // Tag = "SensorLevel", |
| | | // }; |
| | | // this.AddChidren(btnLevel); |
| | | |
| | | btnLevel.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | #region |
| | | var esp = new EnvironmentalSensorPage(sensor,sensorList); |
| | | MainPage.BasePageView.AddChidren(esp); |
| | | esp.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | #endregion |
| | | }; |
| | | // btnLevel.MouseUpEventHandler = (sender, e) => |
| | | // { |
| | | // #region |
| | | // var esp = new EnvironmentalSensorPage(sensor,sensorList); |
| | | // MainPage.BasePageView.AddChidren(esp); |
| | | // esp.LoadPage(); |
| | | // MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | // #endregion |
| | | // }; |
| | | |
| | | |
| | | btnSensorValues = new Button() |
| | | { |
| | | X = Application.GetRealWidth(25), |
| | | Y = Application.GetRealWidth(83), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(27), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | IsBold = true, |
| | | Text = assembleValues.ToString(), |
| | | Tag = "SensorValues" |
| | | }; |
| | | this.AddChidren(btnSensorValues); |
| | | btnSensorValues.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | #region |
| | | var esp = new EnvironmentalSensorPage(sensor,sensorList); |
| | | MainPage.BasePageView.AddChidren(esp); |
| | | esp.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | #endregion |
| | | }; |
| | | } |
| | | // btnSensorValues = new Button() |
| | | // { |
| | | // X = Application.GetRealWidth(25), |
| | | // Y = Application.GetRealWidth(83), |
| | | // Width = Application.GetRealWidth(100), |
| | | // Height = Application.GetRealWidth(27), |
| | | // TextAlignment = TextAlignment.CenterLeft, |
| | | // TextColor = CSS_Color.PromptingColor1, |
| | | // TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | // IsBold = true, |
| | | // Text = assembleValues.ToString(), |
| | | // Tag = "SensorValues" |
| | | // }; |
| | | // this.AddChidren(btnSensorValues); |
| | | // btnSensorValues.MouseUpEventHandler = (sender, e) => |
| | | // { |
| | | // #region |
| | | // var esp = new EnvironmentalSensorPage(sensor,sensorList); |
| | | // MainPage.BasePageView.AddChidren(esp); |
| | | // esp.LoadPage(); |
| | | // MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | // #endregion |
| | | // }; |
| | | // } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 加载传感器等级相关信息 |
| | | /// </summary> |
| | | void LoadInfo(string sensorSPK) |
| | | { |
| | | var levelColorList = sensorTemp.GetLevelColorList(sensorSPK); |
| | | var levelTextList = sensorTemp.GetLevelTextList(sensorSPK); |
| | | Dialog dialog = new Dialog(); |
| | | // /// <summary> |
| | | // /// 加载传感器等级相关信息 |
| | | // /// </summary> |
| | | // void LoadInfo(string sensorSPK) |
| | | // { |
| | | // var levelColorList = sensorTemp.GetLevelColorList(sensorSPK); |
| | | // var levelTextList = sensorTemp.GetLevelTextList(sensorSPK); |
| | | // Dialog dialog = new Dialog(); |
| | | |
| | | FrameLayout dialogBodyView = new FrameLayout(); |
| | | dialog.AddChidren(dialogBodyView); |
| | | dialogBodyView.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | dialog.Close(); |
| | | }; |
| | | VerticalScrolViewLayout infoView = new VerticalScrolViewLayout() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(667 - 94 - (levelColorList.Count * 44) - 20), |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealHeight(94 + (levelColorList.Count * 44) + levelColorList.Count), |
| | | Radius = (uint)Application.GetRealWidth(12), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Animate = Animate.DownToUp, |
| | | ScrollEnabled = false, |
| | | AnimateSpeed = 0.3f, |
| | | }; |
| | | dialogBodyView.AddChidren(infoView); |
| | | // FrameLayout dialogBodyView = new FrameLayout(); |
| | | // dialog.AddChidren(dialogBodyView); |
| | | // dialogBodyView.MouseUpEventHandler = (sender, e) => |
| | | // { |
| | | // dialog.Close(); |
| | | // }; |
| | | // VerticalScrolViewLayout infoView = new VerticalScrolViewLayout() |
| | | // { |
| | | // Gravity = Gravity.CenterHorizontal, |
| | | // Y = Application.GetRealHeight(667 - 94 - (levelColorList.Count * 44) - 20), |
| | | // Width = Application.GetRealWidth(343), |
| | | // Height = Application.GetRealHeight(94 + (levelColorList.Count * 44) + levelColorList.Count), |
| | | // Radius = (uint)Application.GetRealWidth(12), |
| | | // BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | // Animate = Animate.DownToUp, |
| | | // ScrollEnabled = false, |
| | | // AnimateSpeed = 0.3f, |
| | | // }; |
| | | // dialogBodyView.AddChidren(infoView); |
| | | |
| | | Button btnTitle = new Button() |
| | | { |
| | | Height = Application.GetRealHeight(50), |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | IsBold = true, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextAlignment = TextAlignment.Center, |
| | | }; |
| | | infoView.AddChidren(btnTitle); |
| | | // Button btnTitle = new Button() |
| | | // { |
| | | // Height = Application.GetRealHeight(50), |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // IsBold = true, |
| | | // TextSize = CSS_FontSize.SubheadingFontSize, |
| | | // TextAlignment = TextAlignment.Center, |
| | | // }; |
| | | // infoView.AddChidren(btnTitle); |
| | | |
| | | switch (sensorSPK) |
| | | { |
| | | case SPK.SensorPm25: |
| | | btnTitle.Text = "PM2.5(ug/m²)"; |
| | | break; |
| | | case SPK.SensorTemperature: |
| | | btnTitle.Text = Language.StringByID(StringId.Temp) + "(°C)"; |
| | | break; |
| | | case SPK.SensorTVOC: |
| | | btnTitle.Text = "TVOC(PPB)"; |
| | | break; |
| | | case SPK.SensorCO2: |
| | | btnTitle.Text = "CO2(PPM)"; |
| | | break; |
| | | case SPK.SensorHumidity: |
| | | btnTitle.Text = Language.StringByID(StringId.Humidity) + "(%)"; |
| | | break; |
| | | case SPK.SensorHcho: |
| | | btnTitle.Text = Language.StringByID(StringId.Formaldehyde) + "(mg/m3)"; |
| | | break; |
| | | } |
| | | // switch (sensorSPK) |
| | | // { |
| | | // case SPK.SensorPm25: |
| | | // btnTitle.Text = "PM2.5(ug/m²)"; |
| | | // break; |
| | | // case SPK.SensorTemperature: |
| | | // btnTitle.Text = Language.StringByID(StringId.Temp) + "(°C)"; |
| | | // break; |
| | | // case SPK.SensorTVOC: |
| | | // btnTitle.Text = "TVOC(PPB)"; |
| | | // break; |
| | | // case SPK.SensorCO2: |
| | | // btnTitle.Text = "CO2(PPM)"; |
| | | // break; |
| | | // case SPK.SensorHumidity: |
| | | // btnTitle.Text = Language.StringByID(StringId.Humidity) + "(%)"; |
| | | // break; |
| | | // case SPK.SensorHcho: |
| | | // btnTitle.Text = Language.StringByID(StringId.Formaldehyde) + "(mg/m3)"; |
| | | // break; |
| | | // } |
| | | |
| | | FrameLayout subTitleView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(44), |
| | | }; |
| | | infoView.AddChidren(subTitleView); |
| | | // FrameLayout subTitleView = new FrameLayout() |
| | | // { |
| | | // Height = Application.GetRealHeight(44), |
| | | // }; |
| | | // infoView.AddChidren(subTitleView); |
| | | |
| | | subTitleView.AddChidren(new Button() |
| | | { |
| | | X = Application.GetRealWidth(20), |
| | | Width = Application.GetRealWidth(100), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | IsBold = true, |
| | | TextID = StringId.IntervalValue, |
| | | }); |
| | | // subTitleView.AddChidren(new Button() |
| | | // { |
| | | // X = Application.GetRealWidth(20), |
| | | // Width = Application.GetRealWidth(100), |
| | | // TextAlignment = TextAlignment.CenterLeft, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.TextFontSize, |
| | | // IsBold = true, |
| | | // TextID = StringId.IntervalValue, |
| | | // }); |
| | | |
| | | subTitleView.AddChidren(new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(100), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | IsBold = true, |
| | | TextID = StringId.LevelSensor, |
| | | }); |
| | | // subTitleView.AddChidren(new Button() |
| | | // { |
| | | // Gravity = Gravity.CenterHorizontal, |
| | | // Width = Application.GetRealWidth(100), |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.TextFontSize, |
| | | // IsBold = true, |
| | | // TextID = StringId.LevelSensor, |
| | | // }); |
| | | |
| | | subTitleView.AddChidren(new Button() |
| | | { |
| | | X = Application.GetRealWidth(223), |
| | | Width = Application.GetRealWidth(100), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | IsBold = true, |
| | | TextID = StringId.ColorValue, |
| | | }); |
| | | for (int index = 0; index < levelTextList.Count; index++) |
| | | { |
| | | infoView.AddChidren(new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(303), |
| | | Height = Application.GetRealWidth(1), |
| | | BackgroundColor = CSS_Color.DividingLineColor, |
| | | }); |
| | | // subTitleView.AddChidren(new Button() |
| | | // { |
| | | // X = Application.GetRealWidth(223), |
| | | // Width = Application.GetRealWidth(100), |
| | | // TextAlignment = TextAlignment.CenterRight, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.TextFontSize, |
| | | // IsBold = true, |
| | | // TextID = StringId.ColorValue, |
| | | // }); |
| | | // for (int index = 0; index < levelTextList.Count; index++) |
| | | // { |
| | | // infoView.AddChidren(new Button() |
| | | // { |
| | | // Gravity = Gravity.CenterHorizontal, |
| | | // Width = Application.GetRealWidth(303), |
| | | // Height = Application.GetRealWidth(1), |
| | | // BackgroundColor = CSS_Color.DividingLineColor, |
| | | // }); |
| | | |
| | | FrameLayout subInfoView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(44), |
| | | }; |
| | | infoView.AddChidren(subInfoView); |
| | | // FrameLayout subInfoView = new FrameLayout() |
| | | // { |
| | | // Height = Application.GetRealHeight(44), |
| | | // }; |
| | | // infoView.AddChidren(subInfoView); |
| | | |
| | | subInfoView.AddChidren(new Button() |
| | | { |
| | | X = Application.GetRealWidth(20), |
| | | Width = Application.GetRealWidth(100), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | IsBold = true, |
| | | Text = sensorTemp.GetIntervalValue(sensorSPK)[index] |
| | | }); |
| | | // subInfoView.AddChidren(new Button() |
| | | // { |
| | | // X = Application.GetRealWidth(20), |
| | | // Width = Application.GetRealWidth(100), |
| | | // TextAlignment = TextAlignment.CenterLeft, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.TextFontSize, |
| | | // IsBold = true, |
| | | // Text = sensorTemp.GetIntervalValue(sensorSPK)[index] |
| | | // }); |
| | | |
| | | subInfoView.AddChidren(new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(100), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | IsBold = true, |
| | | TextID = levelTextList[index] |
| | | }); |
| | | // subInfoView.AddChidren(new Button() |
| | | // { |
| | | // Gravity = Gravity.CenterHorizontal, |
| | | // Width = Application.GetRealWidth(100), |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.TextFontSize, |
| | | // IsBold = true, |
| | | // TextID = levelTextList[index] |
| | | // }); |
| | | |
| | | subInfoView.AddChidren(new Button() |
| | | { |
| | | X = Application.GetRealWidth(285), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetRealWidth(38), |
| | | Height = Application.GetRealHeight(18), |
| | | Radius = (uint)Application.GetRealWidth(4), |
| | | BackgroundColor = levelColorList[index] |
| | | }); |
| | | } |
| | | // subInfoView.AddChidren(new Button() |
| | | // { |
| | | // X = Application.GetRealWidth(285), |
| | | // Gravity = Gravity.CenterVertical, |
| | | // Width = Application.GetRealWidth(38), |
| | | // Height = Application.GetRealHeight(18), |
| | | // Radius = (uint)Application.GetRealWidth(4), |
| | | // BackgroundColor = levelColorList[index] |
| | | // }); |
| | | // } |
| | | |
| | | |
| | | |
| | | |
| | | dialog.Show(); |
| | | } |
| | | // dialog.Show(); |
| | | // } |
| | | |
| | | |
| | | |
| | | public void calculateAverage() |
| | | { |
| | | assembleValues = 0; |
| | | foreach (var s in sensorList) |
| | | { |
| | | assembleValues += Convert.ToDouble(s.GetAttrState("value").Replace(",", ".")); |
| | | } |
| | | } |
| | | // public void calculateAverage() |
| | | // { |
| | | // assembleValues = 0; |
| | | // foreach (var s in sensorList) |
| | | // { |
| | | // assembleValues += Convert.ToDouble(s.GetAttrState("value").Replace(",", ".")); |
| | | // } |
| | | // } |
| | | |
| | | /// <summary> |
| | | /// 更新状态 |
| | | /// </summary> |
| | | /// <param name="updateTemp"></param> |
| | | public void UpdataStatus(string spk ,string sid,string value) |
| | | { |
| | | try |
| | | { |
| | | if (spk == sensorSPK) |
| | | { |
| | | var temp = sensorList.Find((obj) => obj.sid == sid); |
| | | if(temp!= null) |
| | | { |
| | | temp.SetAttrState("value", value); |
| | | } |
| | | calculateAverage(); |
| | | // /// <summary> |
| | | // /// 更新状态 |
| | | // /// </summary> |
| | | // /// <param name="updateTemp"></param> |
| | | // public void UpdataStatus(string spk ,string sid,string value) |
| | | // { |
| | | // try |
| | | // { |
| | | // if (spk == sensorSPK) |
| | | // { |
| | | // var temp = sensorList.Find((obj) => obj.sid == sid); |
| | | // if(temp!= null) |
| | | // { |
| | | // temp.SetAttrState("value", value); |
| | | // } |
| | | // calculateAverage(); |
| | | |
| | | |
| | | btnSensorValues.Text = assembleValues.ToString(); |
| | | // btnSensorValues.Text = assembleValues.ToString(); |
| | | |
| | | var curLevel = sensorTemp.GetCurLevel(sensorSPK, assembleValues); |
| | | // var curLevel = sensorTemp.GetCurLevel(sensorSPK, assembleValues); |
| | | |
| | | btnLevel.TextID = sensorTemp.GetLevelTextList(sensorSPK)[curLevel- 1]; |
| | | btnLevel.TextColor = sensorTemp.GetLevelColorList(sensorSPK)[curLevel - 1]; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log($"更新环境传感器界面异常:{ex.Message}"); |
| | | } |
| | | } |
| | | // btnLevel.TextID = sensorTemp.GetLevelTextList(sensorSPK)[curLevel- 1]; |
| | | // btnLevel.TextColor = sensorTemp.GetLevelColorList(sensorSPK)[curLevel - 1]; |
| | | // } |
| | | // } |
| | | // catch (Exception ex) |
| | | // { |
| | | // MainPage.Log($"更新环境传感器界面异常:{ex.Message}"); |
| | | // } |
| | | // } |
| | | |
| | | } |
| | | // } |
| | | |
| | | } |
| | | //} |
| | |
| | | /// </summary> |
| | | void LoadSensorDiv(Function sensor,int index) |
| | | { |
| | | var levelColorList = sensorTemp.GetLevelColorList(sensor.spk); |
| | | var levelTextList = sensorTemp.GetLevelTextList(sensor.spk); |
| | | var levelColorList = sensorTemp.GetLevelColorList(sensor); |
| | | var levelTextList = sensorTemp.GetLevelTextList(sensor); |
| | | { |
| | | var sensorTag = sensor.spk + sensor.sid + sensor.deviceId; |
| | | FrameLayout sensorView = new FrameLayout() |
| | |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(32), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = sensorTemp.GetLevelColorList(sensor.spk)[sensorTemp.GetCurLevel(sensor) - 1], |
| | | TextColor = sensorTemp.GetLevelColorList(sensor)[sensorTemp.GetCurLevel(sensor) - 1], |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextID = levelTextList[sensorTemp.GetCurLevel(sensor) - 1], |
| | | Text = levelTextList[sensorTemp.GetCurLevel(sensor) - 1], |
| | | Tag = "SensorLevel", |
| | | }; |
| | | sensorView.AddChidren(btnLevel); |
| | |
| | | /// </summary> |
| | | void LoadInfo(Function sensor) |
| | | { |
| | | var levelColorList = sensorTemp.GetLevelColorList(sensor.spk); |
| | | var levelTextList = sensorTemp.GetLevelTextList(sensor.spk); |
| | | var levelColorList = sensorTemp.GetLevelColorList(sensor); |
| | | var levelTextList = sensorTemp.GetLevelTextList(sensor); |
| | | Dialog dialog = new Dialog(); |
| | | |
| | | FrameLayout dialogBodyView = new FrameLayout(); |
| | |
| | | switch (sensor.spk) |
| | | { |
| | | case SPK.SensorPm25: |
| | | btnTitle.Text = "PM2.5(ug/m²)"; |
| | | btnTitle.Text = $"PM2.5({sensorTemp.Unit(sensor)})"; |
| | | break; |
| | | case SPK.SensorTemperature: |
| | | btnTitle.Text = Language.StringByID(StringId.Temp) + "(°C)"; |
| | | btnTitle.Text = Language.StringByID(StringId.Temp) + $"({sensorTemp.Unit(sensor)})"; |
| | | break; |
| | | case SPK.SensorTVOC: |
| | | btnTitle.Text = "TVOC(PPB)"; |
| | | btnTitle.Text = $"TVOC({sensorTemp.Unit(sensor)})"; |
| | | break; |
| | | case SPK.SensorCO2: |
| | | btnTitle.Text = "CO2(PPM)"; |
| | | btnTitle.Text = $"CO2({sensorTemp.Unit(sensor)})"; |
| | | break; |
| | | case SPK.SensorHumidity: |
| | | btnTitle.Text = Language.StringByID(StringId.Humidity) + "(%)"; |
| | | btnTitle.Text = Language.StringByID(StringId.Humidity) + $"({sensorTemp.Unit(sensor)})"; |
| | | break; |
| | | case SPK.SensorHcho: |
| | | btnTitle.Text = Language.StringByID(StringId.Formaldehyde) +"(mg/m3)"; |
| | | btnTitle.Text = Language.StringByID(StringId.Formaldehyde) +$"({sensorTemp.Unit(sensor)})"; |
| | | break; |
| | | } |
| | | |
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | IsBold = true, |
| | | Text = sensorTemp.GetIntervalValue(sensor.spk)[index] |
| | | Text = sensorTemp.GetIntervalValue(sensor)[index] |
| | | }); |
| | | |
| | | subInfoView.AddChidren(new Button() |
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | IsBold = true, |
| | | TextID = levelTextList[index] |
| | | Text = levelTextList[index] |
| | | }); |
| | | |
| | | subInfoView.AddChidren(new Button() |
| | |
| | | } |
| | | else if (tag == "SensorLevel") |
| | | { |
| | | (btn as Button).TextID = bodyView.sensorTemp.GetLevelTextList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1]; |
| | | (btn as Button).TextColor = bodyView.sensorTemp.GetLevelColorList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1]; |
| | | (btn as Button).Text = bodyView.sensorTemp.GetLevelTextList(updateTemp)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1]; |
| | | (btn as Button).TextColor = bodyView.sensorTemp.GetLevelColorList(updateTemp)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1]; |
| | | } |
| | | } |
| | | } |
| | | else if (btn.GetType() == typeof(ArcSeekBar)) |
| | | { |
| | | (btn as ArcSeekBar).ProgressBarColor = bodyView.sensorTemp.GetLevelColorList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1]; |
| | | (btn as ArcSeekBar).ProgressBarColor = bodyView.sensorTemp.GetLevelColorList(updateTemp)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1]; |
| | | |
| | | (btn as ArcSeekBar).Progress = (96 / bodyView.sensorTemp.GetLevelColorList(updateTemp.spk).Count) * bodyView.sensorTemp.GetCurLevel(updateTemp); |
| | | (btn as ArcSeekBar).Progress = (96 / bodyView.sensorTemp.GetLevelColorList(updateTemp).Count) * bodyView.sensorTemp.GetCurLevel(updateTemp); |
| | | } |
| | | } |
| | | } |
| | |
| | | historyDataView.AddChidren(myEchartsView); |
| | | |
| | | #region 底部等级提示 |
| | | HorizontalScrolViewLayout tipValuesView = new HorizontalScrolViewLayout() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealWidth(348), |
| | | Width = Application.GetRealWidth(303), |
| | | Height = Application.GetRealHeight(30), |
| | | }; |
| | | diagramView.AddChidren(tipValuesView); |
| | | //HorizontalScrolViewLayout tipValuesView = new HorizontalScrolViewLayout() |
| | | //{ |
| | | // Gravity = Gravity.CenterHorizontal, |
| | | // Y = Application.GetRealWidth(348), |
| | | // Width = Application.GetRealWidth(303), |
| | | // Height = Application.GetRealHeight(30), |
| | | //}; |
| | | //diagramView.AddChidren(tipValuesView); |
| | | |
| | | Button btnColorTip = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = tipValuesView.Bottom, |
| | | Width = Application.GetRealWidth(303), |
| | | Height = Application.GetRealHeight(7), |
| | | UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/SensorColorTipBg.png", |
| | | }; |
| | | diagramView.AddChidren(btnColorTip); |
| | | //Button btnColorTip = new Button() |
| | | //{ |
| | | // Gravity = Gravity.CenterHorizontal, |
| | | // Y = tipValuesView.Bottom, |
| | | // Width = Application.GetRealWidth(303), |
| | | // Height = Application.GetRealHeight(7), |
| | | // UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/SensorColorTipBg.png", |
| | | //}; |
| | | //diagramView.AddChidren(btnColorTip); |
| | | |
| | | HorizontalScrolViewLayout tipTextView = new HorizontalScrolViewLayout() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = btnColorTip.Bottom, |
| | | Width = Application.GetRealWidth(303), |
| | | Height = Application.GetRealHeight(30), |
| | | }; |
| | | diagramView.AddChidren(tipTextView); |
| | | //HorizontalScrolViewLayout tipTextView = new HorizontalScrolViewLayout() |
| | | //{ |
| | | // Gravity = Gravity.CenterHorizontal, |
| | | // Y = btnColorTip.Bottom, |
| | | // Width = Application.GetRealWidth(303), |
| | | // Height = Application.GetRealHeight(30), |
| | | //}; |
| | | //diagramView.AddChidren(tipTextView); |
| | | |
| | | switch (function.spk) |
| | | { |
| | | case SPK.SensorPm25: |
| | | tipValuesView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(101), |
| | | Text = "35", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipValuesView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(101), |
| | | Text = "75", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipValuesView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(101), |
| | | Text = "115", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipTextView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(75), |
| | | TextID = StringId.Great, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipTextView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(75), |
| | | TextID = StringId.Good, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipTextView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(75), |
| | | TextID = StringId.MildPollution, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipTextView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(75), |
| | | TextID = StringId.HeavyPollution, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | break; |
| | | //case SPK.SensorPm25: |
| | | //_intervalValue.Add("0 ~ 35"); |
| | | //_intervalValue.Add("36 ~ 75"); |
| | | //_intervalValue.Add("76 ~ 115"); |
| | | //_intervalValue.Add("115 ~"); |
| | | //_levelTextList.Add(StringId.Great); |
| | | //_levelTextList.Add(StringId.Good); |
| | | //_levelTextList.Add(StringId.MildPollution); |
| | | //_levelTextList.Add(StringId.HeavyPollution); |
| | | //break; |
| | | case SPK.SensorCO2: |
| | | tipValuesView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(101), |
| | | Text = "1000", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipValuesView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(101), |
| | | Text = "2000", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipValuesView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(101), |
| | | Text = "5000", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipTextView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(75), |
| | | TextID = StringId.SensorReferenceTipCO2Level1, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipTextView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(75), |
| | | TextID = StringId.SensorReferenceTipCO2Level2, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipTextView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(75), |
| | | TextID = StringId.SensorReferenceTipCO2Level3, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipTextView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(75), |
| | | TextID = StringId.SensorReferenceTipCO2Level4, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | break; |
| | | case SPK.SensorTemperature: |
| | | tipValuesView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(50), |
| | | Text = "18°C", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipValuesView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(50), |
| | | Text = "20°C", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipValuesView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(50), |
| | | Text = "25°C", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipValuesView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(50), |
| | | Text = "27°C", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipValuesView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(50), |
| | | Text = "30°C", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipValuesView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(50), |
| | | Text = "33°C", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | //_intervalValue.Add("~ 18°C"); |
| | | //_intervalValue.Add("18 ~ 20°C"); |
| | | //_intervalValue.Add("20 ~ 25°C"); |
| | | //_intervalValue.Add("25 ~ 27°C"); |
| | | //_intervalValue.Add("27 ~ 30°C"); |
| | | //_intervalValue.Add("30 ~ 33°C"); |
| | | //_intervalValue.Add("33°C ~"); |
| | | tipTextView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(43), |
| | | TextID = StringId.ExtremelyCold, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipTextView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(43), |
| | | TextID = StringId.SlightlyCold, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipTextView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(43), |
| | | TextID = StringId.Cold, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipTextView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(43), |
| | | TextID = StringId.Comfortable, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipTextView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(43), |
| | | TextID = StringId.TepidFever, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipTextView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(43), |
| | | TextID = StringId.Heat_SensorTip, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipTextView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(43), |
| | | TextID = StringId.ExtremeHeat, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | //_levelTextList.Add(StringId.ExtremelyCold); |
| | | //_levelTextList.Add(StringId.); |
| | | //_levelTextList.Add(StringId.); |
| | | //_levelTextList.Add(StringId.); |
| | | //_levelTextList.Add(StringId.); |
| | | //_levelTextList.Add(StringId.); |
| | | //_levelTextList.Add(StringId.ExtremeHeat); |
| | | break; |
| | | case SPK.SensorTVOC: |
| | | tipValuesView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(101), |
| | | Text = "0.6", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipValuesView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(101), |
| | | Text = "2", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipValuesView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(101), |
| | | Text = "5", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipTextView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(75), |
| | | TextID = StringId.SensorReferenceTVOCTipLevel1, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipTextView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(75), |
| | | TextID = StringId.SensorReferenceTVOCTipLevel2, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipTextView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(75), |
| | | TextID = StringId.SensorReferenceTVOCTipLevel3, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipTextView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(75), |
| | | TextID = StringId.SensorReferenceTVOCTipLevel4, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | break; |
| | | case SPK.SensorHumidity: |
| | | tipValuesView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(151), |
| | | Text = "40%", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipValuesView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(151), |
| | | Text = "70%", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipTextView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(101), |
| | | TextID = StringId.SensorReferenceHumidityTipLevel1, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipTextView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(101), |
| | | TextID = StringId.SensorReferenceHumidityTipLevel2, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | tipTextView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(101), |
| | | TextID = StringId.SensorReferenceHumidityTipLevel3, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | }); |
| | | break; |
| | | } |
| | | //switch (function.spk) |
| | | //{ |
| | | // case SPK.SensorPm25: |
| | | // tipValuesView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(101), |
| | | // Text = "35", |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipValuesView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(101), |
| | | // Text = "75", |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipValuesView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(101), |
| | | // Text = "115", |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipTextView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(75), |
| | | // TextID = StringId.Great, |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipTextView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(75), |
| | | // TextID = StringId.Good, |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipTextView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(75), |
| | | // TextID = StringId.MildPollution, |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipTextView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(75), |
| | | // TextID = StringId.HeavyPollution, |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // break; |
| | | // //case SPK.SensorPm25: |
| | | // //_intervalValue.Add("0 ~ 35"); |
| | | // //_intervalValue.Add("36 ~ 75"); |
| | | // //_intervalValue.Add("76 ~ 115"); |
| | | // //_intervalValue.Add("115 ~"); |
| | | // //_levelTextList.Add(StringId.Great); |
| | | // //_levelTextList.Add(StringId.Good); |
| | | // //_levelTextList.Add(StringId.MildPollution); |
| | | // //_levelTextList.Add(StringId.HeavyPollution); |
| | | // //break; |
| | | // case SPK.SensorCO2: |
| | | // tipValuesView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(101), |
| | | // Text = "1000", |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipValuesView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(101), |
| | | // Text = "2000", |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipValuesView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(101), |
| | | // Text = "5000", |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipTextView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(75), |
| | | // TextID = StringId.SensorReferenceTipCO2Level1, |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipTextView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(75), |
| | | // TextID = StringId.SensorReferenceTipCO2Level2, |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipTextView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(75), |
| | | // TextID = StringId.SensorReferenceTipCO2Level3, |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipTextView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(75), |
| | | // TextID = StringId.SensorReferenceTipCO2Level4, |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // break; |
| | | // case SPK.SensorTemperature: |
| | | // tipValuesView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(50), |
| | | // Text = "18°C", |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipValuesView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(50), |
| | | // Text = "20°C", |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipValuesView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(50), |
| | | // Text = "25°C", |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipValuesView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(50), |
| | | // Text = "27°C", |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipValuesView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(50), |
| | | // Text = "30°C", |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipValuesView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(50), |
| | | // Text = "33°C", |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // //_intervalValue.Add("~ 18°C"); |
| | | // //_intervalValue.Add("18 ~ 20°C"); |
| | | // //_intervalValue.Add("20 ~ 25°C"); |
| | | // //_intervalValue.Add("25 ~ 27°C"); |
| | | // //_intervalValue.Add("27 ~ 30°C"); |
| | | // //_intervalValue.Add("30 ~ 33°C"); |
| | | // //_intervalValue.Add("33°C ~"); |
| | | // tipTextView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(43), |
| | | // TextID = StringId.ExtremelyCold, |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipTextView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(43), |
| | | // TextID = StringId.SlightlyCold, |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipTextView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(43), |
| | | // TextID = StringId.Cold, |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipTextView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(43), |
| | | // TextID = StringId.Comfortable, |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipTextView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(43), |
| | | // TextID = StringId.TepidFever, |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipTextView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(43), |
| | | // TextID = StringId.Heat_SensorTip, |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipTextView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(43), |
| | | // TextID = StringId.ExtremeHeat, |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // //_levelTextList.Add(StringId.ExtremelyCold); |
| | | // //_levelTextList.Add(StringId.); |
| | | // //_levelTextList.Add(StringId.); |
| | | // //_levelTextList.Add(StringId.); |
| | | // //_levelTextList.Add(StringId.); |
| | | // //_levelTextList.Add(StringId.); |
| | | // //_levelTextList.Add(StringId.ExtremeHeat); |
| | | // break; |
| | | // case SPK.SensorTVOC: |
| | | // tipValuesView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(101), |
| | | // Text = "0.6", |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipValuesView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(101), |
| | | // Text = "2", |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipValuesView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(101), |
| | | // Text = "5", |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipTextView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(75), |
| | | // TextID = StringId.SensorReferenceTVOCTipLevel1, |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipTextView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(75), |
| | | // TextID = StringId.SensorReferenceTVOCTipLevel2, |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipTextView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(75), |
| | | // TextID = StringId.SensorReferenceTVOCTipLevel3, |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipTextView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(75), |
| | | // TextID = StringId.SensorReferenceTVOCTipLevel4, |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // break; |
| | | // case SPK.SensorHumidity: |
| | | // tipValuesView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(151), |
| | | // Text = "40%", |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipValuesView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(151), |
| | | // Text = "70%", |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipTextView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(101), |
| | | // TextID = StringId.SensorReferenceHumidityTipLevel1, |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipTextView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(101), |
| | | // TextID = StringId.SensorReferenceHumidityTipLevel2, |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // tipTextView.AddChidren(new Button() |
| | | // { |
| | | // Width = Application.GetRealWidth(101), |
| | | // TextID = StringId.SensorReferenceHumidityTipLevel3, |
| | | // TextAlignment = TextAlignment.Center, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | // }); |
| | | // break; |
| | | //} |
| | | |
| | | #endregion |
| | | |
| | |
| | | int index = 1; |
| | | foreach (var tempSensor in sensorList) |
| | | { |
| | | if (index > 5) |
| | | { |
| | | break; |
| | | } |
| | | if (tempSensor.sid == function.sid) |
| | | { |
| | | continue; |
New file |
| | |
| | | using System; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.Stan; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | | public class EnvironmentPanelPage : DeviceFunction4CardCommonForm |
| | | { |
| | | #region ■ 变量声明___________________________ |
| | | |
| | | /// <summary> |
| | | /// 图标 |
| | | /// </summary> |
| | | private IconViewControl btnIcon = null; |
| | | /// <summary> |
| | | /// 文本控件 |
| | | /// </summary> |
| | | private NormalViewControl btnSuctionView = null; |
| | | |
| | | Function acDevice; |
| | | Function fhDevice; |
| | | Function airFreshDevice; |
| | | #endregion |
| | | |
| | | #region ■ 初始化_____________________________ |
| | | |
| | | /// <summary> |
| | | /// 初始化白色区域的内容 |
| | | /// </summary> |
| | | public override void InitFrameWhiteContent() |
| | | { |
| | | base.ShowColltionButton = false; |
| | | base.SetTitleText(Language.StringByID(StringId.SmartPanel)); |
| | | foreach (var sid in device.targetSids) |
| | | { |
| | | var targetObj = FunctionList.List.Functions.Find((obj) => sid == obj.sid); |
| | | if (targetObj == null) |
| | | { |
| | | continue; |
| | | } |
| | | if (SPK.AcSpkList().Contains(targetObj.spk)) |
| | | { |
| | | acDevice = targetObj; |
| | | } |
| | | else if (SPK.FhSpkList().Contains(targetObj.spk)) |
| | | { |
| | | fhDevice = targetObj; |
| | | } |
| | | else if (SPK.AirFreshSpkList().Contains(targetObj.spk)) |
| | | { |
| | | airFreshDevice = targetObj; |
| | | } |
| | | } |
| | | |
| | | //添加第二索引页 |
| | | this.Add4Page(); |
| | | //初始化第一个索引页的内容 |
| | | this.InitFrameWhiteContent1(); |
| | | //初始化第二个索引页的内容 |
| | | this.InitFrameWhiteContent2(); |
| | | this.InitFrameWhiteContent3(); |
| | | //刷新界面状态 |
| | | //this.RefreshFormStatu(); |
| | | //读取状态 |
| | | //new System.Threading.Thread(() => |
| | | //{ |
| | | // DriverLayer.Control.Ins.SendReadCommand(device); |
| | | //}) |
| | | //{ IsBackground = true }.Start(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 初始化第一个索引页的内容 |
| | | /// </summary> |
| | | private void InitFrameWhiteContent1() |
| | | { |
| | | btnIcon = new IconViewControl(198) |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealWidth(146), |
| | | UnSelectedImagePath = "FunctionIcon/Panel/PanelHelpNormalBgIcon.png", |
| | | SelectedImagePath = "FunctionIcon/Panel/PanelHelpAlarmBgIcon.png", |
| | | }; |
| | | FrameWhiteCentet1.AddChidren(btnIcon); |
| | | |
| | | btnSuctionView = new NormalViewControl(300, 84, true) |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = btnIcon.Bottom, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextColor = CSS_Color.MainColor, |
| | | SelectedTextColor = CSS_Color.AuxiliaryColor2, |
| | | //BackgroundColor = 0xFFFF0000 |
| | | }; |
| | | FrameWhiteCentet1.AddChidren(btnSuctionView); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 初始化第二个索引页的内容 |
| | | /// </summary> |
| | | private void InitFrameWhiteContent2() |
| | | { |
| | | var acPage = new UI2.FuntionControlView.Panel.AcContentView(acDevice); |
| | | FrameWhiteCentet2.AddChidren(acPage); |
| | | acPage.InitContent(); |
| | | } |
| | | |
| | | private void InitFrameWhiteContent3() |
| | | { |
| | | var fhPage = new FhContentView(fhDevice); |
| | | FrameWhiteCentet3.AddChidren(fhPage); |
| | | fhPage.InitContentView(true); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region ■ 设备状态反馈_______________________ |
| | | |
| | | /// <summary> |
| | | /// 设备状态反馈 |
| | | /// </summary> |
| | | /// <param name="i_LocalDevice"></param> |
| | | public override void DeviceStatuPush(Function i_LocalDevice) |
| | | { |
| | | //不是同一个东西 |
| | | if (this.device.sid != i_LocalDevice.sid) { return; } |
| | | |
| | | //刷新界面状态 |
| | | this.RefreshFormStatu(); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region ■ 发送各种命令_______________________ |
| | | |
| | | #endregion |
| | | |
| | | #region ■ 刷新界面状态_______________________ |
| | | |
| | | /// <summary> |
| | | /// 刷新界面状态 |
| | | /// </summary> |
| | | private void RefreshFormStatu() |
| | | { |
| | | Application.RunOnMainThread(() => { |
| | | var temp = device.attributes.Find((sta) => sta.key == "alarm_status"); |
| | | if (temp != null) |
| | | { |
| | | if (temp.state == "alarm") |
| | | { |
| | | btnIcon.IsSelected = true; |
| | | btnSuctionView.TextID = StringId.InAlarm; |
| | | btnSuctionView.IsSelected = true; |
| | | } |
| | | else |
| | | { |
| | | btnIcon.IsSelected = false; |
| | | btnSuctionView.TextID = StringId.SensorNormalState; |
| | | btnSuctionView.IsSelected = false; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region ■ 一般方法___________________________ |
| | | |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | if (temp.state == "alarm") |
| | | { |
| | | btnIcon.IsSelected = true; |
| | | btnSuctionView.TextID = StringId.InAlarm; |
| | | btnSuctionView.TextID = StringId.InAlarming; |
| | | btnSuctionView.IsSelected = true; |
| | | } |
| | | else |
| | |
| | | /// 固定域名,正式环境 |
| | | /// 公共域名就近解析 |
| | | /// </summary> |
| | | public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm |
| | | //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm |
| | | /// <summary> |
| | | /// RegionMark |
| | | /// </summary> |