1
0
mirror of synced 2024-11-21 20:33:49 +00:00

Error handling, connection status and new icons

This commit is contained in:
PsychoMark 2016-06-21 11:43:51 +02:00
parent b7b3a5a490
commit 9201a8811f
20 changed files with 1366 additions and 19 deletions

View File

@ -5,7 +5,8 @@
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Style.xaml" />
<ResourceDictionary Source="Style.xaml"/>
<ResourceDictionary Source="Icons.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>

483
Icons.xaml Normal file
View File

@ -0,0 +1,483 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<DrawingImage x:Key="ClearIcon">
<DrawingImage.Drawing>
<DrawingGroup>
<DrawingGroup>
<DrawingGroup.ClipGeometry>
<RectangleGeometry Rect="0,0,58,58" />
</DrawingGroup.ClipGeometry>
<DrawingGroup>
<DrawingGroup>
<GeometryDrawing Brush="#FFEFEBDE">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M46.5,14L46.5,14 32.5,0 1.5,0 1.5,58 46.5,58z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<DrawingGroup>
<GeometryDrawing Brush="#FFD5D0BB">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M11.5,23L36.5,23C37.052,23 37.5,22.553 37.5,22 37.5,21.447 37.052,21 36.5,21L11.5,21C10.948,21 10.5,21.447 10.5,22 10.5,22.553 10.948,23 11.5,23z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FFD5D0BB">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M11.5,15L21.5,15C22.052,15 22.5,14.553 22.5,14 22.5,13.447 22.052,13 21.5,13L11.5,13C10.948,13 10.5,13.447 10.5,14 10.5,14.553 10.948,15 11.5,15z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FFD5D0BB">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M36.5,29L11.5,29C10.948,29 10.5,29.447 10.5,30 10.5,30.553 10.948,31 11.5,31L36.5,31C37.052,31 37.5,30.553 37.5,30 37.5,29.447 37.052,29 36.5,29z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FFD5D0BB">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M36.5,37L11.5,37C10.948,37 10.5,37.447 10.5,38 10.5,38.553 10.948,39 11.5,39L36.5,39C37.052,39 37.5,38.553 37.5,38 37.5,37.447 37.052,37 36.5,37z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FFD5D0BB">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M36.5,45L11.5,45C10.948,45 10.5,45.447 10.5,46 10.5,46.553 10.948,47 11.5,47L36.5,47C37.052,47 37.5,46.553 37.5,46 37.5,45.447 37.052,45 36.5,45z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup>
<GeometryDrawing Brush="#FFD5D0BB">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M32.5,0L32.5,0 32.5,14 46.5,14z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup>
<DrawingGroup>
<GeometryDrawing Brush="#FFED7161">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="12" RadiusY="12" Center="44.5,46" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FFFFFFFF">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M45.914,46L49.45,42.464C49.841,42.073 49.841,41.441 49.45,41.05 49.059,40.659 48.427,40.659 48.036,41.05L44.5,44.586 40.964,41.05C40.573,40.659 39.941,40.659 39.55,41.05 39.159,41.441 39.159,42.073 39.55,42.464L43.086,46 39.55,49.536C39.159,49.927 39.159,50.559 39.55,50.95 39.745,51.145 40.001,51.243 40.257,51.243 40.513,51.243 40.769,51.145 40.964,50.95L44.5,47.414 48.036,50.95C48.231,51.145 48.487,51.243 48.743,51.243 48.999,51.243 49.255,51.145 49.45,50.95 49.841,50.559 49.841,49.927 49.45,49.536L45.914,46z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup>
</DrawingGroup>
</DrawingGroup>
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage x:Key="ConnectIcon">
<DrawingImage.Drawing>
<DrawingGroup>
<DrawingGroup>
<DrawingGroup.ClipGeometry>
<RectangleGeometry Rect="0,0,59,59" />
</DrawingGroup.ClipGeometry>
<DrawingGroup>
<DrawingGroup>
<GeometryDrawing Brush="#FF556080">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M54.392,19L3.608,19C1.616,19,0,17.384,0,15.392L0,3.608C0,1.616,1.616,0,3.608,0L54.391,0C56.384,0,58,1.616,58,3.608L58,15.391C58,17.384,56.384,19,54.392,19z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF38454F">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M54.392,38L3.608,38C1.616,38,0,36.384,0,34.392L0,22.608C0,20.616,1.616,19,3.608,19L54.391,19C56.384,19,58,20.616,58,22.608L58,34.391C58,36.384,56.384,38,54.392,38z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF556080">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M54.392,57L3.608,57C1.616,57,0,55.384,0,53.392L0,41.608C0,39.616,1.616,38,3.608,38L54.391,38C56.384,38,58,39.616,58,41.608L58,53.391C58,55.384,56.384,57,54.392,57z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="3.5" RadiusY="3.5" Center="9.5,9.5" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="49,8" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="45,8" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="51,11" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="47,11" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="41,8" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="43,11" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="37,8" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="39,11" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="33,8" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="35,11" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="3.5" RadiusY="3.5" Center="9.5,28.5" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="49,27" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="45,27" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="51,30" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="47,30" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="41,27" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="43,30" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="37,27" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="39,30" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="33,27" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="35,30" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="3.5" RadiusY="3.5" Center="9.5,47.5" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="49,46" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="45,46" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="51,49" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="47,49" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="41,46" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="43,49" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="37,46" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="39,49" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="33,46" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="35,49" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup>
<DrawingGroup>
<GeometryDrawing Brush="#FF26B999">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="12" RadiusY="12" Center="47,47" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FFFFFFFF">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M53.571,41.179C53.116,40.863,52.494,40.975,52.179,41.429L46.583,49.469 42.634,46.227C42.208,45.876 41.577,45.939 41.227,46.366 40.876,46.793 40.938,47.423 41.366,47.773L46.152,51.702C46.332,51.849 46.556,51.929 46.786,51.929 46.831,51.929 46.877,51.926 46.923,51.92 47.199,51.881 47.447,51.73 47.607,51.501L53.821,42.572C54.136,42.118,54.024,41.495,53.571,41.179z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup>
</DrawingGroup>
</DrawingGroup>
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage x:Key="DisconnectIcon">
<DrawingImage.Drawing>
<DrawingGroup>
<DrawingGroup>
<DrawingGroup.ClipGeometry>
<RectangleGeometry Rect="0,0,59,59" />
</DrawingGroup.ClipGeometry>
<DrawingGroup>
<DrawingGroup>
<GeometryDrawing Brush="#FF556080">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M54.392,19L3.608,19C1.616,19,0,17.384,0,15.392L0,3.608C0,1.616,1.616,0,3.608,0L54.391,0C56.384,0,58,1.616,58,3.608L58,15.391C58,17.384,56.384,19,54.392,19z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF38454F">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M54.392,38L3.608,38C1.616,38,0,36.384,0,34.392L0,22.608C0,20.616,1.616,19,3.608,19L54.391,19C56.384,19,58,20.616,58,22.608L58,34.391C58,36.384,56.384,38,54.392,38z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF556080">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M54.392,57L3.608,57C1.616,57,0,55.384,0,53.392L0,41.608C0,39.616,1.616,38,3.608,38L54.391,38C56.384,38,58,39.616,58,41.608L58,53.391C58,55.384,56.384,57,54.392,57z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="3.5" RadiusY="3.5" Center="9.5,9.5" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="49,8" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="45,8" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="51,11" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="47,11" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="41,8" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="43,11" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="37,8" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="39,11" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="33,8" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="35,11" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="3.5" RadiusY="3.5" Center="9.5,28.5" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="49,27" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="45,27" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="51,30" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="47,30" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="41,27" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="43,30" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="37,27" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="39,30" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="33,27" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="35,30" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="3.5" RadiusY="3.5" Center="9.5,47.5" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="49,46" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="45,46" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="51,49" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="47,49" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="41,46" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="43,49" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="37,46" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="39,49" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="33,46" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="35,49" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup>
<DrawingGroup>
<GeometryDrawing Brush="#FFED7161">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="12" RadiusY="12" Center="47,47" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FFFFFFFF">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M48.414,47L51.95,43.464C52.341,43.073 52.341,42.441 51.95,42.05 51.559,41.659 50.927,41.659 50.536,42.05L47,45.586 43.464,42.05C43.073,41.659 42.441,41.659 42.05,42.05 41.659,42.441 41.659,43.073 42.05,43.464L45.586,47 42.05,50.536C41.659,50.927 41.659,51.559 42.05,51.95 42.245,52.145 42.501,52.243 42.757,52.243 43.013,52.243 43.269,52.145 43.464,51.95L47,48.414 50.536,51.95C50.731,52.145 50.987,52.243 51.243,52.243 51.499,52.243 51.755,52.145 51.95,51.95 52.341,51.559 52.341,50.927 51.95,50.536L48.414,47z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup>
</DrawingGroup>
</DrawingGroup>
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
</ResourceDictionary>

