-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.0.7 Change project structure and check for updates (#11)
* Version 1.0.6, improve patching experience * Publish windows as single application (only works on windows host) * Add update checking and cleanup imports, resetting settings to default won't overwrite saved settings automatically * Change project structure * Version 1.0.7, add minimum window sizes to dialogs
- Loading branch information
Showing
20 changed files
with
1,410 additions
and
1,299 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
64 changes: 32 additions & 32 deletions
64
PathFileComponent.axaml → Windows/Components/PathFileComponent.axaml
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 |
---|---|---|
@@ -1,32 +1,32 @@ | ||
<!--Copyright 2020-2021 dan0v | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License.--> | ||
|
||
<UserControl 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" | ||
x:Class="xdelta3_cross_gui.PathFileComponent" | ||
DataContext="{Binding RelativeSource={RelativeSource Self}}"> | ||
|
||
<Grid ColumnDefinitions="30,25,*" Height="26"> | ||
<Border Grid.Column="0" BorderBrush="Black" BorderThickness="0.5,0,0.5,0.5"> | ||
<CheckBox x:Name="chk_IsChecked" Margin="5,0,5,0" IsChecked="{Binding IsSelected, Mode=TwoWay}"></CheckBox> | ||
</Border> | ||
<Border Grid.Column="1" BorderBrush="Black" BorderThickness="0,0.5,0.5,0.5"> | ||
<TextBlock x:Name="txt_blk_Index" Text="{Binding Index}" HorizontalAlignment="Center" VerticalAlignment="Center">0</TextBlock> | ||
</Border> | ||
<TextBox x:Name="txt_bx_Path" Grid.Column="2" IsReadOnly="True" MinWidth="0"></TextBox> | ||
</Grid> | ||
</UserControl> | ||
<!--Copyright 2020-2021 dan0v | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License.--> | ||
|
||
<UserControl 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" | ||
x:Class="xdelta3_cross_gui.PathFileComponent" | ||
DataContext="{Binding RelativeSource={RelativeSource Self}}"> | ||
|
||
<Grid ColumnDefinitions="30,25,*" Height="26"> | ||
<Border Grid.Column="0" BorderBrush="Black" BorderThickness="0.5,0,0.5,0.5"> | ||
<CheckBox x:Name="chk_IsChecked" Margin="5,0,5,0" IsChecked="{Binding IsSelected, Mode=TwoWay}"></CheckBox> | ||
</Border> | ||
<Border Grid.Column="1" BorderBrush="Black" BorderThickness="0,0.5,0.5,0.5"> | ||
<TextBlock x:Name="txt_blk_Index" Text="{Binding Index}" HorizontalAlignment="Center" VerticalAlignment="Center">0</TextBlock> | ||
</Border> | ||
<TextBox x:Name="txt_bx_Path" Grid.Column="2" IsReadOnly="True" MinWidth="0"></TextBox> | ||
</Grid> | ||
</UserControl> |
211 changes: 104 additions & 107 deletions
211
PathFileComponent.axaml.cs → ...ows/Components/PathFileComponent.axaml.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 |
---|---|---|
@@ -1,107 +1,104 @@ | ||
/*Copyright 2020-2021 dan0v | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License.*/ | ||
|
||
using Avalonia; | ||
using Avalonia.Controls; | ||
using Avalonia.Interactivity; | ||
using Avalonia.Markup.Xaml; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Diagnostics; | ||
using System.IO; | ||
using System.Runtime.CompilerServices; | ||
|
||
namespace xdelta3_cross_gui | ||
{ | ||
public class PathFileComponent : UserControl | ||
{ | ||
private MainWindow MainParent { get; set; } | ||
public string FullPath { get; set; } | ||
public string ShortName { get; set; } | ||
public int Index { get; set; } | ||
|
||
public bool _Shifted = false; | ||
|
||
private MainWindow.FileCategory _FileCategory; | ||
|
||
private bool _IsSelected = false; | ||
public bool IsSelected { | ||
get => _IsSelected; | ||
set | ||
{ | ||
if (value != _IsSelected) | ||
{ | ||
_IsSelected = value; | ||
OnPropertyChanged(); | ||
} | ||
} | ||
} | ||
|
||
TextBlock txt_blk_Index; | ||
TextBox txt_bx_Path; | ||
CheckBox chk_IsChecked; | ||
|
||
public PathFileComponent() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
public PathFileComponent(MainWindow parent, string url, int index, MainWindow.FileCategory fileCategory) | ||
{ | ||
this.InitializeComponent(); | ||
|
||
|
||
this.txt_blk_Index = this.FindControl<TextBlock>("txt_blk_Index"); | ||
this.txt_bx_Path = this.FindControl<TextBox>("txt_bx_Path"); | ||
this.chk_IsChecked = this.FindControl<CheckBox>("chk_IsChecked"); | ||
|
||
this.MainParent = parent; | ||
this.FullPath = ""; | ||
this.ShortName = ""; | ||
this.Index = index; | ||
this._FileCategory = fileCategory; | ||
|
||
|
||
try | ||
{ | ||
this.FullPath = Path.GetFullPath(url); | ||
this.ShortName = Path.GetFileName(url); | ||
} | ||
catch (Exception e) { Debug.WriteLine(e); } | ||
|
||
this.UpdateValues(); | ||
} | ||
|
||
public void UpdateValues() | ||
{ | ||
txt_blk_Index.Text = this.Index + ""; | ||
|
||
txt_bx_Path.Text = this.MainParent.Options.ShowFullPaths ? this.FullPath : this.ShortName; | ||
|
||
chk_IsChecked.IsChecked = this.IsSelected; | ||
} | ||
|
||
private void InitializeComponent() | ||
{ | ||
AvaloniaXamlLoader.Load(this); | ||
} | ||
|
||
public event PropertyChangedEventHandler PropertyChanged; | ||
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) | ||
{ | ||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); | ||
} | ||
} | ||
|
||
} | ||
/*Copyright 2020-2021 dan0v | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License.*/ | ||
|
||
using Avalonia.Controls; | ||
using Avalonia.Markup.Xaml; | ||
using System; | ||
using System.ComponentModel; | ||
using System.Diagnostics; | ||
using System.IO; | ||
using System.Runtime.CompilerServices; | ||
|
||
namespace xdelta3_cross_gui | ||
{ | ||
public class PathFileComponent : UserControl | ||
{ | ||
private MainWindow MainParent { get; set; } | ||
public string FullPath { get; set; } | ||
public string ShortName { get; set; } | ||
public int Index { get; set; } | ||
|
||
public bool _Shifted = false; | ||
|
||
private MainWindow.FileCategory _FileCategory; | ||
|
||
private bool _IsSelected = false; | ||
public bool IsSelected { | ||
get => _IsSelected; | ||
set | ||
{ | ||
if (value != _IsSelected) | ||
{ | ||
_IsSelected = value; | ||
OnPropertyChanged(); | ||
} | ||
} | ||
} | ||
|
||
TextBlock txt_blk_Index; | ||
TextBox txt_bx_Path; | ||
CheckBox chk_IsChecked; | ||
|
||
public PathFileComponent() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
public PathFileComponent(MainWindow parent, string url, int index, MainWindow.FileCategory fileCategory) | ||
{ | ||
this.InitializeComponent(); | ||
|
||
|
||
this.txt_blk_Index = this.FindControl<TextBlock>("txt_blk_Index"); | ||
this.txt_bx_Path = this.FindControl<TextBox>("txt_bx_Path"); | ||
this.chk_IsChecked = this.FindControl<CheckBox>("chk_IsChecked"); | ||
|
||
this.MainParent = parent; | ||
this.FullPath = ""; | ||
this.ShortName = ""; | ||
this.Index = index; | ||
this._FileCategory = fileCategory; | ||
|
||
|
||
try | ||
{ | ||
this.FullPath = Path.GetFullPath(url); | ||
this.ShortName = Path.GetFileName(url); | ||
} | ||
catch (Exception e) { Debug.WriteLine(e); } | ||
|
||
this.UpdateValues(); | ||
} | ||
|
||
public void UpdateValues() | ||
{ | ||
txt_blk_Index.Text = this.Index + ""; | ||
|
||
txt_bx_Path.Text = this.MainParent.Options.ShowFullPaths ? this.FullPath : this.ShortName; | ||
|
||
chk_IsChecked.IsChecked = this.IsSelected; | ||
} | ||
|
||
private void InitializeComponent() | ||
{ | ||
AvaloniaXamlLoader.Load(this); | ||
} | ||
|
||
public event PropertyChangedEventHandler PropertyChanged; | ||
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) | ||
{ | ||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.