-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor code and prepare using Viewmodels
- Loading branch information
Showing
9 changed files
with
72 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
xpathrunnerui/xpathrunnerui/ViewModels/MainWindowViewModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using CommunityToolkit.Mvvm.ComponentModel; | ||
|
||
namespace xpathrunnerui.ViewModels; | ||
|
||
public class MainWindowViewModel : ObservableObject | ||
{ | ||
private bool _isBusy; | ||
|
||
public bool IsBusy | ||
{ | ||
get => _isBusy; | ||
set | ||
{ | ||
if (_isBusy != value) | ||
{ | ||
SetProperty(ref _isBusy, value); | ||
} | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<Window xmlns="https://github.com/avaloniaui" | ||
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:xpathrunnerui" | ||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" | ||
x:Class="xpathrunnerui.MainWindow" | ||
Title="XPATH Runner" | ||
Icon="/Assets/html_tag.png" | ||
WindowStartupLocation="CenterScreen"> | ||
<local:MainView/> | ||
</Window> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using Avalonia; | ||
using Avalonia.Controls; | ||
using Avalonia.Controls.ApplicationLifetimes; | ||
using Avalonia.Interactivity; | ||
using Avalonia.Platform.Storage; | ||
using HtmlAgilityPack; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Threading.Tasks; | ||
|
||
namespace xpathrunnerui | ||
{ | ||
public partial class MainWindow : Window | ||
{ | ||
private string? _filepath; | ||
Check warning on line 15 in xpathrunnerui/xpathrunnerui/Views/MainWindow.axaml.cs
|
||
public MainWindow() | ||
{ | ||
InitializeComponent(); | ||
var screen = Screens.Primary; | ||
// Set width and height as percentages of the screen | ||
if (screen != null) | ||
{ | ||
Width = screen.WorkingArea.Width * 0.5; | ||
Height = screen.WorkingArea.Height * 0.6; | ||
} | ||
} | ||
|
||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters