mirror of
https://github.com/tuxdotrs/highminded.git
synced 2025-08-23 08:01:03 +05:30
25 lines
743 B
C#
25 lines
743 B
C#
using Avalonia.Controls;
|
|
using Avalonia.Interactivity;
|
|
using highminded.utils;
|
|
|
|
namespace highminded.ui.controls;
|
|
|
|
public partial class SettingsUserControl : UserControl
|
|
{
|
|
public SettingsUserControl()
|
|
{
|
|
InitializeComponent();
|
|
|
|
ModelTextBox.Text = InMemoryDb.Obj.SettingsManager.Settings.Model;
|
|
ApiUrlTextBox.Text = InMemoryDb.Obj.SettingsManager.Settings.ApiURL;
|
|
ApiKeyTextBox.Text = InMemoryDb.Obj.SettingsManager.Settings.ApiKey;
|
|
}
|
|
|
|
private void SaveSettingsBtn_OnClick(object? sender, RoutedEventArgs e)
|
|
{
|
|
InMemoryDb.Obj.SaveSettings(new AppSettings()
|
|
{
|
|
ApiKey = ApiKeyTextBox.Text, ApiURL = ApiUrlTextBox.Text, Model = ModelTextBox.Text
|
|
});
|
|
}
|
|
} |