56
Images/Clear.svg Normal file
View File

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 58 58" style="enable-background:new 0 0 58 58;" xml:space="preserve">
<g>
<g>
<polygon style="fill:#EFEBDE;" points="46.5,14 32.5,0 1.5,0 1.5,58 46.5,58 "/>
<g>
<path style="fill:#D5D0BB;" d="M11.5,23h25c0.552,0,1-0.447,1-1s-0.448-1-1-1h-25c-0.552,0-1,0.447-1,1S10.948,23,11.5,23z"/>
<path style="fill:#D5D0BB;" d="M11.5,15h10c0.552,0,1-0.447,1-1s-0.448-1-1-1h-10c-0.552,0-1,0.447-1,1S10.948,15,11.5,15z"/>
<path style="fill:#D5D0BB;" d="M36.5,29h-25c-0.552,0-1,0.447-1,1s0.448,1,1,1h25c0.552,0,1-0.447,1-1S37.052,29,36.5,29z"/>
<path style="fill:#D5D0BB;" d="M36.5,37h-25c-0.552,0-1,0.447-1,1s0.448,1,1,1h25c0.552,0,1-0.447,1-1S37.052,37,36.5,37z"/>
<path style="fill:#D5D0BB;" d="M36.5,45h-25c-0.552,0-1,0.447-1,1s0.448,1,1,1h25c0.552,0,1-0.447,1-1S37.052,45,36.5,45z"/>
</g>
<polygon style="fill:#D5D0BB;" points="32.5,0 32.5,14 46.5,14 "/>
</g>
<g>
<circle style="fill:#ED7161;" cx="44.5" cy="46" r="12"/>
<path style="fill:#FFFFFF;" d="M45.914,46l3.536-3.536c0.391-0.391,0.391-1.023,0-1.414s-1.023-0.391-1.414,0L44.5,44.586
l-3.536-3.536c-0.391-0.391-1.023-0.391-1.414,0s-0.391,1.023,0,1.414L43.086,46l-3.536,3.536c-0.391,0.391-0.391,1.023,0,1.414
c0.195,0.195,0.451,0.293,0.707,0.293s0.512-0.098,0.707-0.293l3.536-3.536l3.536,3.536c0.195,0.195,0.451,0.293,0.707,0.293
s0.512-0.098,0.707-0.293c0.391-0.391,0.391-1.023,0-1.414L45.914,46z"/>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

