Commits

Maxim Moiseev committed 7991059

resources related updates

Comments (0)

Files changed (6)

src/cleesmic/AppManifest.xml

 <Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:sdp="http://schemas.seesmic.com/sdp/2010/deployment">
-    <sdp:Plugin>
+  <sdp:Plugin>
     <sdp:Id>16B52BAE-3448-434A-964F-2A6EC3796E3F</sdp:Id>
     <sdp:Name>Cleesmic</sdp:Name>
-    <sdp:Description>clck.ru plugin for Seesmic Desktop 2</sdp:Description>
+    <sdp:Description>clck.ru URL shortener plugin for Seesmic Desktop 2</sdp:Description>
     <sdp:Version>0.0.1.0</sdp:Version>
-    <!--<sdp:LogoUrl>clck.png</sdp:LogoUrl>-->
-    <sdp:Vendor>Maxim Moiseev maxim.moiseev@gmail.com</sdp:Vendor>
+    <sdp:LogoUrl>Resources/clck.png</sdp:LogoUrl>
+    <sdp:Vendor>Maxim Moiseev (maxim.moiseev@gmail.com)</sdp:Vendor>
     <sdp:Copyright>2010 (c) Maxim Moiseev</sdp:Copyright>
-    <sdp:HomepageUrl>http://clck.ru</sdp:HomepageUrl>
+    <sdp:HomepageUrl>http://bitbucket.org/moiseev/cleesmic/</sdp:HomepageUrl>
     <sdp:PlatformVersion>1.0.0</sdp:PlatformVersion>
   </sdp:Plugin>
   <Deployment.Parts>

src/cleesmic/CleesmicPlugin.fs

     let Id = "{16B52BAE-3448-434A-964F-2A6EC3796E3F}"
     let Name = "clck.ru"
 
+    let _resources = 
+//        System.Diagnostics.Debug.WriteLine("CleesmicPlugin: creating _resources")
+        ResourceDictionary(Source=Uri("/cleesmic;component/Xaml/Templates.xaml"))
+
+    let IconTemplate =
+//        System.Diagnostics.Debug.WriteLine("CleesmicPlugin: returning IconTemplate")
+        _resources.["CleesmicIconTemplate"] :?> DataTemplate
+        
+
 [<Export(typeof<IShortUrlProvider>)>]
 type ClckShortUrlProvider() = 
     interface IShortUrlProvider with
 
         member this.Icon
             with get () =
-                XamlReader.Load "<DataTemplate><Image Source=\"/cleesmic;component/clck.png\" Width=\"78\" Height=\"23\" /></DataTemplate>"
-                    :?> DataTemplate
-
+//                System.Diagnostics.Debug.WriteLine("CleesmicPlugin: Icon called")
+                Plugin.IconTemplate
 
         member this.Text
             with get () = Plugin.Name

src/cleesmic/Resources/clck.png

Added
New image

src/cleesmic/Xaml/Templates.xaml

+<ResourceDictionary xmlns:my="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
+                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                    xmlns:System="clr-namespace:System;assembly=mscorlib"
+                    xmlns:utils="clr-namespace:Seesmic.Sdp.Utils;assembly=Seesmic.Sdp.Utils">
+
+    <DataTemplate x:Key="CleesmicIconTemplate">
+        <Image Source="/cleesmic;component/Resources/clck.png" Width="78" Height="23"></Image>
+    </DataTemplate>
+
+</ResourceDictionary>

src/cleesmic/clck.png

Removed
Old image

src/cleesmic/cleesmic.fsproj

     <None Include="AppManifest.xml" />
     <Compile Include="AssemblyInfo.fs" />
     <Compile Include="CleesmicPlugin.fs" />
-    <Content Include="clck.png">
+    <Content Include="Resources\clck.png">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
+    <EmbeddedResource Include="Xaml\Templates.xaml" />
   </ItemGroup>
   <ItemGroup>
     <Reference Include="mscorlib" />
     </Reference>
     <Reference Include="Seesmic.Sdp.Extensibility">
       <HintPath>..\..\lib\Seesmic.Sdp.Extensibility.dll</HintPath>
+      <Private>False</Private>
     </Reference>
     <Reference Include="Seesmic.Sdp.Utils">
       <HintPath>..\..\lib\Seesmic.Sdp.Utils.dll</HintPath>
+      <Private>False</Private>
     </Reference>
     <Reference Include="System" />
     <Reference Include="System.ComponentModel.Composition">
-      <HintPath>c:\Program Files\Microsoft SDKs\Silverlight\v4.0\Libraries\Client\System.ComponentModel.Composition.dll</HintPath>
+      <HintPath>$(ProgramFiles)\Microsoft SDKs\Silverlight\v4.0\Libraries\Client\System.ComponentModel.Composition.dll</HintPath>
+      <Private>False</Private>
     </Reference>
     <Reference Include="System.ComponentModel.DataAnnotations">
-      <HintPath>..\..\..\..\..\..\..\..\Program Files\Microsoft SDKs\Silverlight\v4.0\Libraries\Client\System.ComponentModel.DataAnnotations.dll</HintPath>
+      <HintPath>$(ProgramFiles)\Microsoft SDKs\Silverlight\v4.0\Libraries\Client\System.ComponentModel.DataAnnotations.dll</HintPath>
+      <Private>False</Private>
     </Reference>
     <Reference Include="System.Core" />
     <Reference Include="System.Net" />
     <Reference Include="System.Windows" />
     <Reference Include="System.Windows.Browser" />
     <Reference Include="System.Windows.Controls.Data">
-      <HintPath>..\..\..\..\..\..\..\..\Program Files\Microsoft SDKs\Silverlight\v4.0\Libraries\Client\System.Windows.Controls.Data.dll</HintPath>
+      <HintPath>$(ProgramFiles)\Microsoft SDKs\Silverlight\v4.0\Libraries\Client\System.Windows.Controls.Data.dll</HintPath>
+      <Private>False</Private>
     </Reference>
     <Reference Include="System.Windows.Controls.Data.Input">
-      <HintPath>c:\Program Files\Microsoft SDKs\Silverlight\v4.0\Libraries\Client\System.Windows.Controls.Data.Input.dll</HintPath>
+      <HintPath>$(ProgramFiles)\Microsoft SDKs\Silverlight\v4.0\Libraries\Client\System.Windows.Controls.Data.Input.dll</HintPath>
+      <Private>False</Private>
     </Reference>
     <Reference Include="System.Windows.Controls.Input">
-      <HintPath>..\..\..\..\..\..\..\..\Program Files\Microsoft SDKs\Silverlight\v4.0\Libraries\Client\System.Windows.Controls.Input.dll</HintPath>
+      <HintPath>$(ProgramFiles)\Microsoft SDKs\Silverlight\v4.0\Libraries\Client\System.Windows.Controls.Input.dll</HintPath>
+      <Private>False</Private>
     </Reference>
     <Reference Include="System.Windows.Data">
-      <HintPath>..\..\..\..\..\..\..\..\Program Files\Microsoft SDKs\Silverlight\v4.0\Libraries\Client\System.Windows.Data.dll</HintPath>
+      <HintPath>$(ProgramFiles)\Microsoft SDKs\Silverlight\v4.0\Libraries\Client\System.Windows.Data.dll</HintPath>
+      <Private>False</Private>
     </Reference>
     <Reference Include="System.Xml" />
   </ItemGroup>