-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #81 from lacmus-foundation/dev
Dev: hotfix geoposition and filtering
- Loading branch information
Showing
12 changed files
with
130 additions
and
56 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
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,33 @@ | ||
using System.IO; | ||
using System.Reactive; | ||
using Avalonia.Controls; | ||
using DynamicData; | ||
using ReactiveUI; | ||
using ReactiveUI.Fody.Helpers; | ||
using ReactiveUI.Validation.Extensions; | ||
using ReactiveUI.Validation.Helpers; | ||
|
||
namespace LacmusApp.ViewModels | ||
{ | ||
public class SaveAsWindowViewModel : ReactiveValidationObject<SaveAsWindowViewModel> | ||
{ | ||
private readonly SourceList<PhotoViewModel> _photos; | ||
public SaveAsWindowViewModel(Window window, SourceList<PhotoViewModel> photos) | ||
{ | ||
_photos = photos; | ||
this.ValidationRule( | ||
viewModel => viewModel.OutputPath, | ||
Directory.Exists, | ||
path => $"Incorrect path {path}"); | ||
|
||
SaveCommand = ReactiveCommand.Create(OpenLicense); | ||
} | ||
[Reactive] public string OutputPath { get; set; } | ||
public ReactiveCommand<Unit, Unit> SaveCommand { get; set; } | ||
|
||
public void OpenLicense() | ||
{ | ||
|
||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<Window xmlns="https://github.com/avaloniaui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
Icon="resm:LacmusApp.Assets.avalonia-logo.ico" | ||
x:Class="LacmusApp.Views.SaveAsWindow" | ||
CanResize="False" | ||
Title="Save as" | ||
Width="500" | ||
Height="325"> | ||
<StackPanel> | ||
<Border Classes="Card"> | ||
<StackPanel> | ||
<TextBlock Margin="0 2" Classes="Heading" Text="Select options to save:" /> | ||
<TextBlock Margin="0 2" Classes="Caption" Text="Type of photos to save:" /> | ||
<ComboBox Margin="0 2 0 5" SelectedIndex="{Binding FilterIndex, Mode=TwoWay}"> | ||
<ComboBoxItem Content="All photos" /> | ||
<ComboBoxItem Content="Photos with objects" /> | ||
<ComboBoxItem Content="Favorite photos" /> | ||
</ComboBox> | ||
<CheckBox Margin="0 2" IsChecked="True" | ||
Content="Save source photos." /> | ||
<CheckBox Margin="0 2" IsChecked="True" | ||
Content="Save XML annotations." /> | ||
<CheckBox Margin="0 2" IsChecked="False" | ||
Content="Save photo with drawn bboxes." /> | ||
<CheckBox Margin="0 2" IsChecked="False" | ||
Content="Save bbox crops." /> | ||
<TextBox Margin="0 5" UseFloatingWatermark="True" | ||
Watermark="Enter input path here." | ||
Text="{Binding OutputPath, Mode=TwoWay}" /> | ||
<Button Margin="0 2 0 5" Content="Save photos"/> | ||
</StackPanel> | ||
</Border> | ||
</StackPanel> | ||
</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,16 @@ | ||
using Avalonia.Markup.Xaml; | ||
using Avalonia.ReactiveUI; | ||
using LacmusApp.ViewModels; | ||
using ReactiveUI; | ||
|
||
namespace LacmusApp.Views | ||
{ | ||
public class SaveAsWindow : ReactiveWindow<SaveAsWindowViewModel> | ||
{ | ||
public SaveAsWindow() | ||
{ | ||
this.WhenActivated(disposables => { }); | ||
AvaloniaXamlLoader.Load(this); | ||
} | ||
} | ||
} |