60
Images/Clear.xaml Normal file
View File

@ -0,0 +1,60 @@
<DrawingGroup xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<DrawingGroup x:Name="DrawingLayer">
<DrawingGroup.ClipGeometry>
<RectangleGeometry Rect="0,0,58,58" />
</DrawingGroup.ClipGeometry>
<DrawingGroup>
<DrawingGroup>
<GeometryDrawing Brush="#FFEFEBDE">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M46.5,14L46.5,14 32.5,0 1.5,0 1.5,58 46.5,58z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<DrawingGroup>
<GeometryDrawing Brush="#FFD5D0BB">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M11.5,23L36.5,23C37.052,23 37.5,22.553 37.5,22 37.5,21.447 37.052,21 36.5,21L11.5,21C10.948,21 10.5,21.447 10.5,22 10.5,22.553 10.948,23 11.5,23z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FFD5D0BB">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M11.5,15L21.5,15C22.052,15 22.5,14.553 22.5,14 22.5,13.447 22.052,13 21.5,13L11.5,13C10.948,13 10.5,13.447 10.5,14 10.5,14.553 10.948,15 11.5,15z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FFD5D0BB">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M36.5,29L11.5,29C10.948,29 10.5,29.447 10.5,30 10.5,30.553 10.948,31 11.5,31L36.5,31C37.052,31 37.5,30.553 37.5,30 37.5,29.447 37.052,29 36.5,29z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FFD5D0BB">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M36.5,37L11.5,37C10.948,37 10.5,37.447 10.5,38 10.5,38.553 10.948,39 11.5,39L36.5,39C37.052,39 37.5,38.553 37.5,38 37.5,37.447 37.052,37 36.5,37z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FFD5D0BB">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M36.5,45L11.5,45C10.948,45 10.5,45.447 10.5,46 10.5,46.553 10.948,47 11.5,47L36.5,47C37.052,47 37.5,46.553 37.5,46 37.5,45.447 37.052,45 36.5,45z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup>
<GeometryDrawing Brush="#FFD5D0BB">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M32.5,0L32.5,0 32.5,14 46.5,14z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup>
<DrawingGroup>
<GeometryDrawing Brush="#FFED7161">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="12" RadiusY="12" Center="44.5,46" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FFFFFFFF">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M45.914,46L49.45,42.464C49.841,42.073 49.841,41.441 49.45,41.05 49.059,40.659 48.427,40.659 48.036,41.05L44.5,44.586 40.964,41.05C40.573,40.659 39.941,40.659 39.55,41.05 39.159,41.441 39.159,42.073 39.55,42.464L43.086,46 39.55,49.536C39.159,49.927 39.159,50.559 39.55,50.95 39.745,51.145 40.001,51.243 40.257,51.243 40.513,51.243 40.769,51.145 40.964,50.95L44.5,47.414 48.036,50.95C48.231,51.145 48.487,51.243 48.743,51.243 48.999,51.243 49.255,51.145 49.45,50.95 49.841,50.559 49.841,49.927 49.45,49.536L45.914,46z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup>
</DrawingGroup>
</DrawingGroup>
</DrawingGroup>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

