Permalink
Browse files

Added very basic index manipulation and committing capability. This c…

…ommit was produced by GitSharp.Demo itself.
  • Loading branch information...
1 parent c1f2546 commit 6cabae01527cc77067ac1c76d078751f5b7f310c @henon committed Mar 20, 2010
View
@@ -39,8 +39,14 @@
<Application x:Class="GitSharp.Demo.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- StartupUri="Browser.xaml">
+ StartupUri="MainFrame.xaml">
<Application.Resources>
-
+ <LinearGradientBrush x:Key="SilverGradientTopVertical" StartPoint="0,0" EndPoint="0,1">
+ <GradientStop Color="#FFEEEEEE" Offset="0" />
+ <GradientStop Color="#FFCCCCCC" Offset="1" />
+ </LinearGradientBrush>
+ <Style x:Key="HeaderLabelStyle">
+ <Setter Property="Label.Background" Value="{StaticResource SilverGradientTopVertical}" ></Setter>
+ </Style>
</Application.Resources>
</Application>
View
@@ -1,173 +0,0 @@
-<!--
- /*
- * 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.
- */
- -->
-<Window x:Class="GitSharp.Demo.Browser"
- 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"
- Title="GitSharp.Demo - Repository Browser" MinHeight="300" MinWidth="640" Width="800" Height="600">
-
- <Window.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>
- <LinearGradientBrush x:Key="SilverGradientTopVertical" StartPoint="0,0" EndPoint="0,1">
- <GradientStop Color="#FFEEEEEE" Offset="0" />
- <GradientStop Color="#FFCCCCCC" Offset="1" />
- </LinearGradientBrush>
- <Style x:Key="HeaderLabelStyle">
- <Setter Property="Label.Background" Value="{StaticResource SilverGradientTopVertical}" ></Setter>
- </Style>
- <!--config tree templates-->
- <!--<HierarchicalDataTemplate DataType="{x:Type config:Section}" ItemsSource="{Binding Path=Entries}">
- <TextBlock Text="{Binding Name}" TextTrimming="CharacterEllipsis"/>
- </HierarchicalDataTemplate>
- <DataTemplate DataType="{x:Type config:Entry}">
- <StackPanel Orientation="Horizontal">
- <Label Content="{Binding Name}" ToolTip="{Binding FullName}" Width="200"/>
- <Label Content=" = "/>
- <TextBox Text="{Binding Path=Value, Mode=TwoWay, UpdateSourceTrigger=LostFocus}" ToolTip="{Binding Value}" Width="300"/>
- </StackPanel>
- </DataTemplate>-->
- </Window.Resources>
- <DockPanel>
- <!--menu-->
- <Menu DockPanel.Dock="Top">
- <MenuItem Header="File" >
- <MenuItem Header="Open repository ..." Click="OnSelectRepository"/>
- <Separator />
- <MenuItem Header="Exit" Click="OnMenuClose" />
- </MenuItem>
- <MenuItem Header="Edit" >
- <MenuItem Header="Repository configuration..." Click="OnOpenRepositoryConfiguration"/>
- </MenuItem>
- </Menu>
- <!--status bar-->
- <DockPanel DockPanel.Dock="Bottom" LastChildFill="False" Background="LightGray">
- <Label Margin="0,0,5,0" Content="Repository:">
- <Label.ContextMenu>
- <ContextMenu>
- <MenuItem Header="Select repository path" Click="OnSelectRepository"/>
- </ContextMenu>
- </Label.ContextMenu>
- </Label>
- <TextBox Name="m_url_textbox" MinWidth="100">.</TextBox>
- <Button Click="OnLoadRepository" Margin="5,0,0,0">Reload</Button>
- </DockPanel>
- <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>
- <!--<ListView Name="m_refs" DockPanel.Dock="Top" >
- <ListView.View>
- <GridView>
- <GridView.Columns>
- <GridViewColumn Header="Name" DisplayMemberBinding="{Binding Path=Name}"/>
- <GridViewColumn Header="SHA" DisplayMemberBinding="{Binding Path=ObjectId}"/>
- <GridViewColumn Header="OriginalName" DisplayMemberBinding="{Binding Path=OriginalName}"/>
- <GridViewColumn Header="Detached" DisplayMemberBinding="{Binding Path=Detached}"/>
- <GridViewColumn Header="Storage" DisplayMemberBinding="{Binding Path=StorageFormat.Name}"/>
- </GridView.Columns>
- </GridView>
- </ListView.View>
- </ListView>-->
- <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>
- <!--<GridSplitter Width="2" Grid.Column="1" ResizeBehavior="PreviousAndNext"/>-->
-
- </DockPanel>
- <!--<GridSplitter Grid.Row="1" ResizeBehavior="PreviousAndNext" ResizeDirection="Rows" Height="6" Background="White"/>-->
- </DockPanel>
-
- </DockPanel>
- </DockPanel>
-
-</Window>
Oops, something went wrong.

0 comments on commit 6cabae0

Please sign in to comment.