Skip to content

Commit 7692f2f

Browse files
committed
Update version and apply some behaviors to some buttons
1 parent bc93aed commit 7692f2f

5 files changed

Lines changed: 40 additions & 8 deletions

File tree

OS.Communication/Platforms/Android/Communication/MAUI_SerialDevice.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public bool Open(string commChannel)
100100
{
101101
if (this.CurrentDevice == null)
102102
{
103-
if (String.IsNullOrEmpty(this.DeviceName)) FireErrorEvent("Device not setup");
103+
if (String.IsNullOrEmpty(this.DeviceName)) FireErrorEvent("*** Device not setup ***");
104104
else FireErrorEvent("Device is not connected");
105105
return false;
106106
}

SimpleOBDII/SimpleOBDII.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
<PropertyGroup>
3333
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.22621.0</TargetFrameworks>
3434
<DefaultLanguage>EN</DefaultLanguage>
35-
<AssemblyVersion>1.0.1.0</AssemblyVersion>
36-
<FileVersion>1.0.1.0</FileVersion>
35+
<AssemblyVersion>1.0.1.1</AssemblyVersion>
36+
<FileVersion>1.0.1.1</FileVersion>
3737
</PropertyGroup>
3838

3939

SimpleOBDII/Templates/Templates.xaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,15 @@
8686

8787
</ControlTemplate>
8888

89+
90+
91+
92+
93+
94+
95+
96+
97+
8998
<!-- Selected Device Info -->
9099
<ControlTemplate x:Key="selected-device-info">
91100
<Grid ColumnSpacing="5" RowSpacing="3" Margin="0" Padding="0" HorizontalOptions="CenterAndExpand">

SimpleOBDII/Views/HomePage.xaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717

1818
<!--- Menu 1 -->
1919
<ControlTemplate x:Key="View1">
20-
<StackLayout>
20+
<StackLayout >
2121
<Label FontSize="20">Menu 1</Label>
2222
<Label>Create a custom menu here - maybe</Label>
23-
<Button Margin="5,10" Command="{TemplateBinding BindingContext.View1Command}" Text="Command Button 1" TextColor="{StaticResource LightTextColor}"></Button>
23+
<Button x:Name="View1" Margin="5,10" Command="{TemplateBinding BindingContext.View1Command}" Text="Command Button 1" TextColor="{StaticResource LightTextColor}"></Button>
2424
</StackLayout>
2525
</ControlTemplate>
2626

@@ -29,7 +29,7 @@
2929
<StackLayout>
3030
<Label FontSize="20">Menu 2</Label>
3131
<Label>Some Other Menu thing going on here</Label>
32-
<Button Margin="5,10" Command="{TemplateBinding BindingContext.View2Command}" Text="Command Button 2" TextColor="{StaticResource LightTextColor}"></Button>
32+
<Button x:Name="View2" Margin="5,10" Command="{TemplateBinding BindingContext.View2Command}" Text="Command Button 2" TextColor="{StaticResource LightTextColor}"></Button>
3333
</StackLayout>
3434
</ControlTemplate>
3535

@@ -76,7 +76,7 @@
7676
<Color x:Key="DarkRadioButtonColor">#9B9A99</Color>
7777

7878
<ControlTemplate x:Key="RadioButtonTemplate1">
79-
<Border Stroke="#F3F2F1"
79+
<Border Stroke="#F3F2F1" x:Name="RadioButtonTemplate1"
8080
StrokeThickness="0"
8181
StrokeShape="RoundRectangle 10"
8282
BackgroundColor="#00F3F2F1"
@@ -117,7 +117,7 @@
117117
</ControlTemplate>
118118

119119
<ControlTemplate x:Key="RadioButtonTemplate2">
120-
<Border Stroke="#F3F2F1"
120+
<Border Stroke="#F3F2F1" x:Name="RadioButtonTemplate2"
121121
StrokeThickness="0"
122122
StrokeShape="RoundRectangle 10"
123123
BackgroundColor="#00F3F2F1"

SimpleOBDII/Views/HomePage.xaml.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,29 @@ private void OnManufacturersLoaded(object sender, EventArgs e)
6666
this.manufacturersManager.ManufacturersLoaded -= OnManufacturersLoaded;
6767
}
6868

69+
protected override void OnHandlerChanged()
70+
{
71+
base.OnHandlerChanged();
72+
#if WINDOWS
73+
/*
74+
Because this is the first, default page to be shown, the controls must be instantiated
75+
before they can be assigned CursorIcon.Hand behavor - so it's
76+
*/
77+
DTCs.SetCustomCursor(CursorIcon.Hand, DTCs.Handler?.MauiContext);
78+
UserPids.SetCustomCursor(CursorIcon.Hand, UserPids.Handler?.MauiContext);
79+
Settings.SetCustomCursor(CursorIcon.Hand, Settings.Handler?.MauiContext);
80+
81+
#endif
82+
83+
84+
}
85+
86+
protected override void OnApplyTemplate()
87+
{
88+
base.OnApplyTemplate();
89+
90+
}
91+
6992
private void ContentView_ChildRemoved(object sender, ElementEventArgs e)
7093
{
7194
(e.Element as IDisposable)?.Dispose();

0 commit comments

Comments
 (0)