85
Images/Connect.svg Normal file
View File

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 59 59" style="enable-background:new 0 0 59 59;" xml:space="preserve">
<g>
<g>
<path style="fill:#556080;" d="M54.392,19H3.608C1.616,19,0,17.384,0,15.392V3.608C0,1.616,1.616,0,3.608,0h50.783
C56.384,0,58,1.616,58,3.608v11.783C58,17.384,56.384,19,54.392,19z"/>
<path style="fill:#38454F;" d="M54.392,38H3.608C1.616,38,0,36.384,0,34.392V22.608C0,20.616,1.616,19,3.608,19h50.783
C56.384,19,58,20.616,58,22.608v11.783C58,36.384,56.384,38,54.392,38z"/>
<path style="fill:#556080;" d="M54.392,57H3.608C1.616,57,0,55.384,0,53.392V41.608C0,39.616,1.616,38,3.608,38h50.783
C56.384,38,58,39.616,58,41.608v11.783C58,55.384,56.384,57,54.392,57z"/>
<circle style="fill:#8697CB;" cx="9.5" cy="9.5" r="3.5"/>
<circle style="fill:#8697CB;" cx="49" cy="8" r="1"/>
<circle style="fill:#8697CB;" cx="45" cy="8" r="1"/>
<circle style="fill:#8697CB;" cx="51" cy="11" r="1"/>
<circle style="fill:#8697CB;" cx="47" cy="11" r="1"/>
<circle style="fill:#8697CB;" cx="41" cy="8" r="1"/>
<circle style="fill:#8697CB;" cx="43" cy="11" r="1"/>
<circle style="fill:#8697CB;" cx="37" cy="8" r="1"/>
<circle style="fill:#8697CB;" cx="39" cy="11" r="1"/>
<circle style="fill:#8697CB;" cx="33" cy="8" r="1"/>
<circle style="fill:#8697CB;" cx="35" cy="11" r="1"/>
<circle style="fill:#8697CB;" cx="9.5" cy="28.5" r="3.5"/>
<circle style="fill:#8697CB;" cx="49" cy="27" r="1"/>
<circle style="fill:#8697CB;" cx="45" cy="27" r="1"/>
<circle style="fill:#8697CB;" cx="51" cy="30" r="1"/>
<circle style="fill:#8697CB;" cx="47" cy="30" r="1"/>
<circle style="fill:#8697CB;" cx="41" cy="27" r="1"/>
<circle style="fill:#8697CB;" cx="43" cy="30" r="1"/>
<circle style="fill:#8697CB;" cx="37" cy="27" r="1"/>
<circle style="fill:#8697CB;" cx="39" cy="30" r="1"/>
<circle style="fill:#8697CB;" cx="33" cy="27" r="1"/>
<circle style="fill:#8697CB;" cx="35" cy="30" r="1"/>
<circle style="fill:#8697CB;" cx="9.5" cy="47.5" r="3.5"/>
<circle style="fill:#8697CB;" cx="49" cy="46" r="1"/>
<circle style="fill:#8697CB;" cx="45" cy="46" r="1"/>
<circle style="fill:#8697CB;" cx="51" cy="49" r="1"/>
<circle style="fill:#8697CB;" cx="47" cy="49" r="1"/>
<circle style="fill:#8697CB;" cx="41" cy="46" r="1"/>
<circle style="fill:#8697CB;" cx="43" cy="49" r="1"/>
<circle style="fill:#8697CB;" cx="37" cy="46" r="1"/>
<circle style="fill:#8697CB;" cx="39" cy="49" r="1"/>
<circle style="fill:#8697CB;" cx="33" cy="46" r="1"/>
<circle style="fill:#8697CB;" cx="35" cy="49" r="1"/>
</g>
<g>
<circle style="fill:#26B999;" cx="47" cy="47" r="12"/>
<path style="fill:#FFFFFF;" d="M53.571,41.179c-0.455-0.316-1.077-0.204-1.392,0.25l-5.596,8.04l-3.949-3.242
c-0.426-0.351-1.057-0.288-1.407,0.139c-0.351,0.427-0.289,1.057,0.139,1.407l4.786,3.929c0.18,0.147,0.404,0.227,0.634,0.227
c0.045,0,0.091-0.003,0.137-0.009c0.276-0.039,0.524-0.19,0.684-0.419l6.214-8.929C54.136,42.118,54.024,41.495,53.571,41.179z"/>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

203
Images/Connect.xaml Normal file
View File

@ -0,0 +1,203 @@
<DrawingGroup xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<DrawingGroup x:Name="DrawingLayer">
<DrawingGroup.ClipGeometry>
<RectangleGeometry Rect="0,0,59,59" />
</DrawingGroup.ClipGeometry>
<DrawingGroup>
<DrawingGroup>
<GeometryDrawing Brush="#FF556080">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M54.392,19L3.608,19C1.616,19,0,17.384,0,15.392L0,3.608C0,1.616,1.616,0,3.608,0L54.391,0C56.384,0,58,1.616,58,3.608L58,15.391C58,17.384,56.384,19,54.392,19z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF38454F">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M54.392,38L3.608,38C1.616,38,0,36.384,0,34.392L0,22.608C0,20.616,1.616,19,3.608,19L54.391,19C56.384,19,58,20.616,58,22.608L58,34.391C58,36.384,56.384,38,54.392,38z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF556080">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M54.392,57L3.608,57C1.616,57,0,55.384,0,53.392L0,41.608C0,39.616,1.616,38,3.608,38L54.391,38C56.384,38,58,39.616,58,41.608L58,53.391C58,55.384,56.384,57,54.392,57z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="3.5" RadiusY="3.5" Center="9.5,9.5" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="49,8" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="45,8" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="51,11" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="47,11" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="41,8" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="43,11" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="37,8" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="39,11" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="33,8" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="35,11" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="3.5" RadiusY="3.5" Center="9.5,28.5" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="49,27" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="45,27" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="51,30" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="47,30" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="41,27" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="43,30" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="37,27" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="39,30" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="33,27" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="35,30" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="3.5" RadiusY="3.5" Center="9.5,47.5" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="49,46" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="45,46" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="51,49" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="47,49" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="41,46" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="43,49" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="37,46" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="39,49" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="33,46" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="35,49" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup>
<DrawingGroup>
<GeometryDrawing Brush="#FF26B999">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="12" RadiusY="12" Center="47,47" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FFFFFFFF">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M53.571,41.179C53.116,40.863,52.494,40.975,52.179,41.429L46.583,49.469 42.634,46.227C42.208,45.876 41.577,45.939 41.227,46.366 40.876,46.793 40.938,47.423 41.366,47.773L46.152,51.702C46.332,51.849 46.556,51.929 46.786,51.929 46.831,51.929 46.877,51.926 46.923,51.92 47.199,51.881 47.447,51.73 47.607,51.501L53.821,42.572C54.136,42.118,54.024,41.495,53.571,41.179z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup>
</DrawingGroup>
</DrawingGroup>
</DrawingGroup>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

86
Images/Disconnect.svg Normal file
View File

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 59 59" style="enable-background:new 0 0 59 59;" xml:space="preserve">
<g>
<g>
<path style="fill:#556080;" d="M54.392,19H3.608C1.616,19,0,17.384,0,15.392V3.608C0,1.616,1.616,0,3.608,0h50.783
C56.384,0,58,1.616,58,3.608v11.783C58,17.384,56.384,19,54.392,19z"/>
<path style="fill:#38454F;" d="M54.392,38H3.608C1.616,38,0,36.384,0,34.392V22.608C0,20.616,1.616,19,3.608,19h50.783
C56.384,19,58,20.616,58,22.608v11.783C58,36.384,56.384,38,54.392,38z"/>
<path style="fill:#556080;" d="M54.392,57H3.608C1.616,57,0,55.384,0,53.392V41.608C0,39.616,1.616,38,3.608,38h50.783
C56.384,38,58,39.616,58,41.608v11.783C58,55.384,56.384,57,54.392,57z"/>
<circle style="fill:#8697CB;" cx="9.5" cy="9.5" r="3.5"/>
<circle style="fill:#8697CB;" cx="49" cy="8" r="1"/>
<circle style="fill:#8697CB;" cx="45" cy="8" r="1"/>
<circle style="fill:#8697CB;" cx="51" cy="11" r="1"/>
<circle style="fill:#8697CB;" cx="47" cy="11" r="1"/>
<circle style="fill:#8697CB;" cx="41" cy="8" r="1"/>
<circle style="fill:#8697CB;" cx="43" cy="11" r="1"/>
<circle style="fill:#8697CB;" cx="37" cy="8" r="1"/>
<circle style="fill:#8697CB;" cx="39" cy="11" r="1"/>
<circle style="fill:#8697CB;" cx="33" cy="8" r="1"/>
<circle style="fill:#8697CB;" cx="35" cy="11" r="1"/>
<circle style="fill:#8697CB;" cx="9.5" cy="28.5" r="3.5"/>
<circle style="fill:#8697CB;" cx="49" cy="27" r="1"/>
<circle style="fill:#8697CB;" cx="45" cy="27" r="1"/>
<circle style="fill:#8697CB;" cx="51" cy="30" r="1"/>
<circle style="fill:#8697CB;" cx="47" cy="30" r="1"/>
<circle style="fill:#8697CB;" cx="41" cy="27" r="1"/>
<circle style="fill:#8697CB;" cx="43" cy="30" r="1"/>
<circle style="fill:#8697CB;" cx="37" cy="27" r="1"/>
<circle style="fill:#8697CB;" cx="39" cy="30" r="1"/>
<circle style="fill:#8697CB;" cx="33" cy="27" r="1"/>
<circle style="fill:#8697CB;" cx="35" cy="30" r="1"/>
<circle style="fill:#8697CB;" cx="9.5" cy="47.5" r="3.5"/>
<circle style="fill:#8697CB;" cx="49" cy="46" r="1"/>
<circle style="fill:#8697CB;" cx="45" cy="46" r="1"/>
<circle style="fill:#8697CB;" cx="51" cy="49" r="1"/>
<circle style="fill:#8697CB;" cx="47" cy="49" r="1"/>
<circle style="fill:#8697CB;" cx="41" cy="46" r="1"/>
<circle style="fill:#8697CB;" cx="43" cy="49" r="1"/>
<circle style="fill:#8697CB;" cx="37" cy="46" r="1"/>
<circle style="fill:#8697CB;" cx="39" cy="49" r="1"/>
<circle style="fill:#8697CB;" cx="33" cy="46" r="1"/>
<circle style="fill:#8697CB;" cx="35" cy="49" r="1"/>
</g>
<g>
<circle style="fill:#ED7161;" cx="47" cy="47" r="12"/>
<path style="fill:#FFFFFF;" d="M48.414,47l3.536-3.536c0.391-0.391,0.391-1.023,0-1.414s-1.023-0.391-1.414,0L47,45.586
l-3.536-3.536c-0.391-0.391-1.023-0.391-1.414,0s-0.391,1.023,0,1.414L45.586,47l-3.536,3.536c-0.391,0.391-0.391,1.023,0,1.414
c0.195,0.195,0.451,0.293,0.707,0.293s0.512-0.098,0.707-0.293L47,48.414l3.536,3.536c0.195,0.195,0.451,0.293,0.707,0.293
s0.512-0.098,0.707-0.293c0.391-0.391,0.391-1.023,0-1.414L48.414,47z"/>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.5 KiB

