diff --git a/XLAB/App.xaml b/XLAB/App.xaml index fdb6182..c673361 100644 --- a/XLAB/App.xaml +++ b/XLAB/App.xaml @@ -5,18 +5,19 @@ StartupUri="MainWindow.xaml"> - - + + - + + - - + + - - - + + + @@ -35,9 +36,38 @@ @@ -110,12 +140,14 @@ - - - + - - - - + Header="Виды деятельности подразделения"> - diff --git a/XLAB/FrpdDirectoryWindowViewModel.cs b/XLAB/FrpdDirectoryWindowViewModel.cs index 7b06860..e83dfff 100644 --- a/XLAB/FrpdDirectoryWindowViewModel.cs +++ b/XLAB/FrpdDirectoryWindowViewModel.cs @@ -219,7 +219,7 @@ namespace XLAB } await RefreshFrpdCoreAsync(null, null); - _dialogService.ShowInfo("Запись FRPD удалена."); + _dialogService.ShowInfo("Запись удалена."); }); } @@ -246,7 +246,7 @@ namespace XLAB } await RefreshFrpdCoreAsync(selected.FrpdId, null); - _dialogService.ShowInfo("Запись FRPDVD удалена."); + _dialogService.ShowInfo("Запись удалена."); }); } @@ -305,7 +305,7 @@ namespace XLAB { await Task.Run(delegate { _service.UpdateFrpdItem(result); }); await RefreshFrpdCoreAsync(result.Id, SelectedFrpdvd == null ? (int?)null : SelectedFrpdvd.Id); - _dialogService.ShowInfo("Запись FRPD обновлена."); + _dialogService.ShowInfo("Запись обновлена."); }); } @@ -326,7 +326,7 @@ namespace XLAB { await Task.Run(delegate { _service.UpdateFrpdvdItem(result); }); await RefreshFrpdCoreAsync(result.FrpdId, result.Id); - _dialogService.ShowInfo("Запись FRPDVD обновлена."); + _dialogService.ShowInfo("Запись обновлена."); }); } @@ -466,7 +466,7 @@ namespace XLAB { var searchText = string.IsNullOrWhiteSpace(SearchText) ? null : SearchText.Trim(); StatusText = string.Format( - "{0}FRPD: {1}/{2}. FRPDVD: {3}.", + "{0}Подразделений: {1}/{2}. Видов деятельности: {3}.", string.IsNullOrWhiteSpace(searchText) ? string.Empty : string.Format("Поиск: \"{0}\". ", searchText), FrpdItems.Count, _frpdCache.Count, diff --git a/XLAB/FrpdEditWindow.xaml b/XLAB/FrpdEditWindow.xaml index dc84827..cd5f562 100644 --- a/XLAB/FrpdEditWindow.xaml +++ b/XLAB/FrpdEditWindow.xaml @@ -2,16 +2,15 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="{Binding Title}" - Height="360" + Height="220" Width="680" - MinHeight="340" + MinHeight="220" MinWidth="620" WindowStartupLocation="CenterOwner"> - @@ -23,13 +22,10 @@ - - - - - + @@ -37,14 +33,9 @@ - - + - - - - - + diff --git a/XLAB/FrpdEditWindowViewModel.cs b/XLAB/FrpdEditWindowViewModel.cs index 742f05b..4e3b95d 100644 --- a/XLAB/FrpdEditWindowViewModel.cs +++ b/XLAB/FrpdEditWindowViewModel.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Windows; using System.Windows.Input; namespace XLAB @@ -48,6 +49,11 @@ namespace XLAB set { SetProperty(ref _guid, value); } } + public Visibility GuidFieldVisibility + { + get { return IsNew ? Visibility.Collapsed : Visibility.Visible; } + } + public int Id { get; private set; } public bool IsNew { get; private set; } public DateTime? LiquidatedOn { get; set; } diff --git a/XLAB/MainWindow.xaml b/XLAB/MainWindow.xaml index 691f0bb..a4c8226 100644 --- a/XLAB/MainWindow.xaml +++ b/XLAB/MainWindow.xaml @@ -8,6 +8,22 @@ MinWidth="1180" WindowState="Maximized" Loaded="Window_Loaded"> + + + @@ -97,7 +113,7 @@ @@ -148,9 +164,16 @@ Foreground="DimGray" Text="{Binding AcceptedOn, StringFormat=d}" /> - + + + + @@ -165,10 +188,19 @@ + + + @@ -250,6 +282,19 @@ SelectedValue="{Binding SelectedCustomerId, Mode=TwoWay}" IsEnabled="{Binding IsCustomerEditable}" /> + + + - + + + - - + + + + + + + - - + + Documents { get; private set; } public ICollectionView DocumentsView { get; private set; } @@ -163,6 +172,12 @@ namespace XLAB private set { SetProperty(ref _headerDepartmentName, value); } } + public int HeaderInstrumentCount + { + get { return _headerInstrumentCount; } + private set { SetProperty(ref _headerInstrumentCount, value); } + } + public bool IsDocumentHeaderEditable { get @@ -631,6 +646,7 @@ namespace XLAB } ClearCollections(DocumentLines); + HeaderInstrumentCount = 0; } private void ClearDocumentGroups() @@ -2200,6 +2216,7 @@ namespace XLAB && previousLine.IsPendingInsert && string.Equals(line.DuplicateKey, previousLine.DuplicateKey, StringComparison.OrdinalIgnoreCase); }); + HeaderInstrumentCount = DocumentLines.Count; RefreshDocumentLinesView(); RaiseCommandStates(); } @@ -2447,12 +2464,14 @@ namespace XLAB { if (SelectedDocument == null) { + DetailTableCountText = "Приборов в таблице: 0."; LineStatusText = "Документ не выбран."; return; } if (DocumentGroupSummaries.Count == 0) { + DetailTableCountText = "Приборов в таблице: 0."; LineStatusText = SelectedDocument.IsDraft ? "Черновик пуст. Добавьте приборы через контекстное меню таблицы групп." : "В документе нет групп приборов."; @@ -2461,6 +2480,7 @@ namespace XLAB if (SelectedDocumentGroup == null) { + DetailTableCountText = "Приборов в таблице: 0."; LineStatusText = string.Format("Групп: {0}. Выберите группу.", DocumentGroupSummaries.Count); return; } @@ -2472,6 +2492,7 @@ namespace XLAB && (string.IsNullOrWhiteSpace(GroupDetailFilterText) || Contains(line.SerialNumber, GroupDetailFilterText)); }); var pendingCount = DocumentLines.Count(delegate(PsvDocumentLine line) { return line.IsPendingInsert; }); + DetailTableCountText = string.Format("Приборов в таблице: {0}.", filteredCount); LineStatusText = string.Format( "Групп: {0}. Приборов в выбранной группе: {1}. Отображено по фильтру: {2}. Не сохранено строк: {3}.", diff --git a/XLAB/PsvModels.cs b/XLAB/PsvModels.cs index 621470f..e0a431a 100644 --- a/XLAB/PsvModels.cs +++ b/XLAB/PsvModels.cs @@ -136,6 +136,21 @@ namespace XLAB get { return AcceptedOn.HasValue ? AcceptedOn.Value.Date.AddDays(30) : (DateTime?)null; } } + public string TimelineDisplay + { + get + { + if (IssuedOn.HasValue) + { + return string.Format("Выдача: {0:d}", IssuedOn.Value); + } + + return DueOn.HasValue + ? string.Format("Срок: {0:d}", DueOn.Value) + : string.Empty; + } + } + public bool IsOpenDocumentOverdue { get @@ -172,6 +187,7 @@ namespace XLAB private void RaiseOpenDocumentTimelinePropertiesChanged() { OnPropertyChanged("DueOn"); + OnPropertyChanged("TimelineDisplay"); OnPropertyChanged("IsOpenDocumentOverdue"); OnPropertyChanged("IsOpenDocumentAtTwentyDays"); OnPropertyChanged("IsOpenDocumentAtTenDays"); diff --git a/XLAB/TipsEditWindow.xaml b/XLAB/TipsEditWindow.xaml index c8e0f2d..58bfd3d 100644 --- a/XLAB/TipsEditWindow.xaml +++ b/XLAB/TipsEditWindow.xaml @@ -2,9 +2,9 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="{Binding Title}" - Height="620" + Height="360" Width="760" - MinHeight="580" + MinHeight="360" MinWidth="700" WindowStartupLocation="CenterOwner"> @@ -41,18 +41,6 @@ - - - - - - - - - - - - @@ -60,21 +48,12 @@ - - - - - - - - + + - - - - + diff --git a/XLAB/TprmcpEditWindow.xaml b/XLAB/TprmcpEditWindow.xaml index 0f6d2a0..53684a7 100644 --- a/XLAB/TprmcpEditWindow.xaml +++ b/XLAB/TprmcpEditWindow.xaml @@ -2,9 +2,9 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="{Binding Title}" - Height="320" + Height="160" Width="620" - MinHeight="300" + MinHeight="160" MinWidth="580" WindowStartupLocation="CenterOwner"> @@ -24,17 +24,8 @@ - - - - - - - - - diff --git a/XLAB/TprmkEditWindow.xaml b/XLAB/TprmkEditWindow.xaml index 4cf0902..bade93b 100644 --- a/XLAB/TprmkEditWindow.xaml +++ b/XLAB/TprmkEditWindow.xaml @@ -2,9 +2,9 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="{Binding Title}" - Height="620" + Height="240" Width="760" - MinHeight="580" + MinHeight="240" MinWidth="700" WindowStartupLocation="CenterOwner"> @@ -35,36 +35,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + diff --git a/XLAB/TprzEditWindow.xaml b/XLAB/TprzEditWindow.xaml index 87c4b34..e8ed227 100644 --- a/XLAB/TprzEditWindow.xaml +++ b/XLAB/TprzEditWindow.xaml @@ -2,9 +2,9 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="{Binding Title}" - Height="340" + Height="240" Width="620" - MinHeight="320" + MinHeight="220" MinWidth="580" WindowStartupLocation="CenterOwner"> @@ -31,14 +31,8 @@ - - - - - - diff --git a/XLAB/TypeSizeDirectoryWindow.xaml b/XLAB/TypeSizeDirectoryWindow.xaml index fb772db..21de293 100644 --- a/XLAB/TypeSizeDirectoryWindow.xaml +++ b/XLAB/TypeSizeDirectoryWindow.xaml @@ -33,7 +33,7 @@ + Text="Поиск по типам и типоразмерам:" /> @@ -47,7 +47,7 @@ + Header="Типы СИ"> - - - + Header="Типоразмеры СИ"> - - @@ -125,7 +120,7 @@ + Header="Регламент МК для типоразмера СИ"> - - - + Header="Циклы и периоды МК"> - - - - + diff --git a/_codex_build/XLAB.exe b/_codex_build/XLAB.exe index b0ad73c..d020d5b 100644 Binary files a/_codex_build/XLAB.exe and b/_codex_build/XLAB.exe differ diff --git a/_codex_build/main-window-theme-check-2.png b/_codex_build/main-window-theme-check-2.png new file mode 100644 index 0000000..9121a63 Binary files /dev/null and b/_codex_build/main-window-theme-check-2.png differ diff --git a/_codex_build/main-window-theme-check-3.png b/_codex_build/main-window-theme-check-3.png new file mode 100644 index 0000000..a0f22c1 Binary files /dev/null and b/_codex_build/main-window-theme-check-3.png differ diff --git a/_codex_build/main-window-theme-check.png b/_codex_build/main-window-theme-check.png new file mode 100644 index 0000000..052825e Binary files /dev/null and b/_codex_build/main-window-theme-check.png differ