-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add feature: exclude type names in separate Window for C# client code…
… generation.
- Loading branch information
Chebotov Nikolay
committed
Feb 27, 2020
1 parent
4d09a8b
commit 3a11cdf
Showing
16 changed files
with
173 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version: 1.3.{build} | ||
version: 1.4.{build} | ||
pull_requests: | ||
do_not_increment_build_number: true | ||
skip_tags: true | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<Window x:Class="Unchase.OpenAPI.ConnectedService.Views.CSharpClientExcludedClasses" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
Title="Exclude types from generation" | ||
mc:Ignorable="d" | ||
Width="400" | ||
Height="370" | ||
MaxHeight="370" | ||
MaxWidth="400" | ||
WindowStartupLocation="CenterOwner" | ||
d:DesignHeight="370" d:DesignWidth="400"> | ||
<StackPanel> | ||
<TextBlock Margin="5" Text="Choose types to exclude from generation : "/> | ||
<ListBox | ||
x:Name="ExcludedClassesListBox" | ||
MinHeight="275" | ||
MaxHeight="275" | ||
VerticalContentAlignment="Center" | ||
ScrollViewer.HorizontalScrollBarVisibility="Visible" | ||
ScrollViewer.VerticalScrollBarVisibility="Visible" | ||
Visibility="Visible"> | ||
<ListBox.ItemTemplate> | ||
<DataTemplate> | ||
<StackPanel VerticalAlignment="Center" Orientation="Horizontal"> | ||
<CheckBox | ||
Width="16" | ||
Margin="0,5,8,0" | ||
VerticalAlignment="Center" | ||
VerticalContentAlignment="Center" | ||
IsChecked="{Binding Path=Excluded, Mode=TwoWay}" /> | ||
<TextBlock | ||
Margin="0,5,8,0" | ||
FontSize="12" | ||
Foreground="CornflowerBlue" | ||
Text="{Binding Path=Name}" /> | ||
</StackPanel> | ||
</DataTemplate> | ||
</ListBox.ItemTemplate> | ||
</ListBox> | ||
<Button x:Name="ApplyButton" Margin="5" Width="100" HorizontalAlignment="Right" Click="ApplyButton_Click"> | ||
<TextBlock Text="Apply"/> | ||
</Button> | ||
</StackPanel> | ||
</Window> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
//----------------------------------------------------------------------- | ||
// <copyright file="CSharpClientExcludedClasses.cs" company="Unchase"> | ||
// Copyright (c) Nikolay Chebotov (Unchase). All rights reserved. | ||
// </copyright> | ||
// <license>https://github.com/unchase/Unchase.OpenAPI.Connectedservice/blob/master/LICENSE.md</license> | ||
// <author>Nickolay Chebotov (Unchase), spiritkola@hotmail.com</author> | ||
//----------------------------------------------------------------------- | ||
|
||
using System.Collections.Generic; | ||
using System.Collections.ObjectModel; | ||
using System.Windows; | ||
|
||
namespace Unchase.OpenAPI.ConnectedService.Views | ||
{ | ||
/// <summary> | ||
/// Логика взаимодействия для CSharpClientExcludedClasses.xaml | ||
/// </summary> | ||
public partial class CSharpClientExcludedClasses : Window | ||
{ | ||
public ObservableCollection<Class> Classes { get; set; } | ||
|
||
public class Class | ||
{ | ||
public string Name { get; set; } | ||
|
||
public bool Excluded { get; set; } | ||
} | ||
|
||
public CSharpClientExcludedClasses(IEnumerable<string> classNames) | ||
{ | ||
InitializeComponent(); | ||
Classes = new ObservableCollection<Class>(); | ||
foreach (var className in classNames) | ||
{ | ||
Classes.Add(new Class | ||
{ | ||
Name = className, | ||
Excluded = false | ||
}); | ||
} | ||
ExcludedClassesListBox.ItemsSource = Classes; | ||
} | ||
|
||
private void ApplyButton_Click(object sender, RoutedEventArgs e) | ||
{ | ||
this.DialogResult = true; | ||
this.Close(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.