Добавьте файлы проекта.
This commit is contained in:
24
Windows/AlertWindow.xaml
Normal file
24
Windows/AlertWindow.xaml
Normal file
@@ -0,0 +1,24 @@
|
||||
<Window x:Class="GroundOrganizer.AlertWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:GroundOrganizer"
|
||||
mc:Ignorable="d"
|
||||
FontSize="14"
|
||||
MaxHeight="900"
|
||||
MaxWidth="1920"
|
||||
SizeToContent="WidthAndHeight"
|
||||
ResizeMode="NoResize"
|
||||
WindowStartupLocation="CenterOwner" WindowStyle="ToolWindow" >
|
||||
<Grid>
|
||||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<Label x:Name="alertLabel" Margin="10"/>
|
||||
<Button x:Name="alertButtonOk" Content="Ok"
|
||||
Margin="3" Width="75"
|
||||
HorizontalAlignment="Center"
|
||||
Click="Button_Click"/>
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
||||
32
Windows/AlertWindow.xaml.cs
Normal file
32
Windows/AlertWindow.xaml.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace GroundOrganizer
|
||||
{
|
||||
/// <summary>
|
||||
/// Логика взаимодействия для AlertWindow.xaml
|
||||
/// </summary>
|
||||
public partial class AlertWindow : Window
|
||||
{
|
||||
public AlertWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void Button_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
71
Windows/CanwasWindow.xaml
Normal file
71
Windows/CanwasWindow.xaml
Normal file
@@ -0,0 +1,71 @@
|
||||
<Window x:Class="GroundOrganizer.CanwasWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:GroundOrganizer"
|
||||
mc:Ignorable="d"
|
||||
FontSize="14"
|
||||
SizeToContent="WidthAndHeight"
|
||||
WindowStyle="ToolWindow" >
|
||||
|
||||
<Window.DataContext>
|
||||
<local:ViewModel/>
|
||||
</Window.DataContext>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="0" VerticalAlignment="Top">
|
||||
<ScrollViewer x:Name="CanvasScrollViewer" HorizontalScrollBarVisibility="Visible">
|
||||
<Canvas x:Name="drawArea" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="5" Background="White">
|
||||
<Canvas.ContextMenu>
|
||||
<ContextMenu Opacity="0.9">
|
||||
<MenuItem Header="Изменить свойства фундаментов" Command="{Binding ShowFoundProps}"></MenuItem>
|
||||
<MenuItem Header="Отрисовать номера фундаментов" Click="MenuItem_DrowNumbers_Click"></MenuItem>
|
||||
<!--<MenuItem Header="Перенумеровать" Command="{Binding RenumIGEs}"></MenuItem>
|
||||
<MenuItem Header="Сохранить в БД" Command="{Binding UpdateIGEs}"></MenuItem>
|
||||
<MenuItem Header="Сохранить таблицу в *.csv" ></MenuItem>
|
||||
<MenuItem Header="Заполнить таблицу из *.csv" ></MenuItem>-->
|
||||
</ContextMenu>
|
||||
</Canvas.ContextMenu>
|
||||
</Canvas>
|
||||
</ScrollViewer>
|
||||
<Popup x:Name="popup1" StaysOpen="False" Placement="Mouse" MaxWidth="180" AllowsTransparency="True" IsOpen="False" >
|
||||
<TextBlock TextWrapping="Wrap" Width="180" Background="LightPink" Opacity="0.8" >
|
||||
Чтобы узнать больше, посетите сайт metanit.com
|
||||
</TextBlock>
|
||||
</Popup>
|
||||
</StackPanel>
|
||||
|
||||
<StatusBar Grid.Row="1" VerticalAlignment="Bottom">
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Top">
|
||||
<TextBlock Text="{Binding BasePath}" FontSize="10" Foreground="Gray"/>
|
||||
<TextBlock Text=" | " FontSize="10" HorizontalAlignment="Center"/>
|
||||
<TextBlock Text="Площадка:" FontSize="10" HorizontalAlignment="Center"/>
|
||||
<TextBlock Text=" " FontSize="10" HorizontalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding NamePlayGround}" FontSize="10" Foreground="Blue" FontWeight="Bold"/>
|
||||
<TextBlock Text=" | " FontSize="10" />
|
||||
<TextBlock Text="Скважина:" FontSize="10" />
|
||||
<TextBlock Text=" " FontSize="10" />
|
||||
<TextBlock Text="{Binding NameBore}" FontSize="10" Foreground="Blue" FontWeight="Bold" />
|
||||
<TextBlock Text=" | " FontSize="10" />
|
||||
<TextBlock Text="Сооружение:" FontSize="10" />
|
||||
<TextBlock Text=" " FontSize="10" />
|
||||
<TextBlock Text="{Binding NameStructure}" FontSize="10" Foreground="Blue" FontWeight="Bold" />
|
||||
<TextBlock Text=" | " FontSize="10" />
|
||||
<TextBlock Text="Фундамент:" FontSize="10" />
|
||||
<TextBlock Text=" " FontSize="10" />
|
||||
<TextBlock Text="{Binding NameFoundation}" FontSize="10" Foreground="Blue" FontWeight="Bold" />
|
||||
<TextBlock Text=" | " FontSize="10" />
|
||||
<TextBlock Text="Нагрузка:" FontSize="10" />
|
||||
<TextBlock Text=" " FontSize="10" />
|
||||
<TextBlock Text="{Binding NameFoundLoad}" FontSize="10" Foreground="Blue" FontWeight="Bold" />
|
||||
</StackPanel>
|
||||
</StatusBar>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
||||
163
Windows/CanwasWindow.xaml.cs
Normal file
163
Windows/CanwasWindow.xaml.cs
Normal file
@@ -0,0 +1,163 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace GroundOrganizer
|
||||
{
|
||||
/// <summary>
|
||||
/// Логика взаимодействия для CanwasWindow.xaml
|
||||
/// </summary>
|
||||
public partial class CanwasWindow : Window
|
||||
{
|
||||
ViewModel vm;
|
||||
object src = new object();
|
||||
double d = 1;
|
||||
public CanwasWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = App.Current.MainWindow.DataContext;
|
||||
vm = DataContext as ViewModel;
|
||||
drawArea.MouseDown += DrawArea_MouseDown;
|
||||
drawArea.MouseWheel += DrawArea_MouseWheel;
|
||||
}
|
||||
|
||||
private void DrawArea_MouseWheel(object sender, MouseWheelEventArgs e)
|
||||
{
|
||||
//if (!e.Source.Equals(sender)) return;
|
||||
Canvas da = drawArea;
|
||||
d -= e.Delta * 0.001;
|
||||
Point pos = e.GetPosition(drawArea);
|
||||
double factor = 1 - d * 0.1;
|
||||
//if (drawArea.Height >= drawArea.MinHeight) drawArea.Height = drawArea.MinHeight * factor;
|
||||
//if (drawArea.Width >= drawArea.MinWidth) drawArea.Width = drawArea.MinWidth * factor;
|
||||
ScaleTransform scale = new ScaleTransform(factor, factor, pos.X, pos.Y);
|
||||
|
||||
foreach (UIElement item in da.Children) item.RenderTransform = scale;
|
||||
drawArea.RenderTransform = scale;
|
||||
}
|
||||
|
||||
private void DrawArea_MouseDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (e.ChangedButton == MouseButton.Left)
|
||||
{
|
||||
if (!e.Source.Equals(sender)) return;
|
||||
|
||||
foreach (Polygon item in drawArea.Children)
|
||||
{
|
||||
item.Fill = Brushes.White;
|
||||
item.Stroke = Brushes.Black;
|
||||
item.StrokeThickness = 2;
|
||||
}
|
||||
vm.BufferFoundations.Clear();
|
||||
src = new object();
|
||||
}
|
||||
}
|
||||
|
||||
public void EventMouseEnter()
|
||||
{
|
||||
foreach (UIElement item in drawArea.Children)
|
||||
{
|
||||
item.MouseEnter += Item_MouseEnter;
|
||||
item.MouseLeave += Item_MouseLeave;
|
||||
item.MouseDown += Item_MouseDown;
|
||||
}
|
||||
}
|
||||
|
||||
//private void DrawArea_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
//{
|
||||
// foreach (Polygon item in drawArea.Children) item.Fill = Brushes.White;
|
||||
// vm.BufferFoundations.Clear();
|
||||
//}
|
||||
|
||||
private void Item_MouseDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
Polygon poly = new Polygon();
|
||||
int i = 0;
|
||||
if (e.Source.GetType() == poly.GetType())
|
||||
{
|
||||
src = e.Source;
|
||||
i = drawArea.Children.IndexOf(sender as UIElement);
|
||||
foreach (Polygon item in drawArea.Children)
|
||||
{
|
||||
if (item == src) continue;
|
||||
//item.Fill = Brushes.White;
|
||||
item.Stroke = Brushes.Black;
|
||||
item.StrokeThickness = 2;
|
||||
}
|
||||
poly = (Polygon)src;
|
||||
poly.Stroke = Brushes.Red;
|
||||
poly.StrokeThickness = 3;
|
||||
poly.Fill = Brushes.LightGoldenrodYellow;
|
||||
vm.SelectedFoundation = vm.ListFoundation[i];
|
||||
vm.BufferFoundations.Add(vm.ListFoundation[i]);
|
||||
}
|
||||
}
|
||||
|
||||
private void Item_MouseLeave(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (src.Equals(e.Source)) return;
|
||||
Polygon poly = new Polygon();
|
||||
|
||||
if (sender.GetType() == poly.GetType())
|
||||
{
|
||||
poly = (Polygon)sender;
|
||||
poly.Stroke = Brushes.Black;
|
||||
poly.StrokeThickness = 2;
|
||||
}
|
||||
|
||||
Rectangle rre = new Rectangle();
|
||||
|
||||
if (sender.GetType() == rre.GetType())
|
||||
{
|
||||
rre = (Rectangle)sender;
|
||||
rre.Stroke = Brushes.Black;
|
||||
rre.StrokeThickness = 2;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void Item_MouseEnter(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (src.Equals(e.Source)) return;
|
||||
Polygon poly = new Polygon();
|
||||
|
||||
if (e.Source.GetType() == poly.GetType())
|
||||
{
|
||||
poly = (Polygon)e.Source;
|
||||
poly.Stroke = Brushes.Blue;
|
||||
poly.StrokeThickness = 3;
|
||||
|
||||
//if (vm.SelectedFoundation == null) return;
|
||||
//StackPanel toolTipPanel = new StackPanel() { Orientation = System.Windows.Controls.Orientation.Horizontal, Background = Brushes.Bisque, Opacity = 0.8 };
|
||||
//toolTipPanel.Children.Add(new TextBlock { Text = "Марка ", VerticalAlignment = VerticalAlignment.Center });
|
||||
//toolTipPanel.Children.Add(new TextBlock { Text = vm.SelectedFoundation.Name, FontSize = 16, VerticalAlignment = VerticalAlignment.Center });
|
||||
//popup1.Child = toolTipPanel;
|
||||
//popup1.IsOpen = true;
|
||||
}
|
||||
|
||||
Rectangle rre = new Rectangle();
|
||||
|
||||
if (sender.GetType() == rre.GetType())
|
||||
{
|
||||
rre = (Rectangle)sender;
|
||||
rre.Stroke = Brushes.Red;
|
||||
rre.StrokeThickness = 4;
|
||||
}
|
||||
}
|
||||
|
||||
private void MenuItem_DrowNumbers_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
vm.DrowFoundsNums();
|
||||
}
|
||||
}
|
||||
}
|
||||
188
Windows/FoundPropWindow.xaml
Normal file
188
Windows/FoundPropWindow.xaml
Normal file
@@ -0,0 +1,188 @@
|
||||
<Window x:Class="GroundOrganizer.FoundPropWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:GroundOrganizer"
|
||||
mc:Ignorable="d"
|
||||
Title="FoundPropWindow" FontSize="14" SizeToContent="WidthAndHeight">
|
||||
<Window.DataContext>
|
||||
<local:ViewModel/>
|
||||
</Window.DataContext>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal" Margin="3">
|
||||
<TextBlock Text="Марка: "/>
|
||||
<TextBox Text="{Binding NameFoundation}" Width="80"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="2" Orientation="Horizontal" Margin="3">
|
||||
<TextBlock Text="Отметка подошвы FL , "/>
|
||||
<TextBlock Text="[м] " Foreground="DarkGoldenrod"/>
|
||||
<TextBox Text="{Binding FL}" Width="80" Margin="21,0,0,0"/>
|
||||
<Button Content="Изменить" Command="{Binding ReplaceFLFound}"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="3">
|
||||
<TextBlock Text="Уровень планировки DL , "/>
|
||||
<TextBlock Text="[м] " Foreground="DarkGoldenrod"/>
|
||||
<TextBox Text="{Binding DL}" Width="80"/>
|
||||
<Button Content="Изменить" Command="{Binding ReplaceDLFound}"/>
|
||||
<Button Content="= отм. 0,000" Command="{Binding ReplaceDLFoundfromNULL}" Margin="3,0,3,0"/>
|
||||
<Button Content="Рассчитать" Command="{Binding CalculateDLFound}"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="3" Orientation="Horizontal" Margin="3">
|
||||
<TextBlock Text="Глубина заложения "/>
|
||||
<TextBlock Text="d"/>
|
||||
<TextBlock Text="1" FontSize="10" VerticalAlignment="Bottom" Margin="0,6,0,0"/>
|
||||
<TextBlock Text=" , "/>
|
||||
<TextBlock Text="[м] " Foreground="DarkGoldenrod"/>
|
||||
<TextBox Text="{Binding D1}" Width="80" Margin="13,0,0,0"/>
|
||||
<Button Content="Изменить" Command="{Binding ReplaceD1Found}"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<GroupBox Grid.Row="4" Header="Нагрузки на фундамент">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal" Margin="3">
|
||||
<Button Command="{Binding AddFoundLoad}" Margin="3" Background="White" BorderThickness="0" ToolTip="Добавить">
|
||||
<Button.Content>
|
||||
<Image Source="/Images/Bookmark-add-icon32.png"/>
|
||||
</Button.Content>
|
||||
</Button>
|
||||
<Button Command="{Binding RenumFoundLoads}" Margin="3" Background="White" BorderThickness="0" ToolTip="Перенумеровать">
|
||||
<Button.Content>
|
||||
<Image Source="/Images/text-list-numbers-icon32.png"/>
|
||||
</Button.Content>
|
||||
</Button>
|
||||
<Button Command="{Binding UpdateFoundLoads}" Margin="3" Background="White" BorderThickness="0" ToolTip="Сохранить в БД">
|
||||
<Button.Content>
|
||||
<Image Source="/Images/database-accept-icon.png" />
|
||||
</Button.Content>
|
||||
</Button>
|
||||
<Button Command="{Binding ImportFoundLoadsFromCSV}" Margin="3" Background="White" BorderThickness="0" ToolTip="Импорт из *.csv">
|
||||
<Button.Content>
|
||||
<Image Source="/Images/icons8-import-csv-32.png" />
|
||||
</Button.Content>
|
||||
</Button>
|
||||
<Button Command="{Binding ExportFoundLoadsToCSV}" Margin="3" Background="White" BorderThickness="0" ToolTip="Экспорт в *.csv">
|
||||
<Button.Content>
|
||||
<Image Source="/Images/icons8-export-csv-32.png" />
|
||||
</Button.Content>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<DataGrid x:Name="ForcesDataGrid" Grid.Row="1"
|
||||
MaxHeight="250" MinColumnWidth="40"
|
||||
Margin="3"
|
||||
ItemsSource="{Binding ListFoundLoad}"
|
||||
AutoGenerateColumns="False"
|
||||
Style="{StaticResource LayersDataGridStyle}"
|
||||
RowHeight="{DynamicResource rowsHeight}"
|
||||
SelectedItem="{Binding SelectedFoundLoad}"
|
||||
ColumnHeaderStyle="{DynamicResource DataGridHeaderStyle}">
|
||||
<DataGrid.Columns >
|
||||
<DataGridTextColumn Header="#" Binding="{Binding Path=Number}" />
|
||||
<!--<DataGridTextColumn Header="Класс" Binding="{Binding Path=ClassId}" IsReadOnly="True" HeaderStyle="{StaticResource HeaderGridStyle}" />-->
|
||||
|
||||
|
||||
<DataGridTextColumn Binding="{Binding Path=N}"
|
||||
CellStyle="{StaticResource CellGridStyle}">
|
||||
<DataGridTextColumn.Header>
|
||||
<StackPanel >
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="N"/>
|
||||
<TextBlock Text=" [тс]" VerticalAlignment="Bottom" Foreground="DarkGoldenrod"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
|
||||
<DataGridTextColumn Binding="{Binding Path=Mx}"
|
||||
CellStyle="{StaticResource CellGridStyle}">
|
||||
<DataGridTextColumn.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="M"/>
|
||||
<TextBlock Text="x" FontSize="10" VerticalAlignment="Bottom" Margin="0,6,0,0"/>
|
||||
<TextBlock Text=" [тсм]" VerticalAlignment="Bottom" Foreground="DarkGoldenrod"/>
|
||||
</StackPanel>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
|
||||
<DataGridTextColumn Binding="{Binding Path=My}"
|
||||
CellStyle="{StaticResource CellGridStyle}">
|
||||
<DataGridTextColumn.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="M"/>
|
||||
<TextBlock Text="y" FontSize="10" VerticalAlignment="Bottom" Margin="0,6,0,0"/>
|
||||
<TextBlock Text=" [тсм]" VerticalAlignment="Bottom" Foreground="DarkGoldenrod"/>
|
||||
</StackPanel>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
|
||||
<DataGridTextColumn Binding="{Binding Path=Qx}"
|
||||
CellStyle="{StaticResource CellGridStyle}">
|
||||
<DataGridTextColumn.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Q"/>
|
||||
<TextBlock Text="x" FontSize="10" VerticalAlignment="Bottom" Margin="0,6,0,0"/>
|
||||
<TextBlock Text=" [тс]" VerticalAlignment="Bottom" Foreground="DarkGoldenrod"/>
|
||||
</StackPanel>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
|
||||
<DataGridTextColumn Binding="{Binding Path=Qy}"
|
||||
CellStyle="{StaticResource CellGridStyle}">
|
||||
<DataGridTextColumn.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Q"/>
|
||||
<TextBlock Text="y" FontSize="10" VerticalAlignment="Bottom" Margin="0,6,0,0"/>
|
||||
<TextBlock Text=" [тс]" VerticalAlignment="Bottom" Foreground="DarkGoldenrod"/>
|
||||
</StackPanel>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
|
||||
<DataGridTextColumn Binding="{Binding Path=q}"
|
||||
CellStyle="{StaticResource CellGridStyle}">
|
||||
<DataGridTextColumn.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="q"/>
|
||||
<TextBlock Text=" [т" Foreground="DarkGoldenrod"/>
|
||||
<TextBlock Text="/м" Foreground="DarkGoldenrod"/>
|
||||
<TextBlock Text="2" FontSize="10" VerticalAlignment="Top" Foreground="DarkGoldenrod"/>
|
||||
<TextBlock Text="]" Foreground="DarkGoldenrod"/>
|
||||
</StackPanel>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<StackPanel Grid.Row="5" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Button Content="OK" Width="75" Margin="3" Click="ButtonOK_Click"/>
|
||||
<Button Content="Cancel" Width="75" Margin="3" Click="ButtonCancel_Click"/>
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
||||
43
Windows/FoundPropWindow.xaml.cs
Normal file
43
Windows/FoundPropWindow.xaml.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace GroundOrganizer
|
||||
{
|
||||
/// <summary>
|
||||
/// Логика взаимодействия для FoundPropWindow.xaml
|
||||
/// </summary>
|
||||
public partial class FoundPropWindow : Window
|
||||
{
|
||||
ViewModel vm;
|
||||
public FoundPropWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = App.Current.MainWindow.DataContext;
|
||||
vm = DataContext as ViewModel;
|
||||
}
|
||||
|
||||
private void ButtonOK_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
vm.SelectedFoundation.CopyProps(vm.BufferFoundations);
|
||||
vm.UpdateFoundationInList();
|
||||
vm.UpdateFoundLoadInList();
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void ButtonCancel_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
17
Windows/ImageWindow.xaml
Normal file
17
Windows/ImageWindow.xaml
Normal file
@@ -0,0 +1,17 @@
|
||||
<Window x:Class="GroundOrganizer.ImageWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:GroundOrganizer"
|
||||
mc:Ignorable="d"
|
||||
FontSize="14"
|
||||
MaxHeight="900"
|
||||
MaxWidth="1920"
|
||||
SizeToContent="WidthAndHeight"
|
||||
ResizeMode="NoResize"
|
||||
WindowStartupLocation="CenterOwner" WindowStyle="ToolWindow" >
|
||||
<Grid>
|
||||
<Image x:Name="alertImage" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="3"/>
|
||||
</Grid>
|
||||
</Window>
|
||||
27
Windows/ImageWindow.xaml.cs
Normal file
27
Windows/ImageWindow.xaml.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace GroundOrganizer
|
||||
{
|
||||
/// <summary>
|
||||
/// Логика взаимодействия для ImageWindow.xaml
|
||||
/// </summary>
|
||||
public partial class ImageWindow : Window
|
||||
{
|
||||
public ImageWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user