Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
czhcom committed Sep 5, 2022
0 parents commit ac1ee4f
Show file tree
Hide file tree
Showing 123 changed files with 8,317 additions and 0 deletions.
406 changes: 406 additions & 0 deletions .gitignore

Large diffs are not rendered by default.

55 changes: 55 additions & 0 deletions Dory.Rigger.MAUI.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.3.32811.315
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dory.Rigger.Maui", "DoryRiggerMaui\Dory.Rigger.Maui.csproj", "{6756DF48-C545-4DF0-838C-2C4662C47856}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SharedUI", "SharedUI\SharedUI.csproj", "{C8D2F7C3-BA44-4619-95B5-44514E3A2C2C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2A734484-F6D2-4559-BAAC-7C2E6B363AD4}"
ProjectSection(SolutionItems) = preProject
ReadMe.txt = ReadMe.txt
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SharedServices", "SharedServices\SharedServices.csproj", "{1A27EFB4-66C4-4090-ADBA-55B44662DD4F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dory.Rigger.Wasm", "DoryRiggerWasm\Dory.Rigger.Wasm.csproj", "{1935892D-B591-4890-842D-1490CBA853E1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dory.Rigger.Server", "DoryRiggerServer\Dory.Rigger.Server.csproj", "{A1E23278-26CD-42F6-A610-376C7B27FEA7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6756DF48-C545-4DF0-838C-2C4662C47856}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6756DF48-C545-4DF0-838C-2C4662C47856}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6756DF48-C545-4DF0-838C-2C4662C47856}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{6756DF48-C545-4DF0-838C-2C4662C47856}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6756DF48-C545-4DF0-838C-2C4662C47856}.Release|Any CPU.Build.0 = Release|Any CPU
{C8D2F7C3-BA44-4619-95B5-44514E3A2C2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C8D2F7C3-BA44-4619-95B5-44514E3A2C2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C8D2F7C3-BA44-4619-95B5-44514E3A2C2C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C8D2F7C3-BA44-4619-95B5-44514E3A2C2C}.Release|Any CPU.Build.0 = Release|Any CPU
{1A27EFB4-66C4-4090-ADBA-55B44662DD4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1A27EFB4-66C4-4090-ADBA-55B44662DD4F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1A27EFB4-66C4-4090-ADBA-55B44662DD4F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1A27EFB4-66C4-4090-ADBA-55B44662DD4F}.Release|Any CPU.Build.0 = Release|Any CPU
{1935892D-B591-4890-842D-1490CBA853E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1935892D-B591-4890-842D-1490CBA853E1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1935892D-B591-4890-842D-1490CBA853E1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1935892D-B591-4890-842D-1490CBA853E1}.Release|Any CPU.Build.0 = Release|Any CPU
{A1E23278-26CD-42F6-A610-376C7B27FEA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A1E23278-26CD-42F6-A610-376C7B27FEA7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A1E23278-26CD-42F6-A610-376C7B27FEA7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A1E23278-26CD-42F6-A610-376C7B27FEA7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {24AE643F-3477-4AF6-898C-EE7BDB4C8964}
EndGlobalSection
EndGlobal
37 changes: 37 additions & 0 deletions DoryRiggerMaui/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?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:DoryRiggerMaui"
x:Class="DoryRiggerMaui.App">
<Application.Resources>
<ResourceDictionary>

<Color x:Key="PageBackgroundColor">#512bdf</Color>
<Color x:Key="PrimaryTextColor">White</Color>

<Style TargetType="Label">
<Setter Property="TextColor" Value="{DynamicResource PrimaryTextColor}" />
<Setter Property="FontFamily" Value="OpenSansRegular" />
</Style>

<Style TargetType="Button">
<Setter Property="TextColor" Value="{DynamicResource PrimaryTextColor}" />
<Setter Property="FontFamily" Value="OpenSansRegular" />
<Setter Property="BackgroundColor" Value="#2b0b98" />
<Setter Property="Padding" Value="14,10" />
</Style>


<Color x:Key="PrimaryColor">#512bdf</Color>
<Color x:Key="SecondaryColor">White</Color>

<Style TargetType="NavigationPage">
<Setter Property="BarBackgroundColor"
Value="#512bdf"></Setter>
<Setter Property="BarTextColor"
Value="{DynamicResource SecondaryColor}" />
</Style>

</ResourceDictionary>
</Application.Resources>
</Application>
21 changes: 21 additions & 0 deletions DoryRiggerMaui/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using Microsoft.Maui.Controls.PlatformConfiguration;

namespace DoryRiggerMaui;

public partial class App : Application
{
public App()
{
InitializeComponent();
MainPage = new MainPage();
}

protected override Window CreateWindow(IActivationState? activationState)
{
var window = base.CreateWindow(activationState);
window.Title = "";
return window;
}

}

78 changes: 78 additions & 0 deletions DoryRiggerMaui/Dory.Rigger.Maui.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.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);net6.0-tizen</TargetFrameworks> -->
<OutputType>Exe</OutputType>
<RootNamespace>DoryRiggerMaui</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<EnableDefaultCssItems>false</EnableDefaultCssItems>

<!-- Display name -->
<ApplicationTitle>DoryRiggerMaui</ApplicationTitle>

<!-- App Identifier -->
<ApplicationId>com.companyname.DoryRiggerMaui</ApplicationId>
<ApplicationIdGuid>9F98D96D-6262-45F4-A8B9-36B2ACA67DC4</ApplicationIdGuid>

