샘플 SDK 최초 Commit
This commit is contained in:
9
test/Aptabase.WPF.Test/App.xaml
Normal file
9
test/Aptabase.WPF.Test/App.xaml
Normal file
@@ -0,0 +1,9 @@
|
||||
<Application x:Class="Aptabase.WPF.Test.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:Aptabase.WPF.Test"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
13
test/Aptabase.WPF.Test/App.xaml.cs
Normal file
13
test/Aptabase.WPF.Test/App.xaml.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Windows;
|
||||
|
||||
namespace Aptabase.WPF.Test;
|
||||
|
||||
/// <summary>
|
||||
/// Interaction logic for App.xaml
|
||||
/// </summary>
|
||||
public partial class App : Application
|
||||
{
|
||||
}
|
||||
|
||||
20
test/Aptabase.WPF.Test/Aptabase.WPF.Test.csproj
Normal file
20
test/Aptabase.WPF.Test/Aptabase.WPF.Test.csproj
Normal file
@@ -0,0 +1,20 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\Aptabase.WPF.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.6" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net9.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<UseWPF>true</UseWPF>
|
||||
<Version>1.0.1</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
10
test/Aptabase.WPF.Test/AssemblyInfo.cs
Normal file
10
test/Aptabase.WPF.Test/AssemblyInfo.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using System.Windows;
|
||||
|
||||
[assembly:ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
||||
//(used if a resource is not found in the page,
|
||||
// or application resource dictionaries)
|
||||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
||||
//(used if a resource is not found in the page,
|
||||
// app, or any theme specific resource dictionaries)
|
||||
)]
|
||||
14
test/Aptabase.WPF.Test/MainWindow.xaml
Normal file
14
test/Aptabase.WPF.Test/MainWindow.xaml
Normal file
@@ -0,0 +1,14 @@
|
||||
<Window x:Class="Aptabase.WPF.Test.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:Aptabase.WPF.Test"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="450" Width="800">
|
||||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<Button Content="test_event" Margin="5" Click="TestEvent_Click"/>
|
||||
<Button Content="SuperApp/menu1" Margin="5" Click="Menu1_Click"/>
|
||||
<Button Content="SuperApp/menu2" Margin="5" Click="Menu2_Click"/>
|
||||
</StackPanel>
|
||||
</Window>
|
||||
37
test/Aptabase.WPF.Test/MainWindow.xaml.cs
Normal file
37
test/Aptabase.WPF.Test/MainWindow.xaml.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using System.Windows;
|
||||
using Microsoft.Extensions.Logging.Abstractions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Aptabase.WPF.Test;
|
||||
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
private static readonly AptabaseClient _aptabase = new("A-SH-0265005374", new AptabaseOptions
|
||||
{
|
||||
Host = "https://aptabase.hmac.kr",
|
||||
IsDebugMode = true
|
||||
}, NullLogger.Instance);
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private async void TestEvent_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
await _aptabase.TrackEvent("test_event");
|
||||
}
|
||||
|
||||
private async void Menu1_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
await _aptabase.TrackEvent("SuperApp/menu1");
|
||||
}
|
||||
|
||||
private async void Menu2_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
await _aptabase.TrackEvent("SuperApp/menu2");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user