Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Cleanup

  • Loading branch information...
commit fc47f092d2424af093fa34219bbd83af16071d09 1 parent ac717c6
@PeterForstmeier PeterForstmeier authored
View
24 src/Main/Base/Project/Src/Gui/Dialogs/ReferenceDialog/ServiceReference/AddServiceReferenceDialog.xaml
@@ -22,9 +22,6 @@
<Window.Resources>
<HierarchicalDataTemplate x:Key="HeaderTemplate"
ItemsSource="{Binding SubItems}">
- <!--
- <TextBlock Grid.Row="0" Text="{Binding Path=Description}" />-->
-
<StackPanel Orientation="Horizontal">
<Image Width="16" Height="16" Source="{Binding Image}"/>
<TextBlock Text="{Binding Description}"/>
@@ -125,25 +122,7 @@
</ListBox.ItemTemplate>
</ListBox>
- <!--
- <ListView
- Grid.Column="1" Grid.Row="1" Margin="4"
- ItemsSource="{Binding Path=TwoValues}">
- <ListView.View>
- <GridView>
- <GridViewColumn>
- <GridViewColumn.CellTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal">
- <Image Width="16" Height="16" Source="{Binding Image}"/>
- <TextBlock Text="{Binding Description}"/>
- </StackPanel>
- </DataTemplate>
- </GridViewColumn.CellTemplate>
- </GridViewColumn>
- </GridView>
- </ListView.View>
- </ListView>-->
+
</Grid>
<Border Grid.Row="5" Grid.ColumnSpan="3" Margin="4,0,4,0" BorderThickness="2" BorderBrush="LightGray">
@@ -167,7 +146,6 @@
</Button>
<widgets:UniformGridWithSpacing
-
Columns="2"
Grid.Column="2"
HorizontalAlignment="Right"
View
26 src/Main/Base/Project/Src/Gui/Dialogs/ReferenceDialog/ServiceReference/AddServiceReferenceViewModel.cs
@@ -83,7 +83,7 @@ public AddServiceReferenceViewModel(IProject project)
}
- #region Go
+ #region Go Command
public System.Windows.Input.ICommand GoCommand {get; private set;}
@@ -254,7 +254,7 @@ void DiscoveredWebServices(DiscoveryClientProtocol protocol)
discoveryUri);
DefaultNameSpace = GetDefaultNamespace();
FillItems (serviceDescriptionCollection);
- var referenceName = GetReferenceName(discoveryUri);
+ var referenceName = ServiceReferenceHelper.GetReferenceName(discoveryUri);
}
}
@@ -271,20 +271,8 @@ string GetDefaultNamespace()
return String.Empty;
}
-
- static string GetReferenceName(Uri uri)
- {
- if (uri != null) {
- return uri.Host;
- }
- return String.Empty;
- }
-
#endregion
-
- #region new binding
-
public string Title
{
get {return title;}
@@ -323,7 +311,6 @@ public string Title
public List <ServiceItem> ServiceItems {
get {return items; }
-
set {
items = value;
base.RaisePropertyChanged(() =>ServiceItems);
@@ -398,7 +385,7 @@ void FillItems (ServiceDescriptionCollection descriptions)
void Add(ServiceDescription description)
{
- List<ServiceItem> l = new List<ServiceItem>();
+ List<ServiceItem> items = new List<ServiceItem>();
var name = ServiceReferenceHelper.GetServiceName(description);
var rootNode = new ServiceItem(null,name);
rootNode.Tag = description;
@@ -406,18 +393,15 @@ void Add(ServiceDescription description)
foreach(Service service in description.Services) {
var serviceNode = new ServiceItem(null,service.Name);
serviceNode.Tag = service;
- l.Add(serviceNode);
+ items.Add(serviceNode);
foreach (PortType portType in description.PortTypes) {
var portNode = new ServiceItem(PresentationResourceService.GetBitmapSource("Icons.16x16.Interface"),portType.Name);
portNode.Tag = portType;
serviceNode.SubItems.Add(portNode);
}
}
- ServiceItems = l;
+ ServiceItems = items;
}
-
-
- #endregion
}
View
2  src/Main/Base/Project/Src/Gui/Dialogs/ReferenceDialog/ServiceReference/AdvancedServiceDialog.xaml
@@ -40,7 +40,7 @@
</Grid.ColumnDefinitions>
<TextBlock Margin="25,0,0,0"
- Text="Access level for generated classes:"></TextBlock>
+ Text="{Binding AccessLevel}"></TextBlock>
<ComboBox
Grid.Column="1 " Margin="4"
gui:EnumBinding.EnumType="{x:Type local:Modifyers}" SelectedValue="{Binding SelectedModifyer}">
View
6 src/Main/Base/Project/Src/Gui/Dialogs/ReferenceDialog/ServiceReference/AdvancedServiceViewModel.cs
@@ -63,7 +63,7 @@ internal class AdvancedServiceViewModel:ViewModelBase
{
private string compatibilityText ="Add a web Reference instead of a Service Reference. ";
private string c_2 ="thios will generate code base on .NET Framework 2.0 Web services technology";
-
+ private string accesslevel = "Access level for generated classes:";
public AdvancedServiceViewModel()
{
Title ="Service Reference Settings";
@@ -83,6 +83,10 @@ public AdvancedServiceViewModel()
public string Title {get;set;}
+ public string AccessLevel {
+ get {return accesslevel;}
+ }
+
private Modifyers selectedModifyer;
public Modifyers SelectedModifyer {
View
9 src/Main/Base/Project/Src/Gui/Dialogs/ReferenceDialog/ServiceReferenceHelper.cs
@@ -72,5 +72,14 @@ public static string GetServiceName(ServiceDescription description)
return String.Empty;
}
+
+ public static string GetReferenceName(Uri uri)
+ {
+ if (uri != null) {
+ return uri.Host;
+ }
+ return String.Empty;
+ }
+
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.