샘플 SDK 최초 Commit
This commit is contained in:
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