-
Notifications
You must be signed in to change notification settings - Fork 2
/
MainWindow.xaml
140 lines (124 loc) · 12.4 KB
/
MainWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<Window x:Class="ExecutorOpenDSS.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Customização OpenDSS" Height="600" Width="575">
<Grid Margin="5,5,5,5">
<Grid.Resources>
<Style TargetType="{x:Type TextBox}">
<Setter Property="Margin" Value="10,0,0,0" />
</Style>
<Style BasedOn="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" TargetType="{x:Type Button}">
<Setter Property="Margin" Value="10,0,0,0" />
<Setter Property="BorderBrush" Value="Black" />
</Style>
<Style TargetType="{x:Type Label}">
<Setter Property="Margin" Value="10,5,0,0" />
</Style>
<Style TargetType="{x:Type CheckBox}">
<Setter Property="Margin" Value="10,5,0,0" />
</Style>
<Style BasedOn="{StaticResource {x:Static ToolBar.ComboBoxStyleKey}}" TargetType="{x:Type ComboBox}">
<Setter Property="Margin" Value="10,5,0,0" />
<Setter Property="BorderBrush" Value="#FFE6E3E3" />
</Style>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<!-- 4-->
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<!-- 9-->
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Mês:" HorizontalAlignment="Left" Height="26" Width="35" />
<ComboBox Grid.Row="0" Grid.Column="0" x:Name="mesComboBox" HorizontalAlignment="Left" VerticalAlignment="Bottom" Height="24" Width="90" Margin="50,0,0,0" SelectionChanged="MesComboBox_SelectionChanged" >
<ComboBoxItem IsSelected="True">Janeiro</ComboBoxItem>
<ComboBoxItem>Fevereiro</ComboBoxItem>
<ComboBoxItem>Março</ComboBoxItem>
<ComboBoxItem>Abril</ComboBoxItem>
<ComboBoxItem>Maio</ComboBoxItem>
<ComboBoxItem>Junho</ComboBoxItem>
<ComboBoxItem>Julho</ComboBoxItem>
<ComboBoxItem>Agosto</ComboBoxItem>
<ComboBoxItem>Setembro</ComboBoxItem>
<ComboBoxItem>Outubro</ComboBoxItem>
<ComboBoxItem>Novembro</ComboBoxItem>
<ComboBoxItem>Dezembro</ComboBoxItem>
</ComboBox>
<Label Grid.Row="0" Grid.Column="1" Content="Ano:" HorizontalAlignment="Left" Height="26" />
<TextBox Grid.Row="0" Grid.Column="1" x:Name="anoTextBox" HorizontalAlignment="Left" VerticalAlignment="Bottom" Height="24" TextWrapping="Wrap" Width="60" LostFocus="AnoTB_LostFocus" Margin="50,0,0,0" Text="2020"/>
<Label Grid.Row="1" Grid.Column="0" Content="Tipo de fluxo:" HorizontalAlignment="Left" Height="26" />
<ComboBox Grid.Row="1" Grid.Column="0" x:Name="tipoFluxoComboBox" HorizontalAlignment="Left" VerticalAlignment="Bottom" Height="24" Width="90" LostFocus="TipoFluxoCB_LostFocus" KeyUp="TipoFluxoCB_LostFocus" Margin="90,0,0,0" >
<ComboBoxItem IsSelected="True">Snap</ComboBoxItem>
<ComboBoxItem>Hourly</ComboBoxItem>
<ComboBoxItem>Daily</ComboBoxItem>
<ComboBoxItem>Monthly</ComboBoxItem>
<ComboBoxItem>Yearly</ComboBoxItem>
</ComboBox>
<Label Grid.Row="1" Grid.Column="1" Content="Tipo de dia:" HorizontalAlignment="Left" Height="26" Width="75"/>
<ComboBox Grid.Row="1" Grid.Column="1" x:Name="tipoDiaComboBox" HorizontalAlignment="Left" VerticalAlignment="Bottom" Height="24" Width="90" IsEnabled="False" Margin="80,0,0,0" >
<ComboBoxItem IsSelected="True">Dia útil</ComboBoxItem>
<ComboBoxItem>Sábado</ComboBoxItem>
<ComboBoxItem>Domingo</ComboBoxItem>
</ComboBox>
<Label Grid.Row="1" Grid.Column="2" Content="Hora (0 a 23):" HorizontalAlignment="Left" Height="26" Width="90"/>
<TextBox Grid.Row="1" Grid.Column="2" x:Name="horaTextBox" HorizontalAlignment="Left" VerticalAlignment="Bottom" Height="24" TextWrapping="Wrap" Width="90" LostFocus="HoraTextBox_LostFocus" Margin="90,0,0,0" Text="18" Grid.ColumnSpan="1"/>
<Label Grid.Row="2" Grid.ColumnSpan="2" Content="Caminho dos arquivos dos alimentadores *.dss:" HorizontalAlignment="Left" VerticalAlignment="Top" Height="26" Width="264" Margin="10,0,0,0" />
<TextBox Grid.Row="3" Grid.ColumnSpan="3" x:Name="caminhoDSSTextBox" HorizontalAlignment="Stretch" Height="24" VerticalAlignment="Top" LostFocus="CaminhoDSSTB_LostFocus" MouseDoubleClick="TextBox_MouseDoubleClick" />
<Button Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="3" x:Name="caminhoDSSBrowserButton" HorizontalAlignment="Right" VerticalAlignment="Top" Width="20" Height="24" Content="..." Click="CaminhoDSSBrowse_Click" Margin="40,0,0,12" />
<Label Grid.Row="4" Grid.ColumnSpan="2" Content="Caminho dos recursos permanentes:" HorizontalAlignment="Left" VerticalAlignment="Top" Height="26" Width="210" Margin="10,-15,0,0" />
<TextBox Grid.Row="5" Grid.ColumnSpan="3" x:Name="caminhoPermTextBox" HorizontalAlignment="Stretch" Height="24" VerticalAlignment="Top" LostFocus="CaminhoTB_LostFocus" MouseDoubleClick="TextBox_MouseDoubleClick" />
<Button Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="3" x:Name="caminhoPermBrowserButton" HorizontalAlignment="Right" VerticalAlignment="Center" Width="20" Height="24" Content="..." Click="CaminhoPermBrowse_Click" Margin="40,0,0,12" />
<CheckBox Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="2" x:Name="otimizaEnergiaCheckBox" Content="Otimiza LoadMult Energia" HorizontalAlignment="Left" Width="160" Checked="OtimizaEnergiaCheckBox_Checked" Unchecked="OtimizaEnergiaCheckBox_Unchecked" />
<CheckBox Grid.Row="6" Grid.Column="1" x:Name="simplificaMesComDUCheckBox" Content="Fluxo Mensal por DU" HorizontalAlignment="Left" Width="140" Grid.ColumnSpan="2" IsEnabled="False" />
<Label Grid.Row="6" Grid.Column="2" Content="Incremento %:" HorizontalAlignment="Left" VerticalAlignment="Center" Height="26" Width="110" Margin="0,0,0,0" />
<TextBox Grid.Row="6" Grid.Column="2" x:Name="incrementoAjusteTextBox" HorizontalAlignment="Left" Height="24" Width="60" VerticalAlignment="Center" Margin="100,0,0,0" LostFocus="FloatTextBox_LostFocus" MouseDoubleClick="TextBox_MouseDoubleClick" Text="5" IsEnabled="False"/>
<CheckBox Grid.Row="7" Grid.ColumnSpan="2" x:Name="usarTensoesBarramentoCheckBox" Content="Setar Tensão de Saída SE (pu):" HorizontalAlignment="Left" Width="180" Checked="UsarTensoesBarramentoCheckBox_Checked" Unchecked="UsarTensoesBarramentoCheckBox_Unchecked"/>
<TextBox Grid.Row="7" Grid.Column="0" Grid.ColumnSpan="2" x:Name="tensaoSaidaBarTextBox" HorizontalAlignment="Left" Height="24" VerticalAlignment="Top" Text="1.0362" Width="60" Margin="190,0,0,0" />
<Label Grid.Row="7" Grid.Column="2" Content="LoadMult Alt.:" HorizontalAlignment="Left" VerticalAlignment="Top" Height="26" Width="110" Margin="0,0,0,0" />
<TextBox Grid.Row="7" Grid.Column="2" x:Name="loadMultAltTextBox" HorizontalAlignment="Left" Height="24" Width="60" VerticalAlignment="Center" Text="0.5" Margin="100,0,0,0" IsEnabled="False" />
<Button Grid.Row="8" Grid.Column="1" x:Name="ExecutaButton" Content="Executar" Width="100" VerticalAlignment="Top" Click="ExecutaButton_Click" Margin="0,10,0,0" Height="23" />
<Button Grid.Row="8" Grid.Column="2" x:Name="CancelaButton" Content="Cancelar" Height="23" Width="100" VerticalAlignment="Top" HorizontalAlignment="Center" Click="CancelaButton_Click" IsCancel="True" IsEnabled="False" Margin="0,10,0,0" />
<TextBox Grid.Row="9" Grid.ColumnSpan="4" x:Name="display" HorizontalAlignment="Stretch" TextWrapping="Wrap" IsReadOnly="True" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Auto" Text="" Margin="0,10,0,0"/>
<Expander Grid.Row="8" Grid.Column="0" Grid.ColumnSpan="3" Grid.RowSpan="2" Header="Mais opções..." BorderBrush="Black" Background="White" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" >
<DockPanel Margin="0,10,5,5" LastChildFill="False">
<DockPanel DockPanel.Dock="Top">
<Button x:Name="FeriadosButton" Content="Configurar Feriados" Width="130" HorizontalAlignment="Left" Margin="10,0,0,0" Click="FeriadosButton_Click" Height="22" />
<Button DockPanel.Dock="Right" x:Name="CargaReligadores" Content="Carga dos Religadores" Width="130" HorizontalAlignment="Center" Margin="10,0,0,0" Click="CargaReligadores_Click" Height="22" />
<Button DockPanel.Dock="Right" x:Name="GetChavesNAs" Content="Reconfigurar" Width="130" HorizontalAlignment="Center" Margin="10,0,0,0" Click="AnaliseChavesNAs_Click" Height="22" />
</DockPanel>
<DockPanel DockPanel.Dock="Top">
<Button DockPanel.Dock="Left" x:Name="PlaceCapacitors" Content="Aloca Capacitores" Click="PlaceCapacitors_Click" Width="130" />
<Button DockPanel.Dock="Left" x:Name="ResumoAlim" Content="Resumo Alim." Click="ResumoAlim_Click" Width="130" />
<Button DockPanel.Dock="Right" x:Name="AnaliseLoops" Content="Analisar Loops" Width="130" HorizontalAlignment="Center" Margin="10,0,0,0" Click="AnaliseLoops_Click" Height="22"/>
</DockPanel>
<CheckBox DockPanel.Dock="Top" x:Name="calculaDRPDRCCheckBox" Content="Gerar Relatório Clientes com DRP e DRC" HorizontalAlignment="Left" VerticalAlignment="Top" Height="23" Margin="10,10,0,0" />
<CheckBox DockPanel.Dock="Top" x:Name="calcTensaoBarTrafoCheckBox" Content="Gerar Relatório Tensão Barra Trafos" HorizontalAlignment="Left" VerticalAlignment="Top" Height="23" Margin="10,0,0,0" />
<CheckBox DockPanel.Dock="Top" x:Name="verifCargaIsolada" Content="Gerar Relatório Cargas Isoladas" HorizontalAlignment="Left" VerticalAlignment="Top" Height="23" Margin="10,0,0,0" />
<!--CheckBox DockPanel.Dock="Top" x:Name="FeederReport" Content="Gerar Relatório Sumário Alimentador" HorizontalAlignment="Left" VerticalAlignment="Top" Height="23" Margin="10,0,0,0" /-->
<CheckBox DockPanel.Dock="Top" x:Name="verifTapsRTs" Content="Gerar Relatório Comutação Taps RTs" HorizontalAlignment="Left" VerticalAlignment="Top" Height="23" Margin="10,0,0,0" />
<CheckBox DockPanel.Dock="Top" x:Name="calculaPUOtm" Content="Calcular PU saída SE ótimo" HorizontalAlignment="Left" VerticalAlignment="Top" Height="23" Margin="10,0,0,0" />
<CheckBox DockPanel.Dock="Top" x:Name="IncluiCapMTCheckBox" Content="Incluir Capacitores de MT" HorizontalAlignment="Left" VerticalAlignment="Top" Height="23" Margin="10,0,0,0" />
<!--CheckBox DockPanel.Dock="Top" x:Name="ModeloCargaCemig" Content="Modelo Carga Cemig" HorizontalAlignment="Left" VerticalAlignment="Top" Height="23" Margin="10,0,0,0" Checked="ModeloCargaCemig_Checked" /-->
<StackPanel Orientation="Horizontal" DockPanel.Dock="Top">
<Label Content="BatchEdit string:" HorizontalAlignment="Left" VerticalAlignment="Top" Height="26" Margin="10,-5,0,0" Width="95" />
<TextBox Text="! BatchEdit " x:Name="TBBatchEdit" HorizontalAlignment="Left" VerticalAlignment="Top" Height="24" TextWrapping="Wrap" Width="220" />
</StackPanel>
<CheckBox DockPanel.Dock="Top" x:Name="AllowFormsCheckBox" Content="Exibir mensagens do OpenDSS" HorizontalAlignment="Left" IsChecked="True" Margin="10,0,0,0" />
<CheckBox DockPanel.Dock="Top" x:Name="otimizaCheckBox" Content="Otimiza LoadMult" Visibility="Hidden" Checked="OtimizaCheckBox_Checked" Unchecked="OtimizaCheckBox_Unchecked" IsEnabled="False" Grid.ColumnSpan="2" Margin="10,0,0,0"/>
</DockPanel>
</Expander>
</Grid>
</Window>