203
Images/Disconnect.xaml Normal file
View File

@ -0,0 +1,203 @@
<DrawingGroup xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<DrawingGroup x:Name="DrawingLayer">
<DrawingGroup.ClipGeometry>
<RectangleGeometry Rect="0,0,59,59" />
</DrawingGroup.ClipGeometry>
<DrawingGroup>
<DrawingGroup>
<GeometryDrawing Brush="#FF556080">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M54.392,19L3.608,19C1.616,19,0,17.384,0,15.392L0,3.608C0,1.616,1.616,0,3.608,0L54.391,0C56.384,0,58,1.616,58,3.608L58,15.391C58,17.384,56.384,19,54.392,19z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF38454F">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M54.392,38L3.608,38C1.616,38,0,36.384,0,34.392L0,22.608C0,20.616,1.616,19,3.608,19L54.391,19C56.384,19,58,20.616,58,22.608L58,34.391C58,36.384,56.384,38,54.392,38z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF556080">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M54.392,57L3.608,57C1.616,57,0,55.384,0,53.392L0,41.608C0,39.616,1.616,38,3.608,38L54.391,38C56.384,38,58,39.616,58,41.608L58,53.391C58,55.384,56.384,57,54.392,57z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="3.5" RadiusY="3.5" Center="9.5,9.5" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="49,8" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="45,8" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="51,11" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="47,11" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="41,8" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="43,11" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="37,8" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="39,11" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="33,8" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="35,11" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="3.5" RadiusY="3.5" Center="9.5,28.5" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="49,27" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="45,27" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="51,30" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="47,30" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="41,27" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="43,30" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="37,27" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="39,30" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="33,27" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="35,30" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="3.5" RadiusY="3.5" Center="9.5,47.5" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="49,46" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="45,46" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="51,49" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="47,49" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="41,46" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="43,49" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="37,46" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="39,49" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="33,46" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FF8697CB">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="1" RadiusY="1" Center="35,49" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup>
<DrawingGroup>
<GeometryDrawing Brush="#FFED7161">
<GeometryDrawing.Geometry>
<EllipseGeometry RadiusX="12" RadiusY="12" Center="47,47" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#FFFFFFFF">
<GeometryDrawing.Geometry>
<PathGeometry FillRule="Nonzero" Figures="M48.414,47L51.95,43.464C52.341,43.073 52.341,42.441 51.95,42.05 51.559,41.659 50.927,41.659 50.536,42.05L47,45.586 43.464,42.05C43.073,41.659 42.441,41.659 42.05,42.05 41.659,42.441 41.659,43.073 42.05,43.464L45.586,47 42.05,50.536C41.659,50.927 41.659,51.559 42.05,51.95 42.245,52.145 42.501,52.243 42.757,52.243 43.013,52.243 43.269,52.145 43.464,51.95L47,48.414 50.536,51.95C50.731,52.145 50.987,52.243 51.243,52.243 51.499,52.243 51.755,52.145 51.95,51.95 52.341,51.559 52.341,50.927 51.95,50.536L48.414,47z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup>
</DrawingGroup>
</DrawingGroup>
</DrawingGroup>

View File

@ -2,6 +2,29 @@
namespace PettingZoo.Model
{
public enum ConnectionStatus
{
Disconnected,
Connecting,
Connected,
Error
}
public class StatusChangedEventArgs : EventArgs
{
public ConnectionStatus Status { get; private set; }
public string Context { get; private set; }
public StatusChangedEventArgs(ConnectionStatus status, string context)
{
Status = status;
Context = context;
}
}
public class MessageReceivedEventArgs : EventArgs
{
public MessageInfo MessageInfo { get; private set; }
@ -14,8 +37,10 @@ namespace PettingZoo.Model
}
public interface IConnection : IDisposable
{
event EventHandler<StatusChangedEventArgs> StatusChanged;
event EventHandler<MessageReceivedEventArgs> MessageReceived;
}
}

View File

