-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
65 additions
and
19 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 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 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,18 @@ | ||
using System.IO; | ||
|
||
namespace SmartCommander.ViewModels | ||
{ | ||
public class ViewerViewModel : ViewModelBase | ||
{ | ||
public ViewerViewModel(string filename) | ||
Check warning on line 7 in src/SmartCommander/ViewModels/ViewerViewModel.cs GitHub Actions / build-ubuntu-latest
Check warning on line 7 in src/SmartCommander/ViewModels/ViewerViewModel.cs GitHub Actions / build-ubuntu-latest
Check warning on line 7 in src/SmartCommander/ViewModels/ViewerViewModel.cs GitHub Actions / build-windows-latest
Check warning on line 7 in src/SmartCommander/ViewModels/ViewerViewModel.cs GitHub Actions / build-windows-latest
|
||
{ | ||
try | ||
{ | ||
Text = File.ReadAllText(filename); | ||
} | ||
catch { } | ||
} | ||
|
||
public string Text { get; set; } | ||
} | ||
} |
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 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" | ||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" | ||
ShowInTaskbar="True" | ||
WindowState="Maximized" | ||
x:Class="SmartCommander.ViewerWindow" | ||
Title="SmartCommander Viewer"> | ||
<TextBlock Text="{Binding Text}" ScrollViewer.VerticalScrollBarVisibility="Visible" ></TextBlock> | ||
|
||
</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,11 @@ | ||
using Avalonia.Controls; | ||
|
||
namespace SmartCommander; | ||
|
||
public partial class ViewerWindow : Window | ||
{ | ||
public ViewerWindow() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} |