Export to CSV was added
This commit is contained in:
@@ -50,8 +50,12 @@ namespace StructureHelper.Windows.ViewModels.NdmCrossSections
|
||||
(
|
||||
editCalculatorCommand = new RelayCommand(o =>
|
||||
{
|
||||
var tmpSelected = SelectedItem;
|
||||
EditCalculator();
|
||||
Items.Clear();
|
||||
AddItems(repository.CalculatorsList);
|
||||
OnPropertyChanged(nameof(Items));
|
||||
SelectedItem = tmpSelected;
|
||||
}, o => SelectedItem != null));
|
||||
}
|
||||
}
|
||||
@@ -68,6 +72,8 @@ namespace StructureHelper.Windows.ViewModels.NdmCrossSections
|
||||
}
|
||||
private RelayCommand deleteCalculatorCommand;
|
||||
private RelayCommand runCommand;
|
||||
private RelayCommand copyCalculatorCommand;
|
||||
|
||||
public RelayCommand Delete
|
||||
{
|
||||
get
|
||||
@@ -100,13 +106,27 @@ namespace StructureHelper.Windows.ViewModels.NdmCrossSections
|
||||
var calculator = SelectedItem as IForceCalculator;
|
||||
var vm = new ForcesResultsViewModel(calculator);
|
||||
var wnd = new ForceResultsView(vm);
|
||||
wnd.Show();
|
||||
wnd.ShowDialog();
|
||||
}
|
||||
}, o => SelectedItem != null));
|
||||
}
|
||||
}
|
||||
|
||||
public RelayCommand Copy => throw new NotImplementedException();
|
||||
public RelayCommand Copy
|
||||
{
|
||||
get
|
||||
{
|
||||
return copyCalculatorCommand ??
|
||||
(
|
||||
copyCalculatorCommand = new RelayCommand(o =>
|
||||
{
|
||||
var item = SelectedItem.Clone() as INdmCalculator;
|
||||
repository.CalculatorsList.Add(item);
|
||||
Items.Add(item);
|
||||
OnPropertyChanged(nameof(Items));
|
||||
}, o => SelectedItem != null));
|
||||
}
|
||||
}
|
||||
|
||||
private void DeleteCalculator()
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ using StructureHelper.Windows.Forces;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperLogics.Models.Calculations.CalculationProperties;
|
||||
using StructureHelperLogics.Models.CrossSections;
|
||||
using StructureHelperLogics.NdmCalculations.Analyses;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
@@ -65,6 +66,8 @@ namespace StructureHelper.Windows.ViewModels.NdmCrossSections
|
||||
}
|
||||
}
|
||||
private RelayCommand editForceCombinationCommand;
|
||||
private RelayCommand copyCommand;
|
||||
|
||||
public RelayCommand Edit
|
||||
{
|
||||
get
|
||||
@@ -74,12 +77,28 @@ namespace StructureHelper.Windows.ViewModels.NdmCrossSections
|
||||
editForceCombinationCommand = new RelayCommand(o =>
|
||||
{
|
||||
EditForceCombination();
|
||||
Items.Clear();
|
||||
AddItems(repository.ForceCombinationLists);
|
||||
OnPropertyChanged(nameof(Items));
|
||||
}, o => SelectedItem != null));
|
||||
}
|
||||
}
|
||||
|
||||
public RelayCommand Copy => throw new NotImplementedException();
|
||||
public RelayCommand Copy
|
||||
{
|
||||
get
|
||||
{
|
||||
return copyCommand ??
|
||||
(
|
||||
copyCommand = new RelayCommand(o =>
|
||||
{
|
||||
var item = SelectedItem.Clone() as IForceCombinationList;
|
||||
repository.ForceCombinationLists.Add(item);
|
||||
Items.Add(item);
|
||||
OnPropertyChanged(nameof(Items));
|
||||
}, o => SelectedItem != null));
|
||||
}
|
||||
}
|
||||
|
||||
private void EditForceCombination()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user