mirror of
https://github.com/jwetzell/qController.git
synced 2026-09-10 00:29:50 +00:00
update to .NET 10 and fix label colors
This commit is contained in:
+2
-2
@@ -1,6 +1,6 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.12.35707.178
|
||||
# Visual Studio Version 18
|
||||
VisualStudioVersion = 18.9.12120.119 stable
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "qController", "qController\qController.csproj", "{63B39EEA-36D4-4B2C-8FFD-FB0E12FD8B14}"
|
||||
EndProject
|
||||
|
||||
@@ -19,18 +19,8 @@ namespace qController
|
||||
if (qCommand.osc.Contains("go"))
|
||||
{
|
||||
BackgroundColor = Colors.SeaGreen;
|
||||
// TODO Xamarin.Forms.Device.RuntimePlatform is no longer supported. Use Microsoft.Maui.Devices.DeviceInfo.Platform instead. For more details see https://learn.microsoft.com/en-us/dotnet/maui/migration/forms-projects#device-changes
|
||||
switch (Device.RuntimePlatform)
|
||||
{
|
||||
case Device.iOS:
|
||||
FontSize = App.HeightUnit * 4;
|
||||
FontAttributes = FontAttributes.Bold;
|
||||
break;
|
||||
case Device.Android:
|
||||
FontSize = App.HeightUnit * 4;
|
||||
FontAttributes = FontAttributes.Bold;
|
||||
break;
|
||||
}
|
||||
FontSize = App.HeightUnit * 4;
|
||||
FontAttributes = FontAttributes.Bold;
|
||||
}
|
||||
else if (qCommand.osc.Contains("panic"))
|
||||
{
|
||||
|
||||
@@ -10,16 +10,7 @@ namespace qController.Cell
|
||||
public ObservableCollection<OSCListItem> items;
|
||||
public QCueListCell(QCueList qCueList)
|
||||
{
|
||||
// TODO Xamarin.Forms.Device.RuntimePlatform is no longer supported. Use Microsoft.Maui.Devices.DeviceInfo.Platform instead. For more details see https://learn.microsoft.com/en-us/dotnet/maui/migration/forms-projects#device-changes
|
||||
switch (Device.RuntimePlatform)
|
||||
{
|
||||
case Device.iOS:
|
||||
Margin = new Thickness(10, 30, 10, 10);
|
||||
break;
|
||||
case Device.Android:
|
||||
Margin = new Thickness(10, 10, 10, 10);
|
||||
break;
|
||||
}
|
||||
Margin = new Thickness(10, 10, 10, 10);
|
||||
Padding = new Thickness(10);
|
||||
items = new ObservableCollection<OSCListItem>();
|
||||
|
||||
@@ -41,22 +32,15 @@ namespace qController.Cell
|
||||
icon.HorizontalTextAlignment = TextAlignment.Center;
|
||||
icon.VerticalTextAlignment = TextAlignment.Center;
|
||||
icon.FontSize = App.HeightUnit * 3;
|
||||
icon.TextColor = Colors.Black;
|
||||
var label = new Label { VerticalOptions = LayoutOptions.FillAndExpand };
|
||||
label.SetBinding(Label.TextProperty, "Text");
|
||||
if (label.Text == "Disconnect")
|
||||
{
|
||||
label.TextColor = Colors.DarkRed;
|
||||
}
|
||||
// TODO Xamarin.Forms.Device.RuntimePlatform is no longer supported. Use Microsoft.Maui.Devices.DeviceInfo.Platform instead. For more details see https://learn.microsoft.com/en-us/dotnet/maui/migration/forms-projects#device-changes
|
||||
switch (Device.RuntimePlatform)
|
||||
{
|
||||
case Device.iOS:
|
||||
label.FontSize = App.HeightUnit * 3;
|
||||
break;
|
||||
case Device.Android:
|
||||
label.FontSize = App.HeightUnit * 2.2;
|
||||
break;
|
||||
}
|
||||
label.FontSize = App.HeightUnit * 2.2;
|
||||
label.TextColor = Colors.Black;
|
||||
grid.Add(icon);
|
||||
grid.Add(label, 1, 0);
|
||||
return new ViewCell { View = grid };
|
||||
@@ -68,7 +52,7 @@ namespace qController.Cell
|
||||
{
|
||||
BackgroundColor = Colors.Gray,
|
||||
Text = "Close",
|
||||
TextColor = Colors.White
|
||||
TextColor = Colors.Black
|
||||
};
|
||||
|
||||
layout.Children.Add(closeButton);
|
||||
|
||||
@@ -75,11 +75,13 @@ namespace qController.Cell
|
||||
nameLabel.FontAttributes = FontAttributes.Bold;
|
||||
nameLabel.FontSize = App.HeightUnit * 3;
|
||||
nameLabel.Margin = new Thickness(0, 20, 0, 0);
|
||||
nameLabel.TextColor = Colors.Black;
|
||||
|
||||
addressLabel.HorizontalTextAlignment = TextAlignment.Center;
|
||||
addressLabel.VerticalTextAlignment = TextAlignment.Start;
|
||||
addressLabel.FontSize = App.HeightUnit * 2.5;
|
||||
addressLabel.Margin = new Thickness(0, 0, 0, 20);
|
||||
addressLabel.TextColor = Colors.Black;
|
||||
|
||||
connectLabel.HorizontalOptions = LayoutOptions.StartAndExpand;
|
||||
connectLabel.VerticalOptions = LayoutOptions.CenterAndExpand;
|
||||
|
||||
@@ -89,7 +89,8 @@ namespace qController.Cell
|
||||
number = new Label {
|
||||
Text = "",
|
||||
FontAttributes = FontAttributes.Bold,
|
||||
FontSize = App.HeightUnit * 5
|
||||
FontSize = App.HeightUnit * 5,
|
||||
TextColor = Colors.Black,
|
||||
};
|
||||
|
||||
name = new Label {
|
||||
@@ -97,7 +98,8 @@ namespace qController.Cell
|
||||
FontAttributes = FontAttributes.Bold,
|
||||
HorizontalTextAlignment = TextAlignment.Center,
|
||||
FontSize = App.HeightUnit * 3.5,
|
||||
Margin = new Thickness(0)
|
||||
Margin = new Thickness(0),
|
||||
TextColor = Colors.Black,
|
||||
};
|
||||
|
||||
type = new Label {
|
||||
@@ -105,7 +107,8 @@ namespace qController.Cell
|
||||
FontFamily = App.QFont,
|
||||
VerticalTextAlignment = TextAlignment.Center,
|
||||
HorizontalTextAlignment = TextAlignment.End,
|
||||
FontSize = App.HeightUnit * 5
|
||||
FontSize = App.HeightUnit * 5,
|
||||
TextColor = Colors.Black,
|
||||
};
|
||||
|
||||
notes = new Label {
|
||||
@@ -113,7 +116,8 @@ namespace qController.Cell
|
||||
HorizontalTextAlignment = TextAlignment.Center,
|
||||
Margin = new Thickness(0,0,0,10),
|
||||
VerticalOptions = LayoutOptions.FillAndExpand,
|
||||
HorizontalOptions = LayoutOptions.FillAndExpand
|
||||
HorizontalOptions = LayoutOptions.FillAndExpand,
|
||||
TextColor = Colors.Black,
|
||||
};
|
||||
|
||||
//BACKGROUND COLORS FOR TESTING ONLY
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="qController.App">
|
||||
<Application.Resources>
|
||||
<!-- Application resource dictionary -->
|
||||
<OnPlatform x:Key="qfont" x:TypeArguments="x:String">
|
||||
<On Platform="Android" Value="qfont.ttf#qfont" />
|
||||
<On Platform="iOS" Value="qfont" />
|
||||
</OnPlatform>
|
||||
</Application.Resources>
|
||||
|
||||
</Application>
|
||||
|
||||
@@ -39,19 +39,9 @@ namespace qController
|
||||
Height = mainDisplayInfo.Height / mainDisplayInfo.Density;
|
||||
Width = mainDisplayInfo.Width / mainDisplayInfo.Density;
|
||||
HeightUnit = Height / 100.0;
|
||||
WidthUnit = Width / 100.0;
|
||||
// TODO Xamarin.Forms.Device.RuntimePlatform is no longer supported. Use Microsoft.Maui.Devices.DeviceInfo.Platform instead. For more details see https://learn.microsoft.com/en-us/dotnet/maui/migration/forms-projects#device-changes
|
||||
switch (Device.RuntimePlatform)
|
||||
{
|
||||
case Device.iOS:
|
||||
QFont = "qfont";
|
||||
break;
|
||||
case Device.Android:
|
||||
QFont = "qfont.ttf#qfont";
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
WidthUnit = Width / 100.0;
|
||||
|
||||
QFont = "qfont";
|
||||
rootPage = new RootPage();
|
||||
rootPage.Detail = new NavigationPage(new QConnectionPage());
|
||||
MainPage = rootPage;
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="4*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label x:Name="menuButton" FontFamily = "{StaticResource qfont}" HorizontalOptions = "Start" VerticalOptions="End" Margin="20,10,20,10" Grid.Row="0" Grid.Column="0" FontSize="25" Text=""/>
|
||||
<Label x:Name="instanceName" HorizontalTextAlignment="End" HorizontalOptions = "FillAndExpand" VerticalOptions="End" Margin="20,10,20,10" Grid.Row="0" Grid.Column="1"/>
|
||||
<Label x:Name="menuButton" FontFamily = "qfont" HorizontalOptions = "Start" VerticalOptions="End" Margin="20,10,20,10" Grid.Row="0" Grid.Column="0" FontSize="25" Text="" TextColor="Black"/>
|
||||
<Label x:Name="instanceName" HorizontalTextAlignment="End" HorizontalOptions = "FillAndExpand" VerticalOptions="End" Margin="20,10,20,10" Grid.Row="0" Grid.Column="1" TextColor="Black"/>
|
||||
</Grid>
|
||||
<AbsoluteLayout x:Name="sLayout" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"></AbsoluteLayout>
|
||||
</StackLayout>
|
||||
|
||||
@@ -24,6 +24,8 @@ namespace qController
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
SafeAreaEdges = SafeAreaEdges.All;
|
||||
|
||||
qController = new QController(address, 53000);
|
||||
qController.qClient.qParser.WorkspaceInfoReceived += WorkspaceInfoReceived;
|
||||
qController.qClient.qParser.WorkspaceUpdated += WorkspaceUpdated;
|
||||
|
||||
@@ -11,9 +11,9 @@ namespace qController
|
||||
public ObservableCollection<MenuPageItem> items { get; } = new ObservableCollection<MenuPageItem>();
|
||||
public MenuPage()
|
||||
{
|
||||
On<iOS>().SetUseSafeArea(true);
|
||||
Title = "Menu";
|
||||
InitializeComponent();
|
||||
SafeAreaEdges = SafeAreaEdges.All;
|
||||
|
||||
ChangeToHome();
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label x:Name="menuButton" FontFamily = "{StaticResource qfont}" HorizontalOptions = "Start" VerticalOptions="End" Margin="20,10,20,10" Grid.Row="0" Grid.Column="0" FontSize="25" Text=""/>
|
||||
<Label x:Name="menuButton" FontFamily = "qfont" HorizontalOptions = "Start" VerticalOptions="End" Margin="20,10,20,10" Grid.Row="0" Grid.Column="0" FontSize="25" Text="" TextColor="Black"/>
|
||||
</Grid>
|
||||
<ListView x:Name="listView" HasUnevenRows="true" BackgroundColor="#4A4A4A" SeparatorVisibility="None"></ListView>
|
||||
</StackLayout>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="40" android:versionName="1.7.2" package="com.jwetzell.qlabcontroller" android:installLocation="auto">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="41" android:versionName="1.8.0" package="com.jwetzell.qlabcontroller" android:installLocation="auto">
|
||||
<application android:allowBackup="true" android:icon="@mipmap/appicon" android:supportsRtl="true" android:label="qControl"></application>
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
|
||||
@@ -14,6 +14,7 @@ namespace qController
|
||||
{
|
||||
base.OnCreate(savedInstanceState);
|
||||
Acr.UserDialogs.UserDialogs.Init(this);
|
||||
RequestedOrientation = ScreenOrientation.Portrait;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net9.0-android35.0</TargetFrameworks>
|
||||
<TargetFrameworks>net10.0-android36.0</TargetFrameworks>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>qController</RootNamespace>
|
||||
<UseMaui>true</UseMaui>
|
||||
@@ -28,9 +28,23 @@
|
||||
<AndroidEnableMultiDex>False</AndroidEnableMultiDex>
|
||||
<EmbedAssembliesIntoApk>False</EmbedAssembliesIntoApk>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net9.0-android35.0|AnyCPU'">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net9.0-android36.0|AnyCPU'">
|
||||
<AndroidPackageFormat>apk</AndroidPackageFormat>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net10.0-android36.0|AnyCPU'">
|
||||
<Optimize>False</Optimize>
|
||||
<AndroidKeyStore>False</AndroidKeyStore>
|
||||
<RunAOTCompilation>True</RunAOTCompilation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net10.0-android36.0|AnyCPU'">
|
||||
<AndroidPackageFormat>apk</AndroidPackageFormat>
|
||||
<AndroidUseAapt2>False</AndroidUseAapt2>
|
||||
<AndroidCreatePackagePerAbi>False</AndroidCreatePackagePerAbi>
|
||||
<AndroidKeyStore>False</AndroidKeyStore>
|
||||
<PublishTrimmed>True</PublishTrimmed>
|
||||
<RunAOTCompilation>True</RunAOTCompilation>
|
||||
<Optimize>True</Optimize>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<!-- App Icon -->
|
||||
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" ForegroundScale="0.65" />
|
||||
|
||||
Reference in New Issue
Block a user