This enhancement allows user to click on different buttons to post different external methods. In my personal opinion buttons are more intuitive to use than checkbox + single button. I totally understand the current setup is for demo purpose and it's useful. This enhancement is to provide users with an additional way to post external methods.
<Button x:Name="BExternalMethodProject" BorderBrush="#FFABADB3" Background="{x:Null}" Padding="5,0,5,0"
Click="BExternalMethodProject_Click" HorizontalAlignment="Left" Width="183" Height="26"
VerticalAlignment="Top" Margin="11,40,0,0" Grid.ColumnSpan="2" Grid.Row="1">
<StackPanel Orientation="Horizontal">
<TextBlock Text="Project" Margin="5,0,0,0" />
</StackPanel>
</Button>
<Button x:Name="BExternalMethodWalls" BorderBrush="#FFABADB3" Background="{x:Null}" Padding="5,0,5,0"
Click="BExternalMethodWalls_Click" HorizontalAlignment="Left" Width="183" Height="26"
VerticalAlignment="Center" Margin="11,40,0,0" Grid.ColumnSpan="2" Grid.Row="1">
<StackPanel Orientation="Horizontal">
<TextBlock Text="Walls" Margin="5,0,0,0" />
</StackPanel>
</Button>
<Button x:Name="BExternalMethodSheet" BorderBrush="#FFABADB3" Background="{x:Null}" Padding="5,0,5,0"
Click="BExternalMethodSheet_Click" HorizontalAlignment="Left" Width="183" Height="26"
VerticalAlignment="Bottom" Margin="11,40,0,0" Grid.ColumnSpan="2" Grid.Row="1">
<StackPanel Orientation="Horizontal">
<TextBlock Text="Sheet" Margin="5,0,0,0" />
</StackPanel>
</Button>
Then I've utilized the "IsMouseOver" property in the MethodsWrapper class to identify which button is clicked. (Open for suggestions and better ideas)
if (ui.BExternalMethodProject.IsMouseOver)
{
Methods.DocumentInfo(ui, doc);
}
if (ui.BExternalMethodWalls.IsMouseOver)
{
Methods.WallInfo(ui, doc);
}
if (ui.BExternalMethodSheet.IsMouseOver)
{
Methods.SheetRename(ui, doc);
}
Happy to create a pull request if you find this enhancement useful.