Created
September 23, 2011 20:05
-
-
Save SuperYeti/1238337 to your computer and use it in GitHub Desktop.
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 characters
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() | |
{ | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment