feat(01-06): build WPF shell — MainWindow XAML, ViewModels, LogPanelSink wiring
- Add FeatureTabBase UserControl with ProgressBar/TextBlock/CancelButton strip (Visibility bound to IsRunning, shown only during operations) - Add MainWindowViewModel with TenantProfiles ObservableCollection, ConnectCommand, ClearSessionCommand, ManageProfilesCommand, ProgressUpdatedMessage subscription - Add ProfileManagementViewModel wrapping ProfileService CRUD with input validation - Add SettingsViewModel (extends FeatureViewModelBase) with language/folder settings - Update MainWindow.xaml: DockPanel shell with Toolbar, TabControl (8 tabs), 150px RichTextBox LogPanel, StatusBar (tenant name | ProgressStatus | ProgressPercentage) - MainWindow.xaml.cs: DI constructor, DataContext=viewModel, LoadProfilesAsync on Loaded - App.xaml.cs: register all services, wire LogPanelSink after MainWindow resolved, register DispatcherUnhandledException and UnobservedTaskException global handlers - App.xaml: add BoolToVisibilityConverter resource
This commit is contained in:
33
SharepointToolbox/Views/Controls/FeatureTabBase.xaml
Normal file
33
SharepointToolbox/Views/Controls/FeatureTabBase.xaml
Normal file
@@ -0,0 +1,33 @@
|
||||
<UserControl x:Class="SharepointToolbox.Views.Controls.FeatureTabBase"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:loc="clr-namespace:SharepointToolbox.Localization">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Placeholder content — Phase 2+ replaces Row 0 -->
|
||||
<TextBlock Grid.Row="0"
|
||||
Text="{Binding Source={x:Static loc:TranslationSource.Instance}, Path=[tab.comingsoon]}"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
|
||||
<!-- Per-tab progress/cancel strip (shown only when IsRunning) -->
|
||||
<Grid Grid.Row="1" Margin="8,4"
|
||||
Visibility="{Binding IsRunning, Converter={StaticResource BoolToVisibilityConverter}}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ProgressBar Grid.Column="0" Height="16" Minimum="0" Maximum="100"
|
||||
Value="{Binding ProgressValue}" />
|
||||
<TextBlock Grid.Column="1" Margin="8,0" VerticalAlignment="Center"
|
||||
Text="{Binding StatusMessage}" />
|
||||
<Button Grid.Column="2"
|
||||
Content="{Binding Source={x:Static loc:TranslationSource.Instance}, Path=[btn.cancel]}"
|
||||
Command="{Binding CancelCommand}" Width="70" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
11
SharepointToolbox/Views/Controls/FeatureTabBase.xaml.cs
Normal file
11
SharepointToolbox/Views/Controls/FeatureTabBase.xaml.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace SharepointToolbox.Views.Controls;
|
||||
|
||||
public partial class FeatureTabBase : UserControl
|
||||
{
|
||||
public FeatureTabBase()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user