diff --git a/App/RobobinApp/Platforms/Android/Resources/values/colors.xml b/App/RobobinApp/Platforms/Android/Resources/values/colors.xml index 5cd1604963d9ff3ca81859c9af7678b8707fe4ea..2f85cd76c34e784b78e9730f92f7249c3c8ba3cf 100644 --- a/App/RobobinApp/Platforms/Android/Resources/values/colors.xml +++ b/App/RobobinApp/Platforms/Android/Resources/values/colors.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <resources> <color name="colorPrimary">#512BD4</color> - <color name="colorPrimaryDark">#2B0B98</color> - <color name="colorAccent">#2B0B98</color> + <color name="colorPrimaryDark">#FFFFFF</color> + <color name="colorAccent">#FFFFFF</color> </resources> \ No newline at end of file diff --git a/App/RobobinApp/ViewModels/ConnectionPageViewModel.cs b/App/RobobinApp/ViewModels/ConnectionPageViewModel.cs index 97e98a2be770afc8aa1de30e5db90f0a2d4f0885..6717948f0a1723eed17dc41ab78ffb38b639a57e 100644 --- a/App/RobobinApp/ViewModels/ConnectionPageViewModel.cs +++ b/App/RobobinApp/ViewModels/ConnectionPageViewModel.cs @@ -32,6 +32,7 @@ namespace RobobinApp.ViewModels private BluetoothDevice _selectedDevice; private IDevice _connectedDevice; public ICommand GoHomeCommand { get; } + public ICommand GoToHelpPage { get; } public ObservableCollection<BluetoothDevice> BluetoothDevices { get; } public ObservableCollection<WifiNetwork> WifiNetworks { get; } @@ -141,6 +142,7 @@ namespace RobobinApp.ViewModels DisconnectCommand = new Command(OnDisconnect); GoHomeCommand = new Command(async () => await OnGoHome()); ConnectCommand = new Command(OnToggleConnection); + TestReadOperation = new Command(async () => await ReadOperationAsync()); SendWifiInfoCommand = new Command(OnSendWifiInfo); @@ -153,7 +155,7 @@ namespace RobobinApp.ViewModels Debug.WriteLine("Checking and requesting Bluetooth permissions."); CheckAndRequestBluetoothPermissions(); } - + private async void OnSendWifiInfo(object obj) { try diff --git a/App/RobobinApp/ViewModels/MainPageViewModel.cs b/App/RobobinApp/ViewModels/MainPageViewModel.cs index da7f2073c716bfb43f0b94defc522a3e3c06ea09..7bccfcb698c8af4dbbffe5bb7c8dd4c7ca932073 100644 --- a/App/RobobinApp/ViewModels/MainPageViewModel.cs +++ b/App/RobobinApp/ViewModels/MainPageViewModel.cs @@ -1,5 +1,6 @@ using System.Collections.ObjectModel; using System.ComponentModel; +using System.Diagnostics; using System.Runtime.CompilerServices; using System.Windows.Input; using Microsoft.Extensions.Logging; @@ -17,10 +18,11 @@ namespace RobobinApp.ViewModels private bool _isBusy; private string _statusMessage; + public ICommand GoToHelpPage { get; } + + + - - - public ICommand ConnectToRobobinCommand { get; } private Graph _selectedGraph; @@ -39,9 +41,11 @@ namespace RobobinApp.ViewModels public MainPageViewModel() { + GoToHelpPage = new Command(OnHelpPageAccess); ConnectToRobobinCommand = new Command(async () => await OnConnectToRobobin()); SelectGraphCommand = new Command<int>(OnSelectGraph); var graphNodes1 = new List<Node> + { new Node("A", 50, 50), new Node("B", 150, 50), @@ -161,6 +165,15 @@ namespace RobobinApp.ViewModels return polarMatrix; } + private async void OnHelpPageAccess() + { + Debug.WriteLine("Navigating to help page."); + + + var helpPageUrl = "https://butternut-pint-1dd.notion.site/RoboBin-Help-Page-1367bb78dcfd80a49052e41ba17511f1?pvs=74"; + + await Launcher.OpenAsync(new Uri(helpPageUrl)); + } public bool IsBusy { get => _isBusy; diff --git a/App/RobobinApp/Views/ConnectionPage.xaml b/App/RobobinApp/Views/ConnectionPage.xaml index b690ba31c2b7772ffc48a326b82eac57c1bfaf7c..d3856956632b807554d47643235f835052d12248 100644 --- a/App/RobobinApp/Views/ConnectionPage.xaml +++ b/App/RobobinApp/Views/ConnectionPage.xaml @@ -39,7 +39,6 @@ <Button Text="{Binding ConnectButtonText}" Command="{Binding ConnectCommand}" - IsEnabled="{Binding SelectedDevice, Converter={StaticResource NullToBooleanConverter}}" StyleClass="button-primary" HorizontalOptions="Center" /> </StackLayout> diff --git a/App/RobobinApp/Views/MainPage.xaml b/App/RobobinApp/Views/MainPage.xaml index 6dfef3e9dee53f2e3338dba0d6c1086eba548073..7f8086d59993137e0e6e24149ac410e0464f99d9 100644 --- a/App/RobobinApp/Views/MainPage.xaml +++ b/App/RobobinApp/Views/MainPage.xaml @@ -59,7 +59,7 @@ VerticalOptions="FillAndExpand" Grid.Column="2" Grid.Row="0"> <HorizontalStackLayout HorizontalOptions="Start" VerticalOptions="End"> - <Button Text="Info" /> + <Button Text="Info" Command="{Binding GoToHelpPage}"/> <Picker Title="Select Graph" ItemsSource="{Binding GraphNames}" SelectedIndexChanged="OnGraphSelected" diff --git a/App/RobobinApp/Views/MainPage_Android.xaml b/App/RobobinApp/Views/MainPage_Android.xaml index 09ba3e2d301a44fd4bbad1ded4d2a3d4293fa661..153fb312699b38fe054f7435d333555b655579a7 100644 --- a/App/RobobinApp/Views/MainPage_Android.xaml +++ b/App/RobobinApp/Views/MainPage_Android.xaml @@ -29,7 +29,7 @@ <HorizontalStackLayout HorizontalOptions="Start" VerticalOptions="End"> <Button Text="Admin" Command="{Binding ConnectToRobobinCommand}"/> <Button Text="Setup" Command="{Binding ConnectToRobobinCommand}"/> - <Button Text="Info" /> + <Button Text="Info" Command= "{Binding GoToHelpPage}"/> <Picker Title="Select Graph" ItemsSource="{Binding GraphNames}" SelectedIndexChanged="OnGraphSelected"