mirror of
https://github.com/VitalickS/BrightSharp.Toolkit.git
synced 2026-03-21 10:21:16 +00:00
prepare for dist
This commit is contained in:
@@ -16,6 +16,7 @@ using AppleJobs.Data.Models.Articles;
|
||||
using AppleJobs.Data.Models.Orders;
|
||||
using AppleJobs.Data.Models.Inventory;
|
||||
using System.ComponentModel;
|
||||
using System;
|
||||
|
||||
namespace JetFrames.AppleJobs.Editor
|
||||
{
|
||||
@@ -43,12 +44,12 @@ namespace JetFrames.AppleJobs.Editor
|
||||
{
|
||||
get
|
||||
{
|
||||
context.ModelJobs.Count();
|
||||
ModelJobs.Count();
|
||||
return GetSingleton(ref _modelJobPriceTemplates, context.ModelJobPriceTemplates);
|
||||
}
|
||||
}
|
||||
List<ModelJob> _modelJobs;
|
||||
public IEnumerable<ModelJob> ModelJobs { get { return GetSingleton(ref _modelJobs, context.ModelJobs); } }
|
||||
public IEnumerable<ModelJob> ModelJobs { get { context.Models.Load(); return GetSingleton(ref _modelJobs, context.ModelJobs); } }
|
||||
List<Order> _orders;
|
||||
public IEnumerable<Order> Orders { get { return GetSingleton(ref _orders, context.Orders.OrderByDescending(o => o.DateCreated).Take(2000)); } }
|
||||
List<OrderStatus> _orderStatuses;
|
||||
@@ -184,6 +185,7 @@ namespace JetFrames.AppleJobs.Editor
|
||||
DataContext = vm,
|
||||
Owner = Application.Current.MainWindow
|
||||
};
|
||||
dialog.ShowDialog();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -305,10 +307,11 @@ namespace JetFrames.AppleJobs.Editor
|
||||
private static IEnumerable<T> GetSingleton<T>(ref List<T> entities, IQueryable<T> query) where T : class
|
||||
{
|
||||
if (entities != null) return entities;
|
||||
|
||||
entities = query.ToList();
|
||||
|
||||
var view = CollectionViewSource.GetDefaultView(entities) as IEditableCollectionView;
|
||||
if (view != null) view.NewItemPlaceholderPosition = NewItemPlaceholderPosition.AtBeginning;
|
||||
//var view = CollectionViewSource.GetDefaultView(entities) as IEditableCollectionView;
|
||||
//if (view != null) view.NewItemPlaceholderPosition = NewItemPlaceholderPosition.AtBeginning;
|
||||
|
||||
return entities;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,9 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>appleicon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EntityFramework.6.1.0\lib\net45\EntityFramework.dll</HintPath>
|
||||
@@ -202,6 +205,9 @@
|
||||
<ItemGroup>
|
||||
<Folder Include="Converters\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="appleicon.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
@@ -9,8 +9,9 @@
|
||||
xmlns:local="clr-namespace:JetFrames.AppleJobs.Editor"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:bs="http://schemas.brightsharp.com/developer"
|
||||
Background="{DynamicResource WindowBackgroundBrush}"
|
||||
mc:Ignorable="d" DataContext="{Binding Editor, Source={StaticResource ViewModelLocator}}"
|
||||
Title="MainWindow" Height="700" d:DesignWidth="2000">
|
||||
Title="Редактор AppleJobs" Height="600" d:DesignWidth="800" Icon="appleicon.ico">
|
||||
<Window.Resources>
|
||||
<ObjectDataProvider x:Key="themes" MethodName="GetValues"
|
||||
ObjectType="{x:Type sys:Enum}">
|
||||
@@ -18,6 +19,21 @@
|
||||
<x:Type TypeName="bs:ColorThemes"/>
|
||||
</ObjectDataProvider.MethodParameters>
|
||||
</ObjectDataProvider>
|
||||
<TabItem Header="Категории статей" x:Key="NewsCategoriesViewTab">
|
||||
<TabItem.ContentTemplate>
|
||||
<DataTemplate>
|
||||
<Grid DataContext="{StaticResource ViewModelLocator}">
|
||||
<TextBox VerticalAlignment="Top" HorizontalAlignment="Right" Width="200" Margin="0,5,0,0">
|
||||
<bs:MarkupExtensionProperties.Header>Фильтрация</bs:MarkupExtensionProperties.Header>
|
||||
<i:Interaction.Behaviors>
|
||||
<bs:FilterDefaultViewTextBoxBehavior ItemsSource="{Binding Path=Editor.NewsCategories}" />
|
||||
</i:Interaction.Behaviors>
|
||||
</TextBox>
|
||||
<view:NewsCategories Margin="0,30,0,0" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</TabItem.ContentTemplate>
|
||||
</TabItem>
|
||||
<TabItem Header="Модели" x:Key="ModelsViewTab">
|
||||
<TabItem.ContentTemplate>
|
||||
<DataTemplate>
|
||||
@@ -73,7 +89,7 @@
|
||||
<bs:FilterDefaultViewTextBoxBehavior ItemsSource="{Binding Path=Editor.ModelJobPriceTemplates}" />
|
||||
</i:Interaction.Behaviors>
|
||||
</TextBox>
|
||||
<Button VerticalAlignment="Top" HorizontalAlignment="Left" Command="{Binding Source={StaticResource ViewModelLocator}, Path=Editor.AddNewPriceTemplateCommand}" Margin="0,3,0,0">
|
||||
<Button bs:MarkupExtensionProperties.CornerRadius="0" VerticalAlignment="Top" HorizontalAlignment="Left" Command="{Binding Source={StaticResource ViewModelLocator}, Path=Editor.AddNewPriceTemplateCommand}" Margin="0,3,0,0">
|
||||
<Path Fill="Blue">
|
||||
<Path.Data>
|
||||
<CombinedGeometry>
|
||||
@@ -200,7 +216,7 @@
|
||||
<TreeViewItem Header="Статьи (новости)">
|
||||
<TreeViewItem Header="Статьи" Tag="{StaticResource NewsViewTab}" />
|
||||
<!--TODO-->
|
||||
<TreeViewItem Header="Категории статей" />
|
||||
<TreeViewItem Header="Категории статей" Tag="{StaticResource NewsCategoriesViewTab}" />
|
||||
</TreeViewItem>
|
||||
|
||||
</TreeView>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
mc:Ignorable="d" d:DataContext="{StaticResource ViewModelLocator}"
|
||||
d:DesignHeight="300" d:DesignWidth="774">
|
||||
<Grid>
|
||||
<DataGrid x:Name="dg" ItemsSource="{Binding Editor.ModelJobPriceTemplates}"
|
||||
<DataGrid x:Name="dg" ItemsSource="{Binding Editor.ModelJobPriceTemplates}"
|
||||
CanUserAddRows="False" AlternatingRowBackground="{DynamicResource AlternatingRowBackgroundBrush}">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Binding="{Binding ModelJob.Name}" Header="Работа" Width="120" SortMemberPath="ModelJob.Name"
|
||||
|
||||
BIN
JetFrames.AppleJobs.Editor/appleicon.ico
Normal file
BIN
JetFrames.AppleJobs.Editor/appleicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 192 KiB |
Reference in New Issue
Block a user