@ -12,11 +12,14 @@ namespace PettingZoo.Model
{
public class RabbitMQClientConnection : IConnection
{
private const int ConnectRetryDelay = 5000;
private readonly CancellationTokenSource connectionTaskToken;
private RabbitMQ.Client.IConnection connection;
private IModel model;
public event EventHandler<StatusChangedEventArgs> StatusChanged;
public event EventHandler<MessageReceivedEventArgs> MessageReceived;
@ -44,6 +47,9 @@ namespace PettingZoo.Model
connection.Dispose();
connection = null;
}
StatusChanged = null;
MessageReceived = null;
}
@ -58,18 +64,34 @@ namespace PettingZoo.Model
Password = connectionInfo.Password
};
// ToDo exception handling
connection = factory.CreateConnection();
model = connection.CreateModel();
var statusContext = String.Format(@"{0}:{1}{2}", connectionInfo.Host, connectionInfo.Port, connectionInfo.VirtualHost);
var queueName = model.QueueDeclare().QueueName;
model.QueueBind(queueName, connectionInfo.Exchange, connectionInfo.RoutingKey);
while (!cancellationToken.IsCancellationRequested)
{
DoStatusChanged(ConnectionStatus.Connecting, statusContext);
try
{
connection = factory.CreateConnection();
model = connection.CreateModel();
var queueName = model.QueueDeclare().QueueName;
model.QueueBind(queueName, connectionInfo.Exchange, connectionInfo.RoutingKey);
var consumer = new EventingBasicConsumer(model);
consumer.Received += ClientReceived;
var consumer = new EventingBasicConsumer(model);
consumer.Received += ClientReceived;
model.BasicConsume(queueName, true, consumer);
model.BasicConsume(queueName, true, consumer);
DoStatusChanged(ConnectionStatus.Connected, statusContext);
break;
}
catch (Exception e)
{
DoStatusChanged(ConnectionStatus.Error, e.Message);
Task.Delay(ConnectRetryDelay, cancellationToken).Wait(cancellationToken);
}
}
}
@ -90,6 +112,13 @@ namespace PettingZoo.Model
}
private void DoStatusChanged(ConnectionStatus status, string context = null)
{
if (StatusChanged != null)
StatusChanged(this, new StatusChangedEventArgs(status, context));
}
private static Dictionary<string, string> ConvertProperties(IBasicProperties basicProperties)
{
var properties = new Dictionary<string, string>();

View File

@ -92,6 +92,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Page Include="Icons.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Style.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@ -177,10 +181,6 @@
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<Resource Include="Images\Connect.png" />
<Resource Include="Images\Disconnect.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="PettingZoo.ico" />
</ItemGroup>

View File

@ -212,5 +212,41 @@ namespace PettingZoo.Properties {
return ResourceManager.GetString("PropertyValue", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Connected.
/// </summary>
public static string StatusConnected {
get {
return ResourceManager.GetString("StatusConnected", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Connecting to {0}....
/// </summary>
public static string StatusConnecting {
get {
return ResourceManager.GetString("StatusConnecting", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Disconnected.
/// </summary>
public static string StatusDisconnected {
get {
return ResourceManager.GetString("StatusDisconnected", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Error: {0}.
/// </summary>
public static string StatusError {
get {
return ResourceManager.GetString("StatusError", resourceCulture);
}
}
}
}

View File

@ -168,4 +168,16 @@
<data name="PropertyValue" xml:space="preserve">
<value>Value</value>
</data>
<data name="StatusConnected" xml:space="preserve">
<value>Connected</value>
</data>
<data name="StatusConnecting" xml:space="preserve">
<value>Connecting to {0}...</value>
</data>
<data name="StatusDisconnected" xml:space="preserve">
<value>Disconnected</value>
</data>
<data name="StatusError" xml:space="preserve">
<value>Error: {0}</value>
</data>
</root>

12
README.md Normal file
View File

@ -0,0 +1,12 @@
# Petting Zoo
##### A RabbitMQ live message viewer
ToDo: explain how it brings you coffee, fame and world peace. Or maybe just makes watching the messages flow slightly more comfortable.
#### Icons
Icons are from the Interaction Assets pack by Madebyoliver
<http://www.flaticon.com/authors/madebyoliver>
Designed by Freepik and distributed by Flaticon

View File

@ -40,6 +40,7 @@
<TextBox Grid.Column="1" Grid.Row="0" Text="{Binding Host}" Name="HostTextBox" />
<Label Grid.Column="0" Grid.Row="1" Content="{x:Static res:Resources.ConnectionPort}"/>
<TextBox Grid.Column="1" Grid.Row="1" Text="{Binding Port}" Width="100" HorizontalAlignment="Left" PreviewTextInput="NumericPreviewTextInput" />
<Label Grid.Column="0" Grid.Row="2" Content="{x:Static res:Resources.ConnectionVirtualHost}"/>
<TextBox Grid.Column="1" Grid.Row="2" Text="{Binding VirtualHost}"/>

View File

@ -1,4 +1,5 @@
using System.Windows;
using System.Windows.Input;
using PettingZoo.Model;
using PettingZoo.ViewModel;
@ -34,5 +35,12 @@ namespace PettingZoo.View
InitializeComponent();
DataContext = viewModel;
}
private void NumericPreviewTextInput(object sender, TextCompositionEventArgs args)
{
if (!char.IsDigit(args.Text, args.Text.Length - 1))
args.Handled = true;
}
}
}

View File

@ -17,27 +17,27 @@
<ToolBar DockPanel.Dock="Top" ToolBarTray.IsLocked="True">
<Button Command="{Binding ConnectCommand}">
<StackPanel Orientation="Horizontal">
<Image Source="/Images/Connect.png" Width="16" Height="16" Style="{StaticResource ToolbarIcon}"/>
<Image Source="{StaticResource ConnectIcon}" Width="16" Height="16" Style="{StaticResource ToolbarIcon}"/>
<TextBlock Margin="3,0,0,0">Connect</TextBlock>
</StackPanel>
</Button>
<Button Command="{Binding DisconnectCommand}">
<StackPanel Orientation="Horizontal">
<Image Source="/Images/Disconnect.png" Width="16" Height="16" Style="{StaticResource ToolbarIcon}"/>
<Image Source="{StaticResource DisconnectIcon}" Width="16" Height="16" Style="{StaticResource ToolbarIcon}"/>
<TextBlock Margin="3,0,0,0">Disconnect</TextBlock>
</StackPanel>
</Button>
<Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />
<Button Command="{Binding ClearCommand}">
<StackPanel Orientation="Horizontal">
<Image Source="/Images/Disconnect.png" Width="16" Height="16" Style="{StaticResource ToolbarIcon}"/>
<Image Source="{StaticResource ClearIcon}" Width="16" Height="16" Style="{StaticResource ToolbarIcon}"/>
<TextBlock Margin="3,0,0,0">Clear messages</TextBlock>
</StackPanel>
</Button>
</ToolBar>
<StatusBar DockPanel.Dock="Bottom">
<StatusBarItem>
<TextBlock />
<TextBlock Text="{Binding ConnectionStatus}"/>
</StatusBarItem>
</StatusBar>
<Grid Margin="4">

View File

@ -6,6 +6,7 @@ using System.Threading.Tasks;
using System.Windows.Input;
using PettingZoo.Infrastructure;
using PettingZoo.Model;
using PettingZoo.Properties;
namespace PettingZoo.ViewModel
{
@ -17,6 +18,7 @@ namespace PettingZoo.ViewModel
private ConnectionInfo connectionInfo;
private IConnection connection;
private string connectionStatus;
private readonly ObservableCollection<MessageInfo> messages;
private MessageInfo selectedMessage;
@ -37,6 +39,19 @@ namespace PettingZoo.ViewModel
}
}
public string ConnectionStatus
{
get { return connectionStatus; }
private set
{
if (value == connectionStatus)
return;
connectionStatus = value;
RaisePropertyChanged();
}
}
public ObservableCollection<MessageInfo> Messages { get { return messages; } }
public MessageInfo SelectedMessage
@ -81,6 +96,7 @@ namespace PettingZoo.ViewModel
this.connectionInfoBuilder = connectionInfoBuilder;
this.connectionFactory = connectionFactory;
connectionStatus = GetConnectionStatus(null);
messages = new ObservableCollection<MessageInfo>();
connectCommand = new DelegateCommand(ConnectExecute);
@ -105,9 +121,13 @@ namespace PettingZoo.ViewModel
if (newInfo == null)
return;
if (connection != null)
connection.Dispose();
ConnectionInfo = newInfo;
connection = connectionFactory.CreateConnection(connectionInfo);
connection.MessageReceived += ConnectionMessageReceived;
connection.StatusChanged += ConnectionStatusChanged;
disconnectCommand.RaiseCanExecuteChanged();
}
@ -122,6 +142,8 @@ namespace PettingZoo.ViewModel
}
ConnectionInfo = null;
ConnectionStatus = GetConnectionStatus(null);
disconnectCommand.RaiseCanExecuteChanged();
}
@ -145,16 +167,41 @@ namespace PettingZoo.ViewModel
}
private void ConnectionMessageReceived(object sender, MessageReceivedEventArgs e)
private void ConnectionStatusChanged(object sender, StatusChangedEventArgs args)
{
ConnectionStatus = GetConnectionStatus(args);
}
private void ConnectionMessageReceived(object sender, MessageReceivedEventArgs args)
{
RunFromUiScheduler(() =>
{
messages.Add(e.MessageInfo);
messages.Add(args.MessageInfo);
clearCommand.RaiseCanExecuteChanged();
});
}
private string GetConnectionStatus(StatusChangedEventArgs args)
{
if (args != null)
switch (args.Status)
{
case Model.ConnectionStatus.Connecting:
return String.Format(Resources.StatusConnecting, args.Context);
case Model.ConnectionStatus.Connected:
return String.Format(Resources.StatusConnected, args.Context);
case Model.ConnectionStatus.Error:
return String.Format(Resources.StatusError, args.Context);
}
return Resources.StatusDisconnected;
}
private void RunFromUiScheduler(Action action)
{
Task.Factory.StartNew(action, CancellationToken.None, TaskCreationOptions.None, uiScheduler);