Skip to content

Commit 0dc816a

Browse files
authored
Merge pull request #9 from VladM7/help-system
Help popups
2 parents 0553e9f + ab75257 commit 0dc816a

File tree

5 files changed

+63
-5
lines changed

5 files changed

+63
-5
lines changed

Views/Pages/DashboardPage.xaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,13 @@
2828
<StackPanel Orientation="Horizontal" Margin="30,5,0,0">
2929
<ui:ListView IsEnabled="False">
3030
<ui:ListViewItem>
31-
<TextBlock Text="→ Improved UI and UX (no longer a single page, dark mode)" TextWrapping="Wrap" Width="700"/>
31+
<TextBlock Text="→ Improved UI and 3D rendering" TextWrapping="Wrap" Width="700"/>
3232
</ui:ListViewItem>
3333
<ui:ListViewItem>
34-
<TextBlock Text="→ Now using MVVM architectural pattern" TextWrapping="Wrap" Width="700"/>
34+
<TextBlock Text="→ Mixed SKU pallets" TextWrapping="Wrap" Width="700"/>
35+
</ui:ListViewItem>
36+
<ui:ListViewItem>
37+
<TextBlock Text="→ Multiple constraints, such as stability, weight distribution, etc." TextWrapping="Wrap" Width="700"/>
3538
</ui:ListViewItem>
3639
<ui:ListViewItem>
3740
<TextBlock Text="→ Improved SKU management" TextWrapping="Wrap" Width="700"/>
@@ -53,6 +56,16 @@
5356
</ui:ListViewItem>
5457
</ui:ListView>
5558
</StackPanel>
59+
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
60+
<ui:TextBlock VerticalAlignment="Center">For more details, check the </ui:TextBlock>
61+
<ui:HyperlinkButton Padding="5,5,5,6" NavigateUri="https://github.com/VladM7/Stack-Solver" Height="28" Margin="2,0,2,0">
62+
<WrapPanel>
63+
<ui:TextBlock>GitHub</ui:TextBlock>
64+
<ui:SymbolIcon Symbol="ArrowUpRight16" VerticalAlignment="Center" Margin="4,0,0,0"/>
65+
</WrapPanel>
66+
</ui:HyperlinkButton>
67+
<ui:TextBlock VerticalAlignment="Center">page.</ui:TextBlock>
68+
</StackPanel>
5669
</StackPanel>
5770
</Grid>
5871
</Page>

Views/Pages/PalletBuilderPage.xaml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,29 @@
3434
<StackPanel Orientation="Horizontal" Grid.Column="0" Grid.Row="0">
3535
<ui:Button x:Name="generateButton" Content="Generate" Command="{Binding ViewModel.GenerateCommand}" IsEnabled="{Binding ViewModel.IsGenerating, Converter={StaticResource BooleanNegationConverter}}" Grid.Column="0" Grid.Row="0" VerticalAlignment="Top" Appearance="Primary" Icon="{ui:SymbolIcon ArrowTurnDownRight48}"/>
3636
<ui:Button Content="Cancel" Command="{Binding ViewModel.CancelCommand}" Icon="{ui:SymbolIcon DismissCircle24}" Margin="8,0,0,0" VerticalAlignment="Top" IsEnabled="{Binding ViewModel.IsGenerating}"/>
37-
<ui:Button Content="Help" Icon="{ui:SymbolIcon Question24}" Margin="8,0,0,0" VerticalAlignment="Top"/>
37+
<ui:Button x:Name="topHelpButton" Icon="{ui:SymbolIcon Question24}" Margin="8,0,0,0" VerticalAlignment="Top" Click="TopHelpButton_Click" Cursor="Help">
38+
<WrapPanel>
39+
<ui:TextBlock Text="Help"/>
40+
<ui:Flyout x:Name="helpFlyout" Placement="Mouse" Width="0" Height="0" MinWidth="0" MinHeight="0" VerticalAlignment="Top">
41+
<ui:TextBlock>
42+
Here you can adjust different parameters and see the results.
43+
<LineBreak/>
44+
<LineBreak/>
45+
1. Set the pallet dimensions manually or by selecting a pallet type.
46+
<LineBreak/>
47+
2. Adjust the quantity for each SKU type.
48+
<LineBreak/>
49+
(or set it to 0 to ignore that specific SKU)
50+
<LineBreak/>
51+
You can add more SKU types (or edit them) in the Library page.
52+
<LineBreak/>
53+
3. Change the layer generation and stacking options.
54+
<LineBreak/>
55+
4. Click Generate and see the results in the analyzer pages.
56+
</ui:TextBlock>
57+
</ui:Flyout>
58+
</WrapPanel>
59+
</ui:Button>
3860
</StackPanel>
3961
<ProgressBar Grid.Row ="1" Height="5" Margin="0,4,0,0" IsIndeterminate="True" Visibility="{Binding ViewModel.IsGenerating, Converter={StaticResource BoolToVisibilityConverter}}"/>
4062
<TabControl Grid.Row="2" Grid.Column="1" Margin="0,8,0,0">

