Skip to content

Commit

Permalink
Preview flag is now hidden if .vsix is a marketplace release. Fixes #95
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKert committed Jul 17, 2020
1 parent 391d348 commit dd59fcc
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 5 deletions.
4 changes: 4 additions & 0 deletions src/BuildVision.Common/BuildVision.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,8 @@
<ProjectReference Include="..\BuildVision.Contracts\BuildVision.Contracts.csproj" />
</ItemGroup>

<PropertyGroup Condition="'$(Configuration)' == 'Marketplace'">
<DefineConstants>MARKETPLACE</DefineConstants>
</PropertyGroup>

</Project>
4 changes: 4 additions & 0 deletions src/BuildVision.Contracts/BuildVision.Contracts.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@
<Reference Include="PresentationFramework" />
</ItemGroup>

<PropertyGroup Condition="'$(Configuration)' == 'Marketplace'">
<DefineConstants>MARKETPLACE</DefineConstants>
</PropertyGroup>

</Project>
4 changes: 4 additions & 0 deletions src/BuildVision.Exports/BuildVision.Exports.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@
<ProjectReference Include="..\BuildVision.Contracts\BuildVision.Contracts.csproj" />
</ItemGroup>

<PropertyGroup Condition="'$(Configuration)' == 'Marketplace'">
<DefineConstants>MARKETPLACE</DefineConstants>
</PropertyGroup>

</Project>
2 changes: 1 addition & 1 deletion src/BuildVision.UI/BuildVision.UI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Marketplace|AnyCPU'">
<OutputPath>bin\Marketplace\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>TRACE;MARKETPLACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down
2 changes: 1 addition & 1 deletion src/BuildVision.UI/Components/ControlView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Border ClipToBounds="True" SnapsToDevicePixels="True" Panel.ZIndex="1000" Height="Auto" VerticalAlignment="Top" Margin="0,0" Padding="5,0,5,1" Background="#D63F26" CornerRadius="2" Visibility="{Binding PreviewVersion, Converter={StaticResource BoolToVisibilityConverter}}" HorizontalAlignment="Left">
<Border ClipToBounds="True" SnapsToDevicePixels="True" Panel.ZIndex="1000" Height="Auto" VerticalAlignment="Top" Margin="0,0" Padding="5,0,5,1" Background="#D63F26" CornerRadius="2" Visibility="{Binding Source={x:Static viewModels:BuildVisionPaneViewModel.PreviewVersion}, Converter={StaticResource BoolToVisibilityConverter}}" HorizontalAlignment="Left">
<Border.LayoutTransform>
<RotateTransform Angle="-50"/>
</Border.LayoutTransform>
Expand Down
4 changes: 2 additions & 2 deletions src/BuildVision.UI/ViewModels/BuildVisionPaneViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ public class BuildVisionPaneViewModel : BindableBase, IBuildVisionPaneViewModel
private readonly ILogger _logger = LogManager.ForContext<BuildVisionPaneViewModel>();

#if MARKETPLACE
public const string PreviewVersion = "false";
public const bool PreviewVersion = false;
#else
public const string PreviewVersion = "true";
public const bool PreviewVersion = true;
#endif

public ISolutionModel SolutionModel { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/BuildVision/BuildVision.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Marketplace|AnyCPU'">
<OutputPath>bin\Marketplace\</OutputPath>
<DefineConstants>CODE_ANALYSIS;TRACE</DefineConstants>
<DefineConstants>TRACE;CODE_ANALYSIS;CODE_ANALYSIS;MARKETPLACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down

0 comments on commit dd59fcc

Please sign in to comment.