This repository has been archived by the owner on Dec 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
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
bae5c3f
commit ba943d3
Showing
18 changed files
with
404 additions
and
454 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
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,21 @@ | ||
// <copyright file="DrasticMauiSampleTrayWindow.cs" company="Drastic Actions"> | ||
// Copyright (c) Drastic Actions. All rights reserved. | ||
// </copyright> | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using DrasticMaui.Options; | ||
|
||
namespace DrasticMaui.Sample | ||
{ | ||
public class DrasticMauiSampleTrayWindow : DrasticTrayWindow | ||
{ | ||
public DrasticMauiSampleTrayWindow(DrasticTrayIcon icon, DrasticTrayWindowOptions? options = null) | ||
: base(icon, options) | ||
{ | ||
} | ||
} | ||
} |
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
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
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
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 |
---|---|---|
@@ -1,44 +1,42 @@ | ||
// <copyright file="MauiProgram.cs" company="Drastic Actions"> | ||
// Copyright (c) Drastic Actions. All rights reserved. | ||
// </copyright> | ||
|
||
using DrasticMaui.Controls; | ||
using DrasticMaui.Tray; | ||
using System.Reflection; | ||
|
||
namespace DrasticMaui.Sample; | ||
|
||
/// <summary> | ||
/// Maui Program. | ||
/// </summary> | ||
public static class MauiProgram | ||
{ | ||
/// <summary> | ||
/// Create Maui App. | ||
/// </summary> | ||
/// <returns>MauiApp.</returns> | ||
public static MauiApp CreateMauiApp() | ||
{ | ||
var builder = MauiApp.CreateBuilder(); | ||
builder | ||
.UseMauiApp<App>() | ||
.ConfigureFonts(fonts => | ||
{ | ||
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); | ||
}); | ||
|
||
return builder.Build(); | ||
} | ||
|
||
public static Stream? GetResourceFileContent(string fileName) | ||
{ | ||
var assembly = Assembly.GetExecutingAssembly(); | ||
var resourceName = "DrasticMaui.Sample." + fileName; | ||
if (assembly is null) | ||
{ | ||
return null; | ||
} | ||
|
||
return assembly.GetManifestResourceStream(resourceName); | ||
} | ||
} | ||
// <copyright file="MauiProgram.cs" company="Drastic Actions"> | ||
// Copyright (c) Drastic Actions. All rights reserved. | ||
// </copyright> | ||
|
||
using System.Reflection; | ||
|
||
namespace DrasticMaui.Sample; | ||
|
||
/// <summary> | ||
/// Maui Program. | ||
/// </summary> | ||
public static class MauiProgram | ||
{ | ||
/// <summary> | ||
/// Create Maui App. | ||
/// </summary> | ||
/// <returns>MauiApp.</returns> | ||
public static MauiApp CreateMauiApp() | ||
{ | ||
var builder = MauiApp.CreateBuilder(); | ||
builder | ||
.UseMauiApp<App>() | ||
.ConfigureFonts(fonts => | ||
{ | ||
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); | ||
}); | ||
|
||
return builder.Build(); | ||
} | ||
|
||
public static Stream? GetResourceFileContent(string fileName) | ||
{ | ||
var assembly = Assembly.GetExecutingAssembly(); | ||
var resourceName = "DrasticMaui.Sample." + fileName; | ||
if (assembly is null) | ||
{ | ||
return null; | ||
} | ||
|
||
return assembly.GetManifestResourceStream(resourceName); | ||
} | ||
} |
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
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
Oops, something went wrong.