Refactoring WIP
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
using StructureHelper.Infrastructure;
|
||||
using StructureHelper.Models.Materials;
|
||||
|
||||
namespace StructureHelper
|
||||
namespace StructureHelper.MaterialCatalogWindow
|
||||
{
|
||||
public class MaterialCatalogModel
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<Window x:Class="StructureHelper.MaterialCatalogView"
|
||||
<Window x:Class="StructureHelper.MaterialCatalogWindow.MaterialCatalogView"
|
||||
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"
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
using System.Windows;
|
||||
using StructureHelper.Infrastructure.UI.DataContexts;
|
||||
|
||||
namespace StructureHelper
|
||||
namespace StructureHelper.MaterialCatalogWindow
|
||||
{
|
||||
/// <summary>
|
||||
/// Логика взаимодействия для MaterialCatalogView.xaml
|
||||
/// </summary>
|
||||
public partial class MaterialCatalogView : Window
|
||||
{
|
||||
public MaterialCatalogView(bool isMaterialCanBeSelected = false, PrimitiveDefinitionBase primitive = null)
|
||||
public MaterialCatalogView(bool isMaterialCanBeSelected = false, PrimitiveBase primitive = null)
|
||||
{
|
||||
var materialCatalogModel = new MaterialCatalogModel();
|
||||
var materialCatalogViewModel = new MaterialCatalogViewModel(materialCatalogModel, this, isMaterialCanBeSelected, primitive);
|
||||
|
||||
@@ -6,11 +6,15 @@ using System.Windows;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Input;
|
||||
using Newtonsoft.Json;
|
||||
using StructureHelper.Annotations;
|
||||
using StructureHelper.Infrastructure;
|
||||
using StructureHelper.Infrastructure.UI.DataContexts;
|
||||
using StructureHelper.Models.Materials;
|
||||
using StructureHelper.Properties;
|
||||
using StructureHelper.Windows.AddMaterialWindow;
|
||||
using OpenFileDialog = System.Windows.Forms.OpenFileDialog;
|
||||
using SaveFileDialog = System.Windows.Forms.SaveFileDialog;
|
||||
|
||||
namespace StructureHelper
|
||||
namespace StructureHelper.MaterialCatalogWindow
|
||||
{
|
||||
[JsonObject(MemberSerialization.OptIn)]
|
||||
public class MaterialCatalogViewModel : INotifyPropertyChanged
|
||||
@@ -54,7 +58,7 @@ namespace StructureHelper
|
||||
public Visibility SelectMaterialButtonVisibility => IsMaterialCanBeSelected ? Visibility.Visible : Visibility.Hidden;
|
||||
public MaterialCatalogViewModel() { }
|
||||
|
||||
public MaterialCatalogViewModel(MaterialCatalogModel materialCatalogModel, MaterialCatalogView materialCatalogView, bool isMaterialCanBeSelected, PrimitiveDefinitionBase primitive = null)
|
||||
public MaterialCatalogViewModel(MaterialCatalogModel materialCatalogModel, MaterialCatalogView materialCatalogView, bool isMaterialCanBeSelected, PrimitiveBase primitive = null)
|
||||
{
|
||||
this.materialCatalogModel = materialCatalogModel;
|
||||
this.materialCatalogView = materialCatalogView;
|
||||
|
||||
Reference in New Issue
Block a user