Created
September 23, 2011 20:05
Revisions
-
SuperYeti created this gist
Sep 23, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,76 @@ using System; using MonoMobile.Views; using MonoTouch.UIKit; using MonoTouch.Foundation; using OBDIIEngineLibrary; namespace ObdSync { [Preserve(AllMembers = true)] [Theme(typeof(NavbarTheme))] public class MainMenuView : View { [Section("Main Menu", "",Order = 1)] [Root(ViewType = typeof(DeviceConfigView))] public DeviceConfigViewModel DeviceConfiguration { get; set; } [Button] public void GetSupportedPids() { if(!Application.DeviceVerified) { Alert.Show("Device Not Verified", "You must verify your device before querying it."); return; } SupportedPidsView view = new SupportedPidsView(); Application.NavigationController.PushViewController(new DialogViewController("Supported PID's", view, true), true); } [Button] public void GetTroubleCodes() { if(!Application.DeviceVerified) { Alert.Show("Device Not Verified", "You must verify your device before querying it."); return; } DTCsView view = new DTCsView(); Application.NavigationController.PushViewController(new DialogViewController("Trouble Codes", view, true), true); } [Button] public void GetVoltage() { if(!Application.DeviceVerified) { Alert.Show("Device Not Verified", "You must verify your device before querying it."); return; } Alert.Show("Battery Voltage", "Voltage: " + Application.ElmVoltage.ReadInputVoltage()); } [Button] public void DeleteDatabase() { DAL.DeleteDatabase(); } public MainMenuView() { } } }