Views/Pages/PalletBuilderPage.xaml.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,10 @@ private async void SkuSelectionGrid_CellEditEnding(object sender, DataGridCellEd
8282
}
8383
}
8484
}
85+
86+
private void TopHelpButton_Click(object sender, RoutedEventArgs e)
87+
{
88+
helpFlyout.IsOpen = !helpFlyout.IsOpen;
89+
}
8590
}
8691
}

Views/Pages/SKULibraryPage.xaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,24 @@
2222
<RowDefinition Height="Auto"/>
2323
</Grid.RowDefinitions>
2424

25-
<StackPanel Orientation="Horizontal" Grid.Row="0">
25+
<StackPanel Orientation="Horizontal" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Top">
2626
<ui:Button Content="Add SKU" Margin="0,0,8,0" VerticalAlignment="Top" Icon="{ui:SymbolIcon Add24}" Appearance="Primary" Command="{Binding ViewModel.AddSkuCommand, Mode=OneWay}"/>
2727
<ui:Button Content="Import" Margin="0,0,8,0" VerticalAlignment="Top" Icon="{ui:SymbolIcon ArrowDownload24}" IsEnabled="False"/>
2828
<ui:Button Content="Export" Margin="0,0,8,0" VerticalAlignment="Top" Icon="{ui:SymbolIcon ArrowExportUp24}" IsEnabled="False"/>
29-
<ui:Button Icon="{ui:SymbolIcon Question24}" Content="Help"/>
29+
<ui:Button x:Name="helpButton" Icon="{ui:SymbolIcon Question24}" Click="HelpButton_Click" Cursor="Help">
30+
<WrapPanel>
31+
<ui:TextBlock Text="Help"/>
32+
<ui:Flyout x:Name="helpFlyout" Placement="Mouse" Width="0" Height="0" MinWidth="0" MinHeight="0" VerticalAlignment="Top">
33+
<ui:TextBlock>
34+
Here you can add different types of SKUs.
35+
<LineBreak/>
36+
You can adjust the specific quantities in the generation page.
37+
<LineBreak/>
38+
See the tip at the bottom of the page for details.
39+
</ui:TextBlock>
40+
</ui:Flyout>
41+
</WrapPanel>
42+
</ui:Button>
3043
</StackPanel>
3144

3245
<ui:DataGrid x:Name="skuDataGrid"

Views/Pages/SKULibraryPage.xaml.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,10 @@ private void SkuDataGrid_PreviewKeyDown(object sender, KeyEventArgs e)
7474
}
7575
}
7676
}
77+
78+
private void HelpButton_Click(object sender, RoutedEventArgs e)
79+
{
80+
helpFlyout.IsOpen = !helpFlyout.IsOpen;
81+
}
7782
}
7883
}

0 commit comments

Comments
 (0)