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