Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
114 lines (104 sloc) 5.51 KB
<!--
/*
* Copyright (C) 2009, Henon<meinrad.recheis@gmail.com>
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* - Neither the name of the project nor the
* names of its contributors may be used to endorse or promote
* products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-->
<UserControl x:Class="GitSharp.Demo.BrowserView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:g="clr-namespace:GitSharp;assembly=GitSharp"
xmlns:HistoryGraph="clr-namespace:GitSharp.Demo.HistoryGraph"
xmlns:Demo="clr-namespace:GitSharp.Demo"
xmlns:Controls="clr-namespace:GitSharp.Demo.Controls"
MinHeight="300" MinWidth="300">
<UserControl.Resources>
<!--repository tree templates-->
<HierarchicalDataTemplate DataType="{x:Type g:Tree}" ItemsSource="{Binding Path=Children}">
<TextBlock Text="{Binding Name}" TextTrimming="CharacterEllipsis" ToolTip="{Binding Hash}"/>
</HierarchicalDataTemplate>
<DataTemplate DataType="{x:Type g:AbstractObject}">
<TextBlock Text="{Binding Name}" TextTrimming="CharacterEllipsis" Foreground="CornflowerBlue" ToolTip="{Binding Hash}"/>
</DataTemplate>
</UserControl.Resources>
<DockPanel >
<!--commit history graph-->
<DockPanel Width="400">
<Label DockPanel.Dock="Top" Style="{StaticResource HeaderLabelStyle}">Revision History</Label>
<HistoryGraph:HistoryGraphView x:Name="m_history_graph" DockPanel.Dock="Top" Height="300"/>
<Controls:DockPanelSplitter DockPanel.Dock="Top" Height="4"/>
<!--lower half-->
<Grid Grid.Row="2" DockPanel.Dock="Top">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<!--tree-->
<DockPanel Grid.Column="0">
<Label DockPanel.Dock="Top" Name="m_tree_title" Style="{StaticResource HeaderLabelStyle}">Source Tree (select to show content)</Label>
<TreeView Name="m_tree"/>
</DockPanel>
<GridSplitter ResizeBehavior="PreviousAndNext" Width="2" Grid.Column="1"/>
<!--object-->
<DockPanel Grid.Column="2">
<Label DockPanel.Dock="Top" Name="m_object_title" Style="{StaticResource HeaderLabelStyle}">Blob contents of selected tree node</Label>
<RichTextBox Name="m_object" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"/>
</DockPanel>
</Grid>
</DockPanel>
<Controls:DockPanelSplitter DockPanel.Dock="Left" Width="4" BorderThickness="1"/>
<!--commit browser-->
<DockPanel DockPanel.Dock="Top">
<!--upper half-->
<DockPanel DockPanel.Dock="Top">
<!--tags and branches-->
<DockPanel Margin="0" DockPanel.Dock="Top">
<Label DockPanel.Dock="Top" Name="m_refs_title" Style="{StaticResource HeaderLabelStyle}">Selected Commit</Label>
<Demo:CommitSummaryView x:Name="m_commit_view"/>
</DockPanel>
<Controls:DockPanelSplitter DockPanel.Dock="Top" Height="4"/>
<!--commits-->
<DockPanel DockPanel.Dock="Top">
<Label DockPanel.Dock="Top" Name="m_commit_title" Style="{StaticResource HeaderLabelStyle}">Changes by this commit (select a modification to view the diff)</Label>
<Demo:CommitDiffView x:Name="m_commit_diff" DockPanel.Dock="Top" />
<Controls:DockPanelSplitter DockPanel.Dock="Top" Height="4"/>
<Label DockPanel.Dock="Top" Style="{StaticResource HeaderLabelStyle}">Differences</Label>
<Demo:TextDiffView x:Name="m_text_diff" DockPanel.Dock="Top" />
</DockPanel>
</DockPanel>
</DockPanel>
</DockPanel>
</UserControl>
Jump to Line
Something went wrong with that request. Please try again.