<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">24.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 Include="Resources\Images\lb_logo.svg" />
<MauiFont Include="Resources\Fonts\*" />-->

<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>

<ItemGroup>
<Compile Remove="Platforms\Windows\App - 复制.xaml.cs" />
</ItemGroup>

<!-- <ItemGroup>
<PackageReference Include="MudBlazor" Version="6.0.14" />
</ItemGroup>
<ItemGroup>
<Content Include="Pages\About.razor">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
</Content>
<Content Include="Pages\Blogs.razor">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
</Content>
<Content Include="Pages\Contact.razor">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
</Content>
<Content Include="Pages\LogIn.razor">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
</Content>
<Content Include="Pages\Products.razor">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
</Content>
</ItemGroup>-->
<ItemGroup>
<ProjectReference Include="..\SharedUI\SharedUI.csproj" />
</ItemGroup>
</Project>
13 changes: 13 additions & 0 deletions DoryRiggerMaui/Main.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Router AppAssembly="@typeof(Main).Assembly">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
</Found>
<NotFound>
<LayoutView Layout="@typeof(MainLayout)">
<br />
<p role="alert">Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
</Router>

15 changes: 15 additions & 0 deletions DoryRiggerMaui/MainPage.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:DoryRiggerMaui"
x:Class="DoryRiggerMaui.MainPage"
BackgroundColor="{DynamicResource PageBackgroundColor}">


<BlazorWebView HostPage="wwwroot/index.html">
<BlazorWebView.RootComponents>
<RootComponent Selector="#app" ComponentType="{x:Type local:Main}" />
</BlazorWebView.RootComponents>
</BlazorWebView>

</ContentPage>
12 changes: 12 additions & 0 deletions DoryRiggerMaui/MainPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace DoryRiggerMaui;

public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();


}
}

114 changes: 114 additions & 0 deletions DoryRiggerMaui/MauiProgram.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
using Microsoft.AspNetCore.Components.WebView.Maui;
using Microsoft.Maui.LifecycleEvents;
using MudBlazor.Services;

using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.Compatibility;
using Microsoft.Maui.Controls.Xaml;

#if WINDOWS
using Microsoft.UI;
using Microsoft.UI.Windowing;
using Windows.Graphics;
#endif


namespace DoryRiggerMaui;

public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();

builder
.UseMauiApp<App>()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
});

builder.Services.AddMauiBlazorWebView();

builder.Services.AddMudServices();

#if DEBUG
builder.Services.AddBlazorWebViewDeveloperTools();
#endif


//builder.ConfigureLifecycleEvents(lifecycle =>
//{


//#if WINDOWS
// lifecycle
// .AddWindows (windows => {
// _ = windows.OnWindowCreated ((w) =>
// {
// w.ExtendsContentIntoTitleBar = true;

// var window = w as Microsoft.Maui.MauiWinUIWindow;
// if (window is null)
// return;
// });

// });
//#endif


//#if WINDOWS
// //lifecycle
// // .AddWindows(windows =>
// // windows.OnNativeMessage((app, args) => {
// // if (WindowExtensions.Hwnd == IntPtr.Zero)
// // {
// // WindowExtensions.Hwnd = args.Hwnd;
// // WindowExtensions.SetIcon("Platforms/Windows/trayicon.ico");
// // }
// // }));

// lifecycle.AddWindows(windows => windows.OnWindowCreated((del) => {
// del.ExtendsContentIntoTitleBar = true;
// }));
//#endif

// });



#if WINDOWS
builder.ConfigureLifecycleEvents(events =>
{
events.AddWindows(wndLifeCycleBuilder =>
{
wndLifeCycleBuilder.OnWindowCreated(window =>
{
IntPtr nativeWindowHandle = WinRT.Interop.WindowNative.GetWindowHandle(window);
WindowId win32WindowsId = Win32Interop.GetWindowIdFromWindow(nativeWindowHandle);
AppWindow winuiAppWindow = AppWindow.GetFromWindowId(win32WindowsId);
if(winuiAppWindow.Presenter is OverlappedPresenter p)
{
//p.Maximize();
//p.IsAlwaysOnTop=true;
//初始最小化
p.Minimize();
p.IsResizable=false;
p.IsMaximizable = false;
p.IsMinimizable=false;
}
else
{
const int width = 1024;
const int height = 768;
winuiAppWindow.MoveAndResize(new RectInt32(1024 / 2 - width / 2, 768 / 2 - height / 2, width, height));
}
});
});
});
#endif

return builder.Build();
}
}

8 changes: 8 additions & 0 deletions DoryRiggerMaui/Pages/Index.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@page "/"

<_Index />

@code {

}

7 changes: 7 additions & 0 deletions DoryRiggerMaui/Pages/LogIn.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@page "/LogIn"

<_LogIn />

@code {

}
7 changes: 7 additions & 0 deletions DoryRiggerMaui/Pages/Template.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@page "/Template"

<_Template />

@code {

}
6 changes: 6 additions & 0 deletions DoryRiggerMaui/Platforms/Android/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application android:allowBackup="true" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" android:supportsRtl="true"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
11 changes: 11 additions & 0 deletions DoryRiggerMaui/Platforms/Android/MainActivity.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Android.App;
using Android.Content.PM;
using Android.OS;

namespace DoryRiggerMaui;

[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
public class MainActivity : MauiAppCompatActivity
{
}

Loading

0 comments on commit ac1ee4f

Please sign in to comment.