|
|
@ -11,13 +11,16 @@ using UserInterface.ViewModels;
|
|
|
|
using System.Security;
|
|
|
|
using System.Security;
|
|
|
|
using hass_workstation_service.Communication.InterProcesCommunication.Models;
|
|
|
|
using hass_workstation_service.Communication.InterProcesCommunication.Models;
|
|
|
|
using UserInterface.Util;
|
|
|
|
using UserInterface.Util;
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
using System.Diagnostics;
|
|
|
|
|
|
|
|
|
|
|
|
namespace UserInterface.Views
|
|
|
|
namespace UserInterface.Views
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public class AppInfo : UserControl
|
|
|
|
public class AppInfo : UserControl
|
|
|
|
{
|
|
|
|
{
|
|
|
|
private readonly IIpcClient<IServiceContractInterfaces> client;
|
|
|
|
private readonly IIpcClient<IServiceContractInterfaces> client;
|
|
|
|
|
|
|
|
private readonly string _basePath;
|
|
|
|
public AppInfo()
|
|
|
|
public AppInfo()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.InitializeComponent();
|
|
|
|
this.InitializeComponent();
|
|
|
@ -32,7 +35,7 @@ namespace UserInterface.Views
|
|
|
|
|
|
|
|
|
|
|
|
// create client
|
|
|
|
// create client
|
|
|
|
this.client = clientFactory.CreateClient("info");
|
|
|
|
this.client = clientFactory.CreateClient("info");
|
|
|
|
|
|
|
|
this._basePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Hass Workstation Service");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -63,6 +66,17 @@ namespace UserInterface.Views
|
|
|
|
BrowserUtil.OpenBrowser("https://discord.gg/VraYT2N3wd");
|
|
|
|
BrowserUtil.OpenBrowser("https://discord.gg/VraYT2N3wd");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void OpenLogDirectory(object sender, RoutedEventArgs args)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
string path = Path.Combine(this._basePath, "logs");
|
|
|
|
|
|
|
|
Process.Start("explorer.exe", path);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void OpenConfigDirectory(object sender, RoutedEventArgs args)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Process.Start("explorer.exe", this._basePath);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void InitializeComponent()
|
|
|
|
private void InitializeComponent()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AvaloniaXamlLoader.Load(this);
|
|
|
|
AvaloniaXamlLoader.Load(this);
|
|
|
|