Skip to content

Commit

Permalink
disable few controls that are not used at the moment
Browse files Browse the repository at this point in the history
  • Loading branch information
seba76 committed Dec 11, 2017
1 parent 3b13524 commit 9bdf1bb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions SwaggerContextDriver/ConnectionDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<TextBox Text="{Binding Uri}"/>

<GroupBox Header="Log on details" Margin="0,10,0,10">
<StackPanel Margin="5">
<StackPanel Margin="5" IsEnabled="False">
<RadioButton Content="No Authentication" Margin="0,5,5,0" IsChecked="True" />
<RadioButton Content="Use Windows Credentials" Margin="0,5,5,0" />
<RadioButton Content="Simple Authentication" Margin="0,5,5,0" />
Expand All @@ -34,7 +34,7 @@
</StackPanel>
</GroupBox>

<CheckBox IsChecked="{Binding Persist}">Remember this connection</CheckBox>
<CheckBox IsChecked="{Binding Persist}" IsEnabled="False">Remember this connection</CheckBox>

<DockPanel LastChildFill="False" Margin="0,8,0,0">
<Button Name="btnCancel" DockPanel.Dock="Right" Content="Cancel" Margin="5,0,0,0" Padding="8,3" MinWidth="60" IsCancel="True" TabIndex="2" />
Expand Down
2 changes: 1 addition & 1 deletion SwaggerContextDriver/ConnectionProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ConnectionProperties
public ConnectionProperties(IConnectionInfo cxInfo)
{
_cxInfo = cxInfo;
_driverData = cxInfo.DriverData;
_driverData = cxInfo.DriverData;
}

public bool Persist
Expand Down
6 changes: 5 additions & 1 deletion SwaggerContextDriver/DynamicDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ public override List<ExplorerItem> GetSchemaAndBuildAssembly(IConnectionInfo cxI
public override bool ShowConnectionDialog(IConnectionInfo cxInfo, bool isNewConnection)
{
// Populate the default URI with a demo value:
if (isNewConnection) new ConnectionProperties(cxInfo).Uri = "http://petstore.swagger.io/v2/swagger.json";
if (isNewConnection) new ConnectionProperties(cxInfo)
{
Uri = "http://petstore.swagger.io/v2/swagger.json",
Persist = true
};

bool? result = new ConnectionDialog(cxInfo).ShowDialog();
return result == true;
Expand Down
2 changes: 1 addition & 1 deletion SwaggerContextDriver/header.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<DataContextDriver>
<MainAssembly>SwaggerContextDriver.dll</MainAssembly>
<SupportUri>http://mysite.com</SupportUri>
<SupportUri>https://github.com/seba76/SwaggerContextDriver</SupportUri>
</DataContextDriver>

0 comments on commit 9bdf1bb

Please sign in to comment.