Browse Source

Вот такие пироги

Almir Mukhametzyanov and Alice Dyagileva 1 year ago
parent
commit
a54f52152d
4 changed files with 38 additions and 4 deletions
  1. 2 1
      ROGOZ/App.config
  2. 33 0
      ROGOZ/Dictionary.xaml
  3. 1 1
      ROGOZ/MainWindow.xaml.cs
  4. 2 2
      ROGOZ/Pages/TaskList.xaml

+ 2 - 1
ROGOZ/App.config

@@ -8,7 +8,7 @@
     <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
   </startup>
   <connectionStrings>
-    <add name="user1Entities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=VPMT.RU\IS4;initial catalog=user1;user id=user1;password = ScladniyParol;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
+    <add name="user1Entities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=SRV-WSR\IS4;initial catalog=user1;user id=user1;password = ScladniyParol;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
   </connectionStrings>
   <entityFramework>
     <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
@@ -18,6 +18,7 @@
     </defaultConnectionFactory>
     <providers>
       <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
+		
     </providers>
   </entityFramework>
 </configuration>

+ 33 - 0
ROGOZ/Dictionary.xaml

@@ -271,5 +271,38 @@
         </Style.Triggers>
     </Style>    
         
+   <!--Табличка-->
+    <SolidColorBrush x:Key="{x:Static DataGrid.FocusBorderBrushKey}" Color="#FF000000"/>
+    <Style x:Key="DataGridStyle1" TargetType="DataGrid">
+        <Setter Property="Background" Value="Transparent"/>
+        <Setter Property="Foreground" Value="#222528"/>
+        <Setter Property="BorderThickness" Value="0"/>
+        <Setter Property="RowDetailsVisibilityMode" Value="VisibleWhenSelected"/>
+        <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
+        <Setter Property="ScrollViewer.PanningMode" Value="Both"/>
+        <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
+        <Setter Property="HeadersVisibility" Value="Column"/>
+        <Setter Property="SelectionMode" Value="Single"/>
+        <Setter Property="SelectionUnit" Value="FullRow"/>
+        <Setter Property="CanUserAddRows" Value="False"/>
+        <Setter Property="CanUserDeleteRows" Value="False"/>
+        <Setter Property="CanUserResizeColumns" Value="False"/>
+        <Setter Property="FontSize" Value="15"/>
+        <Setter Property="FontFamily" Value="Comic Sans Ms"/>
+    </Style>
+    <Style x:Key="DataGridCellStyle1" TargetType="DataGridCell">
+        <Setter Property="Background" Value="Transparent"/>
+        <Setter Property="VerticalAlignment" Value="Center"/>
+        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="DataGridCell">
+                    <Border Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
+                        <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
+                    </Border>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
 
 </ResourceDictionary>

+ 1 - 1
ROGOZ/MainWindow.xaml.cs

@@ -54,7 +54,7 @@ namespace ROGOZ
 
             //Windows.AccExitWin window = new Windows.AccExitWin();
             //window.ShowDialog();
-            if (MessageBox.Show("Вы уверены, что хотите выйти из аккаунта ESOFT?", "Выйти", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
+            if (MessageBox.Show("Вы собираетесь выйти из аккаунта ESOFT. Вам потребуется заново ввести ваши логин и пароль, чтобы снова войти в ESOFT", "Выйти", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
                             {
 
                 Pages.Authorization authorization = new Pages.Authorization();

+ 2 - 2
ROGOZ/Pages/TaskList.xaml

@@ -28,11 +28,11 @@
             <TextBox Name="TBoxSearch" Width="200" Height="30" Margin="5" FontSize="18"/>
 
         </StackPanel>
-        <DataGrid Grid.Row="2" x:Name="DGTasks" AutoGenerateColumns="False" ItemsSource="{Binding}" RenderTransformOrigin="0.5,0.5" Margin="10,10,10,41">
+        <DataGrid Grid.Row="2" x:Name="DGTasks" AutoGenerateColumns="False" ItemsSource="{Binding}" RenderTransformOrigin="0.5,0.5" Margin="10,10,10,41" Style="{StaticResource DataGridStyle1}" CellStyle="{StaticResource DataGridCellStyle1}">
             <DataGrid.Columns>
                 <DataGridTextColumn Header="Задача" Binding="{Binding Title}" Width="320"/>
                 <DataGridTextColumn Header="Статус" Binding="{Binding Description}" Width="80"/>
-                <DataGridTextColumn Header="Исполнитель" Binding="{Binding ExecutorID}" Width="140"/>
+                <DataGridTextColumn Header="Исполнитель" Binding="{Binding Executor.User.MiddleName}" Width="140"/>
                 <DataGridTextColumn Header="Менеджер" Width="*"/>
             </DataGrid.Columns>
         </DataGrid>