first edit

This commit is contained in:
Курнат Андрей
2026-01-31 16:11:36 +03:00
commit f0e11d6379
148 changed files with 6986 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
<Window
x:Class="XLIMS.CORE.Windows.EditWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="{Binding Title}"
DataContext="{Binding}"
ShowInTaskbar="True"
SizeToContent="WidthAndHeight"
ResizeMode="NoResize"
WindowStartupLocation="CenterScreen"
WindowStyle="ToolWindow">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Resources/CoreDictionary.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
<DockPanel LastChildFill="True">
<DockPanel
Margin="10"
DockPanel.Dock="Bottom"
LastChildFill="False">
<Button
Width="85"
Click="Button_Click_1"
Command="{Binding CancelCommand}"
Content="Отмена"
DockPanel.Dock="Right"
IsCancel="True" />
<Button
Width="85"
Margin="0,0,10,0"
Click="Button_Click_2"
Command="{Binding SaveCommand}"
Content="ОК"
DockPanel.Dock="Right"
IsDefault="True" />
</DockPanel>
<ContentControl Content="{Binding}" />
</DockPanel>
</Window>

View File

@@ -0,0 +1,37 @@
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 XLIMS.CORE.Windows
{
/// <summary>
/// Логика взаимодействия для EditWindow.xaml
/// </summary>
public partial class EditWindow : Window
{
public EditWindow()
{
InitializeComponent();
}
private void Button_Click_1(object sender, RoutedEventArgs e)
{
DialogResult = false;
}
private void Button_Click_2(object sender, RoutedEventArgs e)
{
DialogResult = true;
}
}
}

View File

@@ -0,0 +1,22 @@
<Window x:Class="XLIMS.CORE.Windows.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="XLIMS"
WindowState="Maximized">
<DockPanel LastChildFill="True">
<Border DockPanel.Dock="Left" Width="40"
Background="Gray">
<ListBox ItemsSource="{Binding Activities}"
SelectedItem="{Binding CurrentActivity,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Title}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Border>
<ContentControl DataContext="{Binding CurrentActivity}" Content="{Binding View}"/>
</DockPanel>
</Window>

View File

@@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using System.Text;
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;
using XLIMS.CORE.ViewModels;
namespace XLIMS.CORE.Windows
{
/// <summary>
/// Логика взаимодействия для MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow(MainViewModel viewModel)
{
InitializeComponent();
DataContext = viewModel; // ViewModel уже содержит ILimsService и все подсервисы
// При необходимости загружаем данные
if (viewModel is MainViewModel vm)
{
//vm.LoadDataAsync(); // или Loaded событие
}
}
// private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
// {
// if (e.ChangedButton == MouseButton.Left)
// DragMove();
// }
// private void Minimize_Click(object sender, RoutedEventArgs e) => WindowState = WindowState.Minimized;
// private void Maximize_Click(object sender, RoutedEventArgs e) => WindowState = WindowState == WindowState.Maximized ? WindowState.Normal : WindowState.Maximized;
// private void Close_Click(object sender, RoutedEventArgs e) => Close();
}
}