Browse Source

Add button for generating new GUID

pull/624/head
olegbevz 12 years ago
parent
commit
7d57cc7a13
  1. 3
      data/resources/StringResources.resx
  2. 30
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/AssemblyInfo/AssemblyInfoPanel.xaml
  3. 4
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/AssemblyInfo/AssemblyInfoViewModel.cs

3
data/resources/StringResources.resx

@ -8431,4 +8431,7 @@ Press Esc to cancel this operation.</value>
<data name="Dialog.ProjectOptions.AssemblyInfo.JitTracking" xml:space="preserve"> <data name="Dialog.ProjectOptions.AssemblyInfo.JitTracking" xml:space="preserve">
<value>JIT tracking</value> <value>JIT tracking</value>
</data> </data>
<data name="Dialog.ProjectOptions.AssemblyInfo.NewGUID" xml:space="preserve">
<value>New GUID</value>
</data>
</root> </root>

30
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/AssemblyInfo/AssemblyInfoPanel.xaml

@ -24,11 +24,18 @@
<Setter Property="Margin" Value="4"/> <Setter Property="Margin" Value="4"/>
<Setter Property="VerticalAlignment" Value="Center"/> <Setter Property="VerticalAlignment" Value="Center"/>
</Style> </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"/> <optionPanels:VersionToStringConverter x:Key="VersionToStringConverter"/>
</Grid.Resources> </Grid.Resources>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition/> <ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
@ -50,40 +57,41 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Label Content="{core:Localize Dialog.ProjectOptions.AssemblyInfo.Title}" Grid.Column="0" Grid.Row="0"/> <Label Content="{core:Localize Dialog.ProjectOptions.AssemblyInfo.Title}" Grid.Column="0" Grid.Row="0"/>
<TextBox Text="{Binding Title, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" 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"/> <Label Content="{core:Localize Dialog.ProjectOptions.AssemblyInfo.Description}" Grid.Column="0" Grid.Row="1"/>
<TextBox Text="{Binding Description, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" 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"/> <Label Content="{core:Localize Dialog.ProjectOptions.AssemblyInfo.Company}" Grid.Column="0" Grid.Row="2"/>
<TextBox Text="{Binding Company, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" 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"/> <Label Content="{core:Localize Dialog.ProjectOptions.AssemblyInfo.Product}" Grid.Column="0" Grid.Row="3"/>
<TextBox Text="{Binding Product, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" 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"/> <Label Content="{core:Localize Dialog.ProjectOptions.AssemblyInfo.Copyright}" Grid.Column="0" Grid.Row="4"/>
<TextBox Text="{Binding Copyright, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" 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"/> <Label Content="{core:Localize Dialog.ProjectOptions.AssemblyInfo.Trademark}" Grid.Column="0" Grid.Row="5"/>
<TextBox Text="{Binding Trademark, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" 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"/> <Label Content="{core:Localize Dialog.ProjectOptions.AssemblyInfo.DefaultAlias}" Grid.Column="0" Grid.Row="6"/>
<TextBox Text="{Binding DefaultAlias, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" 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"/> <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.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"/> <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.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"/> <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.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"/> <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"/> <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"/> <Label Content="{core:Localize Dialog.ProjectOptions.AssemblyInfo.NeutralLanguage}" Grid.Column="0" Grid.Row="11"/>
<TextBox Text="{Binding NeutralLanguage, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.Row="11"/> <TextBox Text="{Binding NeutralLanguage, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="11"/>
<CheckBox Content="{core:Localize Dialog.ProjectOptions.AssemblyInfo.MakeAssemblyCOMVisible}" <CheckBox Content="{core:Localize Dialog.ProjectOptions.AssemblyInfo.MakeAssemblyCOMVisible}"
IsChecked="{Binding ComVisible}" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="12"/> IsChecked="{Binding ComVisible}" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="12"/>

4
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/AssemblyInfo/AssemblyInfoViewModel.cs

@ -1,4 +1,5 @@
using System; using System;
using System.Windows.Input;
using ICSharpCode.SharpDevelop.Widgets; using ICSharpCode.SharpDevelop.Widgets;
namespace ICSharpCode.SharpDevelop.Gui.OptionPanels namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
@ -10,6 +11,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
public AssemblyInfoViewModel(AssemblyInfo assemblyInfo) public AssemblyInfoViewModel(AssemblyInfo assemblyInfo)
{ {
this.assemblyInfo = assemblyInfo; this.assemblyInfo = assemblyInfo;
NewGuidCommand = new RelayCommand(() => Guid = System.Guid.NewGuid());
} }
public string Title public string Title
@ -107,5 +109,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
get { return assemblyInfo.JitTracking; } get { return assemblyInfo.JitTracking; }
set { assemblyInfo.JitTracking = value; OnPropertyChanged(); } set { assemblyInfo.JitTracking = value; OnPropertyChanged(); }
} }
public ICommand NewGuidCommand { get; set; }
} }
} }
Loading…
Cancel
Save