Skip to content

Commit

Permalink
+ Made EdgeControlBase::UpdateEdge() method public. It can be used no…
Browse files Browse the repository at this point in the history
…w to fully update edge visual on custom edge-related modifications [WPF, METRO]

+ Some code for lib debug & test improvement
+ VCP tweaks
  • Loading branch information
panthernet committed Jun 16, 2015
1 parent 6db1d62 commit cefd02b
Show file tree
Hide file tree
Showing 18 changed files with 214 additions and 237 deletions.
33 changes: 33 additions & 0 deletions .settings/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"version": "0.1.0",
// List of configurations. Add new configurations or edit existing ones.
// ONLY "node" and "mono" are supported, change "type" to switch.
"configurations": [
{
// Name of configuration; appears in the launch configuration drop down menu.
"name": "Launch app.js",
// Type of configuration. Possible values: "node", "mono".
"type": "node",
// Workspace relative or absolute path to the program.
"program": "app.js",
// Automatically stop program after launch.
"stopOnEntry": true,
// Command line arguments passed to the program.
"args": [],
// Workspace relative or absolute path to the working directory of the program being debugged. Default is the current workspace.
"cwd": ".",
// Workspace relative or absolute path to the runtime executable to be used. Default is the runtime executable on the PATH.
"runtimeExecutable": null,
// Environment variables passed to the program.
"env": { }
},
{
"name": "Attach",
"type": "node",
// TCP/IP address. Default is "localhost".
"address": "localhost",
// Port to attach to.
"port": 5858
}
]
}
1 change: 1 addition & 0 deletions Documents/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ DETAILED CHANGELOG:
+ Fixed ZoomControl zoom sometimes not firing from code call after control is loaded [WPF]
+ Fixed VB sample project dependencies and refactored code a bit
+ Fixed Fade Move animation logic to report OnCompleted event correctly [WPF]
+ Made EdgeControlBase::UpdateEdge() method public. It can be used now to fully update edge visual on custom edge-related modifications [WPF, METRO]
+ Improved main layout calculation logic to gain performance improvements [WPF, METRO]
+ Reorganized Example apps namespaces and code for greater good :)
+ Merged EdgePointerImage and EdgePointerPath into one universal DefaultEdgePointer class [WPF, METRO]
Expand Down
3 changes: 1 addition & 2 deletions Documents/TODO.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
TODO
1. CUT source ep edge also
2. Move SLE settings from LogicCore to an edge? Its visual not math!
3. Detect bidirectional edge and correctly display it w/o parallelization
4. CHek printing
4. CHeck printing

Add edge labels - labels on path
http://www.codeproject.com/Articles/30090/Text-On-A-Path-in-WPF
Expand Down
2 changes: 1 addition & 1 deletion Examples/METRO.SimpleGraph/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Required by Visual Studio project and item templates
-->
<ResourceDictionary Source="Common/StandardStyles.xaml"/>
<ResourceDictionary Source="Common/templates.xaml"/>
<ResourceDictionary Source="Common/templates2.xaml"/>
</ResourceDictionary.MergedDictionaries>

</ResourceDictionary>
Expand Down
2 changes: 1 addition & 1 deletion Examples/METRO.SimpleGraph/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ protected override void OnLaunched(LaunchActivatedEventArgs args)
// When the navigation stack isn't restored navigate to the first page,
// configuring the new page by passing required information as a navigation
// parameter
if (!rootFrame.Navigate(typeof(MainPage), args.Arguments))
if (!rootFrame.Navigate(typeof(MainPageDebug), args.Arguments))
{
throw new Exception("Failed to create initial page");
}
Expand Down
3 changes: 1 addition & 2 deletions Examples/METRO.SimpleGraph/Common/templates.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls1="using:GraphX.Controls">

<Style TargetType="controls1:VertexControl">
<Setter Property="Background" Value="Transparent"/>

Expand Down Expand Up @@ -172,5 +172,4 @@
</Setter>
</Style>


</ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls1="using:GraphX.Controls">


<Style x:Key="CirclePath" TargetType="controls1:StaticVertexConnectionPoint">
<Setter Property="Shape" Value="Circle"/>

<Setter Property="Content">
<Setter.Value>
<Path Stroke="White" Data="M 38,0.791664C 58.5496,0.791664 75.2083,17.4504 75.2083,38C 75.2083,58.5496 58.5496,75.2083 38,75.2083C 17.4504,75.2083 0.791662,58.5496 0.791662,38C 0.791662,17.4504 17.4504,0.791664 38,0.791664 Z M 38,5.54166C 20.0738,5.54166 5.54167,20.0738 5.54167,38C 5.54167,55.9262 20.0738,70.4583 38,70.4583C 55.9262,70.4583 70.4583,55.9262 70.4583,38C 70.4583,20.0738 55.9262,5.54166 38,5.54166 Z "
Width="10" Height="10" Stretch="Uniform" StrokeThickness="1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Setter.Value>
</Setter>
</Style>

