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