6 changed files with 215 additions and 252 deletions
@ -0,0 +1,138 @@
@@ -0,0 +1,138 @@
|
||||
<UserControl |
||||
x:Class="ICSharpCode.PackageManagement.RegisteredPackageSourcesUserControl" |
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
||||
xmlns:pm="clr-namespace:ICSharpCode.PackageManagement" |
||||
xmlns:pmd="clr-namespace:ICSharpCode.PackageManagement.Design" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
mc:Ignorable="d" |
||||
d:DesignHeight="300" |
||||
d:DesignWidth="300"> |
||||
|
||||
<Grid d:DataContext="{d:DesignInstance pmd:DesignTimeRegisteredPackageSourcesViewModel, IsDesignTimeCreatable=True}"> |
||||
<Grid.Resources> |
||||
<Style |
||||
x:Key="ListBoxItemStyle" |
||||
TargetType="{x:Type ListBoxItem}"> |
||||
|
||||
<Style.Resources> |
||||
<SolidColorBrush |
||||
x:Key="{x:Static SystemColors.ControlBrushKey}" |
||||
Color="{DynamicResource {x:Static SystemColors.HighlightColorKey}}" /> |
||||
</Style.Resources> |
||||
|
||||
<Setter |
||||
Property="Background" |
||||
Value="LightGray"/> |
||||
|
||||
<Style.Triggers> |
||||
<Trigger |
||||
Property="ItemsControl.AlternationIndex" |
||||
Value="0"> |
||||
<Setter |
||||
Property="Background" |
||||
Value="White"/> |
||||
</Trigger> |
||||
</Style.Triggers> |
||||
</Style> |
||||
|
||||
<DataTemplate x:Key="PackageSourceListBoxTemplate"> |
||||
<StackPanel |
||||
x:Name="PackageSourceStackPanel" |
||||
Margin="4"> |
||||
<TextBlock Text="{Binding Path=Name}"/> |
||||
<TextBlock> |
||||
<Hyperlink> |
||||
<TextBlock Text="{Binding Path=SourceUrl}"/> |
||||
</Hyperlink> |
||||
</TextBlock> |
||||
</StackPanel> |
||||
</DataTemplate> |
||||
</Grid.Resources> |
||||
|
||||
<Grid.ColumnDefinitions> |
||||
<ColumnDefinition /> |
||||
<ColumnDefinition Width="Auto"/> |
||||
</Grid.ColumnDefinitions> |
||||
<Grid.RowDefinitions> |
||||
<RowDefinition /> |
||||
<RowDefinition Height="Auto"/> |
||||
</Grid.RowDefinitions> |
||||
<ListBox |
||||
Grid.Row="0" |
||||
HorizontalContentAlignment="Stretch" |
||||
AlternationCount="2" |
||||
pm:ListBoxBehaviour.IsSelectedItemScrolledIntoView="True" |
||||
ItemContainerStyle="{StaticResource ListBoxItemStyle}" |
||||
ItemTemplate="{StaticResource PackageSourceListBoxTemplate}" |
||||
ItemsSource="{Binding Path=PackageSourceViewModels}" |
||||
SelectedItem="{Binding Path=SelectedPackageSourceViewModel}"/> |
||||
<Grid |
||||
Grid.Row="1" |
||||
Margin="4"> |
||||
<Grid.ColumnDefinitions> |
||||
<ColumnDefinition Width="Auto"/> |
||||
<ColumnDefinition /> |
||||
</Grid.ColumnDefinitions> |
||||
<Grid.RowDefinitions> |
||||
<RowDefinition /> |
||||
<RowDefinition /> |
||||
</Grid.RowDefinitions> |
||||
<TextBlock |
||||
Grid.Row="0" |
||||
Grid.Column="0" |
||||
Margin="4" |
||||
Text="Name:"/> |
||||
<TextBox |
||||
Grid.Row="0" |
||||
Grid.Column="1" |
||||
Text="{Binding Path=NewPackageSourceName, UpdateSourceTrigger=PropertyChanged}" |
||||
Margin="4, 2"/> |
||||
<TextBlock |
||||
Grid.Row="1" |
||||
Grid.Column="0" |
||||
Margin="4" |
||||
Text="Source:"/> |
||||
<TextBox |
||||
Grid.Row="1" |
||||
Grid.Column="1" |
||||
Text="{Binding Path=NewPackageSourceUrl, UpdateSourceTrigger=PropertyChanged}" |
||||
Margin="4,2"/> |
||||
</Grid> |
||||
<StackPanel |
||||
Grid.Column="1" |
||||
Grid.Row="0"> |
||||
<Button |
||||
Content="Move Up" |
||||
Command="{Binding Path=MovePackageSourceUpCommand}" |
||||
Margin="4, 2" |
||||
Padding="7, 0"/> |
||||
<Button |
||||
Content="Move Down" |
||||
Command="{Binding Path=MovePackageSourceDownCommand}" |
||||
Margin="4, 2" |
||||
Padding="7, 0"/> |
||||
<Button |
||||
Content="Remove" |
||||
Command="{Binding Path=RemovePackageSourceCommand}" |
||||
Margin="4, 2" |
||||
Padding="7, 0"/> |
||||
</StackPanel> |
||||
<StackPanel |
||||
Grid.Column="1" |
||||
Grid.Row="1"> |
||||
<Button |
||||
Content="Add" |
||||
Command="{Binding Path=AddPackageSourceCommand}" |
||||
Margin="4, 6, 4, 4" |
||||
Padding="7, 0"/> |
||||
<Button |
||||
Content="..." |
||||
Command="{Binding Path=BrowsePackageFolderCommand}" |
||||
HorizontalAlignment="Left" |
||||
Margin="4, 4" |
||||
Padding="7, 0"/> |
||||
</StackPanel> |
||||
</Grid> |
||||
</UserControl> |
@ -0,0 +1,26 @@
@@ -0,0 +1,26 @@
|
||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Text; |
||||
using System.Windows; |
||||
using System.Windows.Controls; |
||||
using System.Windows.Data; |
||||
using System.Windows.Documents; |
||||
using System.Windows.Input; |
||||
using System.Windows.Media; |
||||
|
||||
namespace ICSharpCode.PackageManagement |
||||
{ |
||||
/// <summary>
|
||||
/// Interaction logic for RegisteredPackageSourcesUserControl.xaml
|
||||
/// </summary>
|
||||
public partial class RegisteredPackageSourcesUserControl : UserControl |
||||
{ |
||||
public RegisteredPackageSourcesUserControl() |
||||
{ |
||||
InitializeComponent(); |
||||
} |
||||
} |
||||
} |
@ -1,140 +1,26 @@
@@ -1,140 +1,26 @@
|
||||
<gui:OptionPanel |
||||
x:Class="ICSharpCode.PackageManagement.RegisteredPackageSourcesView" |
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
||||
xmlns:gui="clr-namespace:ICSharpCode.SharpDevelop.Gui;assembly=ICSharpCode.SharpDevelop" |
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
||||
xmlns:pm="clr-namespace:ICSharpCode.PackageManagement" |
||||
xmlns:pmd="clr-namespace:ICSharpCode.PackageManagement.Design" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
mc:Ignorable="d" |
||||
d:DesignHeight="300" |
||||
d:DesignWidth="300" |
||||
Height="300"> |
||||
|
||||
<Grid x:Name="MainGrid"> |
||||
<Grid.Resources> |
||||
<pm:PackageManagementViewModels x:Key="ViewModels"/> |
||||
|
||||
<Style |
||||
x:Key="ListBoxItemStyle" |
||||
TargetType="{x:Type ListBoxItem}"> |
||||
|
||||
<Style.Resources> |
||||
<SolidColorBrush |
||||
x:Key="{x:Static SystemColors.ControlBrushKey}" |
||||
Color="{DynamicResource {x:Static SystemColors.HighlightColorKey}}" /> |
||||
</Style.Resources> |
||||
|
||||
<Setter |
||||
Property="Background" |
||||
Value="LightGray"/> |
||||
|
||||
<Style.Triggers> |
||||
<Trigger |
||||
Property="ItemsControl.AlternationIndex" |
||||
Value="0"> |
||||
<Setter |
||||
Property="Background" |
||||
Value="White"/> |
||||
</Trigger> |
||||
</Style.Triggers> |
||||
</Style> |
||||
|
||||
<DataTemplate x:Key="PackageSourceListBoxTemplate"> |
||||
<StackPanel |
||||
x:Name="PackageSourceStackPanel" |
||||
Margin="4"> |
||||
<TextBlock Text="{Binding Path=Name}"/> |
||||
<TextBlock> |
||||
<Hyperlink> |
||||
<TextBlock Text="{Binding Path=SourceUrl}"/> |
||||
</Hyperlink> |
||||
</TextBlock> |
||||
</StackPanel> |
||||
</DataTemplate> |
||||
</Grid.Resources> |
||||
|
||||
<Grid.DataContext> |
||||
<Binding Source="{StaticResource ViewModels}" Path="RegisteredPackageSourcesViewModel"/> |
||||
</Grid.DataContext> |
||||
|
||||
<Grid.ColumnDefinitions> |
||||
<ColumnDefinition /> |
||||
<ColumnDefinition Width="Auto"/> |
||||
</Grid.ColumnDefinitions> |
||||
<Grid.RowDefinitions> |
||||
<RowDefinition /> |
||||
<RowDefinition Height="Auto"/> |
||||
</Grid.RowDefinitions> |
||||
<ListBox |
||||
Grid.Row="0" |
||||
HorizontalContentAlignment="Stretch" |
||||
AlternationCount="2" |
||||
pm:ListBoxBehaviour.IsSelectedItemScrolledIntoView="True" |
||||
ItemContainerStyle="{StaticResource ListBoxItemStyle}" |
||||
ItemTemplate="{StaticResource PackageSourceListBoxTemplate}" |
||||
ItemsSource="{Binding Path=PackageSourceViewModels}" |
||||
SelectedItem="{Binding Path=SelectedPackageSourceViewModel}"/> |
||||
<Grid |
||||
Grid.Row="1" |
||||
Margin="4"> |
||||
<Grid.ColumnDefinitions> |
||||
<ColumnDefinition Width="Auto"/> |
||||
<ColumnDefinition /> |
||||
</Grid.ColumnDefinitions> |
||||
<Grid.RowDefinitions> |
||||
<RowDefinition /> |
||||
<RowDefinition /> |
||||
</Grid.RowDefinitions> |
||||
<TextBlock |
||||
Grid.Row="0" |
||||
Grid.Column="0" |
||||
Margin="4" |
||||
Text="Name:"/> |
||||
<TextBox |
||||
Grid.Row="0" |
||||
Grid.Column="1" |
||||
Text="{Binding Path=NewPackageSourceName, UpdateSourceTrigger=PropertyChanged}" |
||||
Margin="4, 2"/> |
||||
<TextBlock |
||||
Grid.Row="1" |
||||
Grid.Column="0" |
||||
Margin="4" |
||||
Text="Source:"/> |
||||
<TextBox |
||||
Grid.Row="1" |
||||
Grid.Column="1" |
||||
Text="{Binding Path=NewPackageSourceUrl, UpdateSourceTrigger=PropertyChanged}" |
||||
Margin="4,2"/> |
||||
</Grid> |
||||
<StackPanel |
||||
Grid.Column="1" |
||||
Grid.Row="0"> |
||||
<Button |
||||
Content="Move Up" |
||||
Command="{Binding Path=MovePackageSourceUpCommand}" |
||||
Margin="4, 2" |
||||
Padding="7, 0"/> |
||||
<Button |
||||
Content="Move Down" |
||||
Command="{Binding Path=MovePackageSourceDownCommand}" |
||||
Margin="4, 2" |
||||
Padding="7, 0"/> |
||||
<Button |
||||
Content="Remove" |
||||
Command="{Binding Path=RemovePackageSourceCommand}" |
||||
Margin="4, 2" |
||||
Padding="7, 0"/> |
||||
</StackPanel> |
||||
<StackPanel |
||||
Grid.Column="1" |
||||
Grid.Row="1"> |
||||
<Button |
||||
Content="Add" |
||||
Command="{Binding Path=AddPackageSourceCommand}" |
||||
Margin="4, 6, 4, 4" |
||||
Padding="7, 0"/> |
||||
<Button |
||||
Content="..." |
||||
Command="{Binding Path=BrowsePackageFolderCommand}" |
||||
HorizontalAlignment="Left" |
||||
Margin="4, 4" |
||||
Padding="7, 0"/> |
||||
</StackPanel> |
||||
<pm:RegisteredPackageSourcesUserControl/> |
||||
</Grid> |
||||
</gui:OptionPanel> |
@ -1,140 +1,26 @@
@@ -1,140 +1,26 @@
|
||||
<gui:OptionPanel |
||||
x:Class="ICSharpCode.PackageManagement.RegisteredProjectTemplatePackageSourcesView" |
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
||||
xmlns:gui="clr-namespace:ICSharpCode.SharpDevelop.Gui;assembly=ICSharpCode.SharpDevelop" |
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
||||
xmlns:pm="clr-namespace:ICSharpCode.PackageManagement" |
||||
xmlns:pmd="clr-namespace:ICSharpCode.PackageManagement.Design" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
mc:Ignorable="d" |
||||
d:DesignHeight="300" |
||||
d:DesignWidth="300" |
||||
Height="300"> |
||||
|
||||
<Grid x:Name="MainGrid"> |
||||
<Grid.Resources> |
||||
<pm:PackageManagementViewModels x:Key="ViewModels"/> |
||||
|
||||
<Style |
||||
x:Key="ListBoxItemStyle" |
||||
TargetType="{x:Type ListBoxItem}"> |
||||
|
||||
<Style.Resources> |
||||
<SolidColorBrush |
||||
x:Key="{x:Static SystemColors.ControlBrushKey}" |
||||
Color="{DynamicResource {x:Static SystemColors.HighlightColorKey}}" /> |
||||
</Style.Resources> |
||||
|
||||
<Setter |
||||
Property="Background" |
||||
Value="LightGray"/> |
||||
|
||||
<Style.Triggers> |
||||
<Trigger |
||||
Property="ItemsControl.AlternationIndex" |
||||
Value="0"> |
||||
<Setter |
||||
Property="Background" |
||||
Value="White"/> |
||||
</Trigger> |
||||
</Style.Triggers> |
||||
</Style> |
||||
|
||||
<DataTemplate x:Key="PackageSourceListBoxTemplate"> |
||||
<StackPanel |
||||
x:Name="PackageSourceStackPanel" |
||||
Margin="4"> |
||||
<TextBlock Text="{Binding Path=Name}"/> |
||||
<TextBlock> |
||||
<Hyperlink> |
||||
<TextBlock Text="{Binding Path=SourceUrl}"/> |
||||
</Hyperlink> |
||||
</TextBlock> |
||||
</StackPanel> |
||||
</DataTemplate> |
||||
</Grid.Resources> |
||||
|
||||
<Grid.DataContext> |
||||
<Binding Source="{StaticResource ViewModels}" Path="RegisteredProjectTemplatePackageSourcesViewModel"/> |
||||
</Grid.DataContext> |
||||
|
||||
<Grid.ColumnDefinitions> |
||||
<ColumnDefinition /> |
||||
<ColumnDefinition Width="Auto"/> |
||||
</Grid.ColumnDefinitions> |
||||
<Grid.RowDefinitions> |
||||
<RowDefinition /> |
||||
<RowDefinition Height="Auto"/> |
||||
</Grid.RowDefinitions> |
||||
<ListBox |
||||
Grid.Row="0" |
||||
HorizontalContentAlignment="Stretch" |
||||
AlternationCount="2" |
||||
pm:ListBoxBehaviour.IsSelectedItemScrolledIntoView="True" |
||||
ItemContainerStyle="{StaticResource ListBoxItemStyle}" |
||||
ItemTemplate="{StaticResource PackageSourceListBoxTemplate}" |
||||
ItemsSource="{Binding Path=PackageSourceViewModels}" |
||||
SelectedItem="{Binding Path=SelectedPackageSourceViewModel}"/> |
||||
<Grid |
||||
Grid.Row="1" |
||||
Margin="4"> |
||||
<Grid.ColumnDefinitions> |
||||
<ColumnDefinition Width="Auto"/> |
||||
<ColumnDefinition /> |
||||
</Grid.ColumnDefinitions> |
||||
<Grid.RowDefinitions> |
||||
<RowDefinition /> |
||||
<RowDefinition /> |
||||
</Grid.RowDefinitions> |
||||
<TextBlock |
||||
Grid.Row="0" |
||||
Grid.Column="0" |
||||
Margin="4" |
||||
Text="Name:"/> |
||||
<TextBox |
||||
Grid.Row="0" |
||||
Grid.Column="1" |
||||
Text="{Binding Path=NewPackageSourceName, UpdateSourceTrigger=PropertyChanged}" |
||||
Margin="4, 2"/> |
||||
<TextBlock |
||||
Grid.Row="1" |
||||
Grid.Column="0" |
||||
Margin="4" |
||||
Text="Source:"/> |
||||
<TextBox |
||||
Grid.Row="1" |
||||
Grid.Column="1" |
||||
Text="{Binding Path=NewPackageSourceUrl, UpdateSourceTrigger=PropertyChanged}" |
||||
Margin="4,2"/> |
||||
</Grid> |
||||
<StackPanel |
||||
Grid.Column="1" |
||||
Grid.Row="0"> |
||||
<Button |
||||
Content="Move Up" |
||||
Command="{Binding Path=MovePackageSourceUpCommand}" |
||||
Margin="4, 2" |
||||
Padding="7, 0"/> |
||||
<Button |
||||
Content="Move Down" |
||||
Command="{Binding Path=MovePackageSourceDownCommand}" |
||||
Margin="4, 2" |
||||
Padding="7, 0"/> |
||||
<Button |
||||
Content="Remove" |
||||
Command="{Binding Path=RemovePackageSourceCommand}" |
||||
Margin="4, 2" |
||||
Padding="7, 0"/> |
||||
</StackPanel> |
||||
<StackPanel |
||||
Grid.Column="1" |
||||
Grid.Row="1"> |
||||
<Button |
||||
Content="Add" |
||||
Command="{Binding Path=AddPackageSourceCommand}" |
||||
Margin="4, 6, 4, 4" |
||||
Padding="7, 0"/> |
||||
<Button |
||||
Content="..." |
||||
Command="{Binding Path=BrowsePackageFolderCommand}" |
||||
HorizontalAlignment="Left" |
||||
Margin="4, 4" |
||||
Padding="7, 0"/> |
||||
</StackPanel> |
||||
<pm:RegisteredPackageSourcesUserControl/> |
||||
</Grid> |
||||
</gui:OptionPanel> |
Loading…
Reference in new issue