Skip to content

Commit

Permalink
Redesign
Browse files Browse the repository at this point in the history
  • Loading branch information
xtenzQ committed Mar 14, 2019
1 parent ae2e0d6 commit c2da6d9
Show file tree
Hide file tree
Showing 17 changed files with 153 additions and 77 deletions.
Binary file modified ResearchersWPF.Service/App_Data/Researchers.db
Binary file not shown.
16 changes: 13 additions & 3 deletions ResearchersWPF.UI/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,22 @@
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
>
<Application.Resources>
<Style TargetType="DataGridCell">
<Style x:Key="Body_Content_DataGrid_Centering"
TargetType="{x:Type DataGridCell}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
<Grid Background="{TemplateBinding Background}">
<ContentPresenter VerticalAlignment="Center" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#77ddbc"/>
<Setter Property="Background" Value="#79d3f1"/>
<Setter Property="Foreground" Value="#000"/>
<Setter Property="BorderBrush" Value="#77ddbc"/>
<Setter Property="BorderBrush" Value="#79d3f1"/>
</Trigger>
<Trigger Property="IsKeyboardFocusWithin" Value="True">
<Setter Property="BorderBrush" Value="Red" />
Expand Down
10 changes: 10 additions & 0 deletions ResearchersWPF.UI/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions ResearchersWPF.UI/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,8 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="edit" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\edit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
2 changes: 2 additions & 0 deletions ResearchersWPF.UI/ResearchersWPF.UI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Resource Include="favicon.ico" />
<None Include="Resources\AddResearcher.png" />
<None Include="Resources\edit.png" />
<Content Include="Web.config" />
<None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
Expand Down
Binary file added ResearchersWPF.UI/Resources/AddResearcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ResearchersWPF.UI/Resources/edit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 15 additions & 3 deletions ResearchersWPF.UI/View/ArticleListView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,20 @@
<UserControl.Resources>
<DataTemplate x:Key="RowButtons">
<StackPanel Orientation="Horizontal">
<Button x:Name="btnEditArticle" Content="Edit" Click="btnEditArticle_Click" />
<Button x:Name="btnDeleteArticle" Content="Delete" Command="{Binding DeleteCommand}" />
<Button Background="Transparent" BorderThickness="0" Command="{Binding ShowEditCommand}">
<StackPanel Orientation="Horizontal">
<Canvas Width="24" Height="24">
<Path Data="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z" Fill="Gray" />
</Canvas>
</StackPanel>
</Button>
<Button Background="Transparent" x:Name="btnDeleteResearcher" BorderThickness="0" Command="{Binding DeleteCommand}">
<StackPanel Orientation="Horizontal">
<Canvas Width="24" Height="24">
<Path Data="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z" Fill="Gray" />
</Canvas>
</StackPanel>
</Button>
</StackPanel>
</DataTemplate>
</UserControl.Resources>
Expand Down Expand Up @@ -43,7 +55,7 @@
</Button>
</ToolBar>
</ToolBarTray>
<DataGrid SelectionUnit="FullRow" GridLinesVisibility="None" Background="White" IsReadOnly="True" Grid.Column="0" Grid.Row="0" CanUserAddRows="False" AutoGenerateColumns="False" Height="auto" SelectionMode="Single" x:Name="lsvArticleList" ItemsSource="{Binding Articles}">
<DataGrid CellStyle="{StaticResource Body_Content_DataGrid_Centering}" RowHeight="30" SelectionUnit="FullRow" GridLinesVisibility="None" Background="White" IsReadOnly="True" Grid.Column="0" Grid.Row="0" CanUserAddRows="False" AutoGenerateColumns="False" Height="auto" SelectionMode="Single" x:Name="lsvArticleList" ItemsSource="{Binding Articles}">
<DataGrid.Columns>
<DataGridTextColumn Width="*" Header="Name" Binding="{Binding Path=Name }"/>
<DataGridTextColumn Width="*" Header="Magazine name" Binding="{Binding Path=MagazineName }"/>
Expand Down
16 changes: 8 additions & 8 deletions ResearchersWPF.UI/View/ArticleView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:viewModel="clr-namespace:ResearchersWPF.UI.ViewModel"
mc:Ignorable="d"
Title="Добавить статью" SizeToContent="WidthAndHeight" ResizeMode="NoResize">
Title="Article" SizeToContent="WidthAndHeight" ResizeMode="NoResize">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="auto"></RowDefinition>
</Grid.RowDefinitions>
<GroupBox Header="Статья" Width="auto" Grid.Row="0" Padding="5, 0, 30, 0" Margin="5">
<GroupBox Header="Article" Width="auto" Grid.Row="0" Padding="5, 0, 30, 0" Margin="5">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"></ColumnDefinition>
Expand All @@ -30,12 +30,12 @@
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="auto"></RowDefinition>
</Grid.RowDefinitions>
<TextBlock VerticalAlignment="Center" Grid.Row="1" Grid.Column="0">Название статьи</TextBlock>
<TextBlock VerticalAlignment="Center" Grid.Row="2" Grid.Column="0">Название журнала</TextBlock>
<TextBlock VerticalAlignment="Center" Grid.Row="3" Grid.Column="0">Дата издания</TextBlock>
<TextBox x:Name="Name" Style="{StaticResource placeHolder}" Tag="Введите названние статьи" Margin="5" MaxLength="250" Grid.Row="1" Grid.Column="1" TabIndex="0" Text="{Binding UpdateSourceTrigger=PropertyChanged, Path=Name,
<TextBlock VerticalAlignment="Center" Grid.Row="1" Grid.Column="0">Article name</TextBlock>
<TextBlock VerticalAlignment="Center" Grid.Row="2" Grid.Column="0">Magazine name</TextBlock>
<TextBlock VerticalAlignment="Center" Grid.Row="3" Grid.Column="0">Release date</TextBlock>
<TextBox x:Name="Name" Style="{StaticResource placeHolder}" Tag="Enter article name" Margin="5" MaxLength="250" Grid.Row="1" Grid.Column="1" TabIndex="0" Text="{Binding UpdateSourceTrigger=PropertyChanged, Path=Name,
ValidatesOnDataErrors=true, NotifyOnValidationError=true}"></TextBox>
<TextBox x:Name="MagazineName" Style="{StaticResource placeHolder}" Tag="Введите название журнала" Margin="5" MaxLength="250" Grid.Row="2" Grid.Column="1" TabIndex="1" Text="{Binding UpdateSourceTrigger=PropertyChanged, Path=MagazineName,
<TextBox x:Name="MagazineName" Style="{StaticResource placeHolder}" Tag="Enter magazine name" Margin="5" MaxLength="250" Grid.Row="2" Grid.Column="1" TabIndex="1" Text="{Binding UpdateSourceTrigger=PropertyChanged, Path=MagazineName,
ValidatesOnDataErrors=true, NotifyOnValidationError=true}"></TextBox>
<xctk:DateTimePicker x:Name="ReleaseDate" TimeFormat="YearMonth" HorizontalAlignment="Left" MinWidth="130" Margin="5" Grid.Row="3" Grid.Column="1" TabIndex="2" Value="{Binding UpdateSourceTrigger=PropertyChanged, Path=ReleaseDate,
ValidatesOnDataErrors=true, NotifyOnValidationError=true}" />
Expand Down Expand Up @@ -78,7 +78,7 @@
</Style>
</Button.Style>
</Button>
<Button x:Name="CancelButton" Content="Отменить" Command="{Binding CancelCommand}" Click="btnCancel_Click" Grid.Row="0" Grid.Column="1" Margin="5" Padding="5" />
<Button x:Name="CancelButton" Content="Cancel" Command="{Binding CancelCommand}" Click="btnCancel_Click" Grid.Row="0" Grid.Column="1" Margin="5" Padding="5" />
</Grid>
</Grid>
</Window>
18 changes: 15 additions & 3 deletions ResearchersWPF.UI/View/MonographListView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,20 @@
<UserControl.Resources>
<DataTemplate x:Key="RowButtons">
<StackPanel Orientation="Horizontal">
<Button x:Name="btnEditMonograph" Content="Edit" Click="btnEditMonograph_Click" />
<Button x:Name="btnDeleteMonograph" Content="Delete" Command="{Binding DeleteCommand}" />
<Button Background="Transparent" BorderThickness="0" Command="{Binding ShowEditCommand}">
<StackPanel Orientation="Horizontal">
<Canvas Width="24" Height="24">
<Path Data="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z" Fill="Gray" />
</Canvas>
</StackPanel>
</Button>
<Button Background="Transparent" x:Name="btnDeleteResearcher" BorderThickness="0" Command="{Binding DeleteCommand}">
<StackPanel Orientation="Horizontal">
<Canvas Width="24" Height="24">
<Path Data="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z" Fill="Gray" />
</Canvas>
</StackPanel>
</Button>
</StackPanel>
</DataTemplate>
</UserControl.Resources>
Expand All @@ -22,7 +34,7 @@
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<DataGrid SelectionUnit="FullRow" GridLinesVisibility="None" Background="White" IsReadOnly="True" Grid.Column="0" Grid.Row="0" CanUserAddRows="False" AutoGenerateColumns="False" Height="auto" SelectionMode="Single" x:Name="lsvMonographList" ItemsSource="{Binding Monographs}">
<DataGrid CellStyle="{StaticResource Body_Content_DataGrid_Centering}" RowHeight="30" SelectionUnit="FullRow" GridLinesVisibility="None" Background="White" IsReadOnly="True" Grid.Column="0" Grid.Row="0" CanUserAddRows="False" AutoGenerateColumns="False" Height="auto" SelectionMode="Single" x:Name="lsvMonographList" ItemsSource="{Binding Monographs}">
<DataGrid.Columns>
<DataGridTextColumn Width="*" Header="Name" Binding="{Binding Path=Name}"/>
<DataGridTextColumn Width="*" Header="Coauthor last name" Binding="{Binding Path=CoauthorLastName }"/>
Expand Down
26 changes: 13 additions & 13 deletions ResearchersWPF.UI/View/MonographView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:viewModel="clr-namespace:ResearchersWPF.UI.ViewModel"
mc:Ignorable="d"
Title="Добавить монографию" SizeToContent="WidthAndHeight" ResizeMode="NoResize">
Title="Monograph" SizeToContent="WidthAndHeight" ResizeMode="NoResize">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<GroupBox Header="Монография" Width="auto" Grid.Row="0" Padding="5, 0, 30, 0" Margin="5">
<GroupBox Header="Monograph" Width="auto" Grid.Row="0" Padding="5, 0, 30, 0" Margin="5">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
Expand All @@ -30,20 +30,20 @@
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<TextBlock VerticalAlignment="Center" Grid.Row="0" Grid.Column="0"><Run Text="Название"/></TextBlock>
<TextBlock VerticalAlignment="Center" Grid.Row="1" Grid.Column="0"><Run Text="Фамилия соавтора"/></TextBlock>
<TextBlock VerticalAlignment="Center" Grid.Row="2" Grid.Column="0"><Run Text="Имя соавтора"/></TextBlock>
<TextBlock VerticalAlignment="Center" Grid.Row="3" Grid.Column="0"><Run Text="Отчество соавтора"/></TextBlock>
<TextBlock VerticalAlignment="Center" Grid.Row="4" Grid.Column="0"><Run Text="Год издания"/></TextBlock>
<TextBlock VerticalAlignment="Center" Grid.Row="5" Grid.Column="0"><Run Text="Число страниц"/></TextBlock>
<TextBlock VerticalAlignment="Center" Grid.Row="0" Grid.Column="0"><Run Text="Name"/></TextBlock>
<TextBlock VerticalAlignment="Center" Grid.Row="1" Grid.Column="0"><Run Text="Coauthor last name"/></TextBlock>
<TextBlock VerticalAlignment="Center" Grid.Row="2" Grid.Column="0"><Run Text="Coauthor first name"/></TextBlock>
<TextBlock VerticalAlignment="Center" Grid.Row="3" Grid.Column="0"><Run Text="Coauthor middle name"/></TextBlock>
<TextBlock VerticalAlignment="Center" Grid.Row="4" Grid.Column="0"><Run Text="Release year"/></TextBlock>
<TextBlock VerticalAlignment="Center" Grid.Row="5" Grid.Column="0"><Run Text="Page count"/></TextBlock>

