Window function material done
This commit is contained in:
23
StructureHelperCommon/Windows/FunctionSelectionVM.cs
Normal file
23
StructureHelperCommon/Windows/FunctionSelectionVM.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Infrastructures.Settings;
|
||||
using StructureHelperCommon.Models.Functions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Windows
|
||||
{
|
||||
public class FunctionSelectionVM
|
||||
{
|
||||
public string SHORT_TERM { get; } = "Short Term";
|
||||
public string LONG_TERM { get; } = "Long Term";
|
||||
public string ULS { get; } = "Ultimate Limit State (ULS)";
|
||||
public string SLS { get; } = "Serviceability Limit State (SLS)";
|
||||
public string SPECIAL { get; } = "Special Limit State";
|
||||
public string CREATE_MATERIAL { get; } = "Create Function Material";
|
||||
public ObservableCollection<IOneVariableFunction> Functions { get; set; } = ProgramSetting.Functions;
|
||||
}
|
||||
}
|
||||
86
StructureHelperCommon/Windows/FunctionSelectionView.xaml
Normal file
86
StructureHelperCommon/Windows/FunctionSelectionView.xaml
Normal file
@@ -0,0 +1,86 @@
|
||||
<Window x:Class="StructureHelperCommon.Windows.FunctionSelectionView"
|
||||
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"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:StructureHelperCommon.Windows"
|
||||
mc:Ignorable="d"
|
||||
Title="FunctionMaterial" Height="250" Width="860">
|
||||
<!--Window.DataContext>
|
||||
<local:FunctionSelectionVM/>
|
||||
</Window.DataContext-->
|
||||
<Window.Resources>
|
||||
<Style x:Key="BoarderPropertyStyle" TargetType="Border">
|
||||
<Setter Property="Background" Value="LightYellow"/>
|
||||
<Setter Property="BorderBrush" Value="Black"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Margin" Value="2"/>
|
||||
</Style>
|
||||
<Style x:Key="BoarderValueStyle" TargetType="Border">
|
||||
<Setter Property="Background" Value="AliceBlue"/>
|
||||
<Setter Property="BorderBrush" Value="Black"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Margin" Value="2"/>
|
||||
</Style>
|
||||
<Style x:Key="TextBlockStyle" TargetType="TextBlock">
|
||||
<Setter Property="Background" Value="LightYellow"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
<Style x:Key="FuncComboBox" TargetType="ComboBox">
|
||||
<Setter Property="ItemsSource" Value="{Binding Functions}"/>
|
||||
<Setter Property="DisplayMemberPath" Value="Name"/>
|
||||
<Setter Property="Margin" Value="10"/>
|
||||
</Style>
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="220"/>
|
||||
<ColumnDefinition Width="220"/>
|
||||
<ColumnDefinition Width="220"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="50"/>
|
||||
<RowDefinition Height="50"/>
|
||||
<RowDefinition Height="50"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Column="0" Grid.Row="0"/>
|
||||
<Border Grid.Column="0" Grid.Row="1" Style="{StaticResource BoarderPropertyStyle}"/>
|
||||
<Border Grid.Column="0" Grid.Row="2" Style="{StaticResource BoarderPropertyStyle}"/>
|
||||
<Border Grid.Column="1" Grid.Row="0" Style="{StaticResource BoarderPropertyStyle}"/>
|
||||
<Border Grid.Column="1" Grid.Row="1" Style="{StaticResource BoarderValueStyle}"/>
|
||||
<Border Grid.Column="1" Grid.Row="2" Style="{StaticResource BoarderValueStyle}"/>
|
||||
<Border Grid.Column="2" Grid.Row="0" Style="{StaticResource BoarderPropertyStyle}"/>
|
||||
<Border Grid.Column="2" Grid.Row="1" Style="{StaticResource BoarderValueStyle}"/>
|
||||
<Border Grid.Column="2" Grid.Row="2" Style="{StaticResource BoarderValueStyle}"/>
|
||||
<Border Grid.Column="3" Grid.Row="0" Style="{StaticResource BoarderPropertyStyle}"/>
|
||||
<Border Grid.Column="3" Grid.Row="1" Style="{StaticResource BoarderValueStyle}"/>
|
||||
<Border Grid.Column="3" Grid.Row="2" Style="{StaticResource BoarderValueStyle}"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="1" Text="{Binding SHORT_TERM}" Style="{StaticResource TextBlockStyle}"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="2" Text="{Binding LONG_TERM}" Style="{StaticResource TextBlockStyle}"/>
|
||||
<TextBlock Grid.Column="1" Grid.Row="0" Text="{Binding ULS}" Style="{StaticResource TextBlockStyle}"/>
|
||||
<TextBlock Grid.Column="2" Grid.Row="0" Text="{Binding SLS}" Style="{StaticResource TextBlockStyle}"/>
|
||||
<TextBlock Grid.Column="3" Grid.Row="0" Text="{Binding SPECIAL}" Style="{StaticResource TextBlockStyle}"/>
|
||||
<ComboBox Style="{StaticResource FuncComboBox}"
|
||||
Grid.Column="1" Grid.Row="1"/>
|
||||
<ComboBox Style="{StaticResource FuncComboBox}"
|
||||
Grid.Column="1" Grid.Row="2"/>
|
||||
<ComboBox Style="{StaticResource FuncComboBox}"
|
||||
Grid.Column="2" Grid.Row="1"/>
|
||||
<ComboBox Style="{StaticResource FuncComboBox}"
|
||||
Grid.Column="2" Grid.Row="2"/>
|
||||
<ComboBox Style="{StaticResource FuncComboBox}"
|
||||
Grid.Column="3" Grid.Row="1"/>
|
||||
<ComboBox Style="{StaticResource FuncComboBox}"
|
||||
Grid.Column="3" Grid.Row="2"/>
|
||||
<Button Grid.Column="3"
|
||||
Grid.Row="3"
|
||||
Margin="10"
|
||||
Content="{Binding CREATE_MATERIAL}"/>
|
||||
</Grid>
|
||||
</Window>
|
||||
33
StructureHelperCommon/Windows/FunctionSelectionView.xaml.cs
Normal file
33
StructureHelperCommon/Windows/FunctionSelectionView.xaml.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace StructureHelperCommon.Windows
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for FunctionSelection.xaml
|
||||
/// </summary>
|
||||
public partial class FunctionSelectionView : Window
|
||||
{
|
||||
private FunctionSelectionVM viewModel;
|
||||
public FunctionSelectionView(FunctionSelectionVM viewModel)
|
||||
{
|
||||
this.viewModel = viewModel;
|
||||
DataContext = this.viewModel;
|
||||
InitializeComponent();
|
||||
}
|
||||
public FunctionSelectionView() : this(new FunctionSelectionVM())
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user