|
@@ -0,0 +1,252 @@
|
|
|
+<?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="SIA" display-mode="list" fontsize="medium" gauges-portrait="2" gauges-landscape="4" logfile="KOMBI_SIA.log">
|
|
|
+ <strings lang="de">
|
|
|
+ <string name="SIA">SIA</string>
|
|
|
+ <string name="!JOB#STATUS_AIF_SIA_DATEN_LESEN#STAT_SERVICE_TEXT"> letzter Service war</string>
|
|
|
+ <string name="!JOB#STATUS_AIF_SIA_DATEN_LESEN#STAT_INSPEKTIONSGRENZE_WERT"> Inspektionsgrenze Kraftstoff [l]</string>
|
|
|
+ <string name="!JOB#STATUS_AIF_SIA_DATEN_LESEN#STAT_KRAFTSTOFFMENGE_WERT"> Kraftstoffmenge seit letztem Service [l]</string>
|
|
|
+ <string name="!JOB#STATUS_AIF_SIA_DATEN_LESEN#STAT_ZEIT_INSP_ZAEHLER_WERT"> Zeitinspektionszähler [Tage]</string>
|
|
|
+ <string name="!JOB#STATUS_AIF_SIA_DATEN_LESEN#STAT_ZEITGRENZE_WERT"> Zeitgrenze [Tage]</string>
|
|
|
+ </strings>
|
|
|
+ <strings>
|
|
|
+ <string name="SIA">SIA</string>
|
|
|
+ <string name="!JOB#STATUS_AIF_SIA_DATEN_LESEN#STAT_SERVICE_TEXT"> last service was</string>
|
|
|
+ <string name="!JOB#STATUS_AIF_SIA_DATEN_LESEN#STAT_INSPEKTIONSGRENZE_WERT"> inspection limit fuel [l]</string>
|
|
|
+ <string name="!JOB#STATUS_AIF_SIA_DATEN_LESEN#STAT_KRAFTSTOFFMENGE_WERT"> fuel since last service [l]</string>
|
|
|
+ <string name="!JOB#STATUS_AIF_SIA_DATEN_LESEN#STAT_ZEIT_INSP_ZAEHLER_WERT"> inspection time counter [days]</string>
|
|
|
+ <string name="!JOB#STATUS_AIF_SIA_DATEN_LESEN#STAT_ZEITGRENZE_WERT"> time limit [days]</string>
|
|
|
+ </strings>
|
|
|
+ <display name="!JOB#STATUS_AIF_SIA_DATEN_LESEN#STAT_SERVICE_TEXT" result="STAT_SERVICE_TEXT" format="T" log_tag="STAT_SERVICE_TEXT" />
|
|
|
+ <display name="!JOB#STATUS_AIF_SIA_DATEN_LESEN#STAT_INSPEKTIONSGRENZE_WERT" result="STAT_INSPEKTIONSGRENZE_WERT" format="L" log_tag="STAT_INSPEKTIONSGRENZE_WERT" />
|
|
|
+ <display name="!JOB#STATUS_AIF_SIA_DATEN_LESEN#STAT_KRAFTSTOFFMENGE_WERT" result="STAT_KRAFTSTOFFMENGE_WERT" format="L" log_tag="STAT_KRAFTSTOFFMENGE_WERT" />
|
|
|
+ <display name="!JOB#STATUS_AIF_SIA_DATEN_LESEN#STAT_ZEIT_INSP_ZAEHLER_WERT" result="STAT_ZEIT_INSP_ZAEHLER_WERT" format="L" log_tag="STAT_ZEIT_INSP_ZAEHLER_WERT" />
|
|
|
+ <display name="!JOB#STATUS_AIF_SIA_DATEN_LESEN#STAT_ZEITGRENZE_WERT" result="STAT_ZEITGRENZE_WERT" format="L" log_tag="STAT_ZEITGRENZE_WERT" />
|
|
|
+
|
|
|
+ <jobs sgbd="kombi39c" />
|
|
|
+
|
|
|
+ <code show_warnings="true">
|
|
|
+ <![CDATA[
|
|
|
+ class PageClass
|
|
|
+ {
|
|
|
+ private Button buttonSIAWegReset;
|
|
|
+ //private Button buttonSIAOelReset;
|
|
|
+ private Button buttonSIAZeitReset;
|
|
|
+ //private Button buttonSIAKorrektur;
|
|
|
+ private bool doSIAWegReset = false;
|
|
|
+ //private bool doSIAOelReset = false;
|
|
|
+ private bool doSIAZeitReset = false;
|
|
|
+ //private bool doSIAKorrektur = false;
|
|
|
+
|
|
|
+ private int serviceArt;
|
|
|
+
|
|
|
+ public void CreateLayout(ActivityMain activity, JobReader.PageInfo pageInfo, LinearLayout pageLayout)
|
|
|
+ {
|
|
|
+ LinearLayout buttonLayout = new LinearLayout(activity);
|
|
|
+ buttonLayout.Orientation = Orientation.Horizontal;
|
|
|
+
|
|
|
+ LinearLayout.LayoutParams buttonLayoutParams = new LinearLayout.LayoutParams(
|
|
|
+ ViewGroup.LayoutParams.MatchParent,
|
|
|
+ ViewGroup.LayoutParams.WrapContent);
|
|
|
+ buttonLayoutParams.Weight = 1;
|
|
|
+
|
|
|
+ // Button 1
|
|
|
+ buttonSIAWegReset = new Button(activity);
|
|
|
+ buttonSIAWegReset.Text = "RESET INSPEKTION / ÖLSERVICE";
|
|
|
+ buttonSIAWegReset.Click += delegate
|
|
|
+ {
|
|
|
+ // button setzt klassenweite variable auf true, diese wird beim durchlauf von ExecuteJob ausgewertet
|
|
|
+ doSIAWegReset = true;
|
|
|
+
|
|
|
+ // Benachrichtung anzeigen wenn man will
|
|
|
+ ActivityMain.ShowNotification(activity, 0, 2,
|
|
|
+ "SIA RESET",
|
|
|
+ "Weginspektion wird zurückgesetzt...");
|
|
|
+ };
|
|
|
+ buttonLayout.AddView(buttonSIAWegReset, buttonLayoutParams);
|
|
|
+
|
|
|
+ //// Button 2
|
|
|
+ //buttonSIAOelReset = new Button(activity);
|
|
|
+ //buttonSIAOelReset.Text = "RESET ÖLSERVICE";
|
|
|
+ //buttonSIAOelReset.Click += delegate
|
|
|
+ //{
|
|
|
+ // // button setzt klassenweite variable auf true, diese wird beim durchlauf von ExecuteJob ausgewertet
|
|
|
+ // doSIAOelReset = true;
|
|
|
+ //
|
|
|
+ // // Benachrichtung anzeigen wenn man will
|
|
|
+ // ActivityMain.ShowNotification(activity, 0, 2,
|
|
|
+ // "SIA RESET",
|
|
|
+ // "Ölservice wird zurückgesetzt...");
|
|
|
+ //};
|
|
|
+ //buttonLayout.AddView(buttonSIAOelReset, buttonLayoutParams);
|
|
|
+
|
|
|
+ // Button 3
|
|
|
+ buttonSIAZeitReset = new Button(activity);
|
|
|
+ buttonSIAZeitReset.Text = "RESET ZEIT- INSPEKTION";
|
|
|
+ buttonSIAZeitReset.Click += delegate
|
|
|
+ {
|
|
|
+ // button setzt klassenweite variable auf true, diese wird beim durchlauf von ExecuteJob ausgewertet
|
|
|
+ doSIAZeitReset = true;
|
|
|
+
|
|
|
+ // Benachrichtung anzeigen wenn man will
|
|
|
+ ActivityMain.ShowNotification(activity, 0, 2,
|
|
|
+ "SIA RESET",
|
|
|
+ "Zeitinspektion wird zurückgesetzt...");
|
|
|
+ };
|
|
|
+ buttonLayout.AddView(buttonSIAZeitReset, buttonLayoutParams);
|
|
|
+
|
|
|
+
|
|
|
+ // KOMBI30_C hat diesen job nicht
|
|
|
+ // // Button 4
|
|
|
+ // buttonSIAKorrektur = new Button(activity);
|
|
|
+ // buttonSIAKorrektur.Text = "KORREKTUR WECHSEL INSPEKTION <> ÖLSERVICE";
|
|
|
+ // buttonSIAKorrektur.Click += delegate
|
|
|
+ // {
|
|
|
+ // // button setzt klassenweite variable auf true, diese wird beim durchlauf von ExecuteJob ausgewertet
|
|
|
+ // doSIAKorrektur = true;
|
|
|
+ //
|
|
|
+ // // Benachrichtung anzeigen wenn man will
|
|
|
+ // ActivityMain.ShowNotification(activity, 0, 2,
|
|
|
+ // "SIA",
|
|
|
+ // "Wechsel zwischen Inspektion <> Ölservice wird durchgeführt...");
|
|
|
+ // };
|
|
|
+ // buttonLayout.AddView(buttonSIAKorrektur, buttonLayoutParams);
|
|
|
+
|
|
|
+ LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(
|
|
|
+ ViewGroup.LayoutParams.MatchParent,
|
|
|
+ ViewGroup.LayoutParams.WrapContent);
|
|
|
+ pageLayout.AddView(buttonLayout, layoutParams);
|
|
|
+ }
|
|
|
+
|
|
|
+ public void DestroyLayout(JobReader.PageInfo pageInfo)
|
|
|
+ {
|
|
|
+ buttonSIAWegReset = null;
|
|
|
+ //buttonSIAOelReset = null;
|
|
|
+ buttonSIAZeitReset = null;
|
|
|
+ //buttonSIAKorrektur = null;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void ExecuteJob(EdiabasNet ediabas, ref MultiMap<string, EdiabasNet.ResultData> resultDict, bool firstCall)
|
|
|
+ {
|
|
|
+ List<Dictionary<string, EdiabasNet.ResultData>> resultSets;
|
|
|
+
|
|
|
+ // Job 1
|
|
|
+ ediabas.ArgString = string.Empty;
|
|
|
+ ediabas.ArgBinaryStd = null;
|
|
|
+ ediabas.ResultsRequests = string.Empty;
|
|
|
+
|
|
|
+ ediabas.ExecuteJob("AIF_SIA_DATEN_LESEN");
|
|
|
+
|
|
|
+ resultSets = ediabas.ResultSets;
|
|
|
+ if (resultSets != null && resultSets.Count >= 2)
|
|
|
+ {
|
|
|
+ EdiabasThread.MergeResultDictionarys(ref resultDict, resultSets[1]);
|
|
|
+ }
|
|
|
+
|
|
|
+ EdiabasNet.ResultData resultData;
|
|
|
+ if (resultSets[1].TryGetValue("STAT_SERVICE_ART", out resultData))
|
|
|
+ {
|
|
|
+ if (resultData.OpData is Int64)
|
|
|
+ {
|
|
|
+ serviceArt = (int)((Int64)resultData.OpData);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ // // Job 2 KOMBI39_C hat diesen Job nicht
|
|
|
+ // ediabas.ArgString = string.Empty;
|
|
|
+ // ediabas.ArgBinaryStd = null;
|
|
|
+ // ediabas.ResultsRequests = string.Empty;
|
|
|
+ //
|
|
|
+ // ediabas.ExecuteJob("ZEITINSPEKTIONSDATUM_LESEN");
|
|
|
+ //
|
|
|
+ // resultSets = ediabas.ResultSets;
|
|
|
+ // if (resultSets != null && resultSets.Count >= 2)
|
|
|
+ // {
|
|
|
+ // EdiabasThread.MergeResultDictionarys(ref resultDict, resultSets[1]);
|
|
|
+ // }
|
|
|
+
|
|
|
+
|
|
|
+ // Button Jobs
|
|
|
+
|
|
|
+ // Button 1 - SIA RESET Weginspektion/Oelservice
|
|
|
+ if (doSIAWegReset) {
|
|
|
+
|
|
|
+ if(serviceArt == 0) ediabas.ArgString = "Oel_Reset";
|
|
|
+ if(serviceArt == 1) ediabas.ArgString = "Weg_Reset";
|
|
|
+
|
|
|
+ ediabas.ArgBinaryStd = null;
|
|
|
+ ediabas.ResultsRequests = "JOB_STATUS";
|
|
|
+
|
|
|
+ ediabas.ExecuteJob("SIA_RESET");
|
|
|
+
|
|
|
+ //resultSets = ediabas.ResultSets;
|
|
|
+ //if (resultSets != null && resultSets.Count >= 2)
|
|
|
+ //{
|
|
|
+ // EdiabasThread.MergeResultDictionarys(ref resultDict, resultSets[1]);
|
|
|
+ //}
|
|
|
+
|
|
|
+ // ablaufvariable wieder zurücksetzen, sonst würde diese funktion nun bei jedem folgenden durchlauf ausgeführt werden...
|
|
|
+ doSIAWegReset = false;
|
|
|
+ }
|
|
|
+
|
|
|
+ //// Button 2 - SIA RESET Ölservice
|
|
|
+ //if (doSIAOelReset) {
|
|
|
+ // ediabas.ArgString = "Oel_Reset";
|
|
|
+ // ediabas.ArgBinaryStd = null;
|
|
|
+ // ediabas.ResultsRequests = "JOB_STATUS";
|
|
|
+ //
|
|
|
+ // ediabas.ExecuteJob("SIA_RESET");
|
|
|
+ //
|
|
|
+ // //resultSets = ediabas.ResultSets;
|
|
|
+ // //if (resultSets != null && resultSets.Count >= 2)
|
|
|
+ // //{
|
|
|
+ // // EdiabasThread.MergeResultDictionarys(ref resultDict, resultSets[1]);
|
|
|
+ // //}
|
|
|
+ //
|
|
|
+ // // ablaufvariable wieder zurücksetzen, sonst würde diese funktion nun bei jedem folgenden durchlauf ausgeführt werden...
|
|
|
+ // doSIAOelReset = false;
|
|
|
+ //}
|
|
|
+
|
|
|
+ // Button 3 - SIA RESET Zeitinspektion
|
|
|
+ if (doSIAZeitReset) {
|
|
|
+ ediabas.ArgString = "Zeit_Reset";
|
|
|
+ ediabas.ArgBinaryStd = null;
|
|
|
+ ediabas.ResultsRequests = "JOB_STATUS";
|
|
|
+
|
|
|
+ ediabas.ExecuteJob("SIA_RESET");
|
|
|
+
|
|
|
+ //resultSets = ediabas.ResultSets;
|
|
|
+ //if (resultSets != null && resultSets.Count >= 2)
|
|
|
+ //{
|
|
|
+ // EdiabasThread.MergeResultDictionarys(ref resultDict, resultSets[1]);
|
|
|
+ //}
|
|
|
+
|
|
|
+ // ablaufvariable wieder zurücksetzen, sonst würde diese funktion nun bei jedem folgenden durchlauf ausgeführt werden...
|
|
|
+ doSIAZeitReset = false;
|
|
|
+ }
|
|
|
+
|
|
|
+ // KOMBI30_C hat diesen job nicht
|
|
|
+ // // Button 4 - SIA Korrektur
|
|
|
+ // if (doSIAKorrektur) {
|
|
|
+ // ediabas.ArgString = string.Empty;
|
|
|
+ // ediabas.ArgBinaryStd = null;
|
|
|
+ // ediabas.ResultsRequests = "JOB_STATUS";
|
|
|
+ //
|
|
|
+ // ediabas.ExecuteJob("SIA_KORREKTUR_SCHREIBEN");
|
|
|
+ //
|
|
|
+ // //resultSets = ediabas.ResultSets;
|
|
|
+ // //if (resultSets != null && resultSets.Count >= 2)
|
|
|
+ // //{
|
|
|
+ // // EdiabasThread.MergeResultDictionarys(ref resultDict, resultSets[1]);
|
|
|
+ // //}
|
|
|
+ //
|
|
|
+ // // ablaufvariable wieder zurücksetzen, sonst würde diese funktion nun bei jedem folgenden durchlauf ausgeführt werden...
|
|
|
+ // doSIAKorrektur = false;
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]]>
|
|
|
+ </code>
|
|
|
+ </page>
|
|
|
+</fragment>
|