Skip to content
Browse files

Update to desk project

  • Loading branch information...
1 parent e2b7176 commit df36cca76a7986bb9b4d43c9e122179f84ee37b3 Steven Houben committed Nov 26, 2012
View
411 NooSphere/ActivityDesk/ActivityDesk.csproj
@@ -1,186 +1,227 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{94919648-ACAC-4E13-817C-5F41B9123C77}</ProjectGuid>
- <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <RootNamespace>ActivityDesk</RootNamespace>
- <AssemblyName>ActivityDesk</AssemblyName>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <WarningLevel>4</WarningLevel>
- <OutputType>winexe</OutputType>
- <IsWebBootstrapper>false</IsWebBootstrapper>
- <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
- <SccProjectName>Svn</SccProjectName>
- <SccLocalPath>Svn</SccLocalPath>
- <SccAuxPath>Svn</SccAuxPath>
- <SccProvider>SubversionScc</SccProvider>
- <PublishUrl>Publish\</PublishUrl>
- <Install>true</Install>
- <InstallFrom>Web</InstallFrom>
- <UpdateEnabled>true</UpdateEnabled>
- <UpdateMode>Foreground</UpdateMode>
- <UpdateInterval>7</UpdateInterval>
- <UpdateIntervalUnits>Days</UpdateIntervalUnits>
- <UpdatePeriodically>false</UpdatePeriodically>
- <UpdateRequired>false</UpdateRequired>
- <MapFileExtensions>false</MapFileExtensions>
- <ApplicationRevision>0</ApplicationRevision>
- <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
- <UseApplicationTrust>false</UseApplicationTrust>
- <BootstrapperEnabled>true</BootstrapperEnabled>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>.\bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <RunCodeAnalysis>true</RunCodeAnalysis>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugSymbols>false</DebugSymbols>
- <Optimize>true</Optimize>
- <OutputPath>.\bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- </PropertyGroup>
- <PropertyGroup>
- <ApplicationIcon>
- </ApplicationIcon>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="Microsoft.Surface.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
- <Reference Include="Microsoft.Surface.Presentation.Generic, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
- <Reference Include="System" />
- <Reference Include="System.Core">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.Windows.Forms" />
- <Reference Include="System.Xaml" />
- <Reference Include="System.Xml" />
- <Reference Include="WindowsBase" />
- <Reference Include="PresentationCore" />
- <Reference Include="PresentationFramework" />
- <Reference Include="Microsoft.Surface" />
- <Reference Include="Microsoft.Surface.Presentation" />
- </ItemGroup>
- <ItemGroup>
- <ApplicationDefinition Include="App.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </ApplicationDefinition>
- <Compile Include="App.xaml.cs">
- <DependentUpon>App.xaml</DependentUpon>
- <SubType>Code</SubType>
- </Compile>
- <None Include="app.config">
- <SubType>Designer</SubType>
- </None>
- <Compile Include="DeskState.cs" />
- <Compile Include="Helper\Pdf\PDFConverter.cs" />
- <Compile Include="Visualizer\Definitions\SmartPhoneDefinition.cs" />
- <Compile Include="Visualizer\Definitions\TabletDefinition.cs" />
- <Compile Include="Visualizer\Visualizations\SmartPhone.xaml.cs">
- <DependentUpon>SmartPhone.xaml</DependentUpon>
- </Compile>
- <Compile Include="Visualizer\Visualizations\VisualizationTablet.xaml.cs">
- <DependentUpon>VisualizationTablet.xaml</DependentUpon>
- </Compile>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Visualizer\Visualizations\BaseVisualization.cs" />
- <Compile Include="Visualizer\Visualizations\VisualizationSmartPhone.xaml.cs">
- <DependentUpon>VisualizationSmartPhone.xaml</DependentUpon>
- </Compile>
- <Compile Include="Helper\GuiHelpers.cs" />
- <Compile Include="Windowing\TableWindow.xaml.cs">
- <DependentUpon>TableWindow.xaml</DependentUpon>
- </Compile>
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="Helper\GlobalSuppressions.cs" />
- <Compile Include="Desk.xaml.cs">
- <DependentUpon>Desk.xaml</DependentUpon>
- </Compile>
- <Compile Include="Visualizer\AncestryChain.cs" />
- <Compile Include="Visualizer\TagVisualizationEnterLeaveEventArgs.cs" />
- <Compile Include="Visualizer\TagVisualizerEvents.cs" />
- <Compile Include="Visualizer\TagVisualizerSynchronizationMode.cs" />
- <AppDesigner Include="Properties\" />
- </ItemGroup>
- <ItemGroup>
- <Page Include="Visualizer\Visualizations\SmartPhone.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Visualizer\Visualizations\VisualizationSmartPhone.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </Page>
- <Page Include="Desk.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </Page>
- <Page Include="Windowing\TableWindow.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </Page>
- <Page Include="Visualizer\Visualizations\StyleDictionary.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </Page>
- <Page Include="Visualizer\Visualizations\VisualizationTablet.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </Page>
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Images\document.PNG" />
- </ItemGroup>
- <ItemGroup>
- <WCFMetadata Include="Service References\" />
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include=".NETFramework,Version=v4.0">
- <Visible>False</Visible>
- <ProductName>Microsoft .NET Framework 4 %28x86 and x64%29</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
- <Visible>False</Visible>
- <ProductName>Windows Installer 3.1</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\NooSphere.ActivitySystem\NooSphere.ActivitySystem.csproj">
- <Project>{5CD6DD93-3EA1-425F-89D7-A80FD23BBC71}</Project>
- <Name>NooSphere.ActivitySystem</Name>
- </ProjectReference>
- <ProjectReference Include="..\NooSphere.Core\NooSphere.Core.csproj">
- <Project>{03C072A4-5960-4A5D-B0CC-98EBD854E970}</Project>
- <Name>NooSphere.Core</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Images\blue.jpg" />
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Images\green.jpg" />
- <Resource Include="Images\red.jpg" />
- <Resource Include="Images\yellow.jpg" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{94919648-ACAC-4E13-817C-5F41B9123C77}</ProjectGuid>
+ <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <RootNamespace>ActivityDesk</RootNamespace>
+ <AssemblyName>ActivityDesk</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <WarningLevel>4</WarningLevel>
+ <OutputType>winexe</OutputType>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+ <SccProjectName>Svn</SccProjectName>
+ <SccLocalPath>Svn</SccLocalPath>
+ <SccAuxPath>Svn</SccAuxPath>
+ <SccProvider>SubversionScc</SccProvider>
+ <PublishUrl>Publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Web</InstallFrom>
+ <UpdateEnabled>true</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>false</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ <Utf8Output>true</Utf8Output>
+ <ExpressionBlendVersion>4.0.20525.0</ExpressionBlendVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>.\bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <RunCodeAnalysis>true</RunCodeAnalysis>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugSymbols>false</DebugSymbols>
+ <Optimize>true</Optimize>
+ <OutputPath>.\bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ </PropertyGroup>
+ <PropertyGroup>
+ <ApplicationIcon>
+ </ApplicationIcon>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Microsoft.Surface.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
+ <Reference Include="Microsoft.Surface.Presentation.Generic, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
+ <Reference Include="System" />
+ <Reference Include="System.Core">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xaml" />
+ <Reference Include="System.Xml" />
+ <Reference Include="WindowsBase" />
+ <Reference Include="PresentationCore" />
+ <Reference Include="PresentationFramework" />
+ <Reference Include="Microsoft.Surface" />
+ <Reference Include="Microsoft.Surface.Presentation" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </ApplicationDefinition>
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ <SubType>Code</SubType>
+ </Compile>
+ <None Include="app.config">
+ <SubType>Designer</SubType>
+ </None>
+ <Compile Include="CustomTopmostBehavior.cs" />
+ <Compile Include="DeskState.cs" />
+ <Compile Include="DeviceTumbnail.xaml.cs">
+ <DependentUpon>DeviceTumbnail.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="DocumentContainer.xaml.cs">
+ <DependentUpon>DocumentContainer.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="DocumentViewTemplateSelector.cs" />
+ <Compile Include="Helper\Pdf\PDFConverter.cs" />
+ <Compile Include="Note.xaml.cs">
+ <DependentUpon>Note.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Visualizer\Definitions\SmartPhoneDefinition.cs" />
+ <Compile Include="Visualizer\Definitions\TabletDefinition.cs" />
+ <Compile Include="Visualizer\Visualizations\SmartPhone.xaml.cs">
+ <DependentUpon>SmartPhone.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Visualizer\Visualizations\VisualizationTablet.xaml.cs">
+ <DependentUpon>VisualizationTablet.xaml</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Visualizer\Visualizations\BaseVisualization.cs" />
+ <Compile Include="Visualizer\Visualizations\VisualizationSmartPhone.xaml.cs">
+ <DependentUpon>VisualizationSmartPhone.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Helper\GuiHelpers.cs" />
+ <Compile Include="Windowing\TableWindow.xaml.cs">
+ <DependentUpon>TableWindow.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Helper\GlobalSuppressions.cs" />
+ <Compile Include="Desk.xaml.cs">
+ <DependentUpon>Desk.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Visualizer\AncestryChain.cs" />
+ <Compile Include="Visualizer\TagVisualizationEnterLeaveEventArgs.cs" />
+ <Compile Include="Visualizer\TagVisualizerEvents.cs" />
+ <Compile Include="Visualizer\TagVisualizerSynchronizationMode.cs" />
+ <AppDesigner Include="Properties\" />
+ </ItemGroup>
+ <ItemGroup>
+ <Page Include="ColoredButtons.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="DeviceTumbnail.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="DocumentContainer.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="Note.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Visualizer\Visualizations\SmartPhone.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="Visualizer\Visualizations\VisualizationSmartPhone.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Desk.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Windowing\TableWindow.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Visualizer\Visualizations\StyleDictionary.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Visualizer\Visualizations\VisualizationTablet.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="icon_tablet.png" />
+ <Resource Include="Images\document.PNG" />
+ <Resource Include="preview_COLOURBOX4153138.jpg" />
+ <Resource Include="Visualizer\Visualizations\pin1.jpg" />
+ </ItemGroup>
+ <ItemGroup>
+ <WCFMetadata Include="Service References\" />
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include=".NETFramework,Version=v4.0">
+ <Visible>False</Visible>
+ <ProductName>Microsoft .NET Framework 4 %28x86 and x64%29</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+ <Visible>False</Visible>
+ <ProductName>Windows Installer 3.1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\NooSphere.ActivitySystem\NooSphere.ActivitySystem.csproj">
+ <Project>{5CD6DD93-3EA1-425F-89D7-A80FD23BBC71}</Project>
+ <Name>NooSphere.ActivitySystem</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\NooSphere.Core\NooSphere.Core.csproj">
+ <Project>{03C072A4-5960-4A5D-B0CC-98EBD854E970}</Project>
+ <Name>NooSphere.Core</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\blue.jpg" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\green.jpg" />
+ <Resource Include="Images\red.jpg" />
+ <Resource Include="Images\yellow.jpg" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\back.jpg" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\1ms-193199.jpg" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\note.png" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>
View
275 NooSphere/ActivityDesk/ColoredButtons.xaml
@@ -0,0 +1,275 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+<Style x:Key="Success" TargetType="{x:Type Button}">
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <ControlTemplate.Resources>
+ <Storyboard x:Key="OnMouseEnter1">
+ <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="rectangle">
+ <EasingColorKeyFrame KeyTime="0" Value="#FF3ECC0E"/>
+ </ColorAnimationUsingKeyFrames>
+ </Storyboard>
+ <Storyboard x:Key="OnMouseLeave1">
+ <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="rectangle">
+ <EasingColorKeyFrame KeyTime="0" Value="#FF80E25F"/>
+ </ColorAnimationUsingKeyFrames>
+ </Storyboard>
+ <Storyboard x:Key="OnMouseDown1">
+ <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="rectangle">
+ <EasingColorKeyFrame KeyTime="0" Value="#FF33A50B"/>
+ </ColorAnimationUsingKeyFrames>
+ </Storyboard>
+ </ControlTemplate.Resources>
+ <Grid>
+ <Rectangle x:Name="rectangle" RadiusY="3.5" RadiusX="3.5" Stroke="#FF428700">
+ <Rectangle.Fill>
+ <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
+ <GradientStop Color="#FF4B9F2C" Offset="1"/>
+ <GradientStop Color="#FF80E25F" Offset="0.289"/>
+ </LinearGradientBrush>
+ </Rectangle.Fill>
+ </Rectangle>
+ <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
+ </Grid>
+ <ControlTemplate.Triggers>
+ <EventTrigger RoutedEvent="Mouse.PreviewMouseUp">
+ <BeginStoryboard Storyboard="{StaticResource OnMouseEnter1}"/>
+ </EventTrigger>
+ <EventTrigger RoutedEvent="Mouse.PreviewMouseDown">
+ <BeginStoryboard x:Name="OnMouseDown1_BeginStoryboard" Storyboard="{StaticResource OnMouseDown1}"/>
+ </EventTrigger>
+ <EventTrigger RoutedEvent="Mouse.MouseEnter">
+ <BeginStoryboard x:Name="OnMouseEnter1_BeginStoryboard" Storyboard="{StaticResource OnMouseEnter1}"/>
+ </EventTrigger>
+ <EventTrigger RoutedEvent="Mouse.MouseLeave">
+ <BeginStoryboard x:Name="OnMouseLeave1_BeginStoryboard" Storyboard="{StaticResource OnMouseLeave1}"/>
+ </EventTrigger>
+ <Trigger Property="IsFocused" Value="True"/>
+ <Trigger Property="IsDefaulted" Value="True"/>
+ <Trigger Property="IsMouseOver" Value="True"/>
+ <Trigger Property="IsPressed" Value="True"/>
+ <Trigger Property="IsEnabled" Value="False"/>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+<Style x:Key="Invert" TargetType="{x:Type Button}">
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <ControlTemplate.Resources>
+ <Storyboard x:Key="OnMouseEnter1">
+ <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="rectangle">
+ <EasingColorKeyFrame KeyTime="0" Value="#FF4E4E4E"/>
+ </ColorAnimationUsingKeyFrames>
+ </Storyboard>
+ <Storyboard x:Key="OnMouseLeave1">
+ <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="rectangle">
+ <EasingColorKeyFrame KeyTime="0" Value="#FF929391"/>
+ </ColorAnimationUsingKeyFrames>
+ </Storyboard>
+ <Storyboard x:Key="OnMouseDown1">
+ <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="rectangle">
+ <EasingColorKeyFrame KeyTime="0" Value="#FF1F1F1F"/>
+ </ColorAnimationUsingKeyFrames>
+ </Storyboard>
+ </ControlTemplate.Resources>
+ <Grid>
+ <Rectangle x:Name="rectangle" RadiusY="3.5" RadiusX="3.5" Stroke="Black">
+ <Rectangle.Fill>
+ <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
+ <GradientStop Color="#FF141414" Offset="0.474"/>
+ <GradientStop Color="#FF929391" Offset="0.043"/>
+ </LinearGradientBrush>
+ </Rectangle.Fill>
+ </Rectangle>
+ <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
+ </Grid>
+ <ControlTemplate.Triggers>
+ <EventTrigger RoutedEvent="Mouse.PreviewMouseUp">
+ <BeginStoryboard Storyboard="{StaticResource OnMouseEnter1}"/>
+ </EventTrigger>
+ <EventTrigger RoutedEvent="Mouse.PreviewMouseUp">
+ <BeginStoryboard Storyboard="{StaticResource OnMouseEnter1}"/>
+ </EventTrigger>
+ <EventTrigger RoutedEvent="Mouse.PreviewMouseDown">
+ <BeginStoryboard x:Name="OnMouseDown1_BeginStoryboard" Storyboard="{StaticResource OnMouseDown1}"/>
+ </EventTrigger>
+ <EventTrigger RoutedEvent="Mouse.MouseEnter">
+ <BeginStoryboard x:Name="OnMouseEnter1_BeginStoryboard" Storyboard="{StaticResource OnMouseEnter1}"/>
+ </EventTrigger>
+ <EventTrigger RoutedEvent="Mouse.MouseLeave">
+ <BeginStoryboard x:Name="OnMouseLeave1_BeginStoryboard" Storyboard="{StaticResource OnMouseLeave1}"/>
+ </EventTrigger>
+ <Trigger Property="IsFocused" Value="True"/>
+ <Trigger Property="IsDefaulted" Value="True"/>
+ <Trigger Property="IsMouseOver" Value="True"/>
+ <Trigger Property="IsPressed" Value="True"/>
+ <Trigger Property="IsEnabled" Value="False"/>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+</Style>
+<Style x:Key="Danger" TargetType="{x:Type Button}">
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <ControlTemplate.Resources>
+ <Storyboard x:Key="OnMouseEnter1">
+ <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="rectangle">
+ <EasingColorKeyFrame KeyTime="0" Value="#FFCC0E0E"/>
+ </ColorAnimationUsingKeyFrames>
+ </Storyboard>
+ <Storyboard x:Key="OnMouseLeave1">
+ <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="rectangle">
+ <EasingColorKeyFrame KeyTime="0" Value="#FFE25F5F"/>
+ </ColorAnimationUsingKeyFrames>
+ </Storyboard>
+ <Storyboard x:Key="OnMouseDown1">
+ <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="rectangle">
+ <EasingColorKeyFrame KeyTime="0" Value="#FFA50B0B"/>
+ </ColorAnimationUsingKeyFrames>
+ </Storyboard>
+ </ControlTemplate.Resources>
+ <Grid>
+ <Rectangle x:Name="rectangle" RadiusY="3.5" RadiusX="3.5" Stroke="#FF870000">
+ <Rectangle.Fill>
+ <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
+ <GradientStop Color="#FF9F2C2C" Offset="1"/>
+ <GradientStop Color="#FFE25F5F" Offset="0.289"/>
+ </LinearGradientBrush>
+ </Rectangle.Fill>
+ </Rectangle>
+ <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
+ </Grid>
+ <ControlTemplate.Triggers>
+ <EventTrigger RoutedEvent="Mouse.PreviewMouseUp">
+ <BeginStoryboard Storyboard="{StaticResource OnMouseEnter1}"/>
+ </EventTrigger>
+ <EventTrigger RoutedEvent="Mouse.PreviewMouseDown">
+ <BeginStoryboard x:Name="OnMouseDown1_BeginStoryboard" Storyboard="{StaticResource OnMouseDown1}"/>
+ </EventTrigger>
+ <EventTrigger RoutedEvent="Mouse.MouseEnter">
+ <BeginStoryboard x:Name="OnMouseEnter1_BeginStoryboard" Storyboard="{StaticResource OnMouseEnter1}"/>
+ </EventTrigger>
+ <EventTrigger RoutedEvent="Mouse.MouseLeave">
+ <BeginStoryboard x:Name="OnMouseLeave1_BeginStoryboard" Storyboard="{StaticResource OnMouseLeave1}"/>
+ </EventTrigger>
+ <Trigger Property="IsFocused" Value="True"/>
+ <Trigger Property="IsDefaulted" Value="True"/>
+ <Trigger Property="IsMouseOver" Value="True"/>
+ <Trigger Property="IsPressed" Value="True"/>
+ <Trigger Property="IsEnabled" Value="False"/>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+ <Style x:Key="Warning" TargetType="{x:Type Button}">
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <ControlTemplate.Resources>
+ <Storyboard x:Key="OnMouseEnter1">
+ <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="rectangle">
+ <EasingColorKeyFrame KeyTime="0" Value="#FFE4CA22"/>
+ </ColorAnimationUsingKeyFrames>
+ </Storyboard>
+ <Storyboard x:Key="OnMouseLeave1">
+ <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="rectangle">
+ <EasingColorKeyFrame KeyTime="0" Value="#FFE2D75F"/>
+ </ColorAnimationUsingKeyFrames>
+ </Storyboard>
+ <Storyboard x:Key="OnMouseDown1">
+ <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="rectangle">
+ <EasingColorKeyFrame KeyTime="0" Value="#FFA57C0B"/>
+ </ColorAnimationUsingKeyFrames>
+ </Storyboard>
+ </ControlTemplate.Resources>
+ <Grid>
+ <Rectangle x:Name="rectangle" RadiusY="3.5" RadiusX="3.5" Stroke="#FF876900">
+ <Rectangle.Fill>
+ <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
+ <GradientStop Color="#FFC49512" Offset="1"/>
+ <GradientStop Color="#FFE2D75F" Offset="0.289"/>
+ </LinearGradientBrush>
+ </Rectangle.Fill>
+ </Rectangle>
+ <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
+ </Grid>
+ <ControlTemplate.Triggers>
+ <EventTrigger RoutedEvent="Mouse.PreviewMouseDown">
+ <BeginStoryboard x:Name="OnMouseDown1_BeginStoryboard" Storyboard="{StaticResource OnMouseDown1}"/>
+ </EventTrigger>
+ <EventTrigger RoutedEvent="Mouse.MouseEnter">
+ <BeginStoryboard x:Name="OnMouseEnter1_BeginStoryboard" Storyboard="{StaticResource OnMouseEnter1}"/>
+ </EventTrigger>
+ <EventTrigger RoutedEvent="Mouse.MouseLeave">
+ <BeginStoryboard x:Name="OnMouseLeave1_BeginStoryboard" Storyboard="{StaticResource OnMouseLeave1}"/>
+ </EventTrigger>
+ <Trigger Property="IsFocused" Value="True"/>
+ <Trigger Property="IsDefaulted" Value="True"/>
+ <Trigger Property="IsMouseOver" Value="True"/>
+ <Trigger Property="IsPressed" Value="True"/>
+ <Trigger Property="IsEnabled" Value="False"/>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+ <Style x:Key="Action" TargetType="{x:Type Button}">
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <ControlTemplate.Resources>
+ <Storyboard x:Key="OnMouseEnter1">
+ <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="rectangle">
+ <EasingColorKeyFrame KeyTime="0" Value="#FF0E71CC"/>
+ </ColorAnimationUsingKeyFrames>
+ </Storyboard>
+ <Storyboard x:Key="OnMouseLeave1">
+ <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="rectangle">
+ <EasingColorKeyFrame KeyTime="0" Value="#FF5F85E2"/>
+ </ColorAnimationUsingKeyFrames>
+ </Storyboard>
+ <Storyboard x:Key="OnMouseDown1">
+ <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="rectangle">
+ <EasingColorKeyFrame KeyTime="0" Value="#FF0B2AA5"/>
+ </ColorAnimationUsingKeyFrames>
+ </Storyboard>
+ </ControlTemplate.Resources>
+ <Grid>
+ <Rectangle x:Name="rectangle" RadiusY="3.5" RadiusX="3.5" Stroke="#FF100C8D">
+ <Rectangle.Fill>
+ <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
+ <GradientStop Color="#FF2C389F" Offset="1"/>
+ <GradientStop Color="#FF5F85E2" Offset="0.289"/>
+ </LinearGradientBrush>
+ </Rectangle.Fill>
+ </Rectangle>
+ <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
+ </Grid>
+ <ControlTemplate.Triggers>
+ <EventTrigger RoutedEvent="Mouse.PreviewMouseDown">
+ <BeginStoryboard x:Name="OnMouseDown1_BeginStoryboard" Storyboard="{StaticResource OnMouseDown1}"/>
+ </EventTrigger>
+ <EventTrigger RoutedEvent="Mouse.MouseEnter">
+ <BeginStoryboard x:Name="OnMouseEnter1_BeginStoryboard" Storyboard="{StaticResource OnMouseEnter1}"/>
+ </EventTrigger>
+ <EventTrigger RoutedEvent="Mouse.MouseLeave">
+ <BeginStoryboard x:Name="OnMouseLeave1_BeginStoryboard" Storyboard="{StaticResource OnMouseLeave1}"/>
+ </EventTrigger>
+ <Trigger Property="IsFocused" Value="True"/>
+ <Trigger Property="IsDefaulted" Value="True"/>
+ <Trigger Property="IsMouseOver" Value="True"/>
+ <Trigger Property="IsPressed" Value="True"/>
+ <Trigger Property="IsEnabled" Value="False"/>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+</Style>
+</ResourceDictionary>
View
106 NooSphere/ActivityDesk/CustomTopmostBehavior.cs
@@ -0,0 +1,106 @@
+using System;
+using System.Windows;
+using System.Windows.Input;
+using Microsoft.Surface.Presentation.Controls;
+using Microsoft.Surface.Presentation.Input;
+
+namespace Behaviors
+{
+ /// <summary>
+ /// Attach this behavior to ScatterViewItems to change their default behavior
+ /// of bringing an activated item to the top. Using this behavior, you can for
+ /// example achieve that non-finger touches from the Surface device to not
+ /// bring items to the top.
+ ///
+ /// Author: Dominik Schmidt (www.dominikschmidt.net)
+ /// </summary>
+ public class CustomTopmostBehavior
+ {
+ #region attached behavior
+
+ /// <summary>
+ /// To enable this behavior, set to true.
+ /// </summary>
+ public static readonly DependencyProperty IsEnabledProperty =
+ DependencyProperty.RegisterAttached("IsEnabled", typeof(bool),
+ typeof(CustomTopmostBehavior), new FrameworkPropertyMetadata(false, OnBehaviorEnabled));
+
+ public static bool GetIsEnabled(DependencyObject d)
+ {
+ return (bool)d.GetValue(IsEnabledProperty);
+ }
+
+ /// <summary>
+ /// Enables or disables behavior for provided ScatterViewItem.
+ /// </summary>
+ /// <param name="d">Target object, must be a ScatterViewItem</param>
+ /// <param name="value">True to enable behavior</param>
+ public static void SetIsEnabled(DependencyObject d, bool value)
+ {
+ d.SetValue(IsEnabledProperty, value);
+ }
+
+ #endregion
+
+ #region static properties
+
+ /// <summary>
+ /// Condition that determines if a preview TouchDown brings
+ /// an ScatterViewItem to the top.
+ /// </summary>
+ public static Predicate<TouchDevice> TestCondition { get; set; }
+
+ static CustomTopmostBehavior()
+ {
+ // intialize default behavior: only bring to top for finger touches
+ TestCondition = (t) =>
+ {
+ return t.GetIsFingerRecognized();
+ };
+ }
+
+ #endregion
+
+ #region helpers
+
+ /// <summary>
+ /// Activate this behavior for all ScatterViewItems
+ /// </summary>
+ public static void Activate()
+ {
+ // sets style for all ScatterViewItems
+ Style sviStyle = new Style(typeof(ScatterViewItem));
+ sviStyle.Setters.Add(new Setter(CustomTopmostBehavior.IsEnabledProperty, true));
+ Application.Current.Resources.Add(typeof(ScatterViewItem), sviStyle);
+ }
+
+ #endregion
+
+ #region private methods
+
+ private static void OnBehaviorEnabled(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ ScatterViewItem item = d as ScatterViewItem;
+ if (item == null)
+ throw new InvalidOperationException("CustomTopmostBehavior can only be attached to ScatterViewItem");
+
+ if (e.NewValue is bool && (bool)e.NewValue)
+ {
+ // disable automatic topmost behavior
+ item.IsTopmostOnActivation = false;
+
+ // enable custom topmost behavior
+ item.AddHandler(ScatterViewItem.PreviewTouchDownEvent, new RoutedEventHandler((_s, _e) =>
+ {
+ TouchEventArgs t = _e as TouchEventArgs;
+ if (TestCondition(t.TouchDevice))
+ {
+ item.SetRelativeZIndex(RelativeScatterViewZIndex.Topmost);
+ }
+ }), true);
+ }
+ }
+
+ #endregion
+ }
+}
View
32 NooSphere/ActivityDesk/Desk.xaml
@@ -7,29 +7,29 @@
Title="Activity Desk" mc:Ignorable="d"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- d:DesignHeight="294" d:DesignWidth="717" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" WindowState="Normal" WindowStyle="None" ResizeMode="NoResize">
+ d:DesignHeight="1080" d:DesignWidth="1920" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" WindowState="Normal" WindowStyle="None" ResizeMode="NoResize" ShowInTaskbar="False" PreviewTouchDown="SurfaceWindow_PreviewTouchDown" AutoOrientsOnStartup="True">
<s:SurfaceWindow.Background>
- <ImageBrush />
+ <ImageBrush ImageSource="/ActivityDesk;component/Images/back.jpg" />
</s:SurfaceWindow.Background>
<s:SurfaceWindow.Resources>
<ImageBrush x:Key="blue" ImageSource="/ActivityDesk;component/Images/blue.jpg" />
<ImageBrush x:Key="red" ImageSource="/ActivityDesk;component/Images/red.jpg" />
<ImageBrush x:Key="green" ImageSource="/ActivityDesk;component/Images/green.jpg" />
<ImageBrush x:Key="yellow" ImageSource="/ActivityDesk;component/Images/yellow.jpg" />
+ <ImageBrush x:Key="back" ImageSource="/ActivityDesk;component/Images/back.jpg" />
</s:SurfaceWindow.Resources>
- <s:TagVisualizer x:Name="Visualizer" tve:TagVisualizerEvents.Mode="Off" VisualizationAdded="Visualizer_VisualizationAdded" VisualizationRemoved="Visualizer_VisualizationRemoved" VisualizationMoved="Visualizer_VisualizationMoved">
- <Grid Name="grid">
- <s:ScatterView Name="view">
- <s:ScatterView.Background>
- <SolidColorBrush />
- </s:ScatterView.Background>
- </s:ScatterView>
- <Grid.Background>
- <SolidColorBrush />
- </Grid.Background>
- </Grid>
- <s:TagVisualizer.Background>
- <SolidColorBrush />
- </s:TagVisualizer.Background>
+ <s:TagVisualizer x:Name="Visualizer" tve:TagVisualizerEvents.Mode="Off" VisualizationAdded="Visualizer_VisualizationAdded" VisualizationRemoved="Visualizer_VisualizationRemoved" VisualizationMoved="Visualizer_VisualizationMoved" Width="1920" Height="1080">
+ <Canvas Name="canvas">
+ <Border Width="1920" Height="1080" BorderThickness="50" BorderBrush="#B4000000" CornerRadius="50" />
+ <Label Content="Drop device to start" FontSize="150" Foreground="#2C6C6C6C" Margin="350,400,0,0" Canvas.Left="-350" Width="1966" HorizontalAlignment="Center" HorizontalContentAlignment="Center" FontWeight="ExtraBlack" ForceCursor="False" FontStretch="UltraExpanded" Name="lblStart" />
+ <Canvas Name="grid" Width="1920" Height="1080" Background="{x:Null}">
+
+ <Grid Width="1920" Height="1080" Name="documentViewContainer">
+ </Grid>
+ <s:SurfaceButton Canvas.Left="50" Canvas.Top="50" Height="156" Name="btnNote" Width="191" Background="#FFE5D300" IsEnabled="True" PreviewTouchDown="button1_PreviewTouchDown">
+ <Label Content="Notes" FontSize="30" FontFamily="SketchFlow Print" FontStyle="Normal" FontWeight="Bold" ForceCursor="False" Canvas.Left="42" Canvas.Top="59"></Label>
+ </s:SurfaceButton>
+ </Canvas>
+ </Canvas>
</s:TagVisualizer>
</s:SurfaceWindow>
View
174 NooSphere/ActivityDesk/Desk.xaml.cs
@@ -35,6 +35,10 @@
using System.Windows.Controls;
using ActivityDesk.Visualizer.Visualization;
using System.Threading.Tasks;
+using System.Windows.Input;
+using Behaviors;
+using System.Windows.Ink;
+using Microsoft.Surface.Presentation.Input;
namespace ActivityDesk
{
@@ -56,6 +60,8 @@ public partial class Desk : SurfaceWindow
private readonly List<string> _lockedTags = new List<string>();
private readonly List<string> _connectedDeviceTags = new List<string>();
private Dictionary<Guid, SurfaceButton> _proxies = new Dictionary<Guid, SurfaceButton>();
+ private Dictionary<string, ScatterViewItem> _lockedTagTumbnails = new Dictionary<string, ScatterViewItem>();
+ private DocumentContainer documentContainer = new DocumentContainer();
#endregion
@@ -69,12 +75,14 @@ public Desk()
//Initializes design-time components
InitializeComponent();
- //Disable default touch visualizations
- TouchVisualizer.SetShowsVisualizations(this, false);
+ TouchVisualizer.SetShowsVisualizations(documentContainer, false);
+ Visualizer.VisualizationInitialized += new TagVisualizerEventHandler(Visualizer_VisualizationInitialized);
//Initializes tag definitions
InitializeTags();
+ this.documentViewContainer.Children.Add(documentContainer);
+
SetDeskState(DeskState.Ready);
_device = new Device()
@@ -86,7 +94,6 @@ public Desk()
};
}
-
public BitmapSource ToBitmapSource(System.Drawing.Bitmap source)
{
BitmapSource bitSrc = null;
@@ -125,21 +132,23 @@ private void SetDeskState(ActivityDesk.DeskState deskState)
this.Dispatcher.Invoke(DispatcherPriority.Background, new System.Action(() =>
{
- switch (deskState)
- {
- case ActivityDesk.DeskState.Active:
- this.Background = (ImageBrush)this.Resources["green"];
- break;
- case ActivityDesk.DeskState.Locked:
- this.Background = (ImageBrush)this.Resources["red"];
- break;
- case ActivityDesk.DeskState.Occupied:
- this.Background = (ImageBrush)this.Resources["yellow"];
- break;
- case ActivityDesk.DeskState.Ready:
- this.Background = (ImageBrush)this.Resources["blue"];
- break;
- }
+ //switch (deskState)
+ //{
+ // case ActivityDesk.DeskState.Active:
+ // this.Background = (ImageBrush)this.Resources["green"];
+ // break;
+ // case ActivityDesk.DeskState.Locked:
+ // this.Background = (ImageBrush)this.Resources["red"];
+ // break;
+ // case ActivityDesk.DeskState.Occupied:
+ // this.Background = (ImageBrush)this.Resources["yellow"];
+ // break;
+ // case ActivityDesk.DeskState.Ready:
+ // this.Background = (ImageBrush)this.Resources["blue"];
+ // break;
+ //}
+
+ this.Background = (ImageBrush)this.Resources["back"];
}));
}
#endregion
@@ -276,7 +285,7 @@ private void host_HostLaunched(object sender, EventArgs e)
private void _client_ActivitySwitched(object sender, ActivityEventArgs e)
{
_currentActivity = e.Activity;
- view.Items.Clear();
+ documentContainer.Clear();
if (e.Activity.Resources.Count != 0)
foreach (Resource res in e.Activity.Resources)
VisualizeResouce(res, _pairedManager.LocalPath + res.RelativePath);
@@ -292,7 +301,7 @@ private void _client_ServiceIsDown(object sender, EventArgs e)
}
this.Dispatcher.Invoke(DispatcherPriority.Background, new System.Action(() =>
{
- view.Items.Clear();
+ documentContainer.Clear();
}));
}
private void _client_FileAdded(object sender, FileEventArgs e)
@@ -323,68 +332,48 @@ private void ClientActivityRemoved(object sender, ActivityRemovedEventArgs e)
#region UI
private void VisualizeResouce(Resource res, string path)
{
- try
- {
- var i = new Image();
- var src = new BitmapImage();
- src.BeginInit();
- src.UriSource = new Uri(path, UriKind.Relative);
- src.CacheOption = BitmapCacheOption.OnLoad;
- src.EndInit();
- i.Source = src;
- i.Stretch = Stretch.Uniform;
-
- view.Items.Add(i);
- }
- catch { }
- }
- private void AddResourceWindow()
- {
- this.Dispatcher.Invoke(DispatcherPriority.Background, new System.Action(() =>
- {
- view.Items.Add(new TableWindow());
- }));
- }
- private void AddActivityUI(Activity activity)
- {
- this.Dispatcher.Invoke(DispatcherPriority.Background, new System.Action(() =>
- {
- SurfaceButton b = new SurfaceButton();
- b.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Center;
- b.VerticalContentAlignment = System.Windows.VerticalAlignment.Center;
- b.Background = System.Windows.Media.Brushes.Gray;
- b.Width = 300;
- b.Tag = activity.Id;
- b.Height = Double.NaN;
- b.Content = activity.Name;
-
- view.Items.Add(b);
- }));
- }
- private void RemoveActivityUI(Guid guid)
- {
- this.Dispatcher.Invoke(DispatcherPriority.Background, new System.Action(() =>
- {
- for (int i = 0; i < view.Items.Count; i++)
- {
- if (view.Items[i] is SurfaceButton)
- if (((Guid)((SurfaceButton)view.Items[i]).Tag) == guid)
- view.Items.RemoveAt(i);
- }
- }));
+ //try
+ //{
+ // var i = new Image();
+ // var src = new BitmapImage();
+ // src.BeginInit();
+ // src.UriSource = new Uri(path, UriKind.Relative);
+ // src.CacheOption = BitmapCacheOption.OnLoad;
+ // src.EndInit();
+ // i.Source = src;
+ // i.Stretch = Stretch.Uniform;
+
+ // documentContainer.Add(i);
+ //}
+ //catch { }
}
+
#endregion
#region Events
+
+ void Visualizer_VisualizationInitialized(object sender, TagVisualizerEventArgs e)
+ {
+ }
+
private void Visualizer_VisualizationAdded(object sender, TagVisualizerEventArgs e)
{
+
+ if (lblStart.Visibility == System.Windows.Visibility.Visible)
+ lblStart.Visibility = System.Windows.Visibility.Hidden;
+
if (!_lockedTags.Contains(e.TagVisualization.VisualizedTag.Value.ToString()))
{
- if (Visualizer.ActiveVisualizations.Count >0 && _pairedManager ==null)
+ if (Visualizer.ActiveVisualizations.Count > 0 && _pairedManager == null)
{
SetDeskState(ActivityDesk.DeskState.Active);
}
}
+ else
+ {
+ if(_lockedTagTumbnails.ContainsKey(e.TagVisualization.VisualizedTag.Value.ToString()))
+ RemoveTagThumbnail(e.TagVisualization.VisualizedTag.Value.ToString());
+ }
((BaseVisualization)e.TagVisualization).Locked += new LockedEventHandler(Desk_Locked);
RunDiscovery();
}
@@ -393,6 +382,8 @@ private void Desk_Locked(object sender, LockedEventArgs e)
if (_lockedTags.Contains(e.VisualizedTag))
{
_lockedTags.Remove(e.VisualizedTag);
+ if (_lockedTagTumbnails.ContainsKey(e.VisualizedTag))
+ RemoveTagThumbnail(e.VisualizedTag);
Log.Out("ActivityDesk", String.Format("{0} unlocked", e.VisualizedTag));
}
else
@@ -401,6 +392,22 @@ private void Desk_Locked(object sender, LockedEventArgs e)
Log.Out("ActivityDesk", String.Format("{0} locked", e.VisualizedTag));
}
}
+
+ private void RemoveTagThumbnail(string tag)
+ {
+ documentContainer.Remove(_lockedTagTumbnails[tag]);
+ _lockedTagTumbnails.Remove(tag);
+ }
+
+ private void AddTagTumbnail(string name, Point p)
+ {
+ var btn = new DeviceTumbnail();
+ btn.Name = name;
+ btn.Center = p;
+ documentContainer.Add(btn);
+ _lockedTagTumbnails.Add(name, btn);
+ }
+
private void Visualizer_VisualizationRemoved(object sender, TagVisualizerEventArgs e)
{
if (!_lockedTags.Contains(e.TagVisualization.VisualizedTag.Value.ToString()))
@@ -409,6 +416,7 @@ private void Visualizer_VisualizationRemoved(object sender, TagVisualizerEventAr
if (Visualizer.ActiveVisualizations.Count == 0)
{
SetDeskState(ActivityDesk.DeskState.Ready);
+ lblStart.Visibility = System.Windows.Visibility.Visible;
}
if (_pairedManager != null)
{
@@ -419,14 +427,38 @@ private void Visualizer_VisualizationRemoved(object sender, TagVisualizerEventAr
this.Dispatcher.Invoke(DispatcherPriority.Background, new System.Action(() =>
{
- view.Items.Clear();
+ documentContainer.Clear();
}));
}
+ else
+ AddTagTumbnail(e.TagVisualization.VisualizedTag.Value.ToString(), e.TagVisualization.Center);
+
}
private void Visualizer_VisualizationMoved(object sender, TagVisualizerEventArgs e)
{
}
#endregion
+ private void button1_PreviewTouchDown(object sender, TouchEventArgs e)
+ {
+ Console.WriteLine(e.TouchDevice.GetIsFingerRecognized().ToString());
+ if (e.TouchDevice.GetIsFingerRecognized())
+ {
+ var ink = new Note();
+ ink.Close += new EventHandler(ink_Close);
+ documentContainer.Add(ink);
+ }
+ }
+
+ void ink_Close(object sender, EventArgs e)
+ {
+ documentContainer.Remove(sender);
+ }
+
+ private void SurfaceWindow_PreviewTouchDown(object sender, TouchEventArgs e)
+ {
+ }
+
+
}
}
View
54 NooSphere/ActivityDesk/DeviceTumbnail.xaml
@@ -0,0 +1,54 @@
+<s:ScatterViewItem
+ xmlns:my="clr-namespace:ActivityDesk"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:s="http://schemas.microsoft.com/surface/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ mc:Ignorable="d"
+ x:Class="ActivityDesk.DeviceTumbnail"
+ x:Name="UserControl">
+ <s:ScatterViewItem.Resources>
+ <ControlTemplate x:Key="Floating">
+ <Grid x:Name="LayoutRoot" Height="150" Width="300">
+ <StackPanel x:Name="pnlButtons" Width="43.334" HorizontalAlignment="Left" Margin="0,0,0,-1.306" d:LayoutOverrides="Height">
+ <s:SurfaceButton x:Name="PinButton" Height="50" Foreground="{x:Null}" Background="Black" Margin="1,1,0,1" />
+ <s:SurfaceButton x:Name="AppButton1" Height="50" Background="#FF501010" Margin="1,1,0,1" />
+ <s:SurfaceButton x:Name="AppButtom2" Height="50" Background="#FF501010" Margin="1,1,0,1" />
+ </StackPanel>
+ <Border x:Name="btnBody" BorderBrush="Black" BorderThickness="15" Margin="50,0,0,0" Background="#6B5A5A5A" CornerRadius="10">
+ <Label x:Name="lblName" Content="{Binding Name}" RenderTransformOrigin="0.5,0.5" Foreground="White"
+ Background="#00000000" FontSize="18.667" FontWeight="Bold" Margin="-14.002,40,-11.905,49.167"
+ d:LayoutOverrides="Height" HorizontalAlignment="Center">
+ <Label.RenderTransform>
+ <TransformGroup>
+ <ScaleTransform/>
+ <SkewTransform/>
+ <RotateTransform Angle="0.033"/>
+ <TranslateTransform/>
+ </TransformGroup>
+ </Label.RenderTransform>
+ </Label>
+ </Border>
+ </Grid>
+ </ControlTemplate>
+ <ControlTemplate x:Key="Docked">
+ <Grid x:Name="LayoutRoot" Height="150" Width="150">
+ <Border x:Name="btnBody" BorderBrush="Black" BorderThickness="15" Margin="0,0,0,0" Background="#6B5A5A5A" CornerRadius="10">
+ <Label x:Name="lblName" Content="{Binding Name}" RenderTransformOrigin="0.5,0.5" Foreground="White"
+ Background="#00000000" FontSize="18.667" FontWeight="Bold"
+ d:LayoutOverrides="Height" HorizontalAlignment="Center">
+ <Label.RenderTransform>
+ <TransformGroup>
+ <ScaleTransform/>
+ <SkewTransform/>
+ <RotateTransform Angle="0.033"/>
+ <TranslateTransform/>
+ </TransformGroup>
+ </Label.RenderTransform>
+ </Label>
+ </Border>
+ </Grid>
+ </ControlTemplate>
+ </s:ScatterViewItem.Resources>
+</s:ScatterViewItem>
View
47 NooSphere/ActivityDesk/DeviceTumbnail.xaml.cs
@@ -0,0 +1,47 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using Microsoft.Surface.Presentation.Controls;
+using System.ComponentModel;
+
+namespace ActivityDesk
+{
+ /// <summary>
+ /// Interaction logic for DeviceTumbnail.xaml
+ /// </summary>
+ public partial class DeviceTumbnail : ScatterViewItem
+ {
+ public string Name
+ {
+ get;
+ set;
+ }
+
+ private Label _label;
+ public override void OnApplyTemplate()
+ {
+ DependencyObject d = GetTemplateChild("lblName");
+ if (d != null)
+ {
+ _label = d as Label;
+ _label.Content = Name;
+ }
+ base.OnApplyTemplate();
+ }
+
+ public DeviceTumbnail()
+ {
+ this.InitializeComponent();
+ CanScale = true;
+ }
+ }
+}
View
14 NooSphere/ActivityDesk/DocumentContainer.xaml
@@ -0,0 +1,14 @@
+<UserControl x:Class="ActivityDesk.DocumentContainer"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:s="http://schemas.microsoft.com/surface/2008"
+ 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:local="clr-namespace:ActivityDesk"
+ mc:Ignorable="d"
+ d:DesignHeight="300" d:DesignWidth="300">
+
+ <Grid>
+ <s:ScatterView Name="view" />
+ </Grid>
+</UserControl>
View
150 NooSphere/ActivityDesk/DocumentContainer.xaml.cs
@@ -0,0 +1,150 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using Microsoft.Surface.Presentation.Controls;
+
+namespace ActivityDesk
+{
+ /// <summary>
+ /// Interaction logic for DocumentView.xaml
+ /// </summary>
+ public partial class DocumentContainer : UserControl
+ {
+ #region Image dependency property
+
+
+ public static DependencyProperty DockState;
+
+ public static DockStates GetDockState(DependencyObject obj)
+ {
+ return (DockStates) obj.GetValue(DockState);
+ }
+ public static void SetDockState(DependencyObject obj, DockStates value)
+ {
+ obj.SetValue(DockState, value);
+ }
+
+ #endregion
+
+ private readonly int _dockSize = 150;
+ private readonly int _rightDockX = 75;
+ private readonly int _leftDockX = 1845;
+ private int _leftDockTreshhold = 100;
+ private int _rightDockTreshhold = 1820;
+
+ public DocumentContainer()
+ {
+ InitializeComponent();
+
+ //register dockstate dependency property
+ var metadata = new FrameworkPropertyMetadata(DockStates.Free);
+ DockState = DependencyProperty.RegisterAttached("DockState",
+ typeof(DockStates),
+ typeof(DocumentContainer), metadata);
+ }
+
+ public void Clear()
+ {
+ this.view.Items.Clear();
+ }
+
+ public void Add(ScatterViewItem element)
+ {
+ DocumentContainer.SetDockState(element, DockStates.Free);
+ element.AddHandler(UIElement.ManipulationCompletedEvent, new EventHandler<ManipulationCompletedEventArgs>(element_ManipulationDelta), true);
+ element.PreviewTouchMove += new EventHandler<TouchEventArgs>(element_PreviewTouchMove);
+ ((ScatterViewItem)element).Template = (ControlTemplate)element.FindResource("Floating");
+ this.view.Items.Add(element);
+ }
+
+ private void element_PreviewTouchMove(object sender, TouchEventArgs e)
+ {
+ HandleDockingFromTouch((ScatterViewItem)sender,e.GetTouchPoint(view).Position);
+ }
+
+ private void HandleDockingFromTouch(ScatterViewItem item,Point p)
+ {
+ if (p.X < _leftDockTreshhold)
+ {
+ item.Template = (ControlTemplate)item.FindResource("Docked");
+ DocumentContainer.SetDockState(item, DockStates.Left);
+ }
+ else if (p.X > _rightDockTreshhold)
+ {
+ item.Template = (ControlTemplate)item.FindResource("Docked");
+ DocumentContainer.SetDockState(item, DockStates.Right);
+ }
+ else
+ {
+ item.Template = (ControlTemplate)item.FindResource("Floating");
+ DocumentContainer.SetDockState(item, DockStates.Free);
+ }
+ UpdateDock(item);
+ }
+ private void HandleDocking(ScatterViewItem item)
+ {
+ if (item.Center.X < _leftDockTreshhold)
+ {
+ item.Template = (ControlTemplate)item.FindResource("Docked");
+ DocumentContainer.SetDockState(item, DockStates.Left);
+ }
+ else if (item.Center.X > _rightDockTreshhold)
+ {
+ item.Template = (ControlTemplate)item.FindResource("Docked");
+ DocumentContainer.SetDockState(item, DockStates.Right);
+ }
+ else
+ {
+ item.Template = (ControlTemplate)item.FindResource("Floating");
+ DocumentContainer.SetDockState(item, DockStates.Free);
+ }
+ UpdateDock(item);
+ }
+ private void UpdateDock(ScatterViewItem item)
+ {
+ var state = DocumentContainer.GetDockState(item);
+ if (state == DockStates.Free)
+ {
+ item.CanMove = true;
+ item.CanRotate = true;
+ }
+ else
+ {
+ if (state == DockStates.Left)
+ item.Center = new Point(_rightDockX, item.Center.Y);
+ else
+ item.Center = new Point(_leftDockTreshhold, item.Center.Y);
+ item.Orientation = 0;
+ item.CanMove = true;
+ item.CanRotate = false;
+ Console.WriteLine(item.Center.X.ToString() + " -> " + item.Width.ToString());
+ }
+ }
+
+ void element_ManipulationDelta(object sender, ManipulationCompletedEventArgs e)
+ {
+ HandleDocking((ScatterViewItem)sender);
+ }
+
+ public void Remove(object element)
+ {
+ this.view.Items.Remove(element);
+ }
+ }
+ public enum DockStates
+ {
+ Left,
+ Right,
+ Free
+ }
+}
View
24 NooSphere/ActivityDesk/DocumentViewTemplateSelector.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows.Controls;
+using System.Windows;
+using Microsoft.Surface.Presentation.Controls;
+
+namespace ActivityDesk
+{
+ public class DocumentViewTemplateSelector : DataTemplateSelector
+ {
+ public DataTemplate FullSize { get; set; }
+ public DataTemplate Docked { get; set; }
+
+ public override DataTemplate SelectTemplate(object item, DependencyObject container)
+ {
+ if (((DeviceTumbnail)item).Center.X < 100 || ((DeviceTumbnail)item).Center.X < 1900)
+ return Docked;
+ else
+ return FullSize;
+ }
+ }
+}
View
BIN NooSphere/ActivityDesk/Images/1ms-193199.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN NooSphere/ActivityDesk/Images/back.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN NooSphere/ActivityDesk/Images/note.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
39 NooSphere/ActivityDesk/Note.xaml
@@ -0,0 +1,39 @@
+<s:ScatterViewItem
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:s="http://schemas.microsoft.com/surface/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:Custom="http://schemas.microsoft.com/surface/2008"
+ mc:Ignorable="d"
+ x:Class="ActivityDesk.Note"
+ x:Name="UserControl">
+ <s:ScatterViewItem.Resources>
+ <ControlTemplate x:Key="Floating" >
+ <Grid x:Name="LayoutRoot" Background="#E6171616" Height="auto" Width="auto">
+ <Custom:SurfaceInkCanvas x:Name="Painter" Margin="20,60,20,60" Background="White"/>
+ <Custom:SurfaceButton Content="Reset" HorizontalAlignment="Left" Margin="8,8,0,0" VerticalAlignment="Top" Width="104.827" Style="{DynamicResource Invert}" x:Name="btnReset" Click="btnReset_Click" />
+ <Custom:SurfaceButton Content="Save" HorizontalAlignment="Left" Margin="126,8,0,0" VerticalAlignment="Top" Width="104.827" x:Name="btnSave" Click="btnSave_Click" />
+ <Custom:SurfaceButton Content="Close" HorizontalAlignment="Right" Margin="0,8,8,0" VerticalAlignment="Top" Width="104.827" x:Name="btnClose" PreviewTouchDown="btnClose_PreviewTouchDown" />
+ </Grid>
+ </ControlTemplate>
+ <ControlTemplate x:Key="Docked">
+ <Grid x:Name="LayoutRoot" Height="150" Width="150">
+ <Border x:Name="btnBody" BorderBrush="Black" BorderThickness="15" Margin="0,0,0,0" Background="Yellow" CornerRadius="10">
+ <Label x:Name="lblName" Content="{Binding Name}" RenderTransformOrigin="0.5,0.5" Foreground="White"
+ Background="#00000000" FontSize="18.667" FontWeight="Bold"
+ d:LayoutOverrides="Height" HorizontalAlignment="Center">
+ <Label.RenderTransform>
+ <TransformGroup>
+ <ScaleTransform/>
+ <SkewTransform/>
+ <RotateTransform Angle="0.033"/>
+ <TranslateTransform/>
+ </TransformGroup>
+ </Label.RenderTransform>
+ </Label>
+ </Border>
+ </Grid>
+ </ControlTemplate>
+ </s:ScatterViewItem.Resources>
+</s:ScatterViewItem>
View
76 NooSphere/ActivityDesk/Note.xaml.cs
@@ -0,0 +1,76 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using Microsoft.Surface.Presentation.Controls;
+using System.Windows.Ink;
+
+namespace ActivityDesk
+{
+ /// <summary>
+ /// Interaction logic for Note.xaml
+ /// </summary>
+ public partial class Note : ScatterViewItem
+ {
+ public event EventHandler Save = null;
+ public event EventHandler Close = null;
+
+ public Note()
+ {
+ this.InitializeComponent();
+ }
+
+ private SurfaceButton reset;
+ private SurfaceInkCanvas painter;
+ public override void OnApplyTemplate()
+ {
+ DependencyObject d = GetTemplateChild("btnReset");
+ if (d != null)
+ {
+ reset = d as SurfaceButton;
+ reset.Click += new RoutedEventHandler(btnReset_Click);
+ }
+
+ DependencyObject e = GetTemplateChild("Painter");
+ if (e != null)
+ {
+ painter = e as SurfaceInkCanvas;
+ // Set up the DrawingAttributes for the pen.
+ var inkDA = new DrawingAttributes();
+ inkDA.Color = Colors.Black;
+ inkDA.Height = 1;
+ inkDA.Width = 1;
+ inkDA.FitToCurve = false;
+ painter.UsesTouchShape = false;
+
+ painter.DefaultDrawingAttributes = inkDA;
+ }
+
+
+ base.OnApplyTemplate();
+ }
+ private void btnReset_Click(object sender, RoutedEventArgs e)
+ {
+ painter.Strokes.Clear();
+ }
+
+ private void btnSave_Click(object sender, RoutedEventArgs e)
+ {
+ //todo
+ }
+
+ private void btnClose_PreviewTouchDown(object sender, TouchEventArgs e)
+ {
+ if (Close != null)
+ Close(this, new EventArgs());
+ }
+ }
+}
View
18 NooSphere/ActivityDesk/Visualizer/Visualizations/VisualizationTablet.xaml
@@ -1,13 +1,15 @@
-<my:BaseVisualization
+<my:BaseVisualization
xmlns:my="clr-namespace:ActivityDesk.Visualizer.Visualization"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:s="http://schemas.microsoft.com/surface/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- x:Class="BaseVis.VisualizationTablet" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" d:DesignHeight="989" d:DesignWidth="671">
- <WrapPanel HorizontalAlignment="Stretch">
- <Rectangle x:Name="Glow"
- Width="530"
- Height="800" RenderTransformOrigin="0.5,0.5" Fill="#FF004799" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"></Rectangle>
- <s:SurfaceButton Click="SurfaceButton_Click" Name="PinButton" Height="50" Background="#FF030303" />
- </WrapPanel>
+ x:Class="BaseVis.VisualizationTablet" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Height="704.5" Width="456">
+ <StackPanel HorizontalAlignment="Stretch" >
+ <Border BorderBrush="Black" BorderThickness="15" Margin="8,0" Background="#6B5A5A5A" Height="650" CornerRadius="10"/>
+ <WrapPanel HorizontalAlignment="Center" VerticalAlignment="Top">
+ <s:SurfaceButton Click="SurfaceButton_Click" x:Name="PinButton" Height="50" Width="50" Foreground="{x:Null}" Background="Black" />
+ <s:SurfaceButton Click="SurfaceButton_Click" x:Name="AppButton1" Height="50" Background="#FF2B0606" Width="50" />
+ <s:SurfaceButton Click="SurfaceButton_Click" x:Name="AppButtom2" Height="50" Background="#FF2B0606" Width="50" />
+ </WrapPanel>
+ </StackPanel>
</my:BaseVisualization>
View
6 NooSphere/ActivityDesk/Visualizer/Visualizations/VisualizationTablet.xaml.cs
@@ -44,8 +44,6 @@ public partial class VisualizationTablet : BaseVisualization
public VisualizationTablet()
{
InitializeComponent();
-
- Glow.RenderTransform = new ScaleTransform(1, 1);
}
/// <summary>
/// Call to indicate that the visualization has entered another UI element.
@@ -98,10 +96,6 @@ public override void Leave()
new Duration(TimeSpan.FromSeconds(seconds)));
animation.AccelerationRatio = accelerationRatio;
animation.DecelerationRatio = decelerationRatio;
- ScaleTransform transform = (ScaleTransform)Glow.RenderTransform;
- transform.BeginAnimation(ScaleTransform.ScaleXProperty, animation);
- transform.BeginAnimation(ScaleTransform.ScaleYProperty, animation);
- Glow.BeginAnimation(OpacityProperty, animation);
}
private void SurfaceButton_Click(object sender, RoutedEventArgs e)
View
BIN NooSphere/ActivityDesk/Visualizer/Visualizations/pin1.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN NooSphere/ActivityDesk/icon_tablet.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN NooSphere/ActivityDesk/preview_COLOURBOX4153138.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit df36cca

Please sign in to comment.
Something went wrong with that request. Please try again.