Skip to content

Commit

Permalink
Using datagrid to show license information
Browse files Browse the repository at this point in the history
  • Loading branch information
HEskandari committed Nov 6, 2010
1 parent 68dbd5e commit 79a4761
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
4 changes: 4 additions & 0 deletions Rhino.Licensing.AdminTool/Rhino.Licensing.AdminTool.csproj
Expand Up @@ -104,6 +104,10 @@
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="WindowsBase" />
<Reference Include="WPFToolkit, Version=3.5.40128.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\SharedLibs\WPFToolkit.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
Expand Down
10 changes: 9 additions & 1 deletion Rhino.Licensing.AdminTool/ViewModels/ProjectViewModel.cs
@@ -1,5 +1,6 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
using System.Windows;
using Caliburn.PresentationFramework.Filters;
Expand Down Expand Up @@ -138,7 +139,14 @@ public virtual ISaveFileDialogViewModel CreateSaveDialogModel()

public virtual void CopyToClipboard(string text)
{
Clipboard.SetText(text, TextDataFormat.UnicodeText);
try
{
Clipboard.SetText(text, TextDataFormat.UnicodeText);
}
catch(COMException)
{
//May thorw COM exception
}
}
}
}
11 changes: 7 additions & 4 deletions Rhino.Licensing.AdminTool/Views/ProjectView.xaml
Expand Up @@ -3,8 +3,7 @@
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:cal="http://www.caliburnproject.org"
mc:Ignorable="d"
xmlns:cal="http://www.caliburnproject.org" xmlns:ctrl="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit" mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300" Padding="5">

<DockPanel LastChildFill="True">
Expand Down Expand Up @@ -76,8 +75,12 @@
</GroupBox>

<GroupBox Header="Issued Licenses" Grid.Row="1">
<ListBox ItemsSource="{Binding CurrentProject.Product.IssuedLicenses}"
ItemTemplate="{DynamicResource IssuedLicenseTemplate}" />
<!--<ListBox ItemsSource="{Binding CurrentProject.Product.IssuedLicenses}"
ItemTemplate="{DynamicResource IssuedLicenseTemplate}" />-->

<ctrl:DataGrid ItemsSource="{Binding CurrentProject.Product.IssuedLicenses}" AutoGenerateColumns="True">
</ctrl:DataGrid>

</GroupBox>
</Grid>
</DockPanel>
Expand Down
1 change: 1 addition & 0 deletions Rhino.Licensing.AdminTool/Views/ShellView.xaml
Expand Up @@ -6,6 +6,7 @@
xmlns:cal="http://www.caliburnproject.org"
xmlns:lib="clr-namespace:Microsoft.Samples.KMoore.WPFSamples.Transition;assembly=J832.Wpf.BagOTricksLib"
mc:Ignorable="d"
WindowStartupLocation="CenterScreen"
Title="{Binding DisplayName}"
d:DesignHeight="300" d:DesignWidth="300"
Height="480" Width="640">
Expand Down

0 comments on commit 79a4761

Please sign in to comment.