| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 | <?xml version="1.0" encoding="utf-8"?><fragment xmlns="http://www.holeschak.de/BmwDeepObd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.holeschak.de/BmwDeepObd BmwDeepObd.xsd">  <page name="Generator" display-mode="grid" fontsize="small" gauges-portrait="2" gauges-landscape="4" logfile="DME_DDE.log">    <strings lang="de">      <string name="Generator">Generator</string>      <string name="!JOB#STATUS_MESSWERTBLOCK_LESEN#STAT_MOTORDREHZAHL_WERT"> Drehzahl [U/min]</string>      <string name="!JOB#STATUS_MESSWERTBLOCK_LESEN#STAT_UBATT_WERT"> Batteriespannung [V]</string>      <string name="!JOB#STATUS_MESSWERTBLOCK_LESEN#STAT_GENERATORLAST_WERT"> Generatorlast [%]</string>	  <string name="!JOB#STATUS_MESSWERTBLOCK_LESEN#STAT_ZUHEIZER_ANSTEUERUNG_WERT"> Zuheizer Ansteuerung [%]:</string>      <string name="!JOB#STATUS_MESSWERTBLOCK_LESEN#STAT_KUEHLMITTELTEMPERATUR_WERT"> Kühlmitteltemperatur [°C]</string>      <string name="!JOB#STATUS_MESSWERTBLOCK_LESEN#STAT_MOTORMOMENT_AKTUELL_WERT"> Drehmoment [Nm]:</string>    </strings>    <strings>      <string name="Generator">Generator</string>      <string name="!JOB#STATUS_MESSWERTBLOCK_LESEN#STAT_MOTORDREHZAHL_WERT"> engine speed [U/min]</string>      <string name="!JOB#STATUS_MESSWERTBLOCK_LESEN#STAT_UBATT_WERT"> voltage [V]</string>      <string name="!JOB#STATUS_MESSWERTBLOCK_LESEN#STAT_GENERATORLAST_WERT"> alternator load [%]</string>      <string name="!JOB#STATUS_MESSWERTBLOCK_LESEN#STAT_ZUHEIZER_ANSTEUERUNG_WERT"> el. heater PWM [%]:</string>      <string name="!JOB#STATUS_MESSWERTBLOCK_LESEN#STAT_KUEHLMITTELTEMPERATUR_WERT"> coolant [°C]</string>      <string name="!JOB#STATUS_MESSWERTBLOCK_LESEN#STAT_MOTORMOMENT_AKTUELL_WERT"> torque [Nm]:</string>    </strings>      <jobs>      <job sgbd="D50M57E1" name="STATUS_MESSWERTBLOCK_LESEN" args="JA;IUBAT;ITKUM;IMOAK;INMOT;IGENL;ITZUH">        <display name="!JOB#STATUS_MESSWERTBLOCK_LESEN#STAT_MOTORDREHZAHL_WERT" result="STAT_MOTORDREHZAHL_WERT" grid-type="simple-gauge-round" min-value="0" max-value="5000" log_tag="STAT_MOTORDREHZAHL_WERT" />        <display name="!JOB#STATUS_MESSWERTBLOCK_LESEN#STAT_KUEHLMITTELTEMPERATUR_WERT" result="STAT_KUEHLMITTELTEMPERATUR_WERT" grid-type="simple-gauge-round" min-value="-20" max-value="120" log_tag="STAT_KUEHLMITTELTEMPERATUR_WERT" />        <display name="!JOB#STATUS_MESSWERTBLOCK_LESEN#STAT_MOTORMOMENT_AKTUELL_WERT" result="STAT_MOTORMOMENT_AKTUELL_WERT" format="L" grid-type="simple-gauge-round" min-value="0" max-value="600" log_tag="STAT_MOTORMOMENT_AKTUELL_WERT" />        <display name="!JOB#STATUS_MESSWERTBLOCK_LESEN#STAT_UBATT_WERT" result="STAT_UBATT_WERT" grid-type="simple-gauge-round" min-value="0" max-value="15" log_tag="STAT_UBATT_WERT" />        <display name="!JOB#STATUS_MESSWERTBLOCK_LESEN#STAT_GENERATORLAST_WERT" result="STAT_GENERATORLAST_WERT" format=".1R" grid-type="simple-gauge-round" min-value="0" max-value="100" log_tag="STAT_GENERATORLAST_WERT" />        <display name="!JOB#STATUS_MESSWERTBLOCK_LESEN#STAT_ZUHEIZER_ANSTEUERUNG_WERT" result="STAT_ZUHEIZER_ANSTEUERUNG_WERT" format=".1R" grid-type="simple-gauge-round" min-value="0" max-value="100" log_tag="STAT_ZUHEIZER_ANSTEUERUNG_WERT" />      </job>    </jobs>    <code show_warnings="true">    <![CDATA[    class PageClass    {        public string FormatResult(JobReader.PageInfo pageInfo, MultiMap<string, EdiabasNet.ResultData> resultDict, string resultName, ref Android.Graphics.Color? textColor)        {            string result = string.Empty;            double value;            bool found;            switch (resultName)            {                case "STATUS_MESSWERTBLOCK_LESEN#STAT_MOTORDREHZAHL_WERT":                    value = ActivityMain.GetResultDouble(resultDict, resultName, 0, out found);                                        // result format: {0,[DIGITS TOTAL INCL COMMA],[0|0.0|0.00|0.000...]}                    result = string.Format(ActivityMain.Culture, "{0,4:0}", value);                                        if (found && value <= 4000) textColor = Android.Graphics.Color.White;                    else if (found && value <= 4250) textColor = Android.Graphics.Color.Yellow;                    else if (found && value <= 4500) textColor = Android.Graphics.Color.Orange;                    else if (found && value > 4500) textColor = Android.Graphics.Color.Red;                    else textColor = Android.Graphics.Color.Gray;                                        break;                                    case "STATUS_MESSWERTBLOCK_LESEN#STAT_UBATT_WERT":                    value = ActivityMain.GetResultDouble(resultDict, resultName, 0, out found);                                        // result format: {0,[DIGITS TOTAL INCL COMMA],[0|0.0|0.00|0.000...]}                    result = string.Format(ActivityMain.Culture, "{0,4:0.0}", value);                                        if (found && value < 10.5) textColor = Android.Graphics.Color.Red;                    else if (found && value < 11.5) textColor = Android.Graphics.Color.Orange;                    else if (found && value <= 12.5) textColor = Android.Graphics.Color.Yellow;                    else if (found && value <= 13.2) textColor = Android.Graphics.Color.Gray;                    else if (found && value <= 14.5) textColor = Android.Graphics.Color.White;                    else if (found && value > 14.5) textColor = Android.Graphics.Color.Red;                    else textColor = Android.Graphics.Color.Gray;                                        break;                case "STATUS_MESSWERTBLOCK_LESEN#STAT_KUEHLMITTELTEMPERATUR_WERT":                    value = ActivityMain.GetResultDouble(resultDict, resultName, 0, out found);                    result = string.Format(ActivityMain.Culture, "{0,3:0}", value);                                        if (found && value < 75) textColor = Android.Graphics.Color.Blue;                    else if (found && value <= 105) textColor = Android.Graphics.Color.White;                    else if (found && value <= 110) textColor = Android.Graphics.Color.Yellow;                    else if (found && value <= 115) textColor = Android.Graphics.Color.Orange;                    else if (found && value > 115) textColor = Android.Graphics.Color.Red;                    else textColor = Android.Graphics.Color.Gray;                                        break;            }            return result;        }    }      ]]>    </code>  </page></fragment>
 |