292 |
292 |
293 on_hmitree_update(hmi_tree_root) |
293 on_hmitree_update(hmi_tree_root) |
294 |
294 |
295 return ret |
295 return ret |
296 |
296 |
|
297 if wx.Platform == '__WXMSW__': |
|
298 browser_launch_cmd="cmd.exe /c 'start msedge {url}'" |
|
299 else: |
|
300 browser_launch_cmd="chromium {url}" |
|
301 |
297 class SVGHMI(object): |
302 class SVGHMI(object): |
298 XSD = """<?xml version="1.0" encoding="utf-8" ?> |
303 XSD = """<?xml version="1.0" encoding="utf-8" ?> |
299 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> |
304 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> |
300 <xsd:element name="SVGHMI"> |
305 <xsd:element name="SVGHMI"> |
301 <xsd:complexType> |
306 <xsd:complexType> |
302 <xsd:attribute name="OnStart" type="xsd:string" use="optional" default="chromium {url}"/> |
307 <xsd:attribute name="OnStart" type="xsd:string" use="optional" default="%s"/> |
303 <xsd:attribute name="OnStop" type="xsd:string" use="optional" default="echo 'please close chromium window at {url}'"/> |
308 <xsd:attribute name="OnStop" type="xsd:string" use="optional" default=""/> |
304 <xsd:attribute name="OnWatchdog" type="xsd:string" use="optional" default="echo 'Watchdog for {name} !'"/> |
309 <xsd:attribute name="OnWatchdog" type="xsd:string" use="optional" default=""/> |
305 <xsd:attribute name="EnableWatchdog" type="xsd:boolean" use="optional" default="false"/> |
310 <xsd:attribute name="EnableWatchdog" type="xsd:boolean" use="optional" default="false"/> |
306 <xsd:attribute name="WatchdogInitial" use="optional" default="30"> |
311 <xsd:attribute name="WatchdogInitial" use="optional" default="30"> |
307 <xsd:simpleType> |
312 <xsd:simpleType> |
308 <xsd:restriction base="xsd:integer"> |
313 <xsd:restriction base="xsd:integer"> |
309 <xsd:minInclusive value="2"/> |
314 <xsd:minInclusive value="2"/> |