Idk, dev work goin on
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ContentDialog
|
||||
x:Class="WinWARP.Ui.Views.Dialogs.AddSubscriptionDialog"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:WinWARP.Ui.Views.Dialogs"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:conv="using:WinWARP.Ui.Converters"
|
||||
xmlns:u="using:WinUI3Localizer"
|
||||
DefaultButton="Primary"
|
||||
mc:Ignorable="d" Height="300" Width="400"
|
||||
u:Uids.Uid="AddSubscriptionDialog"
|
||||
IsPrimaryButtonEnabled="{x:Bind ViewModel.CanSubmit, Mode=OneWay}">
|
||||
|
||||
<ContentDialog.Resources>
|
||||
<conv:UpdateIntervalToTextConverter x:Key="UpdateIntervalToTextConverter"/>
|
||||
</ContentDialog.Resources>
|
||||
<StackPanel Spacing="12" Width="400">
|
||||
<TextBox u:Uids.Uid="AddSubscriptionDialogCustomName" Text="{x:Bind ViewModel.CustomName, Mode=TwoWay}"/>
|
||||
<TextBox u:Uids.Uid="AddSubscriptionDialogUrl" Text="{x:Bind ViewModel.SubscriptionLink, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
|
||||
<Slider Minimum="-1" Maximum="48" x:Name="UpdateIntervalSlider" IsThumbToolTipEnabled="False"
|
||||
Value="{x:Bind ViewModel.UpdateInterval, Mode=TwoWay}">
|
||||
<Slider.Header>
|
||||
<TextBlock>
|
||||
<Run u:Uids.Uid="AddSubscriptionDialogUpdateInterval"/><Run Text=": "/><Run Text="{x:Bind UpdateIntervalSlider.Value, Converter={StaticResource UpdateIntervalToTextConverter}, Mode=OneWay}"/>
|
||||
</TextBlock>
|
||||
</Slider.Header>
|
||||
</Slider>
|
||||
</StackPanel>
|
||||
</ContentDialog>
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.UI.Xaml.Controls.Primitives;
|
||||
using Microsoft.UI.Xaml.Data;
|
||||
using Microsoft.UI.Xaml.Input;
|
||||
using Microsoft.UI.Xaml.Media;
|
||||
using Microsoft.UI.Xaml.Navigation;
|
||||
using Windows.Foundation;
|
||||
using Windows.Foundation.Collections;
|
||||
using WinWARP.Core.ViewModels.Dialogs;
|
||||
|
||||
// To learn more about WinUI, the WinUI project structure,
|
||||
// and more about our project templates, see: http://aka.ms/winui-project-info.
|
||||
|
||||
namespace WinWARP.Ui.Views.Dialogs;
|
||||
|
||||
public sealed partial class AddSubscriptionDialog : ContentDialog
|
||||
{
|
||||
public AddSubscriptionViewModel ViewModel { get; }
|
||||
|
||||
public AddSubscriptionDialog() : this(App.Services.GetRequiredService<AddSubscriptionViewModel>()) {}
|
||||
|
||||
public AddSubscriptionDialog(AddSubscriptionViewModel viewModel)
|
||||
{
|
||||
InitializeComponent();
|
||||
ViewModel = viewModel;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user