-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
c3f8172
commit 0edf8a5
Showing
9 changed files
with
142 additions
and
33 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<UserControl | ||
MinWidth="300" | ||
x:Class="Hollow.Views.Dialogs.ExportDialog" | ||
x:DataType="dialogs:ExportDialogViewModel" | ||
xmlns="https://github.com/avaloniaui" | ||
xmlns:dialogs="clr-namespace:Hollow.Views.Dialogs" | ||
xmlns:languages="clr-namespace:Hollow.Languages" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | ||
<StackPanel Spacing="17"> | ||
<TextBlock Text="{I18N {x:Static languages:LangKeys.SignalSearch_Export_Tip}}" /> | ||
|
||
<ListBox | ||
ItemsSource="{Binding UidList}" | ||
SelectedItems="{Binding SelectedUidList, Mode=TwoWay}" | ||
SelectionMode="Multiple, Toggle" /> | ||
|
||
<Grid ColumnDefinitions="*, 10, *"> | ||
<Button | ||
Command="{Binding CancelCommand}" | ||
Content="{I18N {x:Static languages:LangKeys.Dialog_Cancel}}" | ||
Grid.Column="0" | ||
HorizontalAlignment="Stretch" | ||
HorizontalContentAlignment="Center" /> | ||
<Button | ||
Command="{Binding OkCommand}" | ||
Content="{I18N {x:Static languages:LangKeys.Dialog_Ok}}" | ||
Grid.Column="2" | ||
HorizontalAlignment="Stretch" | ||
HorizontalContentAlignment="Center" /> | ||
</Grid> | ||
</StackPanel> | ||
</UserControl> |
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,15 @@ | ||
using System; | ||
using System.Collections.ObjectModel; | ||
using Avalonia.Controls; | ||
|
||
namespace Hollow.Views.Dialogs; | ||
|
||
public partial class ExportDialog : UserControl | ||
{ | ||
public ExportDialog(ObservableCollection<string> uidList, Action<string[]> selectedUidListCallback) | ||
{ | ||
InitializeComponent(); | ||
|
||
DataContext = new ExportDialogViewModel(uidList, selectedUidListCallback); | ||
} | ||
} |
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; | ||
using System.Collections.ObjectModel; | ||
using System.Linq; | ||
using CommunityToolkit.Mvvm.ComponentModel; | ||
using CommunityToolkit.Mvvm.Input; | ||
using Hollow.Views.Controls; | ||
|
||
namespace Hollow.Views.Dialogs; | ||
|
||
public partial class ExportDialogViewModel( | ||
ObservableCollection<string> uidList, | ||
Action<string[]> selectedUidListCallback) | ||
: ObservableObject | ||
{ | ||
[ObservableProperty] | ||
private ObservableCollection<string> _uidList = uidList; | ||
|
||
[ObservableProperty] | ||
private ObservableCollection<string> _selectedUidList = []; | ||
|
||
[RelayCommand] | ||
private void Ok() | ||
{ | ||
selectedUidListCallback(SelectedUidList.ToArray()); | ||
HollowHost.CloseDialog(); | ||
} | ||
|
||
[RelayCommand] | ||
private void Cancel() | ||
{ | ||
HollowHost.CloseDialog(); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.