-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ce4531d
commit cdc5e0a
Showing
85 changed files
with
12,306 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?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" | ||
xmlns:local="clr-namespace:BRTDataTools.App" | ||
x:Class="BRTDataTools.App.App"> | ||
<Application.Resources> | ||
<ResourceDictionary> | ||
<ResourceDictionary.MergedDictionaries> | ||
<ResourceDictionary Source="Resources/Styles/Colors.xaml" /> | ||
<ResourceDictionary Source="Resources/Styles/Styles.xaml" /> | ||
<ResourceDictionary Source="Resources/Styles/AppStyles.xaml" /> | ||
</ResourceDictionary.MergedDictionaries> | ||
</ResourceDictionary> | ||
</Application.Resources> | ||
</Application> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
namespace BRTDataTools.App | ||
{ | ||
public partial class App : Application | ||
{ | ||
public App() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
protected override Window CreateWindow(IActivationState? activationState) | ||
{ | ||
return new Window(new AppShell()); | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<Shell | ||
x:Class="BRTDataTools.App.AppShell" | ||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
xmlns:sf="clr-namespace:Syncfusion.Maui.Toolkit.SegmentedControl;assembly=Syncfusion.Maui.Toolkit" | ||
xmlns:pages="clr-namespace:BRTDataTools.App.Pages" | ||
Shell.FlyoutBehavior="Flyout" | ||
Title="BRTDataTools.App"> | ||
|
||
<ShellContent | ||
Title="Dashboard" | ||
Icon="{StaticResource IconDashboard}" | ||
ContentTemplate="{DataTemplate pages:MainPage}" | ||
Route="main" /> | ||
|
||
<ShellContent | ||
Title="Projects" | ||
Icon="{StaticResource IconProjects}" | ||
ContentTemplate="{DataTemplate pages:ProjectListPage}" | ||
Route="projects" /> | ||
|
||
<ShellContent | ||
Title="Manage Meta" | ||
Icon="{StaticResource IconMeta}" | ||
ContentTemplate="{DataTemplate pages:ManageMetaPage}" | ||
Route="manage" /> | ||
|
||
<Shell.FlyoutFooter> | ||
<Grid Padding="15"> | ||
<sf:SfSegmentedControl x:Name="ThemeSegmentedControl" | ||
VerticalOptions="Center" HorizontalOptions="Center" SelectionChanged="SfSegmentedControl_SelectionChanged" | ||
SegmentWidth="40" SegmentHeight="40"> | ||
<sf:SfSegmentedControl.ItemsSource> | ||
<x:Array Type="{x:Type sf:SfSegmentItem}"> | ||
<sf:SfSegmentItem ImageSource="{StaticResource IconLight}"/> | ||
<sf:SfSegmentItem ImageSource="{StaticResource IconDark}"/> | ||
</x:Array> | ||
</sf:SfSegmentedControl.ItemsSource> | ||
</sf:SfSegmentedControl> | ||
</Grid> | ||
</Shell.FlyoutFooter> | ||
|
||
</Shell> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using CommunityToolkit.Maui.Alerts; | ||
using CommunityToolkit.Maui.Core; | ||
using Font = Microsoft.Maui.Font; | ||
|
||
namespace BRTDataTools.App | ||
{ | ||
public partial class AppShell : Shell | ||
{ | ||
public AppShell() | ||
{ | ||
InitializeComponent(); | ||
var currentTheme = Application.Current!.UserAppTheme; | ||
ThemeSegmentedControl.SelectedIndex = currentTheme == AppTheme.Light ? 0 : 1; | ||
} | ||
public static async Task DisplaySnackbarAsync(string message) | ||
{ | ||
CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(); | ||
|
||
var snackbarOptions = new SnackbarOptions | ||
{ | ||
BackgroundColor = Color.FromArgb("#FF3300"), | ||
TextColor = Colors.White, | ||
ActionButtonTextColor = Colors.Yellow, | ||
CornerRadius = new CornerRadius(0), | ||
Font = Font.SystemFontOfSize(18), | ||
ActionButtonFont = Font.SystemFontOfSize(14) | ||
}; | ||
|
||
var snackbar = Snackbar.Make(message, visualOptions: snackbarOptions); | ||
|
||
await snackbar.Show(cancellationTokenSource.Token); | ||
} | ||
|
||
public static async Task DisplayToastAsync(string message) | ||
{ | ||
// Toast is currently not working in MCT on Windows | ||
if (OperatingSystem.IsWindows()) | ||
return; | ||
|
||
var toast = Toast.Make(message, textSize: 18); | ||
|
||
var cts = new CancellationTokenSource(TimeSpan.FromSeconds(5)); | ||
await toast.Show(cts.Token); | ||
} | ||
|
||
private void SfSegmentedControl_SelectionChanged(object sender, Syncfusion.Maui.Toolkit.SegmentedControl.SelectionChangedEventArgs e) | ||
{ | ||
Application.Current!.UserAppTheme = e.NewIndex == 0 ? AppTheme.Light : AppTheme.Dark; | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks> | ||
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net9.0-windows10.0.19041.0</TargetFrameworks> | ||
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET --> | ||
<!-- <TargetFrameworks>$(TargetFrameworks);net9.0-tizen</TargetFrameworks> --> | ||
|
||
<!-- Note for MacCatalyst: | ||
The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64. | ||
When specifying both architectures, use the plural <RuntimeIdentifiers> instead of the singular <RuntimeIdentifier>. | ||
The Mac App Store will NOT accept apps with ONLY maccatalyst-arm64 indicated; | ||
either BOTH runtimes must be indicated or ONLY macatalyst-x64. --> | ||
<!-- For example: <RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers> --> | ||
|
||
<OutputType>Exe</OutputType> | ||
<RootNamespace>BRTDataTools.App</RootNamespace> | ||
<UseMaui>true</UseMaui> | ||
<SingleProject>true</SingleProject> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<!-- https://github.com/CommunityToolkit/Maui/issues/2205 --> | ||
<NoWarn>XC0103</NoWarn> | ||
<MauiEnableXamlCBindingWithSourceCompilation>true</MauiEnableXamlCBindingWithSourceCompilation> | ||
|
||
<!-- Display name --> | ||
<ApplicationTitle>BRTDataTools.App</ApplicationTitle> | ||
|
||
<!-- App Identifier --> | ||
<ApplicationId>com.companyname.brtdatatools.app</ApplicationId> | ||
|
||
<!-- Versions --> | ||
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion> | ||
<ApplicationVersion>1</ApplicationVersion> | ||
|
||
<!-- To develop, package, and publish an app to the Microsoft Store, see: https://aka.ms/MauiTemplateUnpackaged --> | ||
<WindowsPackageType>None</WindowsPackageType> | ||
|
||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion> | ||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion> | ||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion> | ||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion> | ||
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion> | ||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<!-- App Icon --> | ||
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" /> | ||
|
||
<!-- Splash Screen --> | ||
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" /> | ||
|
||
<!-- Images --> | ||
<MauiImage Include="Resources\Images\*" /> | ||
<MauiImage Update="Resources\Images\dotnet_bot.png" Resize="True" BaseSize="300,185" /> | ||
|
||
<!-- Custom Fonts --> | ||
<MauiFont Include="Resources\Fonts\*" /> | ||
|
||
<!-- Raw Assets (also remove the "Resources\Raw" prefix) --> | ||
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" /> | ||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" /> | ||
<PackageReference Include="CommunityToolkit.Maui" Version="9.1.0" /> | ||
<PackageReference Include="Microsoft.Data.Sqlite.Core" Version="8.0.8" /> | ||
<PackageReference Include="SQLitePCLRaw.bundle_green" Version="2.1.10" /> | ||
<PackageReference Include="Syncfusion.Maui.Toolkit" Version="1.0.1" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.12.35527.113 d17.12 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BRTDataTools.App", "BRTDataTools.App.csproj", "{6234D526-0A18-43AF-A895-15EDEF616353}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{6234D526-0A18-43AF-A895-15EDEF616353}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{6234D526-0A18-43AF-A895-15EDEF616353}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{6234D526-0A18-43AF-A895-15EDEF616353}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{6234D526-0A18-43AF-A895-15EDEF616353}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
Oops, something went wrong.