샘플 SDK 최초 Commit

This commit is contained in:
AI-team\cyhan
2025-07-07 16:06:18 +09:00
commit be3d38d066
23 changed files with 2248 additions and 0 deletions

View 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>

View 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
{
}

View 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>

View 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)
)]

View 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>

View 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");
}
}