Skip to content

Commit

Permalink
Merge pull request icsharpcode#626 from olegbevz/master
Browse files Browse the repository at this point in the history
Assembly Info Editor (issue icsharpcode#96, second attempt)
  • Loading branch information
siegfriedpammer committed Dec 20, 2014
2 parents eb05c8a + e902157 commit bcae54a
Show file tree
Hide file tree
Showing 11 changed files with 1,545 additions and 1 deletion.
63 changes: 63 additions & 0 deletions data/resources/StringResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -8377,4 +8377,67 @@ Press Esc to cancel this operation.</value>
<data name="ICSharpCode.WpfDesign.AddIn.PressAltText" xml:space="preserve">
<value>Press "Alt" to enter Container</value>
</data>
<data name="Dialog.ProjectOptions.AssemblyInfo" xml:space="preserve">
<value>Assembly Info</value>
</data>
<data name="Dialog.ProjectOptions.AssemblyInfo.AssemblyVersion" xml:space="preserve">
<value>Assembly version:</value>
</data>
<data name="Dialog.ProjectOptions.AssemblyInfo.Company" xml:space="preserve">
<value>Company:</value>
</data>
<data name="Dialog.ProjectOptions.AssemblyInfo.Copyright" xml:space="preserve">
<value>Copyright:</value>
</data>
<data name="Dialog.ProjectOptions.AssemblyInfo.Description" xml:space="preserve">
<value>Description:</value>
</data>
<data name="Dialog.ProjectOptions.AssemblyInfo.FileVersion" xml:space="preserve">
<value>File version:</value>
</data>
<data name="Dialog.ProjectOptions.AssemblyInfo.GUID" xml:space="preserve">
<value>GUID:</value>
</data>
<data name="Dialog.ProjectOptions.AssemblyInfo.MakeAssemblyCOMVisible" xml:space="preserve">
<value>Make assembly COM-visible</value>
</data>
<data name="Dialog.ProjectOptions.AssemblyInfo.NeutralLanguage" xml:space="preserve">
<value>Neutral language:</value>
</data>
<data name="Dialog.ProjectOptions.AssemblyInfo.Product" xml:space="preserve">
<value>Product:</value>
</data>
<data name="Dialog.ProjectOptions.AssemblyInfo.Title" xml:space="preserve">
<value>Title:</value>
</data>
<data name="Dialog.ProjectOptions.AssemblyInfo.Trademark" xml:space="preserve">
<value>Trademark:</value>
</data>
<data name="Dialog.ProjectOptions.AssemblyInfo.AssemblyInfoNotFound" xml:space="preserve">
<value>Assembly info file was not found. Please ensure that the project contains assembly info file.</value>
</data>
<data name="Dialog.ProjectOptions.AssemblyInfo.ClsCompliant" xml:space="preserve">
<value>CLS compliant</value>
</data>
<data name="Dialog.ProjectOptions.AssemblyInfo.DefaultAlias" xml:space="preserve">
<value>Default alias:</value>
</data>
<data name="Dialog.ProjectOptions.AssemblyInfo.InformationalVersion" xml:space="preserve">
<value>Informational version:</value>
</data>
<data name="Dialog.ProjectOptions.AssemblyInfo.JitOptimization" xml:space="preserve">
<value>JIT optimization</value>
</data>
<data name="Dialog.ProjectOptions.AssemblyInfo.JitTracking" xml:space="preserve">
<value>JIT tracking</value>
</data>
<data name="Dialog.ProjectOptions.AssemblyInfo.NewGUID" xml:space="preserve">
<value>New GUID</value>
</data>
<data name="Dialog.ProjectOptions.AssemblyInfo.IncorrectValue" xml:space="preserve">
<value>One of the assembly info values is incorrect.</value>
</data>
<data name="Dialog.ProjectOptions.AssemblyInfo.None" xml:space="preserve">
<value>None</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@
<OptionPanel id = "DebugOptions"
label = "${res:Dialog.ProjectOptions.DebugOptions}"
class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.DebugOptions"/>
<OptionPanel id = "AssemblyInfo"
label = "${res:Dialog.ProjectOptions.AssemblyInfo}"
class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.AssemblyInfoPanel"/>
<!--<OptionPanel id = "Publish"
label = "${res:Dialog.ProjectOptions.Publish}"
class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.Publish"/>-->
Expand Down
15 changes: 15 additions & 0 deletions src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,13 @@
<DependentUpon>OutputWindowOptionsPanel.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\AssemblyInfo\AssemblyInfo.cs" />
<Compile Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\AssemblyInfo\AssemblyInfoPanel.xaml.cs">
<DependentUpon>AssemblyInfoPanel.xaml</DependentUpon>
</Compile>
<Compile Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\AssemblyInfo\AssemblyInfoProvider.cs" />
<Compile Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\AssemblyInfo\AssemblyInfoViewModel.cs" />
<Compile Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\AssemblyInfo\VersionToStringConverter.cs" />
<Compile Include="Src\Gui\Pads\CompilerMessageView\MessageViewCategoryTextWriter.cs" />
<Compile Include="Src\Gui\Pads\TaskList\TaskViewResources.xaml.cs">
<DependentUpon>TaskViewResources.xaml</DependentUpon>
Expand Down Expand Up @@ -904,6 +911,10 @@
<Page Include="Src\Gui\Dialogs\OptionPanels\IDEOptions\TaskListOptionsPanel.xaml" />
<Page Include="Src\Gui\Dialogs\OptionPanels\OutputWindowOptionsPanel.xaml" />
<Page Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\ApplicationSettings.xaml" />
<Page Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\AssemblyInfo\AssemblyInfoPanel.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\BuildAdvanced.xaml" />
<Page Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\BuildEvents.xaml" />
<Page Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\BuildOutput.xaml" />
Expand Down Expand Up @@ -933,6 +944,10 @@
<Name>ICSharpCode.NRefactory.Cecil</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\..\Libraries\NRefactory\ICSharpCode.NRefactory.CSharp\ICSharpCode.NRefactory.CSharp.csproj">
<Project>{53dca265-3c3c-42f9-b647-f72ba678122b}</Project>
<Name>ICSharpCode.NRefactory.CSharp</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\Libraries\NRefactory\ICSharpCode.NRefactory.Xml\ICSharpCode.NRefactory.Xml.csproj">
<Project>{DC393B66-92ED-4CAD-AB25-CFEF23F3D7C6}</Project>
<Name>ICSharpCode.NRefactory.Xml</Name>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.

using System;

namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
{
/// <summary>
/// Assembly info parameters model
/// </summary>
public class AssemblyInfo
{
public string Title { get; set; }

public string Description { get; set; }

public string Company { get; set; }

public string Product { get; set; }

public string Copyright { get; set; }

public string Trademark { get; set; }

public string DefaultAlias { get; set; }

public Version AssemblyVersion { get; set; }

public Version AssemblyFileVersion { get; set; }

public Version InformationalVersion { get; set; }

public Guid? Guid { get; set; }

public string NeutralLanguage { get; set; }

public bool ComVisible { get; set; }

public bool ClsCompliant { get; set; }

public bool JitOptimization { get; set; }

public bool JitTracking { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<optionPanels:ProjectOptionPanel
x:Class="ICSharpCode.SharpDevelop.Gui.OptionPanels.AssemblyInfoPanel"
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"
xmlns:core="http://icsharpcode.net/sharpdevelop/core"
xmlns:optionPanels="clr-namespace:ICSharpCode.SharpDevelop.Gui.OptionPanels"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type={x:Type optionPanels:AssemblyInfoViewModel}}">
<ScrollViewer VerticalScrollBarVisibility="Auto">
<Grid x:Name="RootGrid">
<Grid.Resources>
<Style TargetType="{x:Type Label}">
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style TargetType="{x:Type TextBox}">
<Setter Property="Height" Value="20"/>
<Setter Property="Margin" Value="4"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Validation.ErrorTemplate" Value="{x:Null}"/>
</Style>
<Style TargetType="{x:Type ComboBox}">
<Setter Property="Height" Value="20"/>
<Setter Property="Margin" Value="4"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Validation.ErrorTemplate" Value="{x:Null}"/>
</Style>
<Style TargetType="{x:Type CheckBox}">
<Setter Property="Margin" Value="4"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style TargetType="{x:Type Button}">
<Setter Property="Height" Value="24"/>
<Setter Property="Margin" Value="4"/>
<Setter Property="Padding" Value="4,0,4,0"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<optionPanels:VersionToStringConverter x:Key="VersionToStringConverter"/>
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>

<Label Content="{core:Localize Dialog.ProjectOptions.AssemblyInfo.Title}" Grid.Column="0" Grid.Row="0"/>
<TextBox Text="{Binding Title, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="0"/>

<Label Content="{core:Localize Dialog.ProjectOptions.AssemblyInfo.Description}" Grid.Column="0" Grid.Row="1"/>
<TextBox Text="{Binding Description, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="1"/>

<Label Content="{core:Localize Dialog.ProjectOptions.AssemblyInfo.Company}" Grid.Column="0" Grid.Row="2"/>
<TextBox Text="{Binding Company, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="2"/>

<Label Content="{core:Localize Dialog.ProjectOptions.AssemblyInfo.Product}" Grid.Column="0" Grid.Row="3"/>
<TextBox Text="{Binding Product, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="3"/>

<Label Content="{core:Localize Dialog.ProjectOptions.AssemblyInfo.Copyright}" Grid.Column="0" Grid.Row="4"/>
<TextBox Text="{Binding Copyright, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="4"/>

<Label Content="{core:Localize Dialog.ProjectOptions.AssemblyInfo.Trademark}" Grid.Column="0" Grid.Row="5"/>
<TextBox Text="{Binding Trademark, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="5"/>

<Label Content="{core:Localize Dialog.ProjectOptions.AssemblyInfo.DefaultAlias}" Grid.Column="0" Grid.Row="6"/>
<TextBox Text="{Binding DefaultAlias, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="6"/>

<Label Content="{core:Localize Dialog.ProjectOptions.AssemblyInfo.AssemblyVersion}" Grid.Column="0" Grid.Row="7"/>
<TextBox Text="{Binding AssemblyVersion, Converter={StaticResource VersionToStringConverter}, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="7"/>

<Label Content="{core:Localize Dialog.ProjectOptions.AssemblyInfo.FileVersion}" Grid.Column="0" Grid.Row="8"/>
<TextBox Text="{Binding AssemblyFileVersion, Converter={StaticResource VersionToStringConverter}, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="8"/>

<Label Content="{core:Localize Dialog.ProjectOptions.AssemblyInfo.InformationalVersion}" Grid.Column="0" Grid.Row="9"/>
<TextBox Text="{Binding InformationalVersion, Converter={StaticResource VersionToStringConverter}, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="9"/>

<Label Content="{core:Localize Dialog.ProjectOptions.AssemblyInfo.GUID}" Grid.Column="0" Grid.Row="10"/>
<TextBox Text="{Binding Guid, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.Row="10"/>
<Button Content="{core:Localize Dialog.ProjectOptions.AssemblyInfo.NewGUID}" Command="{Binding NewGuidCommand}" Grid.Column="2" Grid.Row="10"/>

<Label Content="{core:Localize Dialog.ProjectOptions.AssemblyInfo.NeutralLanguage}" Grid.Column="0" Grid.Row="11"/>
<ComboBox SelectedValue="{Binding NeutralLanguage, UpdateSourceTrigger=PropertyChanged}" ItemsSource="{Binding Languages}"
IsEditable="True" DisplayMemberPath="Value" SelectedValuePath="Key"
Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="11"/>

<CheckBox Content="{core:Localize Dialog.ProjectOptions.AssemblyInfo.MakeAssemblyCOMVisible}"
IsChecked="{Binding ComVisible}" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="12"/>

<CheckBox Content="{core:Localize Dialog.ProjectOptions.AssemblyInfo.ClsCompliant}"
IsChecked="{Binding ClsCompliant}" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="13"/>

<CheckBox Content="{core:Localize Dialog.ProjectOptions.AssemblyInfo.JitOptimization}"
IsChecked="{Binding JitOptimization}" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="14"/>

<CheckBox Content="{core:Localize Dialog.ProjectOptions.AssemblyInfo.JitTracking}"
IsChecked="{Binding JitTracking}" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="15"/>
</Grid>
</ScrollViewer>
</optionPanels:ProjectOptionPanel>
Loading

0 comments on commit bcae54a

Please sign in to comment.