Skip to content

Commit

Permalink
Merge pull request #12 from Gaiatux/master
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu authored May 23, 2021
2 parents 6af2472 + 60ce703 commit 3bfd152
Show file tree
Hide file tree
Showing 14 changed files with 274 additions and 143 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ bld/

# Visual Studio 2015 cache/options directory
.vs/
.vscode/

# MSTest test Results
[Tt]est[Rr]esult*/
Expand Down Expand Up @@ -210,3 +211,4 @@ FakesAssemblies/
GeneratedArtifacts/
_Pvt_Extensions/
ModelManifest.xml
/LiveDraw/Properties/PublishProfiles
9 changes: 6 additions & 3 deletions LiveDraw.sln
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
# Visual Studio Version 16
VisualStudioVersion = 16.0.31205.134
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiveDraw", "LiveDraw\LiveDraw.csproj", "{5CAA7FE4-8BFB-4054-A932-46638196DC50}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LiveDraw", "LiveDraw\LiveDraw.csproj", "{5CAA7FE4-8BFB-4054-A932-46638196DC50}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -19,4 +19,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {54108D56-B324-41E9-A48B-A057CC171F92}
EndGlobalSection
EndGlobal
1 change: 1 addition & 0 deletions LiveDraw/.upgrade-assistant
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Build":"0.2.222702\u002Baa9fd4e57ceef6ec3c09e585da50b2c0ba8986b4","CurrentProject":"","EntryPoints":[],"Properties":{}}
2 changes: 1 addition & 1 deletion LiveDraw/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
</configuration>
131 changes: 27 additions & 104 deletions LiveDraw/LiveDraw.csproj
Original file line number Diff line number Diff line change
@@ -1,125 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{5CAA7FE4-8BFB-4054-A932-46638196DC50}</ProjectGuid>
<TargetFramework>net5.0-windows</TargetFramework>
<PublishReadyToRun>false</PublishReadyToRun>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AntFu7.LiveDraw</RootNamespace>
<AssemblyName>LiveDraw</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
<UseWPF>true</UseWPF>
<Configurations>Debug;Release</Configurations>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PropertyGroup>
<ApplicationIcon>Rescoures\Icon.ico</ApplicationIcon>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Rescoures\Icon.ico</ApplicationIcon>
<DebugType>embedded</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<None Remove="App.config" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="ExtendControls.cs" />
<Compile Include="StrokesHistoryNode.cs" />
<Page Include="IconDataDictionary.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="CornerRadiusAnimation.cs" />
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Resource Include="Rescoures\Icon.ico" />
</ItemGroup>
<ItemGroup>
<Resource Include="Rescoures\save29.png" />
<Resource Include="Rescoures\undo6.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<ItemGroup>
<Compile Update="Properties\Settings.Designer.cs">
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<None Update="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
</Project>
14 changes: 7 additions & 7 deletions LiveDraw/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
xmlns:local="clr-namespace:AntFu7.LiveDraw"
x:Class="AntFu7.LiveDraw.MainWindow"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d" ResizeMode="NoResize" UseLayoutRounding="True" WindowStartupLocation="CenterScreen" WindowState="Maximized" Background="{StaticResource FakeTransparent}" AllowsTransparency="True" WindowStyle="None" Title="Free Draw Dev" Icon="Rescoures/icon.ico" >
mc:Ignorable="d" ResizeMode="NoResize" UseLayoutRounding="True" WindowStartupLocation="CenterScreen" WindowState="Maximized" Background="{StaticResource FakeTransparent}" AllowsTransparency="True" WindowStyle="None" Title="LiveDraw Dev" Icon="Rescoures/icon.ico" KeyDown="Window_KeyDown" >
<Window.Resources>
<SolidColorBrush x:Key="PaintingColor1" Color="#FF86E238"/>
<SolidColorBrush x:Key="PaintingColor2" Color="#FF38E2A8"/>
Expand All @@ -31,7 +31,7 @@
</Style>
</Window.Resources>
<Grid>
<InkCanvas x:Name="MainInkCanvas" Background="{x:Null}" MoveEnabled="False" ResizeEnabled="False" Cursor="Pen" Margin="0,0,0,-0.333">
<InkCanvas x:Name="MainInkCanvas" Background="{x:Null}" MoveEnabled="False" ResizeEnabled="False" Cursor="Pen" Margin="0,0,0,-0.333" EditingModeInverted="EraseByPoint">
<InkCanvas.DefaultDrawingAttributes>
<DrawingAttributes Color="#FFFF5656" FitToCurve="True" Height="5" IgnorePressure="False" IsHighlighter="False" StylusTip="Ellipse" StylusTipTransform="Identity" Width="5"/>
</InkCanvas.DefaultDrawingAttributes>
Expand Down Expand Up @@ -227,16 +227,16 @@
<Setter Property="Height" Value="32"/>
</Style>
</WrapPanel.Resources>
<local:ActivableButton x:Name="BrushSwitchButton" Click="BrushSwitchButton_Click">
<local:ActivableButton x:Name="BrushSwitchButton" Click="BrushSwitchButton_Click" ToolTip="Preview">
<Border x:Name="brushPreview" Width="5" Height="5" Background="#FFD6D6D6" CornerRadius="10" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</local:ActivableButton>
<local:ActivableButton x:Name="UndoButton" Click="UndoButton_Click" ToolTip="Undo">
<local:ActivableButton x:Name="UndoButton" Click="UndoButton_Click" ToolTip="Undo (Z)">
<local:ActivableButton.RenderTransform>
<RotateTransform CenterX="16" CenterY="16" Angle="{Binding MinWidth, ElementName=Palette}"/>
</local:ActivableButton.RenderTransform>
<Path Data="{DynamicResource IconUndo}"/>
</local:ActivableButton>
<local:ActivableButton x:Name="RedoButton" ToolTip="Redo" Click="RedoButton_Click">
<local:ActivableButton x:Name="RedoButton" ToolTip="Redo (Y)" Click="RedoButton_Click">
<local:ActivableButton.RenderTransform >
<RotateTransform CenterX="16" CenterY="16" Angle="{Binding MinWidth, ElementName=Palette}"/>
</local:ActivableButton.RenderTransform>
Expand All @@ -246,7 +246,7 @@
</Path.RenderTransform>
</Path>
</local:ActivableButton>
<local:ActivableButton x:Name="EraserButton" Click="EraserButton_Click" ToolTip="Toggle eraser mode">
<local:ActivableButton x:Name="EraserButton" Click="EraserButton_Click" ToolTip="Toggle eraser mode (E)">
<local:ActivableButton.RenderTransform >
<RotateTransform CenterX="16" CenterY="16" Angle="{Binding MinWidth, ElementName=Palette}"/>
</local:ActivableButton.RenderTransform>
Expand Down Expand Up @@ -294,7 +294,7 @@
</local:ActivableButton.RenderTransform>
<Path Data="{DynamicResource IconNoAccess}" />
</local:ActivableButton>
<local:ActivableButton x:Name="OrientationButton" Click="OrientationButton_Click">
<local:ActivableButton x:Name="OrientationButton" Click="OrientationButton_Click" ToolTip="Rotate dock">
<Path Data="{DynamicResource IconMinimize}" RenderTransformOrigin="0.5,0.5">
<Path.RenderTransform>
<RotateTransform Angle="90"/>
Expand Down
Loading

0 comments on commit 3bfd152

Please sign in to comment.