<!-- REGION ZoomControl -->

<SolidColorBrush x:Key="SelectionBrush" Color="LightBlue" Opacity="0.5"/>
Expand Down Expand Up @@ -119,18 +131,19 @@
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls1:VertexControl">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
CornerRadius="10,10,10,10"
Padding="{TemplateBinding Padding}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<ContentPresenter Content="{TemplateBinding Vertex}" />
</Grid>
</Border>
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="40"/>
</Grid.RowDefinitions>
<ContentPresenter Content="{TemplateBinding Vertex}" />
<Border BorderBrush="Blue" BorderThickness="1" Grid.Row="1">
<controls1:StaticVertexConnectionPoint Id="1" Visibility="Visible">
<Path Stroke="White" Data="M 38,0.791664C 58.5496,0.791664 75.2083,17.4504 75.2083,38C 75.2083,58.5496 58.5496,75.2083 38,75.2083C 17.4504,75.2083 0.791662,58.5496 0.791662,38C 0.791662,17.4504 17.4504,0.791664 38,0.791664 Z M 38,5.54166C 20.0738,5.54166 5.54167,20.0738 5.54167,38C 5.54167,55.9262 20.0738,70.4583 38,70.4583C 55.9262,70.4583 70.4583,55.9262 70.4583,38C 70.4583,20.0738 55.9262,5.54166 38,5.54166 Z "
Width="10" Height="10" Stretch="Uniform" StrokeThickness="1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</controls1:StaticVertexConnectionPoint>
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
Expand Down
12 changes: 11 additions & 1 deletion Examples/METRO.SimpleGraph/METRO.SimpleGraph.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
<MinimumVisualStudioVersion>12</MinimumVisualStudioVersion>
<TargetFrameworkVersion />
<PackageCertificateThumbprint>233455ED976F85333F728FB66BE46FA1D70834F7</PackageCertificateThumbprint>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<RestorePackages>true</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down Expand Up @@ -133,6 +135,7 @@
<Compile Include="Models\CurvedErParameters.cs" />
<Compile Include="Models\DataEdge.cs" />
<Compile Include="Models\DataVertex.cs" />
<Compile Include="Models\DebugItems.cs" />
<Compile Include="Models\GraphAreaExample.cs" />
<Compile Include="Models\GraphExample.cs" />
<Compile Include="Models\GXLogicCoreExample.cs" />
Expand Down Expand Up @@ -166,7 +169,7 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Common\debug_template.xaml">
<Page Include="Common\templates2.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down Expand Up @@ -202,6 +205,13 @@
<StartupObject />
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
</Target>
<!-- 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">
Expand Down
12 changes: 3 additions & 9 deletions Examples/METRO.SimpleGraph/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
using GraphX.PCL.Common.Enums;
using GraphX.PCL.Logic.Algorithms.LayoutAlgorithms;
using GraphX.PCL.Logic.Algorithms.OverlapRemoval;
using METRO.SimpleGraph.Models;
using QuickGraph.Graphviz.Dot;

// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238

namespace METRO.SimpleGraph
Expand Down Expand Up @@ -54,15 +57,6 @@ void OnFinishedLayout(object sender, EventArgs e)
private async void butGenerate_Click(object sender, RoutedEventArgs e)
{
GraphAreaExample_Setup();

try
{
await graph.GenerateGraphAsync(true);
}
catch (OperationCanceledException)
{
// User may have canceled
}
}

async void butRelayout_Click(object sender, RoutedEventArgs e)
Expand Down
13 changes: 3 additions & 10 deletions Examples/METRO.SimpleGraph/MainPageDebug.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,10 @@
<Image Stretch="Uniform" Source="Assets/refresh.png" />
</Button>
<StackPanel Orientation="Vertical">
<TextBlock Text="Layout algorithm:" />
<ComboBox x:Name="cboxLayout" />
</StackPanel>
<StackPanel Orientation="Vertical">
<TextBlock Text="Overlap algorithm:" />
<ComboBox x:Name="cboxOverlap" />
</StackPanel>
<StackPanel Orientation="Vertical">
<TextBlock Text="Edge routing algorithm:" />
<ComboBox x:Name="cboxEdgeRouting" />
<TextBlock Text="Debug mode:" />
<ComboBox x:Name="cboxDebug" Width="350" />
</StackPanel>

</StackPanel>
</Grid>

Expand Down
Loading

0 comments on commit cefd02b

Please sign in to comment.