<TextBox x:Name="Name" Style="{StaticResource placeHolder}" Tag="Введите название" Margin="5" MaxLength="250" Grid.Row="0" Grid.Column="1" TabIndex="0" Text="{Binding UpdateSourceTrigger=PropertyChanged, Path=Name,
<TextBox x:Name="Name" Style="{StaticResource placeHolder}" Tag="Enter name" Margin="5" MaxLength="250" Grid.Row="0" Grid.Column="1" TabIndex="0" Text="{Binding UpdateSourceTrigger=PropertyChanged, Path=Name,
ValidatesOnDataErrors=true, NotifyOnValidationError=true}"/>
<TextBox x:Name="CoauthorLastName" Style="{StaticResource placeHolder}" Tag="Введите фамилию" Margin="5" MaxLength="250" Grid.Row="1" Grid.Column="1" TabIndex="0" Text="{Binding UpdateSourceTrigger=PropertyChanged, Path=CoauthorLastName,
<TextBox x:Name="CoauthorLastName" Style="{StaticResource placeHolder}" Tag="Enter last name" Margin="5" MaxLength="250" Grid.Row="1" Grid.Column="1" TabIndex="0" Text="{Binding UpdateSourceTrigger=PropertyChanged, Path=CoauthorLastName,
ValidatesOnDataErrors=true, NotifyOnValidationError=true}"/>
<TextBox x:Name="CoauthorFirstName" Style="{StaticResource placeHolder}" Tag="Введите имя" Margin="5" MaxLength="250" Grid.Row="2" Grid.Column="1" TabIndex="1" Text="{Binding UpdateSourceTrigger=PropertyChanged, Path=CoauthorFirstName,
<TextBox x:Name="CoauthorFirstName" Style="{StaticResource placeHolder}" Tag="Enter first name" Margin="5" MaxLength="250" Grid.Row="2" Grid.Column="1" TabIndex="1" Text="{Binding UpdateSourceTrigger=PropertyChanged, Path=CoauthorFirstName,
ValidatesOnDataErrors=true, NotifyOnValidationError=true}"/>
<TextBox x:Name="CoauthorMiddleName" Style="{StaticResource placeHolder}" Tag="Введите отчество" Margin="5" MaxLength="250" Grid.Row="3" Grid.Column="1" TabIndex="2" Text="{Binding UpdateSourceTrigger=PropertyChanged, Path=CoauthorMiddleName,
<TextBox x:Name="CoauthorMiddleName" Style="{StaticResource placeHolder}" Tag="Enter middle name" Margin="5" MaxLength="250" Grid.Row="3" Grid.Column="1" TabIndex="2" Text="{Binding UpdateSourceTrigger=PropertyChanged, Path=CoauthorMiddleName,
ValidatesOnDataErrors=true, NotifyOnValidationError=true}"/>
<xctk:IntegerUpDown x:Name="ReleaseDate" Margin="5" MaxLength="250" Grid.Row="4" Grid.Column="1" TabIndex="3" HorizontalAlignment="Left" MinWidth="70" Value="{Binding UpdateSourceTrigger=PropertyChanged, Path=ReleaseDate,
ValidatesOnDataErrors=true, NotifyOnValidationError=true}" />
Expand Down Expand Up @@ -91,7 +91,7 @@
</Style>
</Button.Style>
</Button>
<Button x:Name="CancelButton" Content="Отменить" Command="{Binding CancelCommand}" Click="btnCancel_Click" Grid.Row="0" Grid.Column="1" Margin="5" Padding="5" />
<Button x:Name="CancelButton" Content="Cancel" Command="{Binding CancelCommand}" Click="btnCancel_Click" Grid.Row="0" Grid.Column="1" Margin="5" Padding="5" />
</Grid>
</Grid>
</Window>
18 changes: 15 additions & 3 deletions ResearchersWPF.UI/View/PresentationListView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,20 @@
<UserControl.Resources>
<DataTemplate x:Key="RowButtons">
<StackPanel Orientation="Horizontal">
<Button x:Name="btnEditPresentation" Content="Edit" Click="btnEditPresentation_Click" />
<Button x:Name="btnDeletePresentation" Content="Delete" Command="{Binding DeleteCommand}" />
<Button Background="Transparent" BorderThickness="0" Command="{Binding ShowEditCommand}">
<StackPanel Orientation="Horizontal">
<Canvas Width="24" Height="24">
<Path Data="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z" Fill="Gray" />
</Canvas>
</StackPanel>
</Button>
<Button Background="Transparent" x:Name="btnDeleteResearcher" BorderThickness="0" Command="{Binding DeleteCommand}">
<StackPanel Orientation="Horizontal">
<Canvas Width="24" Height="24">
<Path Data="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z" Fill="Gray" />
</Canvas>
</StackPanel>
</Button>
</StackPanel>
</DataTemplate>
</UserControl.Resources>
Expand All @@ -22,7 +34,7 @@
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<DataGrid SelectionUnit="FullRow" GridLinesVisibility="None" Background="White" IsReadOnly="True" Grid.Column="0" Grid.Row="0" CanUserAddRows="False" AutoGenerateColumns="False" Height="auto" SelectionMode="Single" x:Name="lsvPresentationList" ItemsSource="{Binding Presentations}">
<DataGrid CellStyle="{StaticResource Body_Content_DataGrid_Centering}" RowHeight="30" SelectionUnit="FullRow" GridLinesVisibility="None" Background="White" IsReadOnly="True" Grid.Column="0" Grid.Row="0" CanUserAddRows="False" AutoGenerateColumns="False" Height="auto" SelectionMode="Single" x:Name="lsvPresentationList" ItemsSource="{Binding Presentations}">
<DataGrid.Columns>
<DataGridTextColumn Width="*" Header="Name" Binding="{Binding Path=Name }"/>
<DataGridTextColumn Width="*" Header="Conference name" Binding="{Binding Path=ConferenceName }"/>
Expand Down
Loading

0 comments on commit c2da6d9

Please sign in to comment.