aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE.UI/MainWindow.xaml
blob: 032d38c81f4da78a8943b93ff773e4a44aeec337 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<controls:MetroWindow x:Class="Tango.Scripting.IDE.UI.MainWindow"
        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:controls="http://metro.mahapps.com/winfx/xaml/controls"
        xmlns:local="clr-namespace:Tango.Scripting.IDE.UI"
        xmlns:ide="clr-namespace:Tango.Scripting.IDE;assembly=Tango.Scripting.IDE"
        mc:Ignorable="d"
        Title="MainWindow" Height="720" Width="1280" d:DataContext="{d:DesignInstance Type=local:MainWindowVM, IsDesignTimeCreatable=False}" TitlebarHeight="40" TitleCaps="False" BorderBrush="Gray" BorderThickness="1" WindowStartupLocation="CenterScreen">
    <Grid>
        <ide:ScriptIDEView2 DataContext="{Binding IdeVM}" />
    </Grid>
</controls:MetroWindow>
"> System.Linq; using System.Text; using System.Threading.Tasks; using Tango.BL.Entities; using Tango.MachineStudio.Common.Notifications; namespace Tango.MachineStudio.DB.ViewModels { public class ProcessParametersTablesGroupsViewVM : DbTableViewModel<ProcessParametersTablesGroup> { public ProcessParametersTablesGroupsViewVM(INotificationProvider notification) : base(notification) { } protected override void OnBeforeEntitySave(DialogOpenMode mode, ProcessParametersTablesGroup entity) { entity.SaveDate = DateTime.UtcNow; if (entity.Rml != null && entity.Active) { foreach (var group in entity.Rml.ProcessParametersTablesGroups.Where(x => x != entity)) { group.Active = false; } } base.OnBeforeEntitySave(mode, entity); } } }