avancos na ihm

This commit is contained in:
Diego Freitas 2026-07-17 17:45:14 -03:00
parent 8327561222
commit f74e93f978
38 changed files with 7804 additions and 14 deletions

View File

@ -384,9 +384,21 @@
<Compile Include="Forms\frmPinout.Designer.cs">
<DependentUpon>frmPinout.cs</DependentUpon>
</Compile>
<Compile Include="Forms\IHM\Controls\HmiAttitudeIndicator.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Forms\IHM\Controls\HmiAutonomyCard.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Forms\IHM\Controls\HmiAutonomyResourceCard.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Forms\IHM\Controls\HmiCameraSelector.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Forms\IHM\Controls\HmiCompassControl.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Forms\IHM\Controls\HmiDiagnosticTabButton.cs">
<SubType>Component</SubType>
</Compile>
@ -399,12 +411,39 @@
<Compile Include="Forms\IHM\Controls\HmiModuleBadge.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Forms\IHM\Controls\HmiModuleHealthRow.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Forms\IHM\Controls\HmiMovementModeButton.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Forms\IHM\Controls\HmiNavigationMetric.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Forms\IHM\Controls\HmiNetworkEditor.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Forms\IHM\Controls\HmiNozzleCard.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Forms\IHM\Controls\HmiNozzleGliph.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Forms\IHM\Controls\HmiNumericField.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Forms\IHM\Controls\HmiOperationTabButton.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Forms\IHM\Controls\HmiParameterToggleRow.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Forms\IHM\Controls\HmiParameterValueBox.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Forms\IHM\Controls\HmiProgressBar.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Forms\IHM\Controls\HmiRoundedPanel.cs">
<SubType>UserControl</SubType>
</Compile>
@ -414,10 +453,26 @@
<Compile Include="Forms\IHM\Controls\HmiSidebarButton.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Forms\IHM\Controls\HmiSlider.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Forms\IHM\Controls\HmiSonarRadarControl.cs" />
<Compile Include="Forms\IHM\Controls\HmiSprayerModuleHealthRow.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Forms\IHM\Controls\HmiSprayerTelemetryRow.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Forms\IHM\Controls\HmiStatusRow.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Forms\IHM\Controls\HmiTelemetryRow.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Forms\IHM\Controls\HmiTheme.cs" />
<Compile Include="Forms\IHM\Controls\HmiWheelStatusCard.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Forms\IHM\Controls\StatusOperacaoControl.cs">
<SubType>UserControl</SubType>
</Compile>
@ -436,6 +491,40 @@
<Compile Include="Forms\IHM\frmMenu.Designer.cs">
<DependentUpon>frmMenu.cs</DependentUpon>
</Compile>
<Compile Include="Forms\IHM\frmOperacao.cs" />
<Compile Include="Forms\IHM\frmOperacao.Designer.cs">
<DependentUpon>frmOperacao.cs</DependentUpon>
</Compile>
<Compile Include="Forms\IHM\Operacao\HmiCompactMetricCard.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Forms\IHM\Operacao\HmiCompactMetricCard.Designer.cs">
<DependentUpon>HmiCompactMetricCard.cs</DependentUpon>
</Compile>
<Compile Include="Forms\IHM\Operacao\ucOperacaoMovimentacao.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Forms\IHM\Operacao\ucOperacaoMovimentacao.Designer.cs">
<DependentUpon>ucOperacaoMovimentacao.cs</DependentUpon>
</Compile>
<Compile Include="Forms\IHM\Operacao\ucOperacaoNavegacao.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Forms\IHM\Operacao\ucOperacaoNavegacao.Designer.cs">
<DependentUpon>ucOperacaoNavegacao.cs</DependentUpon>
</Compile>
<Compile Include="Forms\IHM\Operacao\ucOperacaoParametros.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Forms\IHM\Operacao\ucOperacaoParametros.Designer.cs">
<DependentUpon>ucOperacaoParametros.cs</DependentUpon>
</Compile>
<Compile Include="Forms\IHM\Operacao\ucOperacaoPulverizador.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Forms\IHM\Operacao\ucOperacaoPulverizador.Designer.cs">
<DependentUpon>ucOperacaoPulverizador.cs</DependentUpon>
</Compile>
<Compile Include="Forms\Simuladores\frmSimulacaoMapaGPS.cs">
<SubType>Form</SubType>
</Compile>
@ -835,6 +924,10 @@
<DependentUpon>frmMenu.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Forms\IHM\frmOperacao.resx">
<DependentUpon>frmOperacao.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Forms\Simuladores\frmSimulacaoMapaGPS.resx">
<DependentUpon>frmSimulacaoMapaGPS.cs</DependentUpon>
</EmbeddedResource>

View File

@ -0,0 +1,657 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
namespace AgroBase.Forms.IHM.Controls.Operacao
{
public class HmiAttitudeIndicator : Control
{
private double _pixelsPerDegree;
private double _frontalDeg;
private double _lateralDeg;
private double _frontalMaxDeg = 45.0;
private double _lateralMaxDeg = 25.0;
/*
* Inclinação visual máxima do horizonte lateral.
* 90° representa o limite configurado.
*/
private double _lateralVisualMaxDeg = 90.0;
/*
* Percentual do raio usado para deslocar o horizonte
* quando a inclinação frontal chega ao limite.
*/
private double _frontalVisualMaxPercent = 0.72;
public HmiAttitudeIndicator()
{
SetStyle(
ControlStyles.UserPaint |
ControlStyles.AllPaintingInWmPaint |
ControlStyles.OptimizedDoubleBuffer |
ControlStyles.ResizeRedraw,
true);
DoubleBuffered = true;
BackColor = HmiTheme.SurfaceRaised;
MinimumSize = new Size(110, 110);
}
[Category("Dados")]
[DefaultValue(0D)]
public double FrontalDeg
{
get { return _frontalDeg; }
set
{
_frontalDeg = value;
Invalidate();
}
}
[Category("Dados")]
[DefaultValue(0D)]
public double LateralDeg
{
get { return _lateralDeg; }
set
{
_lateralDeg = value;
Invalidate();
}
}
[Category("Aparência")]
[DefaultValue(2D)]
public double PixelsPerDegree
{
get { return _pixelsPerDegree; }
set
{
_pixelsPerDegree = Math.Max(0.2, value);
Invalidate();
}
}
[Category("Limites")]
[Description("Inclinação frontal máxima considerada pelo equipamento.")]
[DefaultValue(45D)]
public double FrontalMaxDeg
{
get { return _frontalMaxDeg; }
set
{
_frontalMaxDeg =
Math.Max(0.1, Math.Abs(value));
Invalidate();
}
}
[Category("Limites")]
[Description("Inclinação lateral máxima considerada pelo equipamento.")]
[DefaultValue(90D)]
public double LateralMaxDeg
{
get { return _lateralMaxDeg; }
set
{
_lateralMaxDeg =
Math.Max(0.1, Math.Abs(value));
Invalidate();
}
}
[Category("Aparência")]
[Description("Rotação visual quando a inclinação lateral atinge o limite.")]
[DefaultValue(90D)]
public double LateralVisualMaxDeg
{
get { return _lateralVisualMaxDeg; }
set
{
_lateralVisualMaxDeg =
Math.Max(10.0, Math.Min(90.0, value));
Invalidate();
}
}
[Category("Aparência")]
[Description("Deslocamento vertical máximo em relação ao raio do instrumento.")]
[DefaultValue(0.72D)]
public double FrontalVisualMaxPercent
{
get { return _frontalVisualMaxPercent; }
set
{
_frontalVisualMaxPercent =
Math.Max(0.20, Math.Min(0.90, value));
Invalidate();
}
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
Graphics g = e.Graphics;
g.SmoothingMode = SmoothingMode.AntiAlias;
g.PixelOffsetMode = PixelOffsetMode.HighQuality;
g.TextRenderingHint =
System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
g.Clear(BackColor);
const int margem = 6;
const int alturaRodape = 34;
const int espacamentoRodape = 2;
/*
* Área disponível apenas para o instrumento.
* A faixa inferior fica reservada para os ângulos.
*/
Rectangle areaInstrumento = new Rectangle(
margem,
margem,
Math.Max(1, Width - margem * 2),
Math.Max(
1,
Height -
margem * 2 -
alturaRodape -
espacamentoRodape
)
);
int side = Math.Min(
areaInstrumento.Width,
areaInstrumento.Height
);
side = Math.Max(1, side);
Rectangle circle = new Rectangle(
areaInstrumento.Left +
(areaInstrumento.Width - side) / 2,
areaInstrumento.Top +
(areaInstrumento.Height - side) / 2,
side,
side
);
double percentualFrontal =
Limitar(
_frontalDeg / _frontalMaxDeg,
-1.0,
1.0
);
double percentualLateral =
Limitar(
_lateralDeg / _lateralMaxDeg,
-1.0,
1.0
);
double riscoFrontalReal =
Math.Abs(
_frontalDeg /
_frontalMaxDeg
);
double riscoLateralReal =
Math.Abs(
_lateralDeg /
_lateralMaxDeg
);
double riscoGeralReal =
Math.Max(
riscoFrontalReal,
riscoLateralReal
);
Color corRisco = ObterCorRisco(Math.Min(riscoGeralReal, 1.0));
bool limiteUltrapassado = riscoGeralReal >= 1.0;
float espessuraBorda = limiteUltrapassado ? 3.5F : 2F;
float lateralVisualDeg =
(float)(
percentualLateral *
_lateralVisualMaxDeg
);
float raio =
circle.Height / 2F;
float pitchOffset =
(float)(
percentualFrontal *
raio *
_frontalVisualMaxPercent
);
GraphicsState state = g.Save();
try
{
using (GraphicsPath clip = new GraphicsPath())
{
clip.AddEllipse(circle);
g.SetClip(clip);
float cx =
circle.Left +
circle.Width / 2F;
float cy =
circle.Top +
circle.Height / 2F;
g.TranslateTransform(cx, cy);
g.RotateTransform(
-lateralVisualDeg
);
g.TranslateTransform(
-cx,
-cy
);
float horizonY =
cy + pitchOffset;
/*
* Céu: tudo que fica acima do horizonte.
*/
RectangleF sky = new RectangleF(
circle.Left - side,
circle.Top - side * 2,
side * 3,
horizonY - (circle.Top - side * 2)
);
/*
* Chão: tudo que fica abaixo do horizonte.
*/
RectangleF ground = new RectangleF(
circle.Left - side,
horizonY,
side * 3,
circle.Bottom + side * 2 - horizonY
);
using (SolidBrush skyBrush =
new SolidBrush(
Color.FromArgb(
38,
111,
186
)
))
{
g.FillRectangle(
skyBrush,
sky
);
}
using (SolidBrush groundBrush =
new SolidBrush(
Color.FromArgb(
117,
78,
32
)
))
{
g.FillRectangle(
groundBrush,
ground
);
}
using (Pen horizonPen =
new Pen(
Color.White,
2F
))
{
g.DrawLine(
horizonPen,
circle.Left - side,
horizonY,
circle.Right + side,
horizonY
);
}
using (Pen marksPen =
new Pen(
Color.FromArgb(
220,
Color.White
),
1F
))
{
for (
int deg = -20;
deg <= 20;
deg += 5
)
{
if (deg == 0)
continue;
float y =
horizonY -
(float)(
deg *
_pixelsPerDegree
);
float half =
deg % 10 == 0
? side * 0.16F
: side * 0.10F;
g.DrawLine(
marksPen,
cx - half,
y,
cx + half,
y
);
}
}
}
}
finally
{
g.Restore(state);
}
using (Pen glowPen = new Pen(Color.FromArgb(70, corRisco.R, corRisco.G, corRisco.B), 5F))
{
g.DrawEllipse(glowPen, circle);
}
using (Pen border = new Pen(corRisco, espessuraBorda))
{
g.DrawEllipse(border, circle);
}
float centerX =
circle.Left +
circle.Width / 2F;
float centerY =
circle.Top +
circle.Height / 2F;
using (Pen aircraft =
new Pen(
HmiTheme.Warning,
3F
))
{
g.DrawLine(
aircraft,
centerX - side * 0.22F,
centerY,
centerX - 8,
centerY
);
g.DrawLine(
aircraft,
centerX + 8,
centerY,
centerX + side * 0.22F,
centerY
);
g.DrawLine(
aircraft,
centerX - 8,
centerY,
centerX,
centerY + 5
);
g.DrawLine(
aircraft,
centerX,
centerY + 5,
centerX + 8,
centerY
);
}
/*
* Faixa inferior exclusiva para frontal e lateral.
*/
int rodapeTop =
Height -
alturaRodape -
margem;
int larguraMetade =
Width / 2;
Rectangle frontalRect =
new Rectangle(
margem,
rodapeTop,
larguraMetade - margem - 2,
alturaRodape
);
Rectangle lateralRect =
new Rectangle(
larguraMetade + 2,
rodapeTop,
Width -
larguraMetade -
margem -
2,
alturaRodape
);
DesenharValorAngulo(
g,
frontalRect,
"Frontal",
_frontalDeg,
HmiTheme.Info
);
DesenharValorAngulo(
g,
lateralRect,
"Lateral",
_lateralDeg,
HmiTheme.Info
);
}
private static double Limitar(double valor, double minimo, double maximo)
{
if (valor < minimo)
return minimo;
if (valor > maximo)
return maximo;
return valor;
}
private static Color ObterCorRisco(double risco)
{
risco = Limitar(
risco,
0.0,
1.0
);
/*
* De 0% até 60%:
* verde estável.
*/
if (risco <= 0.60)
return HmiTheme.Success;
/*
* De 60% até 85%:
* transição de verde para amarelo.
*/
if (risco <= 0.85)
{
double fator =
(risco - 0.60) /
(0.85 - 0.60);
return InterpolarCor(
HmiTheme.Success,
HmiTheme.Warning,
fator
);
}
/*
* De 85% até 100%:
* transição de amarelo para vermelho.
*/
double fatorCritico =
(risco - 0.85) /
(1.0 - 0.85);
return InterpolarCor(
HmiTheme.Warning,
HmiTheme.Danger,
fatorCritico
);
}
private static Color InterpolarCor(
Color inicio,
Color fim,
double fator)
{
fator = Limitar(
fator,
0.0,
1.0
);
int r =
inicio.R +
(int)Math.Round(
(fim.R - inicio.R) *
fator
);
int g =
inicio.G +
(int)Math.Round(
(fim.G - inicio.G) *
fator
);
int b =
inicio.B +
(int)Math.Round(
(fim.B - inicio.B) *
fator
);
return Color.FromArgb(
r,
g,
b
);
}
private static void DesenharValorAngulo(
Graphics g,
Rectangle bounds,
string titulo,
double valor,
Color cor)
{
Rectangle tituloRect =
new Rectangle(
bounds.Left,
bounds.Top,
bounds.Width,
11
);
Rectangle valorRect =
new Rectangle(
bounds.Left,
bounds.Top + 9,
bounds.Width,
bounds.Height - 9
);
using (Font tituloFont =
new Font(
"Segoe UI",
5.8F,
FontStyle.Regular
))
using (Font valorFont =
new Font(
"Segoe UI",
9.5F,
FontStyle.Bold
))
{
TextRenderer.DrawText(
g,
titulo,
tituloFont,
tituloRect,
HmiTheme.TextMuted,
TextFormatFlags.HorizontalCenter |
TextFormatFlags.VerticalCenter |
TextFormatFlags.NoPadding |
TextFormatFlags.SingleLine
);
string textoValor =
valor.ToString(
"+0.0;-0.0;0.0"
) +
"°";
TextRenderer.DrawText(
g,
textoValor,
valorFont,
valorRect,
cor,
TextFormatFlags.HorizontalCenter |
TextFormatFlags.VerticalCenter |
TextFormatFlags.NoPadding |
TextFormatFlags.SingleLine
);
}
}
}
}

View File

@ -0,0 +1,124 @@
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace AgroBase.Forms.IHM.Controls.Operacao
{
public class HmiAutonomyCard : UserControl
{
private readonly Label _lblTitulo;
private readonly Label _lblDistanciaTitulo;
private readonly Label _lblDistancia;
private readonly Label _lblTempoTitulo;
private readonly Label _lblTempo;
private Color _accentColor = HmiTheme.Warning;
public HmiAutonomyCard()
{
DoubleBuffered = true;
BackColor = HmiTheme.SurfaceRaised;
Padding = new Padding(8);
Margin = new Padding(3);
MinimumSize = new Size(150, 92);
_lblTitulo = new Label
{
Dock = DockStyle.Top,
Height = 25,
BackColor = Color.Transparent,
ForeColor = _accentColor,
Font = new Font("Segoe UI", 9F, FontStyle.Bold),
Text = "BATERIA",
TextAlign = ContentAlignment.MiddleLeft
};
TableLayoutPanel values = new TableLayoutPanel
{
Dock = DockStyle.Fill,
BackColor = Color.Transparent,
ColumnCount = 2,
RowCount = 2,
Margin = Padding.Empty,
Padding = Padding.Empty
};
values.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
values.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
values.RowStyles.Add(new RowStyle(SizeType.Percent, 42F));
values.RowStyles.Add(new RowStyle(SizeType.Percent, 58F));
_lblDistanciaTitulo = CreateCaption("Distância restante");
_lblTempoTitulo = CreateCaption("Tempo restante");
_lblDistancia = CreateValue("0 m");
_lblTempo = CreateValue("00:00:00");
values.Controls.Add(_lblDistanciaTitulo, 0, 0);
values.Controls.Add(_lblTempoTitulo, 1, 0);
values.Controls.Add(_lblDistancia, 0, 1);
values.Controls.Add(_lblTempo, 1, 1);
Controls.Add(values);
Controls.Add(_lblTitulo);
}
private static Label CreateCaption(string text)
{
return new Label
{
Dock = DockStyle.Fill,
BackColor = Color.Transparent,
ForeColor = HmiTheme.TextMuted,
Font = new Font("Segoe UI", 7F),
Text = text,
TextAlign = ContentAlignment.BottomCenter
};
}
private Label CreateValue(string text)
{
return new Label
{
Dock = DockStyle.Fill,
BackColor = Color.Transparent,
ForeColor = _accentColor,
Font = new Font("Segoe UI", 10F, FontStyle.Bold),
Text = text,
TextAlign = ContentAlignment.TopCenter
};
}
[Category("Conteúdo")]
public string Titulo
{
get { return _lblTitulo.Text; }
set { _lblTitulo.Text = value ?? string.Empty; }
}
[Category("Conteúdo")]
public string Distancia
{
get { return _lblDistancia.Text; }
set { _lblDistancia.Text = value ?? string.Empty; }
}
[Category("Conteúdo")]
public string Tempo
{
get { return _lblTempo.Text; }
set { _lblTempo.Text = value ?? string.Empty; }
}
[Category("Aparência")]
public Color AccentColor
{
get { return _accentColor; }
set
{
_accentColor = value;
_lblTitulo.ForeColor = value;
_lblDistancia.ForeColor = value;
_lblTempo.ForeColor = value;
}
}
}
}

View File

@ -0,0 +1,119 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
namespace AgroBase.Forms.IHM.Controls.Operacao
{
public class HmiAutonomyResourceCard : UserControl
{
private readonly Label _lblTitulo;
private readonly Label _lblDistancia;
private readonly Label _lblTempo;
private Color _accentColor = HmiTheme.Success;
public HmiAutonomyResourceCard()
{
SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint |
ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw, true);
DoubleBuffered = true;
BackColor = HmiTheme.SurfaceRaised;
Margin = new Padding(3);
Padding = new Padding(8);
MinimumSize = new Size(140, 68);
TableLayoutPanel root = new TableLayoutPanel
{
Dock = DockStyle.Fill,
ColumnCount = 2,
RowCount = 3,
BackColor = Color.Transparent,
Margin = Padding.Empty,
Padding = Padding.Empty
};
root.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
root.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
root.RowStyles.Add(new RowStyle(SizeType.Absolute, 22F));
root.RowStyles.Add(new RowStyle(SizeType.Absolute, 18F));
root.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
_lblTitulo = MakeLabel("BATERIA", 7.8F, FontStyle.Bold, _accentColor, ContentAlignment.MiddleLeft);
Label dTitle = MakeLabel("Distância restante", 6F, FontStyle.Regular, HmiTheme.TextMuted, ContentAlignment.MiddleCenter);
Label tTitle = MakeLabel("Tempo restante", 6F, FontStyle.Regular, HmiTheme.TextMuted, ContentAlignment.MiddleCenter);
_lblDistancia = MakeLabel("0 m", 9F, FontStyle.Bold, _accentColor, ContentAlignment.MiddleCenter);
_lblTempo = MakeLabel("00:00:00", 9F, FontStyle.Bold, _accentColor, ContentAlignment.MiddleCenter);
root.Controls.Add(_lblTitulo, 0, 0);
root.SetColumnSpan(_lblTitulo, 2);
root.Controls.Add(dTitle, 0, 1);
root.Controls.Add(tTitle, 1, 1);
root.Controls.Add(_lblDistancia, 0, 2);
root.Controls.Add(_lblTempo, 1, 2);
Controls.Add(root);
}
private static Label MakeLabel(string text, float size, FontStyle style, Color color, ContentAlignment align)
{
return new Label
{
Dock = DockStyle.Fill,
AutoSize = false,
BackColor = Color.Transparent,
ForeColor = color,
Font = new Font("Segoe UI", size, style),
Text = text,
TextAlign = align,
AutoEllipsis = true,
Margin = Padding.Empty
};
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
Rectangle bounds = new Rectangle(0, 0, Math.Max(1, Width - 1), Math.Max(1, Height - 1));
using (GraphicsPath path = Rounded(bounds, 8))
using (Pen pen = new Pen(_accentColor, 1.25F))
e.Graphics.DrawPath(pen, path);
using (Pen divider = new Pen(HmiTheme.Border, 1F))
e.Graphics.DrawLine(divider, Width / 2, 37, Width / 2, Math.Max(38, Height - 9));
}
private static GraphicsPath Rounded(Rectangle b, int radius)
{
GraphicsPath p = new GraphicsPath();
int d = Math.Min(radius * 2, Math.Min(b.Width, b.Height));
if (d <= 0) { p.AddRectangle(b); p.CloseFigure(); return p; }
Rectangle a = new Rectangle(b.Left, b.Top, d, d);
p.AddArc(a, 180, 90); a.X = b.Right - d; p.AddArc(a, 270, 90);
a.Y = b.Bottom - d; p.AddArc(a, 0, 90); a.X = b.Left; p.AddArc(a, 90, 90);
p.CloseFigure(); return p;
}
[Category("Conteúdo")]
public string Titulo { get { return _lblTitulo.Text; } set { _lblTitulo.Text = value ?? string.Empty; } }
[Category("Conteúdo")]
public string Distancia { get { return _lblDistancia.Text; } set { _lblDistancia.Text = value ?? string.Empty; } }
[Category("Conteúdo")]
public string Tempo { get { return _lblTempo.Text; } set { _lblTempo.Text = value ?? string.Empty; } }
[Category("Aparência")]
public Color AccentColor
{
get { return _accentColor; }
set
{
_accentColor = value;
_lblTitulo.ForeColor = value;
_lblDistancia.ForeColor = value;
_lblTempo.ForeColor = value;
Invalidate();
}
}
}
}

View File

@ -0,0 +1,223 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
namespace AgroBase.Forms.IHM.Controls.Operacao
{
public class HmiCompassControl : Control
{
private double _roverHeading;
private double _trajectoryHeading;
private bool _showTrajectory = true;
public HmiCompassControl()
{
SetStyle(
ControlStyles.UserPaint |
ControlStyles.AllPaintingInWmPaint |
ControlStyles.OptimizedDoubleBuffer |
ControlStyles.ResizeRedraw,
true);
DoubleBuffered = true;
BackColor = HmiTheme.SurfaceRaised;
MinimumSize = new Size(88, 88);
}
[Category("Dados")]
[DefaultValue(0D)]
public double RoverHeading
{
get { return _roverHeading; }
set
{
_roverHeading = NormalizeAngle(value);
Invalidate();
}
}
[Category("Dados")]
[DefaultValue(0D)]
public double TrajectoryHeading
{
get { return _trajectoryHeading; }
set
{
_trajectoryHeading = NormalizeAngle(value);
Invalidate();
}
}
[Category("Aparência")]
[DefaultValue(true)]
public bool ShowTrajectory
{
get { return _showTrajectory; }
set
{
_showTrajectory = value;
Invalidate();
}
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
Graphics g = e.Graphics;
g.SmoothingMode = SmoothingMode.AntiAlias;
g.Clear(BackColor);
int side = Math.Max(10, Math.Min(ClientSize.Width, ClientSize.Height) - 2);
Rectangle circle = new Rectangle(
(Width - side) / 2,
(Height - side) / 2,
side,
side);
using (SolidBrush bg = new SolidBrush(Color.FromArgb(17, 27, 32)))
g.FillEllipse(bg, circle);
using (Pen border = new Pen(HmiTheme.Border, 1.3F))
g.DrawEllipse(border, circle);
DrawTicks(g, circle);
DrawCardinals(g, circle);
DrawArrow(
g,
circle,
_roverHeading,
HmiTheme.Success,
side * 0.33F,
4F);
if (_showTrajectory)
{
DrawArrow(
g,
circle,
_trajectoryHeading,
HmiTheme.Warning,
side * 0.27F,
3F);
}
float cx = circle.Left + circle.Width / 2F;
float cy = circle.Top + circle.Height / 2F;
using (SolidBrush center = new SolidBrush(HmiTheme.Text))
g.FillEllipse(center, cx - 3F, cy - 3F, 6F, 6F);
}
private static void DrawTicks(Graphics g, Rectangle circle)
{
float cx = circle.Left + circle.Width / 2F;
float cy = circle.Top + circle.Height / 2F;
float radius = circle.Width / 2F;
using (Pen minor = new Pen(Color.FromArgb(85, 105, 115), 1F))
using (Pen major = new Pen(Color.FromArgb(150, 165, 172), 1.3F))
{
for (int deg = 0; deg < 360; deg += 15)
{
double rad = (deg - 90) * Math.PI / 180.0;
bool isMajor = deg % 45 == 0;
float outerX = cx + (float)Math.Cos(rad) * (radius - 3F);
float outerY = cy + (float)Math.Sin(rad) * (radius - 3F);
float innerRadius = radius - (isMajor ? 10F : 6F);
float innerX = cx + (float)Math.Cos(rad) * innerRadius;
float innerY = cy + (float)Math.Sin(rad) * innerRadius;
g.DrawLine(isMajor ? major : minor, innerX, innerY, outerX, outerY);
}
}
}
private static void DrawCardinals(Graphics g, Rectangle circle)
{
using (Font font = new Font("Segoe UI", 7F, FontStyle.Bold))
{
DrawCenteredText(g, "N", font, HmiTheme.Text, circle.Left + circle.Width / 2, circle.Top + 10);
DrawCenteredText(g, "S", font, HmiTheme.TextMuted, circle.Left + circle.Width / 2, circle.Bottom - 12);
DrawCenteredText(g, "O", font, HmiTheme.TextMuted, circle.Left + 12, circle.Top + circle.Height / 2);
DrawCenteredText(g, "L", font, HmiTheme.TextMuted, circle.Right - 12, circle.Top + circle.Height / 2);
}
}
private static void DrawCenteredText(
Graphics g,
string text,
Font font,
Color color,
int x,
int y)
{
Size size = TextRenderer.MeasureText(text, font);
TextRenderer.DrawText(
g,
text,
font,
new Point(x - size.Width / 2, y - size.Height / 2),
color,
TextFormatFlags.NoPadding);
}
private static void DrawArrow(
Graphics g,
Rectangle circle,
double heading,
Color color,
float length,
float width)
{
float cx = circle.Left + circle.Width / 2F;
float cy = circle.Top + circle.Height / 2F;
double rad = (heading - 90.0) * Math.PI / 180.0;
float tipX = cx + (float)Math.Cos(rad) * length;
float tipY = cy + (float)Math.Sin(rad) * length;
using (Pen pen = new Pen(color, width))
{
pen.StartCap = LineCap.Round;
pen.EndCap = LineCap.Round;
g.DrawLine(pen, cx, cy, tipX, tipY);
}
float wing = 8F;
double left = rad + 2.55;
double right = rad - 2.55;
PointF[] head =
{
new PointF(tipX, tipY),
new PointF(
tipX + (float)Math.Cos(left) * wing,
tipY + (float)Math.Sin(left) * wing),
new PointF(
tipX + (float)Math.Cos(right) * wing,
tipY + (float)Math.Sin(right) * wing)
};
using (SolidBrush brush = new SolidBrush(color))
g.FillPolygon(brush, head);
}
private static double NormalizeAngle(double value)
{
value %= 360.0;
if (value < 0)
value += 360.0;
return value;
}
}
}

View File

@ -0,0 +1,89 @@
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace AgroBase.Forms.IHM.Controls.Operacao
{
public class HmiModuleHealthRow : UserControl
{
private readonly Label _lblNome;
private readonly Label _lblSaude;
private readonly Label _lblStatus;
public HmiModuleHealthRow()
{
BackColor = HmiTheme.SurfaceRaised;
Height = 31;
Margin = new Padding(0, 0, 0, 3);
Padding = new Padding(7, 0, 7, 0);
_lblNome = new Label
{
Dock = DockStyle.Fill,
ForeColor = HmiTheme.TextMuted,
BackColor = Color.Transparent,
Font = new Font("Segoe UI", 7.5F),
Text = "Módulo",
TextAlign = ContentAlignment.MiddleLeft
};
_lblStatus = new Label
{
Dock = DockStyle.Right,
Width = 70,
ForeColor = HmiTheme.Success,
BackColor = Color.Transparent,
Font = new Font("Segoe UI", 7.3F, FontStyle.Bold),
Text = "Operante",
TextAlign = ContentAlignment.MiddleRight
};
_lblSaude = new Label
{
Dock = DockStyle.Right,
Width = 45,
ForeColor = HmiTheme.Success,
BackColor = Color.Transparent,
Font = new Font("Segoe UI", 8F, FontStyle.Bold),
Text = "100%",
TextAlign = ContentAlignment.MiddleRight
};
Controls.Add(_lblNome);
Controls.Add(_lblStatus);
Controls.Add(_lblSaude);
}
[Category("Conteúdo")]
public string NomeModulo
{
get { return _lblNome.Text; }
set { _lblNome.Text = value ?? string.Empty; }
}
[Category("Conteúdo")]
public string Saude
{
get { return _lblSaude.Text; }
set { _lblSaude.Text = value ?? string.Empty; }
}
[Category("Conteúdo")]
public string Status
{
get { return _lblStatus.Text; }
set { _lblStatus.Text = value ?? string.Empty; }
}
[Category("Aparência")]
public Color CorEstado
{
get { return _lblStatus.ForeColor; }
set
{
_lblStatus.ForeColor = value;
_lblSaude.ForeColor = value;
}
}
}
}

View File

@ -0,0 +1,48 @@
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace AgroBase.Forms.IHM.Controls.Operacao
{
public class HmiMovementModeButton : Button
{
private bool _selected;
public HmiMovementModeButton()
{
FlatStyle = FlatStyle.Flat;
FlatAppearance.BorderSize = 1;
FlatAppearance.BorderColor = HmiTheme.Border;
BackColor = HmiTheme.SurfaceRaised;
ForeColor = HmiTheme.TextMuted;
Font = new Font("Segoe UI", 7.5F, FontStyle.Bold);
Cursor = Cursors.Hand;
Margin = new Padding(2);
MinimumSize = new Size(86, 50);
UseVisualStyleBackColor = false;
}
[Category("Estado")]
public bool Selected
{
get { return _selected; }
set
{
_selected = value;
if (_selected)
{
BackColor = Color.FromArgb(28, 67, 37);
ForeColor = HmiTheme.Text;
FlatAppearance.BorderColor = HmiTheme.Success;
}
else
{
BackColor = HmiTheme.SurfaceRaised;
ForeColor = HmiTheme.TextMuted;
FlatAppearance.BorderColor = HmiTheme.Border;
}
}
}
}
}

View File

@ -0,0 +1,81 @@
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace AgroBase.Forms.IHM.Controls.Operacao
{
public class HmiNavigationMetric : UserControl
{
private readonly Label _lblTitulo;
private readonly Label _lblValor;
private readonly Panel _separator;
public HmiNavigationMetric()
{
DoubleBuffered = true;
BackColor = HmiTheme.Surface;
Height = 24;
MinimumSize = new Size(105, 22);
Margin = Padding.Empty;
Padding = new Padding(2, 0, 2, 1);
_separator = new Panel
{
Dock = DockStyle.Bottom,
Height = 1,
BackColor = HmiTheme.Border
};
_lblValor = new Label
{
Dock = DockStyle.Right,
Width = 49,
BackColor = Color.Transparent,
ForeColor = HmiTheme.Success,
Font = new Font("Segoe UI", 6.8F, FontStyle.Bold),
Text = "0",
TextAlign = ContentAlignment.MiddleRight,
AutoEllipsis = true,
Margin = Padding.Empty
};
_lblTitulo = new Label
{
Dock = DockStyle.Fill,
BackColor = Color.Transparent,
ForeColor = HmiTheme.TextMuted,
Font = new Font("Segoe UI", 6.2F),
Text = "Métrica",
TextAlign = ContentAlignment.MiddleLeft,
AutoEllipsis = true,
AutoSize = false,
Margin = Padding.Empty
};
Controls.Add(_lblTitulo);
Controls.Add(_lblValor);
Controls.Add(_separator);
}
[Category("Conteúdo")]
public string Titulo
{
get { return _lblTitulo.Text; }
set { _lblTitulo.Text = value ?? string.Empty; }
}
[Category("Conteúdo")]
public string Valor
{
get { return _lblValor.Text; }
set { _lblValor.Text = value ?? string.Empty; }
}
[Category("Aparência")]
public Color CorValor
{
get { return _lblValor.ForeColor; }
set { _lblValor.ForeColor = value; }
}
}
}

View File

@ -0,0 +1,299 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
namespace AgroBase.Forms.IHM.Controls.Operacao
{
public enum HmiNozzleState
{
Desconectado = 0,
Conectado = 1,
Falha = 2,
Alerta = 3,
Operante = 4
}
[DefaultEvent("NozzleClick")]
public class HmiNozzleCard : UserControl
{
private readonly Label _lblCodigo;
private readonly Label _lblAtuacoes;
private readonly Label _lblVazaoInst;
private readonly Label _lblVazaoMedia;
private readonly Label _lblTempo;
private readonly HmiNozzleGlyph _nozzleGlyph;
private bool _commandOn;
private bool _readOn;
private HmiNozzleState _state = HmiNozzleState.Operante;
private bool _allowCommand = true;
public event EventHandler NozzleClick;
public HmiNozzleCard()
{
SetStyle(
ControlStyles.AllPaintingInWmPaint |
ControlStyles.UserPaint |
ControlStyles.OptimizedDoubleBuffer |
ControlStyles.ResizeRedraw,
true);
DoubleBuffered = true;
BackColor = HmiTheme.SurfaceRaised;
Margin = new Padding(2);
Padding = new Padding(4);
MinimumSize = new Size(52, 150);
Cursor = Cursors.Hand;
TableLayoutPanel root = new TableLayoutPanel
{
Dock = DockStyle.Fill,
ColumnCount = 1,
RowCount = 6,
BackColor = Color.Transparent,
Margin = Padding.Empty,
Padding = Padding.Empty
};
root.ColumnStyles.Clear();
root.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
root.RowStyles.Add(new RowStyle(SizeType.Absolute, 19F)); // código
root.RowStyles.Add(new RowStyle(SizeType.Absolute, 48F)); // ícone
root.RowStyles.Add(new RowStyle(SizeType.Percent, 25F));
root.RowStyles.Add(new RowStyle(SizeType.Percent, 25F));
root.RowStyles.Add(new RowStyle(SizeType.Percent, 25F));
root.RowStyles.Add(new RowStyle(SizeType.Percent, 25F));
_lblCodigo = MakeLabel("B01", 8F, FontStyle.Bold, HmiTheme.Text, ContentAlignment.MiddleCenter);
_lblCodigo.AutoEllipsis = false;
_lblCodigo.TextAlign = ContentAlignment.MiddleCenter;
_lblAtuacoes = MakeLabel("At 0", 5.7F, FontStyle.Regular, HmiTheme.TextMuted, ContentAlignment.MiddleLeft);
_lblVazaoInst = MakeLabel("In 0 mL/s", 5.7F, FontStyle.Regular, HmiTheme.TextMuted, ContentAlignment.MiddleLeft);
_lblVazaoMedia = MakeLabel("Md 0 mL/s", 5.7F, FontStyle.Regular, HmiTheme.TextMuted, ContentAlignment.MiddleLeft);
_lblTempo = MakeLabel("00:00", 5.7F, FontStyle.Regular, HmiTheme.TextMuted, ContentAlignment.MiddleLeft);
_nozzleGlyph = new HmiNozzleGlyph
{
Dock = DockStyle.Fill,
BackColor = Color.Transparent,
Margin = Padding.Empty,
CommandOn = false,
ReadOn = false
};
root.Controls.Add(_lblCodigo, 0, 0);
root.Controls.Add(_nozzleGlyph, 0, 1);
root.Controls.Add(_lblAtuacoes, 0, 2);
root.Controls.Add(_lblVazaoInst, 0, 3);
root.Controls.Add(_lblVazaoMedia, 0, 4);
root.Controls.Add(_lblTempo, 0, 5);
Controls.Add(root);
root.BringToFront();
root.PerformLayout();
_lblCodigo.BringToFront();
_nozzleGlyph.BringToFront();
Click += HandleClick;
Resize += delegate
{
root.PerformLayout();
_nozzleGlyph.Invalidate();
};
root.Click += HandleClick;
_lblCodigo.Click += HandleClick;
_lblAtuacoes.Click += HandleClick;
_lblVazaoInst.Click += HandleClick;
_lblVazaoMedia.Click += HandleClick;
_lblTempo.Click += HandleClick;
_nozzleGlyph.Click += HandleClick;
}
private static Label MakeLabel(
string text,
float size,
FontStyle style,
Color color,
ContentAlignment align)
{
return new Label
{
Dock = DockStyle.Fill,
BackColor = Color.Transparent,
ForeColor = color,
Font = new Font("Segoe UI", size, style),
Text = text,
TextAlign = align,
AutoEllipsis = true,
AutoSize = false,
UseMnemonic = false,
Margin = Padding.Empty
};
}
private void HandleClick(object sender, EventArgs e)
{
if (!_allowCommand)
return;
if (NozzleClick != null)
NozzleClick(this, EventArgs.Empty);
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
Color border = GetStateColor(_state);
using (Pen glow = new Pen(
Color.FromArgb(45, border.R, border.G, border.B),
4F))
{
e.Graphics.DrawRectangle(
glow,
2,
2,
Math.Max(1, Width - 5),
Math.Max(1, Height - 5));
}
using (Pen pen = new Pen(border, 1.3F))
{
e.Graphics.DrawRectangle(
pen,
0,
0,
Math.Max(1, Width - 1),
Math.Max(1, Height - 1));
}
}
private static Color GetStateColor(HmiNozzleState state)
{
switch (state)
{
case HmiNozzleState.Desconectado:
return HmiTheme.TextMuted;
case HmiNozzleState.Conectado:
return HmiTheme.Info;
case HmiNozzleState.Falha:
return HmiTheme.Danger;
case HmiNozzleState.Alerta:
return HmiTheme.Warning;
case HmiNozzleState.Operante:
default:
return HmiTheme.Success;
}
}
[Category("Conteúdo")]
public string Codigo
{
get { return _lblCodigo.Text; }
set { _lblCodigo.Text = value ?? string.Empty; }
}
[Category("Estado")]
public HmiNozzleState State
{
get { return _state; }
set
{
_state = value;
Invalidate();
}
}
[Category("Estado")]
public bool CommandOn
{
get { return _commandOn; }
set
{
if (_commandOn == value)
return;
_commandOn = value;
_nozzleGlyph.CommandOn = value;
Invalidate();
}
}
[Category("Estado")]
public bool ReadOn
{
get { return _readOn; }
set
{
if (_readOn == value)
return;
_readOn = value;
_nozzleGlyph.ReadOn = value;
Invalidate();
}
}
[Category("Comportamento")]
public bool AllowCommand
{
get { return _allowCommand; }
set
{
_allowCommand = value;
Cursor = value
? Cursors.Hand
: Cursors.Default;
}
}
[Category("Conteúdo")]
public int Atuacoes
{
get
{
int value;
int.TryParse(_lblAtuacoes.Text.Replace("Atua. ", ""), out value);
return value;
}
set { _lblAtuacoes.Text = "Atu. " + value; }
}
[Category("Conteúdo")]
public double VazaoInstantanea
{
get { return 0D; }
set { _lblVazaoInst.Text = "Inst. " + value.ToString("0") + " mL/s"; }
}
[Category("Conteúdo")]
public double VazaoMedia
{
get { return 0D; }
set { _lblVazaoMedia.Text = "Méd. " + value.ToString("0") + " mL/s"; }
}
[Category("Conteúdo")]
public string TempoLigado
{
get { return _lblTempo.Text.Replace("Tempo ", ""); }
set { _lblTempo.Text = "Tempo " + (value ?? "00:00"); }
}
}
}

View File

@ -0,0 +1,261 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
namespace AgroBase.Forms.IHM.Controls.Operacao
{
public class HmiNozzleGlyph : Control
{
private bool _commandOn;
private bool _readOn;
public HmiNozzleGlyph()
{
SetStyle(
ControlStyles.UserPaint |
ControlStyles.AllPaintingInWmPaint |
ControlStyles.OptimizedDoubleBuffer |
ControlStyles.ResizeRedraw |
ControlStyles.SupportsTransparentBackColor,
true
);
DoubleBuffered = true;
BackColor = Color.Transparent;
MinimumSize = new Size(30, 45);
}
[Category("Estado")]
[DefaultValue(false)]
public bool CommandOn
{
get { return _commandOn; }
set
{
if (_commandOn == value)
return;
_commandOn = value;
Invalidate();
}
}
[Category("Estado")]
[DefaultValue(false)]
public bool ReadOn
{
get { return _readOn; }
set
{
if (_readOn == value)
return;
_readOn = value;
Invalidate();
}
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
Graphics g = e.Graphics;
g.SmoothingMode = SmoothingMode.AntiAlias;
g.PixelOffsetMode = PixelOffsetMode.HighQuality;
float larguraUtil = Math.Max(1F, Width - 8F);
float alturaUtil = Math.Max(1F, Height - 4F);
float escala = Math.Min(larguraUtil / 46F, alturaUtil / 52F);
escala = Math.Max(0.45F, Math.Min(1F, escala));
float cx = Width / 2F;
float alturaDesenho = 50F * escala;
float offsetY = Math.Max(0F, (Height - alturaDesenho) / 2F);
Color corDesligado =
Color.FromArgb(145, 155, 160);
Color corJatoDesligado =
Color.FromArgb(68, 78, 83);
Color corCorpo =
_commandOn
? HmiTheme.Success
: corDesligado;
Color corJato =
_readOn
? HmiTheme.Success
: corJatoDesligado;
float topo = offsetY + 1F * escala;
float larguraTampa = 18F * escala;
float alturaTampa = 5F * escala;
float larguraCorpo = 10F * escala;
float alturaCorpo = 13F * escala;
RectangleF tampa = new RectangleF(
cx - larguraTampa / 2F,
topo,
larguraTampa,
alturaTampa
);
RectangleF corpo = new RectangleF(
cx - larguraCorpo / 2F,
tampa.Bottom,
larguraCorpo,
alturaCorpo
);
using (Pen pen =
new Pen(
corCorpo,
Math.Max(1.6F, 2.2F * escala)
))
using (SolidBrush preenchimento =
new SolidBrush(
Color.FromArgb(
_commandOn ? 120 : 0,
corCorpo
)
))
{
if (_commandOn)
{
g.FillRectangle(
preenchimento,
tampa
);
g.FillRectangle(
preenchimento,
corpo
);
}
g.DrawRectangle(
pen,
tampa.X,
tampa.Y,
tampa.Width,
tampa.Height
);
g.DrawRectangle(
pen,
corpo.X,
corpo.Y,
corpo.Width,
corpo.Height
);
float baseY =
corpo.Bottom;
float abertura =
9F * escala;
g.DrawLine(
pen,
cx - abertura,
baseY,
cx + abertura,
baseY
);
g.DrawLine(
pen,
cx - abertura,
baseY,
cx - 13F * escala,
baseY + 6F * escala
);
g.DrawLine(
pen,
cx + abertura,
baseY,
cx + 13F * escala,
baseY + 6F * escala
);
}
float gotasY =
corpo.Bottom +
13F * escala;
using (SolidBrush brush =
new SolidBrush(corJato))
{
DesenharGota(
g,
brush,
cx - 13F * escala,
gotasY,
3F * escala
);
DesenharGota(
g,
brush,
cx - 6F * escala,
gotasY + 5F * escala,
3F * escala
);
DesenharGota(
g,
brush,
cx,
gotasY + 1F * escala,
3F * escala
);
DesenharGota(
g,
brush,
cx + 6F * escala,
gotasY + 5F * escala,
3F * escala
);
DesenharGota(
g,
brush,
cx + 13F * escala,
gotasY,
3F * escala
);
}
}
private static void DesenharGota(
Graphics g,
Brush brush,
float x,
float y,
float raio)
{
using (GraphicsPath path =
new GraphicsPath())
{
path.AddEllipse(
x - raio,
y - raio,
raio * 2F,
raio * 2F
);
g.FillPath(
brush,
path
);
}
}
}
}

View File

@ -0,0 +1,106 @@

using System;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
namespace AgroBase.Forms.IHM.Controls
{
[DefaultEvent("Click")]
public class HmiOperationTabButton : Control
{
private bool _selected;
private string _iconText = "•";
private Color _accentColor = HmiTheme.Info;
public HmiOperationTabButton()
{
SetStyle(ControlStyles.UserPaint |
ControlStyles.AllPaintingInWmPaint |
ControlStyles.OptimizedDoubleBuffer |
ControlStyles.ResizeRedraw |
ControlStyles.SupportsTransparentBackColor, true);
BackColor = Color.Transparent;
ForeColor = HmiTheme.TextMuted;
Cursor = Cursors.Hand;
Font = new Font("Segoe UI", 9F, FontStyle.Bold);
MinimumSize = new Size(120, 40);
UpdateStyles();
}
[Category("Conteúdo")]
public string IconText
{
get { return _iconText; }
set { _iconText = value ?? string.Empty; Invalidate(); }
}
[Category("Aparência")]
public Color AccentColor
{
get { return _accentColor; }
set { _accentColor = value; Invalidate(); }
}
[Category("Estado")]
public bool Selected
{
get { return _selected; }
set
{
_selected = value;
ForeColor = value ? HmiTheme.Text : HmiTheme.TextMuted;
Invalidate();
}
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
Rectangle r = new Rectangle(0, 0, Width - 1, Height - 1);
using (GraphicsPath path = Rounded(r, 9))
{
Color fill = _selected
? Color.FromArgb(42, _accentColor.R, _accentColor.G, _accentColor.B)
: HmiTheme.Surface;
using (SolidBrush brush = new SolidBrush(fill))
e.Graphics.FillPath(brush, path);
using (Pen pen = new Pen(_selected ? _accentColor : HmiTheme.Border, _selected ? 1.6F : 1F))
e.Graphics.DrawPath(pen, path);
}
Rectangle iconRect = new Rectangle(10, 0, 30, Height);
Rectangle textRect = new Rectangle(43, 0, Width - 52, Height);
TextRenderer.DrawText(
e.Graphics, _iconText,
new Font("Segoe UI Symbol", 12F, FontStyle.Bold),
iconRect,
_selected ? _accentColor : HmiTheme.TextMuted,
TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter | TextFormatFlags.NoPadding);
TextRenderer.DrawText(
e.Graphics, Text, Font, textRect, ForeColor,
TextFormatFlags.Left | TextFormatFlags.VerticalCenter |
TextFormatFlags.EndEllipsis | TextFormatFlags.NoPadding);
}
private static GraphicsPath Rounded(Rectangle r, int radius)
{
GraphicsPath p = new GraphicsPath();
int d = radius * 2;
p.AddArc(r.Left, r.Top, d, d, 180, 90);
p.AddArc(r.Right - d, r.Top, d, d, 270, 90);
p.AddArc(r.Right - d, r.Bottom - d, d, d, 0, 90);
p.AddArc(r.Left, r.Bottom - d, d, d, 90, 90);
p.CloseFigure();
return p;
}
}
}

View File

@ -0,0 +1,95 @@
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace AgroBase.Forms.IHM.Controls.Operacao
{
public class HmiParameterToggleRow : UserControl
{
private readonly Label _lblTitulo;
private readonly CheckBox _chkValor;
public HmiParameterToggleRow()
{
DoubleBuffered = true;
BackColor = HmiTheme.SurfaceRaised;
Height = 30;
Margin = new Padding(0, 0, 0, 3);
Padding = new Padding(7, 0, 7, 0);
_chkValor = new CheckBox
{
Appearance = Appearance.Button,
AutoSize = false,
Dock = DockStyle.Right,
Width = 44,
Checked = true,
FlatStyle = FlatStyle.Flat,
//FlatAppearance.BorderColor = HmiTheme.Success,
BackColor = Color.FromArgb(31, 91, 43),
ForeColor = HmiTheme.Text,
Text = "ON",
TextAlign = ContentAlignment.MiddleCenter,
Font = new Font("Segoe UI", 7F, FontStyle.Bold),
UseVisualStyleBackColor = false
};
_lblTitulo = new Label
{
Dock = DockStyle.Fill,
BackColor = Color.Transparent,
ForeColor = HmiTheme.TextMuted,
Font = new Font("Segoe UI", 7.4F),
Text = "Parâmetro",
TextAlign = ContentAlignment.MiddleLeft,
AutoEllipsis = true
};
Controls.Add(_lblTitulo);
Controls.Add(_chkValor);
_chkValor.CheckedChanged += delegate
{
AtualizarEstadoVisual();
};
AtualizarEstadoVisual();
}
private void AtualizarEstadoVisual()
{
if (_chkValor.Checked)
{
_chkValor.Text = "ON";
_chkValor.BackColor = Color.FromArgb(31, 91, 43);
_chkValor.FlatAppearance.BorderColor = HmiTheme.Success;
}
else
{
_chkValor.Text = "OFF";
_chkValor.BackColor = HmiTheme.Surface;
_chkValor.FlatAppearance.BorderColor = HmiTheme.Border;
}
}
[Category("Conteúdo")]
public string Titulo
{
get { return _lblTitulo.Text; }
set { _lblTitulo.Text = value ?? string.Empty; }
}
[Category("Dados")]
public bool Checked
{
get { return _chkValor.Checked; }
set { _chkValor.Checked = value; }
}
[Browsable(false)]
public CheckBox CheckBox
{
get { return _chkValor; }
}
}
}

View File

@ -0,0 +1,131 @@
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace AgroBase.Forms.IHM.Controls.Operacao
{
public class HmiParameterValueBox : UserControl
{
private readonly Label _lblTitulo;
private readonly Label _lblUnidade;
private readonly NumericUpDown _numeric;
public HmiParameterValueBox()
{
DoubleBuffered = true;
BackColor = HmiTheme.SurfaceRaised;
Margin = new Padding(2);
Padding = new Padding(7, 5, 7, 5);
MinimumSize = new Size(105, 66);
_lblTitulo = new Label
{
Dock = DockStyle.Top,
Height = 23,
BackColor = Color.Transparent,
ForeColor = HmiTheme.TextMuted,
Font = new Font("Segoe UI", 7F),
Text = "Parâmetro",
TextAlign = ContentAlignment.MiddleLeft,
AutoEllipsis = true
};
_lblUnidade = new Label
{
Dock = DockStyle.Right,
Width = 34,
BackColor = Color.Transparent,
ForeColor = HmiTheme.TextMuted,
Font = new Font("Segoe UI", 7F),
Text = "%",
TextAlign = ContentAlignment.MiddleCenter
};
_numeric = new NumericUpDown
{
Dock = DockStyle.Fill,
BackColor = HmiTheme.Surface,
ForeColor = HmiTheme.Text,
BorderStyle = BorderStyle.FixedSingle,
DecimalPlaces = 0,
Minimum = 0,
Maximum = 100,
Value = 0,
TextAlign = HorizontalAlignment.Center,
Font = new Font("Segoe UI", 9F, FontStyle.Bold)
};
Panel inputHost = new Panel
{
Dock = DockStyle.Fill,
BackColor = Color.Transparent,
Padding = Padding.Empty
};
inputHost.Controls.Add(_numeric);
inputHost.Controls.Add(_lblUnidade);
Controls.Add(inputHost);
Controls.Add(_lblTitulo);
}
[Category("Conteúdo")]
public string Titulo
{
get { return _lblTitulo.Text; }
set { _lblTitulo.Text = value ?? string.Empty; }
}
[Category("Conteúdo")]
public string Unidade
{
get { return _lblUnidade.Text; }
set { _lblUnidade.Text = value ?? string.Empty; }
}
[Category("Dados")]
public decimal Valor
{
get { return _numeric.Value; }
set
{
decimal ajustado = value;
if (ajustado < _numeric.Minimum)
ajustado = _numeric.Minimum;
if (ajustado > _numeric.Maximum)
ajustado = _numeric.Maximum;
_numeric.Value = ajustado;
}
}
[Category("Dados")]
public decimal Minimo
{
get { return _numeric.Minimum; }
set { _numeric.Minimum = value; }
}
[Category("Dados")]
public decimal Maximo
{
get { return _numeric.Maximum; }
set { _numeric.Maximum = value; }
}
[Category("Dados")]
public int CasasDecimais
{
get { return _numeric.DecimalPlaces; }
set { _numeric.DecimalPlaces = value; }
}
[Browsable(false)]
public NumericUpDown Numeric
{
get { return _numeric; }
}
}
}

View File

@ -0,0 +1,184 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
namespace AgroBase.Forms.IHM.Controls.Operacao
{
public class HmiProgressBar : Control
{
private int _minimum;
private int _maximum = 100;
private int _value;
private Color _barColor = HmiTheme.Success;
private Color _trackColor = Color.FromArgb(38, 48, 54);
private int _cornerRadius = 6;
public HmiProgressBar()
{
SetStyle(
ControlStyles.UserPaint |
ControlStyles.AllPaintingInWmPaint |
ControlStyles.OptimizedDoubleBuffer |
ControlStyles.ResizeRedraw |
ControlStyles.SupportsTransparentBackColor,
true);
DoubleBuffered = true;
BackColor = Color.Transparent;
Height = 14;
MinimumSize = new Size(80, 10);
}
[Category("Dados")]
[DefaultValue(0)]
public int Minimum
{
get { return _minimum; }
set
{
_minimum = value;
if (_maximum <= _minimum)
_maximum = _minimum + 1;
Value = _value;
Invalidate();
}
}
[Category("Dados")]
[DefaultValue(100)]
public int Maximum
{
get { return _maximum; }
set
{
_maximum = Math.Max(_minimum + 1, value);
Value = _value;
Invalidate();
}
}
[Category("Dados")]
[DefaultValue(0)]
public int Value
{
get { return _value; }
set
{
_value = Math.Max(_minimum, Math.Min(_maximum, value));
Invalidate();
}
}
[Category("Aparência")]
public Color BarColor
{
get { return _barColor; }
set
{
_barColor = value;
Invalidate();
}
}
[Category("Aparência")]
public Color TrackColor
{
get { return _trackColor; }
set
{
_trackColor = value;
Invalidate();
}
}
[Category("Aparência")]
[DefaultValue(6)]
public int CornerRadius
{
get { return _cornerRadius; }
set
{
_cornerRadius = Math.Max(0, value);
Invalidate();
}
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
Rectangle bounds = new Rectangle(
0,
1,
Math.Max(1, Width - 1),
Math.Max(1, Height - 3));
using (GraphicsPath trackPath = RoundedPath(bounds, _cornerRadius))
using (SolidBrush trackBrush = new SolidBrush(_trackColor))
{
e.Graphics.FillPath(trackBrush, trackPath);
}
double fraction =
(_value - _minimum) /
(double)(_maximum - _minimum);
int fillWidth =
(int)Math.Round(bounds.Width * fraction);
if (fillWidth <= 0)
return;
Rectangle fill = new Rectangle(
bounds.Left,
bounds.Top,
Math.Max(1, fillWidth),
bounds.Height);
using (GraphicsPath fillPath = RoundedPath(fill, _cornerRadius))
using (SolidBrush fillBrush = new SolidBrush(_barColor))
{
e.Graphics.FillPath(fillBrush, fillPath);
}
}
private static GraphicsPath RoundedPath(Rectangle bounds, int radius)
{
GraphicsPath path = new GraphicsPath();
if (radius <= 0)
{
path.AddRectangle(bounds);
path.CloseFigure();
return path;
}
int diameter =
Math.Min(radius * 2, Math.Min(bounds.Width, bounds.Height));
Rectangle arc =
new Rectangle(bounds.Left, bounds.Top, diameter, diameter);
path.AddArc(arc, 180, 90);
arc.X = bounds.Right - diameter;
path.AddArc(arc, 270, 90);
arc.Y = bounds.Bottom - diameter;
path.AddArc(arc, 0, 90);
arc.X = bounds.Left;
path.AddArc(arc, 90, 90);
path.CloseFigure();
return path;
}
}
}

View File

@ -29,7 +29,7 @@ namespace AgroBase.Forms.IHM.Controls
DoubleBuffered = true;
BackColor = Color.Transparent;
Padding = new Padding(12);
MinimumSize = new Size(30, 30);
MinimumSize = new Size(30, 25);
}
[Category("Aparência")]

View File

@ -30,7 +30,7 @@ namespace AgroBase.Forms.IHM.Controls
BackColor = Color.Transparent;
Cursor = Cursors.Hand;
Height = 38;
MinimumSize = new Size(130, 36);
MinimumSize = new Size(60, 34);
Margin = new Padding(0, 2, 0, 2);
Padding = Padding.Empty;
@ -111,11 +111,25 @@ namespace AgroBase.Forms.IHM.Controls
}
[Category("Conteúdo")]
[DefaultValue("●")]
public string IconText
{
get { return _lblIcone.Text; }
set { _lblIcone.Text = value ?? string.Empty; }
get
{
return _lblIcone.Text;
}
set
{
string texto = value ?? string.Empty;
bool possuiIcone = !string.IsNullOrWhiteSpace(texto);
_lblIcone.Text = texto;
_lblIcone.Visible = possuiIcone;
_layout.ColumnStyles[0].SizeType = SizeType.Absolute;
_layout.ColumnStyles[0].Width = possuiIcone ? 32F : 0F;
_layout.Padding = possuiIcone ? new Padding(9, 2, 10, 2) : new Padding(10, 2, 10, 2);
_lblTexto.TextAlign = possuiIcone ? ContentAlignment.MiddleLeft : ContentAlignment.MiddleCenter;
_layout.PerformLayout();
Invalidate();
}
}
[Category("Aparência")]

View File

@ -0,0 +1,302 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
namespace AgroBase.Forms.IHM.Controls.Operacao
{
[DefaultEvent("ValueChanged")]
public class HmiSlider : Control
{
private int _minimum = 0;
private int _maximum = 100;
private int _value = 0;
private bool _dragging;
private Color _accentColor = HmiTheme.Info;
private Color _trackColor = HmiTheme.Border;
private Color _thumbColor = HmiTheme.Text;
private int _thumbRadius = 8;
private int _trackHeight = 5;
public event EventHandler ValueChanged;
public HmiSlider()
{
SetStyle(
ControlStyles.UserPaint |
ControlStyles.AllPaintingInWmPaint |
ControlStyles.OptimizedDoubleBuffer |
ControlStyles.ResizeRedraw |
ControlStyles.Selectable |
ControlStyles.SupportsTransparentBackColor,
true
);
DoubleBuffered = true;
BackColor = Color.Transparent;
Cursor = Cursors.Hand;
TabStop = true;
MinimumSize = new Size(80, 26);
Size = new Size(180, 30);
}
[Category("Dados")]
[DefaultValue(0)]
public int Minimum
{
get { return _minimum; }
set
{
_minimum = value;
if (_maximum <= _minimum)
_maximum = _minimum + 1;
Value = _value;
Invalidate();
}
}
[Category("Dados")]
[DefaultValue(100)]
public int Maximum
{
get { return _maximum; }
set
{
_maximum = value;
if (_maximum <= _minimum)
_maximum = _minimum + 1;
Value = _value;
Invalidate();
}
}
[Category("Dados")]
[DefaultValue(0)]
public int Value
{
get { return _value; }
set
{
int novo = Math.Max(_minimum, Math.Min(_maximum, value));
if (_value == novo)
return;
_value = novo;
Invalidate();
if (ValueChanged != null)
ValueChanged(this, EventArgs.Empty);
}
}
[Category("Aparência")]
public Color AccentColor
{
get { return _accentColor; }
set
{
_accentColor = value;
Invalidate();
}
}
[Category("Aparência")]
public Color TrackColor
{
get { return _trackColor; }
set
{
_trackColor = value;
Invalidate();
}
}
[Category("Aparência")]
public Color ThumbColor
{
get { return _thumbColor; }
set
{
_thumbColor = value;
Invalidate();
}
}
[Category("Aparência")]
[DefaultValue(8)]
public int ThumbRadius
{
get { return _thumbRadius; }
set
{
_thumbRadius = Math.Max(5, value);
Invalidate();
}
}
[Category("Aparência")]
[DefaultValue(5)]
public int TrackHeight
{
get { return _trackHeight; }
set
{
_trackHeight = Math.Max(2, value);
Invalidate();
}
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
int margem = _thumbRadius + 2;
int y = Height / 2;
int larguraUtil = Math.Max(1, Width - (margem * 2));
float frac = (_value - _minimum) / (float)(_maximum - _minimum);
int thumbX = margem + (int)Math.Round(larguraUtil * frac);
Rectangle trilho = new Rectangle(
margem,
y - (_trackHeight / 2),
larguraUtil,
_trackHeight);
using (GraphicsPath path = RoundedRect(trilho, _trackHeight))
using (SolidBrush brush = new SolidBrush(_trackColor))
e.Graphics.FillPath(brush, path);
Rectangle preenchido = new Rectangle(
margem,
y - (_trackHeight / 2),
Math.Max(1, thumbX - margem),
_trackHeight);
using (GraphicsPath path = RoundedRect(preenchido, _trackHeight))
using (SolidBrush brush = new SolidBrush(_accentColor))
e.Graphics.FillPath(brush, path);
using (SolidBrush glow = new SolidBrush(Color.FromArgb(
55,
_accentColor.R,
_accentColor.G,
_accentColor.B)))
{
e.Graphics.FillEllipse(
glow,
thumbX - _thumbRadius - 4,
y - _thumbRadius - 4,
(_thumbRadius + 4) * 2,
(_thumbRadius + 4) * 2);
}
using (SolidBrush brush = new SolidBrush(_thumbColor))
using (Pen pen = new Pen(_accentColor, 2F))
{
Rectangle thumb = new Rectangle(
thumbX - _thumbRadius,
y - _thumbRadius,
_thumbRadius * 2,
_thumbRadius * 2);
e.Graphics.FillEllipse(brush, thumb);
e.Graphics.DrawEllipse(pen, thumb);
}
if (Focused)
{
using (Pen pen = new Pen(Color.FromArgb(110, _accentColor), 1F))
{
pen.DashStyle = DashStyle.Dot;
e.Graphics.DrawRectangle(
pen,
1,
1,
Width - 3,
Height - 3);
}
}
}
protected override void OnMouseDown(MouseEventArgs e)
{
base.OnMouseDown(e);
Focus();
_dragging = true;
AtualizarPorX(e.X);
}
protected override void OnMouseMove(MouseEventArgs e)
{
base.OnMouseMove(e);
if (_dragging)
AtualizarPorX(e.X);
}
protected override void OnMouseUp(MouseEventArgs e)
{
base.OnMouseUp(e);
_dragging = false;
}
protected override void OnKeyDown(KeyEventArgs e)
{
base.OnKeyDown(e);
if (e.KeyCode == Keys.Left || e.KeyCode == Keys.Down)
{
Value--;
e.Handled = true;
}
else if (e.KeyCode == Keys.Right || e.KeyCode == Keys.Up)
{
Value++;
e.Handled = true;
}
else if (e.KeyCode == Keys.Home)
{
Value = Minimum;
e.Handled = true;
}
else if (e.KeyCode == Keys.End)
{
Value = Maximum;
e.Handled = true;
}
}
private void AtualizarPorX(int x)
{
int margem = _thumbRadius + 2;
int larguraUtil = Math.Max(1, Width - (margem * 2));
float frac = (x - margem) / (float)larguraUtil;
frac = Math.Max(0F, Math.Min(1F, frac));
Value = _minimum +
(int)Math.Round((_maximum - _minimum) * frac);
}
private static GraphicsPath RoundedRect(Rectangle bounds, int radius)
{
GraphicsPath path = new GraphicsPath();
int d = Math.Max(2, Math.Min(radius * 2, Math.Min(bounds.Width, bounds.Height)));
path.AddArc(bounds.Left, bounds.Top, d, d, 180, 90);
path.AddArc(bounds.Right - d, bounds.Top, d, d, 270, 90);
path.AddArc(bounds.Right - d, bounds.Bottom - d, d, d, 0, 90);
path.AddArc(bounds.Left, bounds.Bottom - d, d, d, 90, 90);
path.CloseFigure();
return path;
}
}
}

View File

@ -0,0 +1,193 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
namespace AgroBase.Forms.IHM.Controls.Operacao
{
public class HmiRadarObstacle
{
public HmiRadarObstacle(float lateralM, float frontalM, bool critical)
{
LateralM = lateralM;
FrontalM = frontalM;
Critical = critical;
}
public float LateralM { get; set; }
public float FrontalM { get; set; }
public bool Critical { get; set; }
}
public class HmiSonarRadarControl : Control
{
private readonly List<HmiRadarObstacle> _obstacles =
new List<HmiRadarObstacle>();
private float _maxDistanceM = 3F;
private Color _accentColor = HmiTheme.Info;
public HmiSonarRadarControl()
{
SetStyle(
ControlStyles.UserPaint |
ControlStyles.AllPaintingInWmPaint |
ControlStyles.OptimizedDoubleBuffer |
ControlStyles.ResizeRedraw,
true);
DoubleBuffered = true;
BackColor = HmiTheme.SurfaceRaised;
MinimumSize = new Size(100, 100);
_obstacles.Add(new HmiRadarObstacle(0F, 1.8F, true));
}
[Category("Dados")]
[DefaultValue(3F)]
public float MaxDistanceM
{
get { return _maxDistanceM; }
set
{
_maxDistanceM = Math.Max(0.5F, value);
Invalidate();
}
}
[Category("Aparência")]
public Color AccentColor
{
get { return _accentColor; }
set
{
_accentColor = value;
Invalidate();
}
}
[Browsable(false)]
public IList<HmiRadarObstacle> Obstacles
{
get { return _obstacles; }
}
public void SetObstacles(IEnumerable<HmiRadarObstacle> obstacles)
{
_obstacles.Clear();
if (obstacles != null)
_obstacles.AddRange(obstacles);
Invalidate();
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
e.Graphics.Clear(BackColor);
int side = Math.Min(Width - 12, Height - 12);
Rectangle radar = new Rectangle(
(Width - side) / 2,
(Height - side) / 2,
side,
side);
PointF center = new PointF(
radar.Left + radar.Width / 2F,
radar.Bottom - 7F);
using (Pen gridPen = new Pen(Color.FromArgb(70, HmiTheme.TextMuted), 1F))
{
for (int i = 1; i <= 3; i++)
{
float r = (radar.Width / 2F) * i / 3F;
e.Graphics.DrawArc(
gridPen,
center.X - r,
center.Y - r,
r * 2F,
r * 2F,
180F,
180F);
}
e.Graphics.DrawLine(
gridPen,
center,
new PointF(center.X, radar.Top + 5));
e.Graphics.DrawLine(
gridPen,
center,
new PointF(radar.Left + 7, radar.Top + 7));
e.Graphics.DrawLine(
gridPen,
center,
new PointF(radar.Right - 7, radar.Top + 7));
}
using (Pen sectorPen = new Pen(Color.FromArgb(135, _accentColor), 1.4F))
{
e.Graphics.DrawArc(
sectorPen,
radar,
200F,
140F);
}
foreach (HmiRadarObstacle obstacle in _obstacles)
{
float frontal = Math.Max(0F, Math.Min(_maxDistanceM, obstacle.FrontalM));
float lateral = Math.Max(-_maxDistanceM, Math.Min(_maxDistanceM, obstacle.LateralM));
float escala = (radar.Width / 2F - 8F) / _maxDistanceM;
float x = center.X + lateral * escala;
float y = center.Y - frontal * escala;
Color color = obstacle.Critical
? HmiTheme.Danger
: HmiTheme.Warning;
using (SolidBrush glow = new SolidBrush(Color.FromArgb(
55,
color.R,
color.G,
color.B)))
{
e.Graphics.FillEllipse(glow, x - 9, y - 9, 18, 18);
}
using (SolidBrush brush = new SolidBrush(color))
e.Graphics.FillEllipse(brush, x - 4, y - 4, 8, 8);
}
using (SolidBrush rover = new SolidBrush(HmiTheme.Text))
e.Graphics.FillEllipse(rover, center.X - 5, center.Y - 5, 10, 10);
using (Font font = new Font("Segoe UI", 6.5F))
using (SolidBrush brush = new SolidBrush(HmiTheme.TextMuted))
{
for (int i = 1; i <= 3; i++)
{
string text = (_maxDistanceM * i / 3F).ToString("0.#") + " m";
float r = (radar.Width / 2F) * i / 3F;
e.Graphics.DrawString(
text,
font,
brush,
center.X + 4,
center.Y - r - 7);
}
}
}
}
}

View File

@ -0,0 +1,120 @@
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace AgroBase.Forms.IHM.Controls.Operacao
{
public class HmiSprayerModuleHealthRow : UserControl
{
private readonly Label _lblIcone;
private readonly Label _lblTitulo;
private readonly Label _lblSaude;
private readonly Label _lblStatus;
public HmiSprayerModuleHealthRow()
{
DoubleBuffered = true;
BackColor = HmiTheme.SurfaceRaised;
Height = 31;
MinimumSize = new Size(140, 29);
Margin = new Padding(0, 0, 0, 3);
Padding = new Padding(5, 0, 5, 0);
_lblIcone = new Label
{
Dock = DockStyle.Left,
Width = 18,
BackColor = Color.Transparent,
ForeColor = HmiTheme.TextMuted,
Font = new Font("Segoe UI Symbol", 8F, FontStyle.Bold),
Text = "●",
TextAlign = ContentAlignment.MiddleCenter,
Margin = Padding.Empty
};
_lblStatus = new Label
{
Dock = DockStyle.Right,
Width = 50,
BackColor = Color.Transparent,
ForeColor = HmiTheme.Success,
Font = new Font("Segoe UI", 6.2F, FontStyle.Bold),
Text = "Operante",
TextAlign = ContentAlignment.MiddleRight,
AutoEllipsis = true,
AutoSize = false,
Margin = Padding.Empty
};
_lblSaude = new Label
{
Dock = DockStyle.Right,
Width = 34,
BackColor = Color.Transparent,
ForeColor = HmiTheme.Success,
Font = new Font("Segoe UI", 6.5F, FontStyle.Bold),
Text = "100%",
TextAlign = ContentAlignment.MiddleRight,
AutoSize = false,
Margin = Padding.Empty
};
_lblTitulo = new Label
{
Dock = DockStyle.Fill,
BackColor = Color.Transparent,
ForeColor = HmiTheme.Text,
Font = new Font("Segoe UI", 6.7F),
Text = "Módulo",
TextAlign = ContentAlignment.MiddleLeft,
AutoEllipsis = true,
AutoSize = false,
Margin = Padding.Empty
};
Controls.Add(_lblTitulo);
Controls.Add(_lblStatus);
Controls.Add(_lblSaude);
Controls.Add(_lblIcone);
}
[Category("Conteúdo")]
public string IconText
{
get { return _lblIcone.Text; }
set { _lblIcone.Text = value ?? string.Empty; }
}
[Category("Conteúdo")]
public string Titulo
{
get { return _lblTitulo.Text; }
set { _lblTitulo.Text = value ?? string.Empty; }
}
[Category("Conteúdo")]
public string Saude
{
get { return _lblSaude.Text; }
set { _lblSaude.Text = value ?? string.Empty; }
}
[Category("Conteúdo")]
public string Status
{
get { return _lblStatus.Text; }
set { _lblStatus.Text = value ?? string.Empty; }
}
[Category("Aparência")]
public Color StatusColor
{
get { return _lblStatus.ForeColor; }
set
{
_lblStatus.ForeColor = value;
_lblSaude.ForeColor = value;
}
}
}
}

View File

@ -0,0 +1,106 @@
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace AgroBase.Forms.IHM.Controls.Operacao
{
public class HmiSprayerTelemetryRow : UserControl
{
private readonly Label _lblIcone;
private readonly Label _lblTitulo;
private readonly Label _lblValor;
private readonly Panel _separator;
public HmiSprayerTelemetryRow()
{
DoubleBuffered = true;
BackColor = HmiTheme.Surface;
Height = 29;
MinimumSize = new Size(150, 27);
Margin = Padding.Empty;
Padding = new Padding(4, 0, 4, 1);
_separator = new Panel
{
Dock = DockStyle.Bottom,
Height = 1,
BackColor = HmiTheme.Border
};
_lblIcone = new Label
{
Dock = DockStyle.Left,
Width = 26,
BackColor = Color.Transparent,
ForeColor = HmiTheme.Info,
Font = new Font("Segoe UI Symbol", 8F, FontStyle.Bold),
Text = "●",
TextAlign = ContentAlignment.MiddleCenter
};
_lblValor = new Label
{
Dock = DockStyle.Right,
Width = 92,
BackColor = Color.Transparent,
ForeColor = HmiTheme.Text,
Font = new Font("Segoe UI", 7.2F, FontStyle.Bold),
Text = "0",
TextAlign = ContentAlignment.MiddleRight,
AutoEllipsis = true
};
_lblTitulo = new Label
{
Dock = DockStyle.Fill,
BackColor = Color.Transparent,
ForeColor = HmiTheme.TextMuted,
Font = new Font("Segoe UI", 6.8F),
Text = "Telemetria",
TextAlign = ContentAlignment.MiddleLeft,
AutoEllipsis = true,
AutoSize = false
};
Controls.Add(_lblTitulo);
Controls.Add(_lblValor);
Controls.Add(_lblIcone);
Controls.Add(_separator);
}
[Category("Conteúdo")]
public string IconText
{
get { return _lblIcone.Text; }
set { _lblIcone.Text = value ?? string.Empty; }
}
[Category("Conteúdo")]
public string Titulo
{
get { return _lblTitulo.Text; }
set { _lblTitulo.Text = value ?? string.Empty; }
}
[Category("Conteúdo")]
public string Valor
{
get { return _lblValor.Text; }
set { _lblValor.Text = value ?? string.Empty; }
}
[Category("Aparência")]
public Color CorValor
{
get { return _lblValor.ForeColor; }
set { _lblValor.ForeColor = value; }
}
[Category("Aparência")]
public Color CorIcone
{
get { return _lblIcone.ForeColor; }
set { _lblIcone.ForeColor = value; }
}
}
}

View File

@ -0,0 +1,108 @@
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace AgroBase.Forms.IHM.Controls.Operacao
{
public class HmiTelemetryRow : UserControl
{
private readonly Label _lblIcone;
private readonly Label _lblTitulo;
private readonly Label _lblValor;
private readonly Panel _separator;
public HmiTelemetryRow()
{
DoubleBuffered = true;
BackColor = HmiTheme.Surface;
Height = 25;
MinimumSize = new Size(130, 23);
Margin = Padding.Empty;
Padding = new Padding(3, 0, 3, 1);
_separator = new Panel
{
Dock = DockStyle.Bottom,
Height = 1,
BackColor = HmiTheme.Border
};
_lblIcone = new Label
{
Dock = DockStyle.Left,
Width = 21,
BackColor = Color.Transparent,
ForeColor = HmiTheme.Info,
Font = new Font("Segoe UI Symbol", 8.4F, FontStyle.Bold),
Text = "●",
TextAlign = ContentAlignment.MiddleCenter,
Margin = Padding.Empty
};
_lblValor = new Label
{
Dock = DockStyle.Right,
Width = 82,
BackColor = Color.Transparent,
ForeColor = HmiTheme.Text,
Font = new Font("Segoe UI", 7.4F, FontStyle.Bold),
Text = "0",
TextAlign = ContentAlignment.MiddleRight,
AutoEllipsis = true,
Margin = Padding.Empty
};
_lblTitulo = new Label
{
Dock = DockStyle.Fill,
BackColor = Color.Transparent,
ForeColor = HmiTheme.TextMuted,
Font = new Font("Segoe UI", 6.8F),
Text = "Telemetria",
TextAlign = ContentAlignment.MiddleLeft,
AutoEllipsis = true,
Margin = Padding.Empty
};
Controls.Add(_lblTitulo);
Controls.Add(_lblValor);
Controls.Add(_lblIcone);
Controls.Add(_separator);
}
[Category("Conteúdo")]
public string IconText
{
get { return _lblIcone.Text; }
set { _lblIcone.Text = value ?? string.Empty; }
}
[Category("Conteúdo")]
public string Titulo
{
get { return _lblTitulo.Text; }
set { _lblTitulo.Text = value ?? string.Empty; }
}
[Category("Conteúdo")]
public string Valor
{
get { return _lblValor.Text; }
set { _lblValor.Text = value ?? string.Empty; }
}
[Category("Aparência")]
public Color CorValor
{
get { return _lblValor.ForeColor; }
set { _lblValor.ForeColor = value; }
}
[Category("Aparência")]
public Color CorIcone
{
get { return _lblIcone.ForeColor; }
set { _lblIcone.ForeColor = value; }
}
}
}

View File

@ -0,0 +1,443 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
namespace AgroBase.Forms.IHM.Controls.Operacao
{
public class HmiWheelStatusCard : UserControl
{
private readonly Label _lblTitulo;
private readonly CheckBox _chkDir;
private readonly Label _lblDirSp;
private readonly Label _lblDirAtual;
private readonly Label _lblDirStatus;
private readonly CheckBox _chkMov;
private readonly Label _lblMovSp;
private readonly Label _lblMovAtual;
private readonly Label _lblMovStatus;
private Color _borderColor = HmiTheme.Border;
public HmiWheelStatusCard()
{
SetStyle(
ControlStyles.AllPaintingInWmPaint |
ControlStyles.UserPaint |
ControlStyles.OptimizedDoubleBuffer |
ControlStyles.ResizeRedraw,
true
);
DoubleBuffered = true;
BackColor = HmiTheme.SurfaceRaised;
Margin = new Padding(2, 0, 2, 0);
Padding = new Padding(3);
MinimumSize = Size.Empty;
var root = new TableLayoutPanel
{
Dock = DockStyle.Fill,
BackColor = Color.Transparent,
ColumnCount = 1,
RowCount = 4,
Margin = Padding.Empty,
Padding = Padding.Empty
};
root.ColumnStyles.Add(
new ColumnStyle(SizeType.Percent, 100F)
);
// Título pequeno, liberando espaço para os dados.
root.RowStyles.Add(
new RowStyle(SizeType.Absolute, 18F)
);
root.RowStyles.Add(
new RowStyle(SizeType.Absolute, 1F)
);
root.RowStyles.Add(
new RowStyle(SizeType.Percent, 50F)
);
root.RowStyles.Add(
new RowStyle(SizeType.Percent, 50F)
);
_lblTitulo = new Label
{
Dock = DockStyle.Fill,
AutoSize = false,
AutoEllipsis = false,
UseMnemonic = false,
BackColor = Color.FromArgb(28, 34, 38),
ForeColor = HmiTheme.Text,
Font = new Font(
"Segoe UI",
7.8F,
FontStyle.Bold
),
Text = "EF",
TextAlign = ContentAlignment.MiddleCenter,
Margin = Padding.Empty,
Padding = Padding.Empty
};
var divisorTitulo = new Panel
{
Dock = DockStyle.Fill,
BackColor = HmiTheme.Border,
Margin = Padding.Empty
};
var pnlDir = CriarBloco(
"DIR",
HmiTheme.Manual,
out _chkDir,
out _lblDirSp,
out _lblDirAtual,
out _lblDirStatus
);
var pnlMov = CriarBloco(
"MOV",
HmiTheme.Info,
out _chkMov,
out _lblMovSp,
out _lblMovAtual,
out _lblMovStatus
);
_lblDirSp.Text = "SP +0,0°";
_lblDirAtual.Text = "AT +0,0°";
_lblDirStatus.Text = "Parado";
_lblDirStatus.ForeColor = HmiTheme.Success;
_lblMovSp.Text = "SP 0 rpm";
_lblMovAtual.Text = "AT 0 rpm";
_lblMovStatus.Text = "Sem freio";
_lblMovStatus.ForeColor = HmiTheme.TextMuted;
root.Controls.Add(_lblTitulo, 0, 0);
root.Controls.Add(divisorTitulo, 0, 1);
root.Controls.Add(pnlDir, 0, 2);
root.Controls.Add(pnlMov, 0, 3);
Controls.Add(root);
// Força os elementos críticos para frente.
_lblTitulo.BringToFront();
_chkDir.BringToFront();
_chkMov.BringToFront();
}
private static Panel CriarBloco(
string titulo,
Color corTitulo,
out CheckBox check,
out Label lblSp,
out Label lblAtual,
out Label lblStatus)
{
var panel = new Panel
{
Dock = DockStyle.Fill,
BackColor = Color.Transparent,
Margin = Padding.Empty,
Padding = new Padding(2, 1, 2, 1)
};
var layout = new TableLayoutPanel
{
Dock = DockStyle.Fill,
BackColor = Color.Transparent,
ColumnCount = 1,
RowCount = 4,
Margin = Padding.Empty,
Padding = Padding.Empty
};
layout.ColumnStyles.Add(
new ColumnStyle(SizeType.Percent, 100F)
);
layout.RowStyles.Add(
new RowStyle(SizeType.Absolute, 18F)
);
layout.RowStyles.Add(
new RowStyle(SizeType.Percent, 30F)
);
layout.RowStyles.Add(
new RowStyle(SizeType.Percent, 30F)
);
layout.RowStyles.Add(
new RowStyle(SizeType.Percent, 40F)
);
var header = new Panel
{
Dock = DockStyle.Fill,
BackColor = Color.Transparent,
Margin = Padding.Empty,
Padding = Padding.Empty
};
var lblTitulo = new Label
{
Dock = DockStyle.Fill,
AutoSize = false,
BackColor = Color.Transparent,
ForeColor = corTitulo,
Font = new Font(
"Segoe UI",
6.6F,
FontStyle.Bold
),
Text = titulo,
TextAlign = ContentAlignment.MiddleLeft,
Margin = Padding.Empty,
Padding = Padding.Empty
};
check = CriarCheck();
// Dock Right funciona melhor aqui que coluna estreita.
check.Dock = DockStyle.Right;
check.Width = 22;
header.Controls.Add(lblTitulo);
header.Controls.Add(check);
check.BringToFront();
lblSp = CriarLabelDado("SP 0");
lblAtual = CriarLabelDado("AT 0");
lblStatus = CriarLabelDado("Parado");
lblStatus.Font = new Font(
"Segoe UI",
5.8F,
FontStyle.Bold
);
layout.Controls.Add(header, 0, 0);
layout.Controls.Add(lblSp, 0, 1);
layout.Controls.Add(lblAtual, 0, 2);
layout.Controls.Add(lblStatus, 0, 3);
panel.Controls.Add(layout);
return panel;
}
private static Label CriarLabelDado(string texto)
{
return new Label
{
Dock = DockStyle.Fill,
AutoSize = false,
AutoEllipsis = false,
UseMnemonic = false,
BackColor = Color.Transparent,
ForeColor = HmiTheme.TextMuted,
Font = new Font(
"Segoe UI",
5.7F,
FontStyle.Regular
),
Text = texto,
TextAlign = ContentAlignment.MiddleLeft,
Margin = Padding.Empty,
Padding = Padding.Empty
};
}
private static CheckBox CriarCheck()
{
var check = new CheckBox
{
Appearance = Appearance.Button,
AutoSize = false,
Width = 22,
Height = 17,
Checked = true,
FlatStyle = FlatStyle.Flat,
BackColor = Color.FromArgb(30, 90, 46),
ForeColor = HmiTheme.Success,
Text = "✓",
TextAlign = ContentAlignment.MiddleCenter,
Font = new Font(
"Segoe UI Symbol",
6.2F,
FontStyle.Bold
),
Margin = Padding.Empty,
Padding = Padding.Empty,
Cursor = Cursors.Hand,
UseVisualStyleBackColor = false
};
check.FlatAppearance.BorderSize = 1;
check.FlatAppearance.BorderColor = HmiTheme.Success;
check.FlatAppearance.CheckedBackColor =
Color.FromArgb(30, 90, 46);
check.CheckedChanged += delegate
{
if (check.Checked)
{
check.Text = "✓";
check.ForeColor = HmiTheme.Success;
check.BackColor = Color.FromArgb(30, 90, 46);
check.FlatAppearance.BorderColor = HmiTheme.Success;
}
else
{
check.Text = "×";
check.ForeColor = HmiTheme.Danger;
check.BackColor = HmiTheme.Surface;
check.FlatAppearance.BorderColor = HmiTheme.Danger;
}
};
return check;
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
e.Graphics.SmoothingMode =
SmoothingMode.AntiAlias;
using (var pen = new Pen(_borderColor, 1F))
{
e.Graphics.DrawRectangle(
pen,
0,
0,
Math.Max(1, Width - 1),
Math.Max(1, Height - 1)
);
}
}
[Category("Conteúdo")]
public string Titulo
{
get { return _lblTitulo.Text; }
set
{
_lblTitulo.Text = value ?? string.Empty;
_lblTitulo.Invalidate();
_lblTitulo.BringToFront();
}
}
[Category("Conteúdo")]
public string DirecionalSp
{
get { return _lblDirSp.Text; }
set { _lblDirSp.Text = "SP " + (value ?? string.Empty); }
}
[Category("Conteúdo")]
public string DirecionalAtual
{
get { return _lblDirAtual.Text; }
set { _lblDirAtual.Text = "AT " + (value ?? string.Empty); }
}
[Category("Conteúdo")]
public string StatusDirecional
{
get { return _lblDirStatus.Text; }
set { _lblDirStatus.Text = value ?? string.Empty; }
}
[Category("Conteúdo")]
public string MovimentoSp
{
get { return _lblMovSp.Text; }
set { _lblMovSp.Text = "SP " + (value ?? string.Empty); }
}
[Category("Conteúdo")]
public string MovimentoAtual
{
get { return _lblMovAtual.Text; }
set { _lblMovAtual.Text = "AT " + (value ?? string.Empty); }
}
[Category("Conteúdo")]
public string StatusMovimento
{
get { return _lblMovStatus.Text; }
set { _lblMovStatus.Text = value ?? string.Empty; }
}
[Category("Aparência")]
public Color CorStatusDirecional
{
get { return _lblDirStatus.ForeColor; }
set { _lblDirStatus.ForeColor = value; }
}
[Category("Aparência")]
public Color CorStatusMovimento
{
get { return _lblMovStatus.ForeColor; }
set { _lblMovStatus.ForeColor = value; }
}
[Category("Aparência")]
public Color BorderColor
{
get { return _borderColor; }
set
{
_borderColor = value;
Invalidate();
}
}
[Browsable(false)]
public CheckBox CheckMov
{
get { return _chkMov; }
}
[Browsable(false)]
public CheckBox CheckDir
{
get { return _chkDir; }
}
}
}

View File

@ -0,0 +1,37 @@
namespace AgroBase.Forms.IHM.Controls.Operacao
{
partial class HmiCompactMetricCard
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
}
#endregion
}
}

View File

@ -0,0 +1,86 @@
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace AgroBase.Forms.IHM.Controls.Operacao
{
public partial class HmiCompactMetricCard : UserControl
{
private readonly Label _lblTitulo;
private readonly Label _lblValor;
public HmiCompactMetricCard()
{
DoubleBuffered = true;
BackColor = HmiTheme.SurfaceRaised;
Padding = new Padding(5, 2, 5, 2);
Margin = new Padding(2);
MinimumSize = new Size(55, 32);
AutoScaleMode = AutoScaleMode.None;
_lblTitulo = new Label
{
Dock = DockStyle.Top,
Height = 15,
BackColor = Color.Transparent,
ForeColor = HmiTheme.TextMuted,
Font = new Font("Segoe UI", 6.2F),
Text = "Métrica",
TextAlign = ContentAlignment.MiddleCenter,
AutoEllipsis = true
};
_lblValor = new Label
{
Dock = DockStyle.Fill,
BackColor = Color.Transparent,
ForeColor = HmiTheme.Info,
Font = new Font("Segoe UI", 7.4F, FontStyle.Bold),
Text = "0",
TextAlign = ContentAlignment.MiddleCenter,
AutoEllipsis = true
};
Controls.Add(_lblValor);
Controls.Add(_lblTitulo);
}
[Category("Conteúdo")]
public string Titulo
{
get { return _lblTitulo.Text; }
set { _lblTitulo.Text = value ?? string.Empty; }
}
[Category("Conteúdo")]
public string Valor
{
get { return _lblValor.Text; }
set { _lblValor.Text = value ?? string.Empty; }
}
[Category("Aparência")]
public Color CorValor
{
get { return _lblValor.ForeColor; }
set { _lblValor.ForeColor = value; }
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
using (var pen = new Pen(HmiTheme.Border, 1F))
{
e.Graphics.DrawRectangle(
pen,
0,
0,
Width - 1,
Height - 1
);
}
}
}
}

View File

@ -0,0 +1,684 @@
using AgroBase.Forms.IHM.Controls;
using AgroBase.Forms.IHM.Controls.Operacao;
using System.Drawing;
using System.Windows.Forms;
namespace AgroBase.Forms.IHM.Operacao
{
partial class ucOperacaoMovimentacao
{
private System.ComponentModel.IContainer components = null;
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
components.Dispose();
base.Dispose(disposing);
}
#region Component Designer generated code
private void InitializeComponent()
{
this.rootLayout = new System.Windows.Forms.TableLayoutPanel();
this.leftLayout = new System.Windows.Forms.TableLayoutPanel();
this.pnlControle = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.controleLayout = new System.Windows.Forms.TableLayoutPanel();
this.lblControleTitulo = new System.Windows.Forms.Label();
this.lblJoystick = new System.Windows.Forms.Label();
this.cmbJoystick = new System.Windows.Forms.ComboBox();
this.lblVelocidadeMax = new System.Windows.Forms.Label();
this.lblVelocidadeMaxValor = new System.Windows.Forms.Label();
this.sliderVelocidadeMax = new AgroBase.Forms.IHM.Controls.Operacao.HmiSlider();
this.lblAngulo = new System.Windows.Forms.Label();
this.lblAnguloValor = new System.Windows.Forms.Label();
this.sliderAngulo = new AgroBase.Forms.IHM.Controls.Operacao.HmiSlider();
this.lblVelocidadeDir = new System.Windows.Forms.Label();
this.lblVelocidadeDirValor = new System.Windows.Forms.Label();
this.sliderVelocidadeDir = new AgroBase.Forms.IHM.Controls.Operacao.HmiSlider();
this.lblTipoMovimento = new System.Windows.Forms.Label();
this.cmbTipoMovimento = new System.Windows.Forms.ComboBox();
this.acoesLayout = new System.Windows.Forms.TableLayoutPanel();
this.btnControleManual = new AgroBase.Forms.IHM.Controls.HmiSidebarButton();
this.btnReferenciar = new AgroBase.Forms.IHM.Controls.HmiSidebarButton();
this.btnFreio = new AgroBase.Forms.IHM.Controls.HmiSidebarButton();
this.pnlRodas = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.rodasLayout = new System.Windows.Forms.TableLayoutPanel();
this.cardEF = new AgroBase.Forms.IHM.Controls.Operacao.HmiWheelStatusCard();
this.cardDF = new AgroBase.Forms.IHM.Controls.Operacao.HmiWheelStatusCard();
this.cardET = new AgroBase.Forms.IHM.Controls.Operacao.HmiWheelStatusCard();
this.cardDT = new AgroBase.Forms.IHM.Controls.Operacao.HmiWheelStatusCard();
this.centerLayout = new System.Windows.Forms.TableLayoutPanel();
this.pnlCamera = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.cameraLayout = new System.Windows.Forms.TableLayoutPanel();
this.cameraHeaderLayout = new System.Windows.Forms.TableLayoutPanel();
this.lblCameraTitulo = new System.Windows.Forms.Label();
this.lblCameraStatus = new System.Windows.Forms.Label();
this.picCamera = new System.Windows.Forms.PictureBox();
this.cmbTipoFrame = new System.Windows.Forms.ComboBox();
this.pnlRadar = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.radarLayout = new System.Windows.Forms.TableLayoutPanel();
this.lblRadarTitulo = new System.Windows.Forms.Label();
this.radarControl = new AgroBase.Forms.IHM.Controls.Operacao.HmiSonarRadarControl();
this.radarInfoLayout = new System.Windows.Forms.TableLayoutPanel();
this.cardSonarModo = new AgroBase.Forms.IHM.Controls.Operacao.HmiCompactMetricCard();
this.cardSonarFator = new AgroBase.Forms.IHM.Controls.Operacao.HmiCompactMetricCard();
this.cardSonarProximo = new AgroBase.Forms.IHM.Controls.Operacao.HmiCompactMetricCard();
this.cardSonarLivreEsq = new AgroBase.Forms.IHM.Controls.Operacao.HmiCompactMetricCard();
this.cardSonarLivreDir = new AgroBase.Forms.IHM.Controls.Operacao.HmiCompactMetricCard();
this.cardSonarCorredor = new AgroBase.Forms.IHM.Controls.Operacao.HmiCompactMetricCard();
this.rightLayout = new System.Windows.Forms.TableLayoutPanel();
this.pnlTelemetria = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.telemetryLayout = new System.Windows.Forms.TableLayoutPanel();
this.lblTelemetriaTitulo = new System.Windows.Forms.Label();
this.telemetryVelocidade = new AgroBase.Forms.IHM.Controls.Operacao.HmiTelemetryRow();
this.telemetryTensao = new AgroBase.Forms.IHM.Controls.Operacao.HmiTelemetryRow();
this.telemetryCorrente = new AgroBase.Forms.IHM.Controls.Operacao.HmiTelemetryRow();
this.telemetryPotencia = new AgroBase.Forms.IHM.Controls.Operacao.HmiTelemetryRow();
this.telemetryRpm = new AgroBase.Forms.IHM.Controls.Operacao.HmiTelemetryRow();
this.telemetryDistancia = new AgroBase.Forms.IHM.Controls.Operacao.HmiTelemetryRow();
this.telemetryTempo = new AgroBase.Forms.IHM.Controls.Operacao.HmiTelemetryRow();
this.telemetryVelMedia = new AgroBase.Forms.IHM.Controls.Operacao.HmiTelemetryRow();
this.telemetryAutonomiaM = new AgroBase.Forms.IHM.Controls.Operacao.HmiTelemetryRow();
this.telemetryAutonomiaTempo = new AgroBase.Forms.IHM.Controls.Operacao.HmiTelemetryRow();
this.pnlImu = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.imuLayout = new System.Windows.Forms.TableLayoutPanel();
this.lblImuTitulo = new System.Windows.Forms.Label();
this.attitudeIndicator = new AgroBase.Forms.IHM.Controls.Operacao.HmiAttitudeIndicator();
this.imuInfoLayout = new System.Windows.Forms.TableLayoutPanel();
this.cardImuModo = new AgroBase.Forms.IHM.Controls.Operacao.HmiCompactMetricCard();
this.cardImuFator = new AgroBase.Forms.IHM.Controls.Operacao.HmiCompactMetricCard();
this.cardImuMotivo = new AgroBase.Forms.IHM.Controls.Operacao.HmiCompactMetricCard();
((System.ComponentModel.ISupportInitialize)(this.picCamera)).BeginInit();
this.SuspendLayout();
// root
this.rootLayout.BackColor = AgroBase.Forms.IHM.Controls.HmiTheme.Background;
this.rootLayout.ColumnCount = 3;
this.rootLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 37F));
this.rootLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 37F));
this.rootLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 26F));
this.rootLayout.Controls.Add(this.leftLayout, 0, 0);
this.rootLayout.Controls.Add(this.centerLayout, 1, 0);
this.rootLayout.Controls.Add(this.rightLayout, 2, 0);
this.rootLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.rootLayout.Margin = System.Windows.Forms.Padding.Empty;
this.rootLayout.Padding = System.Windows.Forms.Padding.Empty;
this.rootLayout.RowCount = 1;
this.rootLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
// LEFT
this.leftLayout.ColumnCount = 1;
this.leftLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.leftLayout.Controls.Add(this.pnlControle, 0, 0);
this.leftLayout.Controls.Add(this.pnlRodas, 0, 1);
this.leftLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.leftLayout.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
this.leftLayout.RowCount = 2;
this.leftLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 66F));
this.leftLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 34F));
ConfigurePanel(this.pnlControle, this.controleLayout);
ConfigurePanel(this.pnlRodas, this.rodasLayout);
this.controleLayout.ColumnCount = 3;
this.controleLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 30F));
this.controleLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 36F));
this.controleLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 34F));
this.controleLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.controleLayout.RowCount = 11;
this.controleLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 22F));
this.controleLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
this.controleLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 18F));
this.controleLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F));
this.controleLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 18F));
this.controleLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F));
this.controleLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 18F));
this.controleLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F));
this.controleLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 18F));
this.controleLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 31F));
this.controleLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 46F));
// Joystick
this.controleLayout.RowStyles[1] = new RowStyle(SizeType.Absolute, 27F);
// Combo de tipo de movimento
this.controleLayout.RowStyles[9] = new RowStyle(SizeType.Absolute, 28F);
// Botões
this.controleLayout.RowStyles[10] = new RowStyle(SizeType.Absolute, 40F);
SetupTitle(this.lblControleTitulo, "CONTROLE DE MOVIMENTO");
this.controleLayout.Controls.Add(this.lblControleTitulo, 0, 0);
this.controleLayout.SetColumnSpan(this.lblControleTitulo, 3);
SetupCaption(this.lblJoystick, "Joystick");
this.controleLayout.Controls.Add(this.lblJoystick, 0, 1);
SetupCombo(this.cmbJoystick);
this.cmbJoystick.Items.AddRange(new object[] { "DualShock 4", "Joystick USB", "Nenhum" });
this.cmbJoystick.SelectedIndex = 0;
this.controleLayout.Controls.Add(this.cmbJoystick, 1, 1);
this.controleLayout.SetColumnSpan(this.cmbJoystick, 2);
SetupCaption(this.lblVelocidadeMax, "Velocidade máx.");
SetupValue(this.lblVelocidadeMaxValor, "68% · 3,4 km/h", AgroBase.Forms.IHM.Controls.HmiTheme.Success);
this.controleLayout.Controls.Add(this.lblVelocidadeMax, 0, 2);
this.controleLayout.SetColumnSpan(this.lblVelocidadeMax, 2);
this.controleLayout.Controls.Add(this.lblVelocidadeMaxValor, 2, 2);
SetupSlider(this.sliderVelocidadeMax, AgroBase.Forms.IHM.Controls.HmiTheme.Success, 0, 100, 68);
this.controleLayout.Controls.Add(this.sliderVelocidadeMax, 0, 3);
this.controleLayout.SetColumnSpan(this.sliderVelocidadeMax, 3);
SetupCaption(this.lblAngulo, "Ângulo direcional");
SetupValue(this.lblAnguloValor, "+12°", AgroBase.Forms.IHM.Controls.HmiTheme.Manual);
this.controleLayout.Controls.Add(this.lblAngulo, 0, 4);
this.controleLayout.SetColumnSpan(this.lblAngulo, 2);
this.controleLayout.Controls.Add(this.lblAnguloValor, 2, 4);
SetupSlider(this.sliderAngulo, AgroBase.Forms.IHM.Controls.HmiTheme.Manual, 0, 90, 12);
this.controleLayout.Controls.Add(this.sliderAngulo, 0, 5);
this.controleLayout.SetColumnSpan(this.sliderAngulo, 3);
SetupCaption(this.lblVelocidadeDir, "Velocidade direcional");
SetupValue(this.lblVelocidadeDirValor, "55%", AgroBase.Forms.IHM.Controls.HmiTheme.Info);
this.controleLayout.Controls.Add(this.lblVelocidadeDir, 0, 6);
this.controleLayout.SetColumnSpan(this.lblVelocidadeDir, 2);
this.controleLayout.Controls.Add(this.lblVelocidadeDirValor, 2, 6);
SetupSlider(this.sliderVelocidadeDir, AgroBase.Forms.IHM.Controls.HmiTheme.Info, 0, 100, 55);
this.controleLayout.Controls.Add(this.sliderVelocidadeDir, 0, 7);
this.controleLayout.SetColumnSpan(this.sliderVelocidadeDir, 3);
SetupCaption(this.lblTipoMovimento, "Tipo de movimento");
this.controleLayout.Controls.Add(this.lblTipoMovimento, 0, 8);
this.controleLayout.SetColumnSpan(this.lblTipoMovimento, 3);
SetupCombo(this.cmbTipoMovimento);
this.cmbTipoMovimento.Items.AddRange(new object[]
{
"Rodas dianteiras",
"Rodas traseiras",
"Rotacionar no eixo",
"Movimento arco",
"Movimento lateral",
"Movimento diagonal",
"Diagnóstico"
});
this.controleLayout.Controls.Add(this.cmbTipoMovimento, 0, 9);
this.controleLayout.SetColumnSpan(this.cmbTipoMovimento, 3);
this.acoesLayout.ColumnCount = 3;
this.acoesLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 34F));
this.acoesLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33F));
this.acoesLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33F));
this.acoesLayout.Controls.Add(this.btnControleManual, 0, 0);
this.acoesLayout.Controls.Add(this.btnReferenciar, 1, 0);
this.acoesLayout.Controls.Add(this.btnFreio, 2, 0);
this.acoesLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.acoesLayout.RowCount = 2;
this.acoesLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.acoesLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 1F));
SetupAction(this.btnControleManual, "MANUAL", AgroBase.Forms.IHM.Controls.HmiTheme.Success);
SetupAction(this.btnReferenciar, "ZERAR", AgroBase.Forms.IHM.Controls.HmiTheme.Info);
SetupAction(this.btnFreio, "FREIO", AgroBase.Forms.IHM.Controls.HmiTheme.Danger);
this.controleLayout.Controls.Add(this.acoesLayout, 0, 10);
this.controleLayout.SetColumnSpan(this.acoesLayout, 3);
// wheels
this.rodasLayout.Dock = DockStyle.Fill;
this.rodasLayout.Margin = Padding.Empty;
this.rodasLayout.Padding = Padding.Empty;
this.rodasLayout.ColumnCount = 4;
for (int i = 0; i < 4; i++)
this.rodasLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.rodasLayout.RowCount = 1;
this.rodasLayout.RowStyles.Clear();
this.rodasLayout.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
SetupWheel(this.cardEF, "EF");
SetupWheel(this.cardDF, "DF");
SetupWheel(this.cardET, "ET");
SetupWheel(this.cardDT, "DT");
this.rodasLayout.Controls.Add(this.cardEF, 0, 0);
this.rodasLayout.Controls.Add(this.cardDF, 1, 0);
this.rodasLayout.Controls.Add(this.cardET, 2, 0);
this.rodasLayout.Controls.Add(this.cardDT, 3, 0);
// CENTER
this.centerLayout.ColumnCount = 1;
this.centerLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.centerLayout.Controls.Add(this.pnlCamera, 0, 0);
this.centerLayout.Controls.Add(this.pnlRadar, 0, 1);
this.centerLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.centerLayout.Margin = new System.Windows.Forms.Padding(3, 0, 3, 0);
this.centerLayout.RowCount = 2;
this.centerLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 53F));
this.centerLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 47F));
ConfigurePanel(this.pnlCamera, this.cameraLayout);
ConfigurePanel(this.pnlRadar, this.radarLayout);
this.cameraLayout.ColumnCount = 1;
this.cameraLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.cameraLayout.Controls.Add(this.cameraHeaderLayout, 0, 0);
this.cameraLayout.Controls.Add(this.picCamera, 0, 1);
this.cameraLayout.Controls.Add(this.cmbTipoFrame, 0, 2);
this.cameraLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.cameraLayout.RowCount = 3;
this.cameraLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 22F));
this.cameraLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.cameraLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 31F));
this.cameraHeaderLayout.ColumnCount = 2;
this.cameraHeaderLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 35F));
this.cameraHeaderLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 65F));
this.cameraHeaderLayout.Dock = System.Windows.Forms.DockStyle.Fill;
SetupTitle(this.lblCameraTitulo, "VÍDEO");
this.lblCameraStatus.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblCameraStatus.Text = "FPS 28 · 6,4 MB/s · Saúde 96%";
this.lblCameraStatus.ForeColor = AgroBase.Forms.IHM.Controls.HmiTheme.Success;
this.lblCameraStatus.Font = new System.Drawing.Font("Segoe UI", 6.6F);
this.lblCameraStatus.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.cameraHeaderLayout.Controls.Add(this.lblCameraTitulo, 0, 0);
this.cameraHeaderLayout.Controls.Add(this.lblCameraStatus, 1, 0);
this.picCamera.Dock = System.Windows.Forms.DockStyle.Fill;
this.picCamera.BackColor = System.Drawing.Color.Black;
this.picCamera.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.picCamera.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
SetupCombo(this.cmbTipoFrame);
this.cmbTipoFrame.Items.AddRange(new object[] { "RGB", "Segmentação", "Debug", "Overlay" });
// radar
this.radarLayout.ColumnCount = 2;
this.radarLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 45F));
this.radarLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 55F));
this.radarLayout.Controls.Add(this.lblRadarTitulo, 0, 0);
this.radarLayout.Controls.Add(this.radarControl, 0, 1);
this.radarLayout.Controls.Add(this.radarInfoLayout, 1, 1);
this.radarLayout.SetColumnSpan(this.lblRadarTitulo, 2);
this.radarLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.radarLayout.RowCount = 2;
this.radarLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 22F));
this.radarLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
SetupTitle(this.lblRadarTitulo, "SONAR");
this.radarControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.radarControl.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
this.radarControl.MaxDistanceM = 3F;
this.radarInfoLayout.ColumnCount = 2;
this.radarInfoLayout.ColumnStyles.Clear();
this.radarInfoLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
this.radarInfoLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
this.radarInfoLayout.RowCount = 4;
this.radarInfoLayout.RowStyles.Clear();
this.radarInfoLayout.RowStyles.Add(new RowStyle(SizeType.Percent, 28F));
this.radarInfoLayout.RowStyles.Add(new RowStyle(SizeType.Percent, 24F));
this.radarInfoLayout.RowStyles.Add(new RowStyle(SizeType.Percent, 24F));
this.radarInfoLayout.RowStyles.Add(new RowStyle(SizeType.Percent, 24F));
this.radarInfoLayout.Dock = DockStyle.Fill;
this.radarInfoLayout.Margin = Padding.Empty;
SetupCompactCard(this.cardSonarModo, "Modo auxiliar", "SLOWDOWN", HmiTheme.Warning);
SetupCompactCard(this.cardSonarFator, "Fator", "0,75x", HmiTheme.Warning);
SetupCompactCard(this.cardSonarProximo, "Mais próximo", "1,8 m", HmiTheme.Danger);
SetupCompactCard(this.cardSonarLivreEsq, "Dist esquerda", "2,6 m", HmiTheme.Info);
SetupCompactCard(this.cardSonarLivreDir, "Dist direita", "2,4 m", HmiTheme.Info);
SetupCompactCard(this.cardSonarCorredor, "Status no corredor", "Caminhando Rua", HmiTheme.Success);
this.radarInfoLayout.Controls.Add(this.cardSonarModo, 0, 0);
this.radarInfoLayout.SetColumnSpan(this.cardSonarModo, 2);
this.radarInfoLayout.Controls.Add(this.cardSonarFator, 0, 1);
this.radarInfoLayout.Controls.Add(this.cardSonarProximo, 1, 1);
this.radarInfoLayout.Controls.Add(this.cardSonarLivreEsq, 0, 2);
this.radarInfoLayout.Controls.Add(this.cardSonarLivreDir, 1, 2);
this.radarInfoLayout.Controls.Add(this.cardSonarCorredor, 0, 3);
this.radarInfoLayout.SetColumnSpan(this.cardSonarCorredor, 2);
// RIGHT
this.rightLayout.ColumnCount = 1;
this.rightLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.rightLayout.Controls.Add(this.pnlTelemetria, 0, 0);
this.rightLayout.Controls.Add(this.pnlImu, 0, 1);
this.rightLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.rightLayout.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.rightLayout.RowCount = 2;
this.rightLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 58F));
this.rightLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 42F));
ConfigurePanel(this.pnlTelemetria, this.telemetryLayout);
ConfigurePanel(this.pnlImu, this.imuLayout);
this.telemetryLayout.ColumnCount = 1;
this.telemetryLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.telemetryLayout.Controls.Add(this.lblTelemetriaTitulo, 0, 0);
this.telemetryLayout.Controls.Add(this.telemetryVelocidade, 0, 1);
this.telemetryLayout.Controls.Add(this.telemetryTensao, 0, 2);
this.telemetryLayout.Controls.Add(this.telemetryCorrente, 0, 3);
this.telemetryLayout.Controls.Add(this.telemetryPotencia, 0, 4);
this.telemetryLayout.Controls.Add(this.telemetryRpm, 0, 5);
this.telemetryLayout.Controls.Add(this.telemetryDistancia, 0, 6);
this.telemetryLayout.Controls.Add(this.telemetryTempo, 0, 7);
this.telemetryLayout.Controls.Add(this.telemetryVelMedia, 0, 8);
this.telemetryLayout.Controls.Add(this.telemetryAutonomiaM, 0, 9);
this.telemetryLayout.Controls.Add(this.telemetryAutonomiaTempo, 0, 10);
this.telemetryLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.telemetryLayout.RowCount = 11;
this.telemetryLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 22F));
for (int i = 1; i < 11; i++)
this.telemetryLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F));
SetupTitle(this.lblTelemetriaTitulo, "TELEMETRIA");
SetupTelemetry(this.telemetryVelocidade, "◉", "Velocidade atual", "1,6 km/h");
SetupTelemetry(this.telemetryTensao, "▰", "Tensão bateria", "51,2 V");
SetupTelemetry(this.telemetryCorrente, "∿", "Corrente", "18,4 A");
SetupTelemetry(this.telemetryPotencia, "ϟ", "Potência", "941 W");
SetupTelemetry(this.telemetryRpm, "◌", "RPM", "1240 rpm");
SetupTelemetry(this.telemetryDistancia, "◎", "Dist percorrida", "94 m");
SetupTelemetry(this.telemetryTempo, "◷", "Movimento", "00:07:24");
SetupTelemetry(this.telemetryVelMedia, "◉", "Vel média", "1,2 km/h");
SetupTelemetry(this.telemetryAutonomiaM, "⌖", "Aut restante", "1.240 m");
SetupTelemetry(this.telemetryAutonomiaTempo, "◴", "Aut em tempo", "01:18:30");
this.imuLayout.ColumnCount = 2;
this.imuLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 57F));
this.imuLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 43F));
this.imuLayout.Controls.Add(this.lblImuTitulo, 0, 0);
this.imuLayout.Controls.Add(this.attitudeIndicator, 0, 1);
this.imuLayout.Controls.Add(this.imuInfoLayout, 1, 1);
this.imuLayout.SetColumnSpan(this.lblImuTitulo, 2);
this.imuLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.imuLayout.RowCount = 2;
this.imuLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 22F));
this.imuLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
SetupTitle(this.lblImuTitulo, "ATITUDE / IMU");
this.attitudeIndicator.Dock = System.Windows.Forms.DockStyle.Fill;
this.attitudeIndicator.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
this.imuInfoLayout.ColumnCount = 1;
this.imuInfoLayout.ColumnStyles.Clear();
this.imuInfoLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.imuInfoLayout.RowCount = 3;
this.imuInfoLayout.RowStyles.Clear();
this.imuInfoLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 30F));
this.imuInfoLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 30F));
this.imuInfoLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 40F));
this.imuInfoLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.imuInfoLayout.Margin = new System.Windows.Forms.Padding(2, 0, 0, 0);
this.cardImuModo.Dock = System.Windows.Forms.DockStyle.Fill;
this.cardImuModo.Titulo = "Modo auxiliar";
this.cardImuModo.Valor = "SLOWDOWN";
this.cardImuModo.CorValor = AgroBase.Forms.IHM.Controls.HmiTheme.Warning;
this.cardImuFator.Dock = System.Windows.Forms.DockStyle.Fill;
this.cardImuFator.Titulo = "Fator aplicado";
this.cardImuFator.Valor = "0,80x";
this.cardImuFator.CorValor = AgroBase.Forms.IHM.Controls.HmiTheme.Warning;
this.cardImuMotivo.Dock = System.Windows.Forms.DockStyle.Fill;
this.cardImuMotivo.Titulo = "Motivo";
this.cardImuMotivo.Valor = "Inclinação frontal";
this.cardImuMotivo.CorValor = AgroBase.Forms.IHM.Controls.HmiTheme.Text;
this.imuInfoLayout.Controls.Add(this.cardImuModo, 0, 0);
this.imuInfoLayout.Controls.Add(this.cardImuFator, 0, 1);
this.imuInfoLayout.Controls.Add(this.cardImuMotivo, 0, 2);
// UC
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = AgroBase.Forms.IHM.Controls.HmiTheme.Background;
this.Controls.Add(this.rootLayout);
this.DoubleBuffered = true;
this.Name = "ucOperacaoMovimentacao";
this.Size = new System.Drawing.Size(784, 435);
((System.ComponentModel.ISupportInitialize)(this.picCamera)).EndInit();
this.ResumeLayout(false);
}
private static void ConfigurePanel(
AgroBase.Forms.IHM.Controls.HmiRoundedPanel panel,
System.Windows.Forms.Control child)
{
panel.BorderColor = AgroBase.Forms.IHM.Controls.HmiTheme.Border;
panel.Controls.Add(child);
panel.CornerRadius = 9;
panel.Dock = System.Windows.Forms.DockStyle.Fill;
panel.FillColor = AgroBase.Forms.IHM.Controls.HmiTheme.Surface;
panel.Margin = new System.Windows.Forms.Padding(0, 0, 0, 3);
panel.Padding = new System.Windows.Forms.Padding(7);
}
private static void SetupTitle(
System.Windows.Forms.Label label,
string text)
{
label.Dock = System.Windows.Forms.DockStyle.Fill;
label.BackColor = System.Drawing.Color.Transparent;
label.ForeColor = AgroBase.Forms.IHM.Controls.HmiTheme.Text;
label.Font = new System.Drawing.Font("Segoe UI", 8.5F, System.Drawing.FontStyle.Bold);
label.Text = text;
label.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
label.AutoEllipsis = true;
}
private static void SetupCaption(
System.Windows.Forms.Label label,
string text)
{
label.Dock = System.Windows.Forms.DockStyle.Fill;
label.BackColor = System.Drawing.Color.Transparent;
label.ForeColor = AgroBase.Forms.IHM.Controls.HmiTheme.TextMuted;
label.Font = new System.Drawing.Font("Segoe UI", 6.8F);
label.Text = text;
label.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
label.AutoEllipsis = true;
}
private static void SetupValue(Label label, string text, Color color)
{
label.Dock = DockStyle.Fill;
label.BackColor = Color.Transparent;
label.ForeColor = color;
label.Font = new Font("Segoe UI", 6.8F, FontStyle.Bold);
label.Text = text;
label.TextAlign = ContentAlignment.MiddleRight;
label.AutoSize = false;
label.AutoEllipsis = false;
label.UseMnemonic = false;
label.Margin = Padding.Empty;
label.Padding = Padding.Empty;
}
private static void SetupCombo(
System.Windows.Forms.ComboBox combo)
{
combo.Dock = System.Windows.Forms.DockStyle.Fill;
combo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
combo.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
combo.BackColor = AgroBase.Forms.IHM.Controls.HmiTheme.SurfaceRaised;
combo.ForeColor = AgroBase.Forms.IHM.Controls.HmiTheme.Text;
combo.Font = new System.Drawing.Font("Segoe UI", 7.4F);
combo.Margin = new System.Windows.Forms.Padding(0, 1, 0, 1);
}
private static void SetupSlider(
AgroBase.Forms.IHM.Controls.Operacao.HmiSlider slider,
System.Drawing.Color accent,
int min,
int max,
int value)
{
slider.Dock = System.Windows.Forms.DockStyle.Fill;
slider.Minimum = min;
slider.Maximum = max;
slider.Value = value;
slider.AccentColor = accent;
slider.TrackColor = AgroBase.Forms.IHM.Controls.HmiTheme.Border;
slider.ThumbColor = AgroBase.Forms.IHM.Controls.HmiTheme.Text;
slider.Margin = System.Windows.Forms.Padding.Empty;
}
private static void SetupAction(
HmiSidebarButton button,
string text,
Color accent)
{
button.Dock = DockStyle.Fill;
button.Text = text;
button.IconText = string.Empty;
button.AccentColor = accent;
button.BorderColor = accent;
button.FillColor = HmiTheme.SurfaceRaised;
button.Margin = new Padding(2, 3, 2, 2);
button.MinimumSize = Size.Empty;
button.MaximumSize = Size.Empty;
}
private static void SetupWheel(
HmiWheelStatusCard card,
string titulo)
{
card.Dock = DockStyle.Fill;
card.Margin = new Padding(2, 0, 2, 0);
card.MinimumSize = Size.Empty;
card.Titulo = titulo;
card.DirecionalSp = "+0,0°";
card.DirecionalAtual = "+0,0°";
card.StatusDirecional = "Parado";
card.MovimentoSp = "0 rpm";
card.MovimentoAtual = "0 rpm";
card.StatusMovimento = "Sem freio";
card.CheckDir.Checked = true;
card.CheckMov.Checked = true;
card.CorStatusDirecional = HmiTheme.Success;
card.CorStatusMovimento = HmiTheme.TextMuted;
card.BringToFront();
}
private static void SetupCompactCard(
HmiCompactMetricCard card,
string titulo,
string valor,
Color cor)
{
card.Dock = DockStyle.Fill;
card.Titulo = titulo;
card.Valor = valor;
card.CorValor = cor;
card.Margin = new Padding(2);
card.MinimumSize = Size.Empty;
}
private static void SetupTelemetry(
AgroBase.Forms.IHM.Controls.Operacao.HmiTelemetryRow row,
string icon,
string title,
string value)
{
row.Dock = System.Windows.Forms.DockStyle.Fill;
row.IconText = icon;
row.Titulo = title;
row.Valor = value;
}
#endregion
private System.Windows.Forms.TableLayoutPanel rootLayout;
private System.Windows.Forms.TableLayoutPanel leftLayout;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlControle;
private System.Windows.Forms.TableLayoutPanel controleLayout;
private System.Windows.Forms.Label lblControleTitulo;
private System.Windows.Forms.Label lblJoystick;
private System.Windows.Forms.ComboBox cmbJoystick;
private System.Windows.Forms.Label lblVelocidadeMax;
private System.Windows.Forms.Label lblVelocidadeMaxValor;
private AgroBase.Forms.IHM.Controls.Operacao.HmiSlider sliderVelocidadeMax;
private System.Windows.Forms.Label lblAngulo;
private System.Windows.Forms.Label lblAnguloValor;
private AgroBase.Forms.IHM.Controls.Operacao.HmiSlider sliderAngulo;
private System.Windows.Forms.Label lblVelocidadeDir;
private System.Windows.Forms.Label lblVelocidadeDirValor;
private AgroBase.Forms.IHM.Controls.Operacao.HmiSlider sliderVelocidadeDir;
private System.Windows.Forms.Label lblTipoMovimento;
private System.Windows.Forms.ComboBox cmbTipoMovimento;
private System.Windows.Forms.TableLayoutPanel acoesLayout;
private AgroBase.Forms.IHM.Controls.HmiSidebarButton btnControleManual;
private AgroBase.Forms.IHM.Controls.HmiSidebarButton btnReferenciar;
private AgroBase.Forms.IHM.Controls.HmiSidebarButton btnFreio;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlRodas;
private System.Windows.Forms.TableLayoutPanel rodasLayout;
private AgroBase.Forms.IHM.Controls.Operacao.HmiWheelStatusCard cardEF;
private AgroBase.Forms.IHM.Controls.Operacao.HmiWheelStatusCard cardDF;
private AgroBase.Forms.IHM.Controls.Operacao.HmiWheelStatusCard cardET;
private AgroBase.Forms.IHM.Controls.Operacao.HmiWheelStatusCard cardDT;
private System.Windows.Forms.TableLayoutPanel centerLayout;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlCamera;
private System.Windows.Forms.TableLayoutPanel cameraLayout;
private System.Windows.Forms.TableLayoutPanel cameraHeaderLayout;
private System.Windows.Forms.Label lblCameraTitulo;
private System.Windows.Forms.Label lblCameraStatus;
private System.Windows.Forms.PictureBox picCamera;
private System.Windows.Forms.ComboBox cmbTipoFrame;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlRadar;
private System.Windows.Forms.TableLayoutPanel radarLayout;
private System.Windows.Forms.Label lblRadarTitulo;
private AgroBase.Forms.IHM.Controls.Operacao.HmiSonarRadarControl radarControl;
private System.Windows.Forms.TableLayoutPanel radarInfoLayout;
private AgroBase.Forms.IHM.Controls.Operacao.HmiCompactMetricCard cardSonarModo;
private AgroBase.Forms.IHM.Controls.Operacao.HmiCompactMetricCard cardSonarFator;
private AgroBase.Forms.IHM.Controls.Operacao.HmiCompactMetricCard cardSonarProximo;
private AgroBase.Forms.IHM.Controls.Operacao.HmiCompactMetricCard cardSonarLivreEsq;
private AgroBase.Forms.IHM.Controls.Operacao.HmiCompactMetricCard cardSonarLivreDir;
private AgroBase.Forms.IHM.Controls.Operacao.HmiCompactMetricCard cardSonarCorredor;
private System.Windows.Forms.TableLayoutPanel rightLayout;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlTelemetria;
private System.Windows.Forms.TableLayoutPanel telemetryLayout;
private System.Windows.Forms.Label lblTelemetriaTitulo;
private AgroBase.Forms.IHM.Controls.Operacao.HmiTelemetryRow telemetryVelocidade;
private AgroBase.Forms.IHM.Controls.Operacao.HmiTelemetryRow telemetryTensao;
private AgroBase.Forms.IHM.Controls.Operacao.HmiTelemetryRow telemetryCorrente;
private AgroBase.Forms.IHM.Controls.Operacao.HmiTelemetryRow telemetryPotencia;
private AgroBase.Forms.IHM.Controls.Operacao.HmiTelemetryRow telemetryRpm;
private AgroBase.Forms.IHM.Controls.Operacao.HmiTelemetryRow telemetryDistancia;
private AgroBase.Forms.IHM.Controls.Operacao.HmiTelemetryRow telemetryTempo;
private AgroBase.Forms.IHM.Controls.Operacao.HmiTelemetryRow telemetryVelMedia;
private AgroBase.Forms.IHM.Controls.Operacao.HmiTelemetryRow telemetryAutonomiaM;
private AgroBase.Forms.IHM.Controls.Operacao.HmiTelemetryRow telemetryAutonomiaTempo;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlImu;
private System.Windows.Forms.TableLayoutPanel imuLayout;
private System.Windows.Forms.Label lblImuTitulo;
private AgroBase.Forms.IHM.Controls.Operacao.HmiAttitudeIndicator attitudeIndicator;
private System.Windows.Forms.TableLayoutPanel imuInfoLayout;
private AgroBase.Forms.IHM.Controls.Operacao.HmiCompactMetricCard cardImuModo;
private AgroBase.Forms.IHM.Controls.Operacao.HmiCompactMetricCard cardImuFator;
private AgroBase.Forms.IHM.Controls.Operacao.HmiCompactMetricCard cardImuMotivo;
}
}

View File

@ -0,0 +1,93 @@
using AgroBase.Forms.IHM.Controls;
using System.Windows.Forms;
namespace AgroBase.Forms.IHM.Operacao
{
public partial class ucOperacaoMovimentacao : UserControl
{
public ucOperacaoMovimentacao()
{
InitializeComponent();
ConfigurarEstadoInicial();
VincularEventos();
}
private void ConfigurarEstadoInicial()
{
cmbTipoMovimento.SelectedIndex = 0;
cmbTipoFrame.SelectedIndex = 0;
sliderVelocidadeMax.Value = 68;
sliderAngulo.Value = 12;
sliderVelocidadeDir.Value = 55;
AtualizarLabelsSliders();
telemetryVelocidade.CorValor = HmiTheme.Info;
telemetryTensao.CorValor = HmiTheme.Success;
telemetryCorrente.CorValor = HmiTheme.Warning;
telemetryPotencia.CorValor = HmiTheme.Manual;
telemetryAutonomiaM.CorValor = HmiTheme.Success;
telemetryAutonomiaTempo.CorValor = HmiTheme.Success;
cardSonarModo.Valor = "SLOWDOWN";
cardSonarModo.CorValor = HmiTheme.Warning;
cardSonarFator.Valor = "0,75x";
cardSonarFator.CorValor = HmiTheme.Warning;
cardSonarProximo.Valor = "1,8 m";
cardSonarProximo.CorValor = HmiTheme.Danger;
cardSonarLivreEsq.Valor = "2,6 m";
cardSonarLivreDir.Valor = "2,4 m";
cardSonarCorredor.Valor = "Caminhando Rua";
cardSonarCorredor.CorValor = HmiTheme.Success;
attitudeIndicator.FrontalDeg = 3.2;
attitudeIndicator.LateralDeg = -1.8;
cardImuModo.Valor = "SLOWDOWN";
cardImuModo.CorValor = HmiTheme.Warning;
cardImuFator.Valor = "0,80x";
cardImuFator.CorValor = HmiTheme.Warning;
cardImuMotivo.Valor = "Inclinação frontal";
cardImuMotivo.CorValor = HmiTheme.Text;
}
private void VincularEventos()
{
sliderVelocidadeMax.ValueChanged += delegate
{
AtualizarLabelsSliders();
};
sliderAngulo.ValueChanged += delegate
{
AtualizarLabelsSliders();
};
sliderVelocidadeDir.ValueChanged += delegate
{
AtualizarLabelsSliders();
};
}
private void AtualizarLabelsSliders()
{
double velocidadeKmh =
sliderVelocidadeMax.Value * 0.05;
lblVelocidadeMaxValor.Text =
sliderVelocidadeMax.Value +
"% · " +
velocidadeKmh.ToString("0.0") +
" km/h";
lblAnguloValor.Text =
"+" +
sliderAngulo.Value +
"°";
lblVelocidadeDirValor.Text =
sliderVelocidadeDir.Value +
"%";
}
}
}

View File

@ -0,0 +1,758 @@
using AgroBase.Forms.IHM.Controls;
using System.Drawing;
using System.Windows.Forms;
namespace AgroBase.Forms.IHM.Operacao
{
partial class ucOperacaoNavegacao
{
private System.ComponentModel.IContainer components = null;
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
components.Dispose();
base.Dispose(disposing);
}
#region Component Designer generated code
private void InitializeComponent()
{
this.rootLayout = new System.Windows.Forms.TableLayoutPanel();
this.topLayout = new System.Windows.Forms.TableLayoutPanel();
this.pnlMapa = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.mapLayout = new System.Windows.Forms.TableLayoutPanel();
this.mapHeaderLayout = new System.Windows.Forms.TableLayoutPanel();
this.lblMapaTitulo = new System.Windows.Forms.Label();
this.btnMapaWeb = new System.Windows.Forms.Button();
this.btnMapaDinamico = new System.Windows.Forms.Button();
this.pnlMapaVisual = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.lblMapaPlaceholder = new System.Windows.Forms.Label();
this.rightTopLayout = new System.Windows.Forms.TableLayoutPanel();
this.pnlOrientacao = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.orientationLayout = new System.Windows.Forms.TableLayoutPanel();
this.lblOrientacaoTitulo = new System.Windows.Forms.Label();
this.compassControl = new AgroBase.Forms.IHM.Controls.Operacao.HmiCompassControl();
this.orientationValuesLayout = new System.Windows.Forms.TableLayoutPanel();
this.lblRoverTitulo = new System.Windows.Forms.Label();
this.lblRoverValor = new System.Windows.Forms.Label();
this.lblTrajetoriaTitulo = new System.Windows.Forms.Label();
this.lblTrajetoriaValor = new System.Windows.Forms.Label();
this.pnlGnss = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.gnssLayout = new System.Windows.Forms.TableLayoutPanel();
this.lblGnssTitulo = new System.Windows.Forms.Label();
this.metricSatelites = new AgroBase.Forms.IHM.Controls.Operacao.HmiNavigationMetric();
this.metricPrecisao = new AgroBase.Forms.IHM.Controls.Operacao.HmiNavigationMetric();
this.metricIdadeCorrecao = new AgroBase.Forms.IHM.Controls.Operacao.HmiNavigationMetric();
this.metricAltitude = new AgroBase.Forms.IHM.Controls.Operacao.HmiNavigationMetric();
this.metricVelocidade = new AgroBase.Forms.IHM.Controls.Operacao.HmiNavigationMetric();
this.metricHeading = new AgroBase.Forms.IHM.Controls.Operacao.HmiNavigationMetric();
this.pnlTrajetoria = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.trajectoryLayout = new System.Windows.Forms.TableLayoutPanel();
this.lblTrajetoriaSecaoTitulo = new System.Windows.Forms.Label();
this.trajectoryTopCards = new System.Windows.Forms.TableLayoutPanel();
this.lblRuaAtual = new System.Windows.Forms.Label();
this.lblDentroCorredor = new System.Windows.Forms.Label();
this.lblProximoPonto = new System.Windows.Forms.Label();
this.progressRuaHeader = new System.Windows.Forms.TableLayoutPanel();
this.lblProgressoRuaTitulo = new System.Windows.Forms.Label();
this.lblProgressoRuaValor = new System.Windows.Forms.Label();
this.progressRua = new AgroBase.Forms.IHM.Controls.Operacao.HmiProgressBar();
this.progressGeralHeader = new System.Windows.Forms.TableLayoutPanel();
this.lblProgressoGeralTitulo = new System.Windows.Forms.Label();
this.lblProgressoGeralValor = new System.Windows.Forms.Label();
this.progressGeral = new AgroBase.Forms.IHM.Controls.Operacao.HmiProgressBar();
this.trajectoryBottomLayout = new System.Windows.Forms.TableLayoutPanel();
this.lblStatusMapa = new System.Windows.Forms.Label();
this.lblTempoOperacao = new System.Windows.Forms.Label();
this.lblDistanciaEsq = new System.Windows.Forms.Label();
this.lblDistanciaDir = new System.Windows.Forms.Label();
this.pnlAutonomia = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.autonomyLayout = new System.Windows.Forms.TableLayoutPanel();
this.lblAutonomiaTitulo = new System.Windows.Forms.Label();
this.autonomiaBateria = new AgroBase.Forms.IHM.Controls.Operacao.HmiAutonomyResourceCard();
this.autonomiaHerbicida = new AgroBase.Forms.IHM.Controls.Operacao.HmiAutonomyResourceCard();
this.pnlAutonomiaDireitaHost = new System.Windows.Forms.Panel();
this.pnlStatusAutonomia = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.pnlAlertaAutonomia = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.alertLayout = new System.Windows.Forms.TableLayoutPanel();
this.lblAlertaTitulo = new System.Windows.Forms.Label();
this.lblAlertaTexto = new System.Windows.Forms.Label();
this.btnAtualizarAutonomia = new AgroBase.Forms.IHM.Controls.HmiSidebarButton();
this.btnLiberarSupervisao = new AgroBase.Forms.IHM.Controls.HmiSidebarButton();
this.statusAutonomiaLayout = new System.Windows.Forms.TableLayoutPanel();
this.lblStatusAutonomiaTitulo = new System.Windows.Forms.Label();
this.lblStatusBateria = new System.Windows.Forms.Label();
this.lblStatusHerbicida = new System.Windows.Forms.Label();
this.lblStatusCorredor = new System.Windows.Forms.Label();
this.lblStatusAvaliacao = new System.Windows.Forms.Label();
this.cardStatusMapa = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.cardTempoOperacao = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.cardDistanciaEsq = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.cardDistanciaDir = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.SuspendLayout();
this.rootLayout.BackColor = AgroBase.Forms.IHM.Controls.HmiTheme.Background;
this.rootLayout.ColumnCount = 2;
this.rootLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 56F));
this.rootLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 44F));
this.rootLayout.Controls.Add(this.topLayout, 0, 0);
this.rootLayout.SetColumnSpan(this.topLayout, 2);
this.rootLayout.Controls.Add(this.pnlAutonomia, 0, 1);
this.pnlAutonomiaDireitaHost.Dock = DockStyle.Fill;
this.pnlAutonomiaDireitaHost.BackColor = Color.Transparent;
this.pnlAutonomiaDireitaHost.Margin = new Padding(3, 0, 0, 0);
this.pnlAutonomiaDireitaHost.Controls.Add(this.pnlStatusAutonomia);
this.pnlAutonomiaDireitaHost.Controls.Add(this.pnlAlertaAutonomia);
this.pnlStatusAutonomia.Dock = DockStyle.Fill;
this.pnlAlertaAutonomia.Dock = DockStyle.Fill;
this.pnlStatusAutonomia.Margin = Padding.Empty;
this.pnlAlertaAutonomia.Margin = Padding.Empty;
this.rootLayout.Controls.Add(this.pnlAutonomiaDireitaHost, 1, 1);
this.rootLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.rootLayout.Margin = System.Windows.Forms.Padding.Empty;
this.rootLayout.Padding = System.Windows.Forms.Padding.Empty;
this.rootLayout.RowCount = 2;
this.rootLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 72F));
this.rootLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 28F));
this.topLayout.ColumnCount = 2;
this.topLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 57F));
this.topLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 43F));
this.topLayout.Controls.Add(this.pnlMapa, 0, 0);
this.topLayout.Controls.Add(this.rightTopLayout, 1, 0);
this.topLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.topLayout.Margin = new System.Windows.Forms.Padding(0, 0, 0, 3);
ConfigurePanel(this.pnlMapa, this.mapLayout);
this.mapLayout.ColumnCount = 1;
this.mapLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.mapLayout.Controls.Add(this.mapHeaderLayout, 0, 0);
this.mapLayout.Controls.Add(this.pnlMapaVisual, 0, 1);
this.mapLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.mapLayout.RowCount = 2;
this.mapLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 31F));
this.mapLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.mapHeaderLayout.ColumnCount = 3;
this.mapHeaderLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.mapHeaderLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 72F));
this.mapHeaderLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 106F));
this.mapHeaderLayout.Controls.Add(this.lblMapaTitulo, 0, 0);
this.mapHeaderLayout.Controls.Add(this.btnMapaWeb, 1, 0);
this.mapHeaderLayout.Controls.Add(this.btnMapaDinamico, 2, 0);
this.mapHeaderLayout.Dock = System.Windows.Forms.DockStyle.Fill;
SetupTitle(this.lblMapaTitulo, "MAPA DE NAVEGAÇÃO");
SetupMapButton(this.btnMapaWeb, "Mapa Web");
SetupMapButton(this.btnMapaDinamico, "Trajetória");
this.pnlMapaVisual.BorderColor = AgroBase.Forms.IHM.Controls.HmiTheme.Border;
this.pnlMapaVisual.Controls.Add(this.lblMapaPlaceholder);
this.pnlMapaVisual.CornerRadius = 8;
this.pnlMapaVisual.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlMapaVisual.FillColor = System.Drawing.Color.FromArgb(18, 29, 22);
this.lblMapaPlaceholder.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblMapaPlaceholder.BackColor = System.Drawing.Color.Transparent;
this.lblMapaPlaceholder.ForeColor = AgroBase.Forms.IHM.Controls.HmiTheme.Success;
this.lblMapaPlaceholder.Font = new System.Drawing.Font("Consolas", 9F, System.Drawing.FontStyle.Bold);
this.lblMapaPlaceholder.Text =
"MAPA / TRAJETÓRIA\n\n" +
"Rua atual: 12 / 35\n\n" +
" ○ 125\n │\n ○ 126\n │\n [ROVER]\n │\n ○ 127\n\n" +
"Coordenadas: -23.5621, -46.6542\nAltitude: 812 m";
this.lblMapaPlaceholder.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.rightTopLayout.ColumnCount = 2;
this.rightTopLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 54F));
this.rightTopLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 46F));
this.pnlOrientacao.Margin = new Padding(0, 0, 3, 3);
this.rightTopLayout.Controls.Add(this.pnlOrientacao, 0, 0);
this.pnlGnss.Margin = new Padding(3, 0, 0, 3);
this.rightTopLayout.Controls.Add(this.pnlGnss, 1, 0);
this.rightTopLayout.Controls.Add(this.pnlTrajetoria, 0, 1);
this.rightTopLayout.SetColumnSpan(this.pnlTrajetoria, 2);
this.rightTopLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.rightTopLayout.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.rightTopLayout.RowCount = 2;
this.rightTopLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 44F));
this.rightTopLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 56F));
ConfigurePanel(this.pnlOrientacao, this.orientationLayout);
this.pnlOrientacao.Padding = new Padding(2);
this.orientationLayout.Dock = DockStyle.Fill;
this.orientationLayout.Margin = Padding.Empty;
this.orientationLayout.Padding = Padding.Empty;
this.orientationLayout.ColumnCount = 2;
this.orientationLayout.ColumnStyles.Clear();
this.orientationLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 60F));
this.orientationLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 40F));
this.orientationLayout.RowCount = 2;
this.orientationLayout.RowStyles.Clear();
this.orientationLayout.RowStyles.Add(new RowStyle(SizeType.Absolute, 16F));
this.orientationLayout.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
SetupTitle(this.lblOrientacaoTitulo, "ORIENTAÇÃO");
this.lblOrientacaoTitulo.Font = new Font("Segoe UI", 7.5F, FontStyle.Bold);
this.lblOrientacaoTitulo.Margin = Padding.Empty;
this.orientationLayout.Controls.Add(this.lblOrientacaoTitulo, 0, 0);
this.orientationLayout.SetColumnSpan(this.lblOrientacaoTitulo, 2);
this.orientationLayout.Controls.Add(this.compassControl, 0, 1);
this.orientationLayout.Controls.Add(this.orientationValuesLayout, 1, 1);
this.compassControl.Dock = DockStyle.Fill;
this.compassControl.Margin = Padding.Empty;
this.compassControl.MinimumSize = Size.Empty;
this.compassControl.MaximumSize = Size.Empty;
this.orientationValuesLayout.ColumnCount = 1;
this.orientationValuesLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.orientationValuesLayout.Controls.Add(this.lblRoverTitulo, 0, 0);
this.orientationValuesLayout.Controls.Add(this.lblRoverValor, 0, 1);
this.orientationValuesLayout.Controls.Add(this.lblTrajetoriaTitulo, 0, 2);
this.orientationValuesLayout.Controls.Add(this.lblTrajetoriaValor, 0, 3);
this.orientationValuesLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.orientationValuesLayout.RowCount = 4;
this.orientationValuesLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 18F));
this.orientationValuesLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 32F));
this.orientationValuesLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 18F));
this.orientationValuesLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 32F));
SetupHeadingTitle(this.lblRoverTitulo, "Rover", AgroBase.Forms.IHM.Controls.HmiTheme.Success);
SetupHeadingValue(this.lblRoverValor, "128°", AgroBase.Forms.IHM.Controls.HmiTheme.Success);
SetupHeadingTitle(this.lblTrajetoriaTitulo, "Trajetória", AgroBase.Forms.IHM.Controls.HmiTheme.Warning);
SetupHeadingValue(this.lblTrajetoriaValor, "136°", AgroBase.Forms.IHM.Controls.HmiTheme.Warning);
ConfigurePanel(this.pnlGnss, this.gnssLayout);
this.pnlGnss.Padding = new Padding(6, 4, 6, 4);
this.gnssLayout.ColumnCount = 1;
this.gnssLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.gnssLayout.Controls.Add(this.metricSatelites, 0, 0);
this.gnssLayout.Controls.Add(this.metricPrecisao, 0, 1);
this.gnssLayout.Controls.Add(this.metricIdadeCorrecao, 0, 2);
this.gnssLayout.Controls.Add(this.metricAltitude, 0, 3);
this.gnssLayout.Controls.Add(this.metricVelocidade, 0, 4);
this.gnssLayout.Controls.Add(this.metricHeading, 0, 5);
this.gnssLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.gnssLayout.RowCount = 6;
this.gnssLayout.RowStyles.Clear();
for (int i = 0; i < 6; i++)
this.gnssLayout.RowStyles.Add(new RowStyle(SizeType.Percent, 16.6667F));
//SetupTitle(this.lblGnssTitulo, "GNSS");
SetupMetric(this.metricSatelites, "Satélites", "18");
SetupMetric(this.metricPrecisao, "Precisão", "0,8 cm");
SetupMetric(this.metricIdadeCorrecao, "Idade correção", "1,2 s");
SetupMetric(this.metricAltitude, "Altitude", "812 m");
SetupMetric(this.metricVelocidade, "Velocidade", "3,4 km/h");
SetupMetric(this.metricHeading, "Heading", "128°");
ConfigurePanel(this.pnlTrajetoria, this.trajectoryLayout);
this.trajectoryLayout.ColumnCount = 1;
this.trajectoryLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.trajectoryLayout.Controls.Add(this.trajectoryTopCards, 0, 0);
this.trajectoryLayout.Controls.Add(this.progressRuaHeader, 0, 1);
this.trajectoryLayout.Controls.Add(this.progressRua, 0, 2);
this.trajectoryLayout.Controls.Add(this.progressGeralHeader, 0, 3);
this.trajectoryLayout.Controls.Add(this.progressGeral, 0, 4);
this.trajectoryLayout.Controls.Add(this.trajectoryBottomLayout, 0, 5);
this.trajectoryLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.trajectoryLayout.RowCount = 6;
this.trajectoryLayout.RowStyles.Clear();
this.trajectoryLayout.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F));
this.trajectoryLayout.RowStyles.Add(new RowStyle(SizeType.Absolute, 25F));
this.trajectoryLayout.RowStyles.Add(new RowStyle(SizeType.Absolute, 12F));
this.trajectoryLayout.RowStyles.Add(new RowStyle(SizeType.Absolute, 25F));
this.trajectoryLayout.RowStyles.Add(new RowStyle(SizeType.Absolute, 12F));
this.trajectoryLayout.RowStyles.Add(new RowStyle(SizeType.Absolute, 40F));
//SetupTitle(this.lblTrajetoriaSecaoTitulo, "TRAJETÓRIA");
this.trajectoryTopCards.ColumnCount = 3;
this.trajectoryTopCards.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33F));
this.trajectoryTopCards.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33F));
this.trajectoryTopCards.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.34F));
this.trajectoryTopCards.Controls.Add(this.lblRuaAtual, 0, 0);
this.trajectoryTopCards.Controls.Add(this.lblDentroCorredor, 1, 0);
this.trajectoryTopCards.Controls.Add(this.lblProximoPonto, 2, 0);
this.trajectoryTopCards.Dock = System.Windows.Forms.DockStyle.Fill;
SetupInfoBox(this.lblRuaAtual, "Rua 12 / 35", AgroBase.Forms.IHM.Controls.HmiTheme.Info);
SetupInfoBox(this.lblDentroCorredor, "No corredor Sim", AgroBase.Forms.IHM.Controls.HmiTheme.Success);
SetupInfoBox(this.lblProximoPonto, "Ponto 124 / 842", AgroBase.Forms.IHM.Controls.HmiTheme.Info);
SetupProgressHeader(
this.progressRuaHeader,
this.lblProgressoRuaTitulo,
this.lblProgressoRuaValor,
"Progresso da rua",
"65% · 124 / 275 m");
this.progressRua.Dock = System.Windows.Forms.DockStyle.Fill;
this.progressRua.Maximum = 100;
this.progressRua.Value = 65;
this.progressRua.Margin = new System.Windows.Forms.Padding(1, 1, 1, 1);
this.progressRua.CornerRadius = 5;
SetupProgressHeader(
this.progressGeralHeader,
this.lblProgressoGeralTitulo,
this.lblProgressoGeralValor,
"Progresso geral",
"38% · 842 / 2200 m");
this.progressGeral.Dock = System.Windows.Forms.DockStyle.Fill;
this.progressGeral.Maximum = 100;
this.progressGeral.Value = 38;
this.progressGeral.Margin = new System.Windows.Forms.Padding(1, 1, 1, 1);
this.progressGeral.CornerRadius = 5;
this.trajectoryBottomLayout.Controls.Clear();
this.trajectoryBottomLayout.ColumnCount = 2;
this.trajectoryBottomLayout.ColumnStyles.Clear();
this.trajectoryBottomLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
this.trajectoryBottomLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
this.trajectoryBottomLayout.RowCount = 2;
this.trajectoryBottomLayout.RowStyles.Clear();
this.trajectoryBottomLayout.RowStyles.Add(new RowStyle(SizeType.Absolute, 25F));
this.trajectoryBottomLayout.RowStyles.Add(new RowStyle(SizeType.Absolute, 25F));
SetupTrajectoryFooterCard(this.cardStatusMapa, this.lblStatusMapa, HmiTheme.Success);
SetupTrajectoryFooterCard(this.cardTempoOperacao, this.lblTempoOperacao, HmiTheme.Info);
SetupTrajectoryFooterCard(this.cardDistanciaEsq, this.lblDistanciaEsq, HmiTheme.Info);
SetupTrajectoryFooterCard(this.cardDistanciaDir, this.lblDistanciaDir, HmiTheme.Info);
this.trajectoryBottomLayout.Controls.Add(this.cardStatusMapa, 0, 0);
this.trajectoryBottomLayout.Controls.Add(this.cardTempoOperacao, 1, 0);
this.trajectoryBottomLayout.Controls.Add(this.cardDistanciaEsq, 0, 1);
this.trajectoryBottomLayout.Controls.Add(this.cardDistanciaDir, 1, 1);
this.trajectoryBottomLayout.Dock = DockStyle.Fill;
this.trajectoryBottomLayout.Margin = Padding.Empty;
this.trajectoryBottomLayout.Padding = Padding.Empty;
this.lblStatusMapa.Text = "Caminhando Rua";
this.lblTempoOperacao.Text = "00:17:32 / 00:42:00";
this.lblDistanciaEsq.Text = "Esq. 0,12 m";
this.lblDistanciaDir.Text = "Dir. 0,15 m";
ConfigurePanel(this.pnlAutonomia, this.autonomyLayout);
this.pnlAutonomia.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
this.autonomyLayout.ColumnCount = 2;
this.autonomyLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.autonomyLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.autonomyLayout.Controls.Add(this.lblAutonomiaTitulo, 0, 0);
this.autonomyLayout.SetColumnSpan(this.lblAutonomiaTitulo, 2);
this.autonomyLayout.Controls.Add(this.autonomiaBateria, 0, 1);
this.autonomyLayout.Controls.Add(this.autonomiaHerbicida, 1, 1);
this.autonomyLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.autonomyLayout.RowCount = 2;
this.autonomyLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 23F));
this.autonomyLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
SetupTitle(this.lblAutonomiaTitulo, "AUTONOMIA DO CORREDOR");
this.autonomiaBateria.Dock = System.Windows.Forms.DockStyle.Fill;
this.autonomiaBateria.Titulo = "BATERIA";
this.autonomiaBateria.Distancia = "620 m";
this.autonomiaBateria.Tempo = "00:21:00";
this.autonomiaBateria.Margin = new System.Windows.Forms.Padding(2);
this.autonomiaHerbicida.Dock = System.Windows.Forms.DockStyle.Fill;
this.autonomiaHerbicida.Titulo = "HERBICIDA";
this.autonomiaHerbicida.Distancia = "480 m";
this.autonomiaHerbicida.Tempo = "00:16:30";
this.autonomiaHerbicida.Margin = new System.Windows.Forms.Padding(2);
ConfigurePanel(this.pnlAlertaAutonomia, this.alertLayout);
this.pnlAlertaAutonomia.BorderColor = AgroBase.Forms.IHM.Controls.HmiTheme.Danger;
this.pnlAlertaAutonomia.Margin = System.Windows.Forms.Padding.Empty;
this.alertLayout.ColumnCount = 2;
this.alertLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.alertLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.alertLayout.Controls.Add(this.lblAlertaTitulo, 0, 0);
this.alertLayout.SetColumnSpan(this.lblAlertaTitulo, 2);
this.alertLayout.Controls.Add(this.lblAlertaTexto, 0, 1);
this.alertLayout.SetColumnSpan(this.lblAlertaTexto, 2);
this.alertLayout.Controls.Add(this.btnAtualizarAutonomia, 0, 2);
this.alertLayout.Controls.Add(this.btnLiberarSupervisao, 1, 2);
this.alertLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.alertLayout.RowCount = 3;
this.alertLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 31F));
this.alertLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.alertLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 43F));
this.lblAlertaTitulo.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblAlertaTitulo.BackColor = System.Drawing.Color.Transparent;
this.lblAlertaTitulo.ForeColor = AgroBase.Forms.IHM.Controls.HmiTheme.Danger;
this.lblAlertaTitulo.Font = new System.Drawing.Font("Segoe UI", 9.5F, System.Drawing.FontStyle.Bold);
this.lblAlertaTitulo.Text = "Autonomia insuficiente para concluir o corredor";
this.lblAlertaTitulo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.lblAlertaTitulo.AutoEllipsis = true;
this.lblAlertaTexto.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblAlertaTexto.BackColor = System.Drawing.Color.Transparent;
this.lblAlertaTexto.ForeColor = AgroBase.Forms.IHM.Controls.HmiTheme.TextMuted;
this.lblAlertaTexto.Font = new System.Drawing.Font("Segoe UI", 7F);
this.lblAlertaTexto.Text =
"A autonomia atual não é suficiente para finalizar o corredor com segurança.\n" +
"Atualize os recursos ou libere a supervisão para continuar.";
this.lblAlertaTexto.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
SetupAction(this.btnAtualizarAutonomia, "ATUALIZAR", "↻", AgroBase.Forms.IHM.Controls.HmiTheme.TextMuted);
SetupAction(this.btnLiberarSupervisao, "LIBERAR", "□", AgroBase.Forms.IHM.Controls.HmiTheme.Danger);
ConfigurePanel(this.pnlStatusAutonomia, this.statusAutonomiaLayout);
this.pnlStatusAutonomia.BorderColor = AgroBase.Forms.IHM.Controls.HmiTheme.Success;
this.pnlStatusAutonomia.Margin = System.Windows.Forms.Padding.Empty;
this.statusAutonomiaLayout.ColumnCount = 1;
this.statusAutonomiaLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.statusAutonomiaLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusAutonomiaLayout.Margin = System.Windows.Forms.Padding.Empty;
this.statusAutonomiaLayout.Padding = new System.Windows.Forms.Padding(6);
this.statusAutonomiaLayout.RowCount = 5;
this.statusAutonomiaLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.statusAutonomiaLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.statusAutonomiaLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.statusAutonomiaLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.statusAutonomiaLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
SetupStatusAutonomiaLabel(this.lblStatusAutonomiaTitulo, "STATUS DA AUTONOMIA", HmiTheme.Text, true);
SetupStatusAutonomiaLabel(this.lblStatusBateria, "Bateria: suficiente para concluir", HmiTheme.Success, false);
SetupStatusAutonomiaLabel(this.lblStatusHerbicida, "Herbicida: suficiente para concluir", HmiTheme.Success, false);
SetupStatusAutonomiaLabel(this.lblStatusCorredor, "Corredor liberado", HmiTheme.Success, true);
SetupStatusAutonomiaLabel(this.lblStatusAvaliacao, "Nova avaliação na próxima troca de rua", HmiTheme.TextMuted, false);
this.statusAutonomiaLayout.Controls.Add(this.lblStatusAutonomiaTitulo, 0, 0);
this.statusAutonomiaLayout.Controls.Add(this.lblStatusBateria, 0, 1);
this.statusAutonomiaLayout.Controls.Add(this.lblStatusHerbicida, 0, 2);
this.statusAutonomiaLayout.Controls.Add(this.lblStatusCorredor, 0, 3);
this.statusAutonomiaLayout.Controls.Add(this.lblStatusAvaliacao, 0, 4);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = AgroBase.Forms.IHM.Controls.HmiTheme.Background;
this.Controls.Add(this.rootLayout);
this.DoubleBuffered = true;
this.Name = "ucOperacaoNavegacao";
this.Size = new System.Drawing.Size(784, 435);
this.ResumeLayout(false);
}
private static void ConfigurePanel(
AgroBase.Forms.IHM.Controls.HmiRoundedPanel panel,
System.Windows.Forms.Control child)
{
panel.BorderColor = AgroBase.Forms.IHM.Controls.HmiTheme.Border;
panel.Controls.Add(child);
panel.CornerRadius = 9;
panel.Dock = System.Windows.Forms.DockStyle.Fill;
panel.FillColor = AgroBase.Forms.IHM.Controls.HmiTheme.Surface;
panel.Margin = new System.Windows.Forms.Padding(0, 0, 0, 3);
panel.Padding = new System.Windows.Forms.Padding(7);
}
private static void SetupTitle(
System.Windows.Forms.Label label,
string text)
{
label.Dock = System.Windows.Forms.DockStyle.Fill;
label.BackColor = System.Drawing.Color.Transparent;
label.ForeColor = AgroBase.Forms.IHM.Controls.HmiTheme.Text;
label.Font = new System.Drawing.Font("Segoe UI", 8.6F, System.Drawing.FontStyle.Bold);
label.Text = text;
label.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
label.AutoEllipsis = true;
}
private static void SetupMapButton(
System.Windows.Forms.Button button,
string text)
{
button.Dock = System.Windows.Forms.DockStyle.Fill;
button.Text = text;
button.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
button.FlatAppearance.BorderColor = AgroBase.Forms.IHM.Controls.HmiTheme.Border;
button.BackColor = AgroBase.Forms.IHM.Controls.HmiTheme.SurfaceRaised;
button.ForeColor = AgroBase.Forms.IHM.Controls.HmiTheme.TextMuted;
button.Font = new System.Drawing.Font("Segoe UI", 7F, System.Drawing.FontStyle.Bold);
button.Margin = new System.Windows.Forms.Padding(2);
}
private static void SetupHeadingTitle(
System.Windows.Forms.Label label,
string text,
System.Drawing.Color color)
{
label.Dock = System.Windows.Forms.DockStyle.Fill;
label.BackColor = System.Drawing.Color.Transparent;
label.ForeColor = color;
label.Font = new System.Drawing.Font("Segoe UI", 6.8F, System.Drawing.FontStyle.Bold);
label.Text = text;
label.TextAlign = System.Drawing.ContentAlignment.BottomLeft;
label.Padding = new Padding(2, 0, 0, 0);
label.AutoEllipsis = true;
}
private static void SetupHeadingValue(
System.Windows.Forms.Label label,
string text,
System.Drawing.Color color)
{
label.Dock = System.Windows.Forms.DockStyle.Fill;
label.BackColor = System.Drawing.Color.Transparent;
label.ForeColor = color;
label.Font = new System.Drawing.Font("Segoe UI", 12.5F, System.Drawing.FontStyle.Bold);
label.Text = text;
label.TextAlign = System.Drawing.ContentAlignment.TopLeft;
label.Padding = new Padding(2, 0, 0, 0);
}
private static void SetupMetric(
AgroBase.Forms.IHM.Controls.Operacao.HmiNavigationMetric metric,
string title,
string value)
{
metric.Dock = System.Windows.Forms.DockStyle.Fill;
metric.Titulo = title;
metric.Valor = value;
}
private static void SetupInfoBox(Label label, string text, Color color)
{
label.Dock = DockStyle.Fill;
label.BackColor = HmiTheme.SurfaceRaised;
label.ForeColor = color;
label.Font = new Font("Segoe UI", 6F, FontStyle.Bold);
label.Text = text;
label.TextAlign = ContentAlignment.MiddleCenter;
label.AutoEllipsis = true;
label.AutoSize = false;
label.Margin = new Padding(1);
label.Padding = Padding.Empty;
}
private static void SetupTrajectoryFooterLabel(Label label, string text, Color color)
{
label.Dock = DockStyle.Fill;
label.AutoSize = false;
label.AutoEllipsis = true;
label.BackColor = HmiTheme.SurfaceRaised;
label.ForeColor = color;
label.Font = new Font("Segoe UI", 5.7F, FontStyle.Bold);
label.Text = text;
label.TextAlign = ContentAlignment.MiddleCenter;
label.Margin = Padding.Empty;
label.Padding = Padding.Empty;
}
private static void SetupProgressHeader(
System.Windows.Forms.TableLayoutPanel layout,
System.Windows.Forms.Label title,
System.Windows.Forms.Label value,
string titleText,
string valueText)
{
layout.ColumnCount = 2;
layout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 45F));
layout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 55F));
layout.Controls.Add(title, 0, 0);
layout.Controls.Add(value, 1, 0);
layout.Dock = System.Windows.Forms.DockStyle.Fill;
layout.Margin = System.Windows.Forms.Padding.Empty;
title.Dock = System.Windows.Forms.DockStyle.Fill;
title.BackColor = System.Drawing.Color.Transparent;
title.ForeColor = AgroBase.Forms.IHM.Controls.HmiTheme.TextMuted;
title.Font = new System.Drawing.Font("Segoe UI", 6.5F);
title.Text = titleText;
title.TextAlign = System.Drawing.ContentAlignment.BottomLeft;
value.Dock = System.Windows.Forms.DockStyle.Fill;
value.BackColor = System.Drawing.Color.Transparent;
value.ForeColor = AgroBase.Forms.IHM.Controls.HmiTheme.Text;
value.Font = new System.Drawing.Font("Segoe UI", 6.5F, System.Drawing.FontStyle.Bold);
value.Text = valueText;
value.TextAlign = System.Drawing.ContentAlignment.BottomRight;
value.AutoEllipsis = true;
}
private static void SetupAction(
AgroBase.Forms.IHM.Controls.HmiSidebarButton button,
string text,
string icon,
System.Drawing.Color accent)
{
button.Dock = System.Windows.Forms.DockStyle.Fill;
button.Text = text;
button.IconText = icon;
button.AccentColor = accent;
button.BorderColor = accent;
button.FillColor = AgroBase.Forms.IHM.Controls.HmiTheme.SurfaceRaised;
button.Margin = new System.Windows.Forms.Padding(3);
button.MinimumSize = System.Drawing.Size.Empty;
button.MaximumSize = System.Drawing.Size.Empty;
}
private static void SetupStatusAutonomiaLabel(
Label label,
string text,
Color color,
bool bold)
{
label.Dock = DockStyle.Fill;
label.AutoSize = false;
label.AutoEllipsis = true;
label.BackColor = HmiTheme.SurfaceRaised;
label.ForeColor = color;
label.Font = new Font(
"Segoe UI",
6.8F,
bold
? FontStyle.Bold
: FontStyle.Regular
);
label.Text = text;
label.TextAlign = ContentAlignment.MiddleCenter;
label.Margin = new Padding(0, 0, 0, 3);
}
private static void SetupTrajectoryFooterCard(HmiRoundedPanel card, Label label, Color accent)
{
card.Dock = DockStyle.Fill;
card.Margin = new Padding(1);
card.Padding = new Padding(1);
card.FillColor = HmiTheme.SurfaceRaised;
card.BorderColor = HmiTheme.Border;
card.CornerRadius = 6;
label.Dock = DockStyle.Fill;
label.AutoSize = false;
label.AutoEllipsis = true;
label.BackColor = Color.Transparent;
label.ForeColor = accent;
label.Font = new Font(
"Segoe UI",
5.8F,
FontStyle.Bold
);
label.TextAlign = ContentAlignment.MiddleCenter;
label.Margin = Padding.Empty;
label.Padding = Padding.Empty;
card.Controls.Add(label);
}
#endregion
private System.Windows.Forms.TableLayoutPanel rootLayout;
private System.Windows.Forms.TableLayoutPanel topLayout;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlMapa;
private System.Windows.Forms.TableLayoutPanel mapLayout;
private System.Windows.Forms.TableLayoutPanel mapHeaderLayout;
private System.Windows.Forms.Label lblMapaTitulo;
private System.Windows.Forms.Button btnMapaWeb;
private System.Windows.Forms.Button btnMapaDinamico;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlMapaVisual;
private System.Windows.Forms.Label lblMapaPlaceholder;
private System.Windows.Forms.TableLayoutPanel rightTopLayout;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlOrientacao;
private System.Windows.Forms.TableLayoutPanel orientationLayout;
private System.Windows.Forms.Label lblOrientacaoTitulo;
private AgroBase.Forms.IHM.Controls.Operacao.HmiCompassControl compassControl;
private System.Windows.Forms.TableLayoutPanel orientationValuesLayout;
private System.Windows.Forms.Label lblRoverTitulo;
private System.Windows.Forms.Label lblRoverValor;
private System.Windows.Forms.Label lblTrajetoriaTitulo;
private System.Windows.Forms.Label lblTrajetoriaValor;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlGnss;
private System.Windows.Forms.TableLayoutPanel gnssLayout;
private System.Windows.Forms.Label lblGnssTitulo;
private AgroBase.Forms.IHM.Controls.Operacao.HmiNavigationMetric metricSatelites;
private AgroBase.Forms.IHM.Controls.Operacao.HmiNavigationMetric metricPrecisao;
private AgroBase.Forms.IHM.Controls.Operacao.HmiNavigationMetric metricIdadeCorrecao;
private AgroBase.Forms.IHM.Controls.Operacao.HmiNavigationMetric metricAltitude;
private AgroBase.Forms.IHM.Controls.Operacao.HmiNavigationMetric metricVelocidade;
private AgroBase.Forms.IHM.Controls.Operacao.HmiNavigationMetric metricHeading;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlTrajetoria;
private System.Windows.Forms.TableLayoutPanel trajectoryLayout;
private System.Windows.Forms.Label lblTrajetoriaSecaoTitulo;
private System.Windows.Forms.TableLayoutPanel trajectoryTopCards;
private System.Windows.Forms.Label lblRuaAtual;
private System.Windows.Forms.Label lblDentroCorredor;
private System.Windows.Forms.Label lblProximoPonto;
private System.Windows.Forms.TableLayoutPanel progressRuaHeader;
private System.Windows.Forms.Label lblProgressoRuaTitulo;
private System.Windows.Forms.Label lblProgressoRuaValor;
private AgroBase.Forms.IHM.Controls.Operacao.HmiProgressBar progressRua;
private System.Windows.Forms.TableLayoutPanel progressGeralHeader;
private System.Windows.Forms.Label lblProgressoGeralTitulo;
private System.Windows.Forms.Label lblProgressoGeralValor;
private AgroBase.Forms.IHM.Controls.Operacao.HmiProgressBar progressGeral;
private System.Windows.Forms.TableLayoutPanel trajectoryBottomLayout;
private System.Windows.Forms.Label lblStatusMapa;
private System.Windows.Forms.Label lblTempoOperacao;
private System.Windows.Forms.Label lblDistanciaEsq;
private System.Windows.Forms.Label lblDistanciaDir;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlAutonomia;
private System.Windows.Forms.TableLayoutPanel autonomyLayout;
private System.Windows.Forms.Label lblAutonomiaTitulo;
private AgroBase.Forms.IHM.Controls.Operacao.HmiAutonomyResourceCard autonomiaBateria;
private AgroBase.Forms.IHM.Controls.Operacao.HmiAutonomyResourceCard autonomiaHerbicida;
private System.Windows.Forms.Panel pnlAutonomiaDireitaHost;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlStatusAutonomia;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlAlertaAutonomia;
private System.Windows.Forms.TableLayoutPanel alertLayout;
private System.Windows.Forms.Label lblAlertaTitulo;
private System.Windows.Forms.Label lblAlertaTexto;
private AgroBase.Forms.IHM.Controls.HmiSidebarButton btnAtualizarAutonomia;
private AgroBase.Forms.IHM.Controls.HmiSidebarButton btnLiberarSupervisao;
private System.Windows.Forms.TableLayoutPanel statusAutonomiaLayout;
private System.Windows.Forms.Label lblStatusAutonomiaTitulo;
private System.Windows.Forms.Label lblStatusBateria;
private System.Windows.Forms.Label lblStatusHerbicida;
private System.Windows.Forms.Label lblStatusCorredor;
private System.Windows.Forms.Label lblStatusAvaliacao;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel cardStatusMapa;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel cardTempoOperacao;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel cardDistanciaEsq;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel cardDistanciaDir;
}
}

View File

@ -0,0 +1,236 @@
using AgroBase.Forms.IHM.Controls;
using AgroBase.Forms.IHM.Controls.Operacao;
using System;
using System.Drawing;
using System.Windows.Forms;
namespace AgroBase.Forms.IHM.Operacao
{
public partial class ucOperacaoNavegacao : UserControl
{
private bool _alertaAutonomiaVisivel;
public ucOperacaoNavegacao()
{
InitializeComponent();
ConfigurarEstadoInicial();
VincularEventos();
MostrarStatusAutonomia();
}
private void ConfigurarEstadoInicial()
{
SelecionarMapa(btnMapaDinamico);
compassControl.RoverHeading = 128D;
compassControl.TrajectoryHeading = 136D;
metricSatelites.CorValor = HmiTheme.Success;
metricPrecisao.CorValor = HmiTheme.Success;
metricIdadeCorrecao.CorValor = HmiTheme.Success;
metricAltitude.CorValor = HmiTheme.Success;
metricVelocidade.CorValor = HmiTheme.Success;
metricHeading.CorValor = HmiTheme.Success;
progressRua.Value = 65;
progressRua.BarColor = HmiTheme.Info;
progressGeral.Value = 38;
progressGeral.BarColor = HmiTheme.Success;
autonomiaBateria.AccentColor = HmiTheme.Warning;
autonomiaHerbicida.AccentColor = HmiTheme.Danger;
}
private void VincularEventos()
{
btnMapaWeb.Click += delegate
{
SelecionarMapa(btnMapaWeb);
};
btnMapaDinamico.Click += delegate
{
SelecionarMapa(btnMapaDinamico);
};
btnAtualizarAutonomia.Click += btnAtualizarAutonomia_Click;
btnLiberarSupervisao.Click += btnLiberarSupervisao_Click;
}
private void SelecionarMapa(Button selecionado)
{
AplicarEstiloMapa(btnMapaWeb, false);
AplicarEstiloMapa(btnMapaDinamico, false);
AplicarEstiloMapa(selecionado, true);
}
private static void AplicarEstiloMapa(
Button button,
bool selecionado)
{
if (selecionado)
{
button.BackColor = Color.FromArgb(31, 91, 43);
button.ForeColor = HmiTheme.Text;
button.FlatAppearance.BorderColor = HmiTheme.Success;
}
else
{
button.BackColor = HmiTheme.SurfaceRaised;
button.ForeColor = HmiTheme.TextMuted;
button.FlatAppearance.BorderColor = HmiTheme.Border;
}
}
public void AtualizarOrientacao(
double headingRover,
double headingTrajetoria,
bool possuiTrajetoria)
{
compassControl.RoverHeading = headingRover;
compassControl.TrajectoryHeading = headingTrajetoria;
compassControl.ShowTrajectory = possuiTrajetoria;
lblRoverValor.Text =
headingRover.ToString("0") + "°";
lblTrajetoriaValor.Text =
possuiTrajetoria
? headingTrajetoria.ToString("0") + "°"
: "--";
}
public void AtualizarProgresso(
int percentualRua,
string detalheRua,
int percentualGeral,
string detalheGeral)
{
progressRua.Value = percentualRua;
lblProgressoRuaValor.Text =
percentualRua +
"% · " +
(detalheRua ?? string.Empty);
progressGeral.Value = percentualGeral;
lblProgressoGeralValor.Text =
percentualGeral +
"% · " +
(detalheGeral ?? string.Empty);
}
private void MostrarStatusAutonomia()
{
_alertaAutonomiaVisivel = false;
pnlAlertaAutonomia.Visible = false;
pnlStatusAutonomia.Visible = true;
pnlStatusAutonomia.BringToFront();
}
private void MostrarAlertaAutonomia()
{
_alertaAutonomiaVisivel = true;
pnlStatusAutonomia.Visible = false;
pnlAlertaAutonomia.Visible = true;
pnlAlertaAutonomia.BringToFront();
}
private void RecalcularAutonomia()
{
}
private bool AutonomiaPermiteConcluirCorredor()
{
return true;
}
private void btnAtualizarAutonomia_Click(object sender, EventArgs e)
{
RecalcularAutonomia();
if (AutonomiaPermiteConcluirCorredor())
{
MostrarStatusAutonomia();
AtualizarStatusAutonomia(
"Bateria: suficiente para concluir",
HmiTheme.Success,
"Herbicida: suficiente para concluir",
HmiTheme.Success,
"Corredor liberado",
HmiTheme.Success
);
}
else
{
MostrarAlertaAutonomia();
}
}
private void btnLiberarSupervisao_Click(object sender, EventArgs e)
{
// Aqui entra a liberação real da operação.
// Exemplo:
// op.AutonomiaCorredor.LiberadaManualmente = true;
MostrarStatusAutonomia();
AtualizarStatusAutonomia(
"Bateria: autonomia abaixo do recomendado",
HmiTheme.Warning,
"Herbicida: autonomia abaixo do recomendado",
HmiTheme.Warning,
"Liberado por supervisão",
HmiTheme.Warning
);
}
private void AtualizarStatusAutonomia(
string bateria,
Color corBateria,
string herbicida,
Color corHerbicida,
string corredor,
Color corCorredor)
{
lblStatusBateria.Text =
bateria;
lblStatusBateria.ForeColor =
corBateria;
lblStatusHerbicida.Text =
herbicida;
lblStatusHerbicida.ForeColor =
corHerbicida;
lblStatusCorredor.Text =
corredor;
lblStatusCorredor.ForeColor =
corCorredor;
}
public void AtualizarBloqueioAutonomia(bool corredorBloqueado, bool liberadoManualmente)
{
if (corredorBloqueado && !liberadoManualmente)
{
MostrarAlertaAutonomia();
return;
}
MostrarStatusAutonomia();
}
}
}

View File

@ -0,0 +1,718 @@
namespace AgroBase.Forms.IHM.Operacao
{
partial class ucOperacaoParametros
{
private System.ComponentModel.IContainer components = null;
protected override void Dispose(bool disposing)
{
if (disposing &&
components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
private void InitializeComponent()
{
this.rootLayout = new System.Windows.Forms.TableLayoutPanel();
this.leftLayout = new System.Windows.Forms.TableLayoutPanel();
this.pnlGeral = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.geralLayout = new System.Windows.Forms.TableLayoutPanel();
this.lblGeralTitulo = new System.Windows.Forms.Label();
this.lblModoOperacao = new System.Windows.Forms.Label();
this.btnModoManual = new System.Windows.Forms.Button();
this.btnModoMapaGps = new System.Windows.Forms.Button();
this.toggleRegistrarDados = new AgroBase.Forms.IHM.Controls.Operacao.HmiParameterToggleRow();
this.pnlMovimento = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.movimentoLayout = new System.Windows.Forms.TableLayoutPanel();
this.lblMovimentoTitulo = new System.Windows.Forms.Label();
this.movTogglesLayout = new System.Windows.Forms.TableLayoutPanel();
this.toggleMovAutomatico = new AgroBase.Forms.IHM.Controls.Operacao.HmiParameterToggleRow();
this.toggleMovSonar = new AgroBase.Forms.IHM.Controls.Operacao.HmiParameterToggleRow();
this.toggleParadaObstaculo = new AgroBase.Forms.IHM.Controls.Operacao.HmiParameterToggleRow();
this.toggleMovImu = new AgroBase.Forms.IHM.Controls.Operacao.HmiParameterToggleRow();
this.toggleParadaInclinacao = new AgroBase.Forms.IHM.Controls.Operacao.HmiParameterToggleRow();
this.toggleFrenagemParar = new AgroBase.Forms.IHM.Controls.Operacao.HmiParameterToggleRow();
this.movValuesLayout = new System.Windows.Forms.TableLayoutPanel();
this.paramVelSemErvas = new AgroBase.Forms.IHM.Controls.Operacao.HmiParameterValueBox();
this.paramVelComErvas = new AgroBase.Forms.IHM.Controls.Operacao.HmiParameterValueBox();
this.pnlDirecional = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.direcionalLayout = new System.Windows.Forms.TableLayoutPanel();
this.lblDirecionalTitulo = new System.Windows.Forms.Label();
this.dirTogglesLayout = new System.Windows.Forms.TableLayoutPanel();
this.toggleDirAutomatico = new AgroBase.Forms.IHM.Controls.Operacao.HmiParameterToggleRow();
this.toggleDirSonar = new AgroBase.Forms.IHM.Controls.Operacao.HmiParameterToggleRow();
this.toggleDirImu = new AgroBase.Forms.IHM.Controls.Operacao.HmiParameterToggleRow();
this.toggleImuPrefereArco = new AgroBase.Forms.IHM.Controls.Operacao.HmiParameterToggleRow();
this.dirValuesLayout = new System.Windows.Forms.TableLayoutPanel();
this.paramAnguloMaximo = new AgroBase.Forms.IHM.Controls.Operacao.HmiParameterValueBox();
this.paramVelMovimentoDir = new AgroBase.Forms.IHM.Controls.Operacao.HmiParameterValueBox();
this.pnlTipoControle = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.tipoControleLayout = new System.Windows.Forms.TableLayoutPanel();
this.lblTipoControle = new System.Windows.Forms.Label();
this.btnControleMpc = new System.Windows.Forms.Button();
this.btnControlePid = new System.Windows.Forms.Button();
this.pnlAtuador = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.atuadorLayout = new System.Windows.Forms.TableLayoutPanel();
this.lblAtuadorTitulo = new System.Windows.Forms.Label();
this.togglePulverizadorAutomatico = new AgroBase.Forms.IHM.Controls.Operacao.HmiParameterToggleRow();
this.cmbModoAgitador = new System.Windows.Forms.ComboBox();
this.atuadorValuesLayout = new System.Windows.Forms.TableLayoutPanel();
this.paramBicosEmUso = new AgroBase.Forms.IHM.Controls.Operacao.HmiParameterValueBox();
this.paramCapacidadeReservatorio = new AgroBase.Forms.IHM.Controls.Operacao.HmiParameterValueBox();
this.paramPressaoLinha = new AgroBase.Forms.IHM.Controls.Operacao.HmiParameterValueBox();
this.paramTelaIniciar = new AgroBase.Forms.IHM.Controls.Operacao.HmiParameterValueBox();
this.paramAlturaArea = new AgroBase.Forms.IHM.Controls.Operacao.HmiParameterValueBox();
this.paramErvasOn = new AgroBase.Forms.IHM.Controls.Operacao.HmiParameterValueBox();
this.paramErvasOff = new AgroBase.Forms.IHM.Controls.Operacao.HmiParameterValueBox();
this.pnlMpc = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.mpcLayout = new System.Windows.Forms.TableLayoutPanel();
this.lblMpcTitulo = new System.Windows.Forms.Label();
this.paramHorizonte = new AgroBase.Forms.IHM.Controls.Operacao.HmiParameterValueBox();
this.paramAnteciparFim = new AgroBase.Forms.IHM.Controls.Operacao.HmiParameterValueBox();
this.rightLayout = new System.Windows.Forms.TableLayoutPanel();
this.pnlMapa = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.mapLayout = new System.Windows.Forms.TableLayoutPanel();
this.mapHeaderLayout = new System.Windows.Forms.TableLayoutPanel();
this.lblMapaTitulo = new System.Windows.Forms.Label();
this.btnMapaBonito = new System.Windows.Forms.Button();
this.btnMapaDinamico = new System.Windows.Forms.Button();
this.pnlMapaVisual = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.lblMapaPlaceholder = new System.Windows.Forms.Label();
this.lblMapaAjuda = new System.Windows.Forms.Label();
this.footerLayout = new System.Windows.Forms.TableLayoutPanel();
this.btnAplicarAtual = new AgroBase.Forms.IHM.Controls.HmiSidebarButton();
this.btnSalvarParametros = new AgroBase.Forms.IHM.Controls.HmiSidebarButton();
this.rootLayout.SuspendLayout();
this.leftLayout.SuspendLayout();
this.pnlGeral.SuspendLayout();
this.geralLayout.SuspendLayout();
this.pnlMovimento.SuspendLayout();
this.movimentoLayout.SuspendLayout();
this.movTogglesLayout.SuspendLayout();
this.movValuesLayout.SuspendLayout();
this.pnlDirecional.SuspendLayout();
this.direcionalLayout.SuspendLayout();
this.dirTogglesLayout.SuspendLayout();
this.dirValuesLayout.SuspendLayout();
this.pnlTipoControle.SuspendLayout();
this.tipoControleLayout.SuspendLayout();
this.pnlAtuador.SuspendLayout();
this.atuadorLayout.SuspendLayout();
this.atuadorValuesLayout.SuspendLayout();
this.pnlMpc.SuspendLayout();
this.mpcLayout.SuspendLayout();
this.rightLayout.SuspendLayout();
this.pnlMapa.SuspendLayout();
this.mapLayout.SuspendLayout();
this.mapHeaderLayout.SuspendLayout();
this.pnlMapaVisual.SuspendLayout();
this.footerLayout.SuspendLayout();
this.SuspendLayout();
// root
this.rootLayout.BackColor =
AgroBase.Forms.IHM.Controls.HmiTheme.Background;
this.rootLayout.ColumnCount = 2;
this.rootLayout.ColumnStyles.Add(
new System.Windows.Forms.ColumnStyle(
System.Windows.Forms.SizeType.Percent,
52F));
this.rootLayout.ColumnStyles.Add(
new System.Windows.Forms.ColumnStyle(
System.Windows.Forms.SizeType.Percent,
48F));
this.rootLayout.Controls.Add(
this.leftLayout,
0,
0);
this.rootLayout.Controls.Add(
this.rightLayout,
1,
0);
this.rootLayout.Dock =
System.Windows.Forms.DockStyle.Fill;
this.rootLayout.Margin =
new System.Windows.Forms.Padding(0);
this.rootLayout.Padding =
new System.Windows.Forms.Padding(0);
// left
this.leftLayout.BackColor =
System.Drawing.Color.Transparent;
this.leftLayout.ColumnCount = 1;
this.leftLayout.ColumnStyles.Add(
new System.Windows.Forms.ColumnStyle(
System.Windows.Forms.SizeType.Percent,
100F));
this.leftLayout.Controls.Add(
this.pnlGeral,
0,
0);
this.leftLayout.Controls.Add(
this.pnlMovimento,
0,
1);
this.leftLayout.Controls.Add(
this.pnlDirecional,
0,
2);
this.leftLayout.Controls.Add(
this.pnlAtuador,
0,
3);
this.leftLayout.Controls.Add(
this.pnlMpc,
0,
4);
this.leftLayout.Dock =
System.Windows.Forms.DockStyle.Fill;
this.leftLayout.Margin =
new System.Windows.Forms.Padding(
0,
0,
3,
0);
this.leftLayout.RowCount = 5;
this.leftLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14F));
this.leftLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.leftLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 22F));
this.leftLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 27F));
this.leftLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 12F));
ConfigurePanel(this.pnlGeral, this.geralLayout);
ConfigurePanel(this.pnlMovimento, this.movimentoLayout);
ConfigurePanel(this.pnlDirecional, this.direcionalLayout);
ConfigurePanel(this.pnlAtuador, this.atuadorLayout);
ConfigurePanel(this.pnlMpc, this.mpcLayout);
// geral
this.geralLayout.ColumnCount = 4;
this.geralLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 23F));
this.geralLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 19F));
this.geralLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 19F));
this.geralLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 39F));
this.geralLayout.Controls.Add(this.lblGeralTitulo, 0, 0);
this.geralLayout.Controls.Add(this.lblModoOperacao, 0, 1);
this.geralLayout.Controls.Add(this.btnModoManual, 1, 1);
this.geralLayout.Controls.Add(this.btnModoMapaGps, 2, 1);
this.geralLayout.Controls.Add(this.toggleRegistrarDados, 3, 1);
this.geralLayout.SetColumnSpan(this.lblGeralTitulo, 4);
this.geralLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.geralLayout.RowCount = 2;
this.geralLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 23F));
this.geralLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
SetupTitle(this.lblGeralTitulo, "1 GERAL DA OPERAÇÃO");
this.lblModoOperacao.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblModoOperacao.Text = "Modo de operação";
this.lblModoOperacao.ForeColor = AgroBase.Forms.IHM.Controls.HmiTheme.TextMuted;
this.lblModoOperacao.Font = new System.Drawing.Font("Segoe UI", 7F);
this.lblModoOperacao.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
SetupChoiceButton(this.btnModoManual, "Manual");
SetupChoiceButton(this.btnModoMapaGps, "MapaGPS");
this.toggleRegistrarDados.Dock = System.Windows.Forms.DockStyle.Fill;
this.toggleRegistrarDados.Titulo = "Registrar dados para pós-processamento";
// movimento
this.movimentoLayout.ColumnCount = 2;
this.movimentoLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 58F));
this.movimentoLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 42F));
this.movimentoLayout.Controls.Add(this.lblMovimentoTitulo, 0, 0);
this.movimentoLayout.Controls.Add(this.movTogglesLayout, 0, 1);
this.movimentoLayout.Controls.Add(this.movValuesLayout, 1, 1);
this.movimentoLayout.SetColumnSpan(this.lblMovimentoTitulo, 2);
this.movimentoLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.movimentoLayout.RowCount = 2;
this.movimentoLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 23F));
this.movimentoLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
SetupTitle(this.lblMovimentoTitulo, "2 MOVIMENTO");
this.movTogglesLayout.ColumnCount = 2;
this.movTogglesLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.movTogglesLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.movTogglesLayout.Controls.Add(this.toggleMovAutomatico, 0, 0);
this.movTogglesLayout.Controls.Add(this.toggleMovImu, 1, 0);
this.movTogglesLayout.Controls.Add(this.toggleMovSonar, 0, 1);
this.movTogglesLayout.Controls.Add(this.toggleParadaInclinacao, 1, 1);
this.movTogglesLayout.Controls.Add(this.toggleParadaObstaculo, 0, 2);
this.movTogglesLayout.Controls.Add(this.toggleFrenagemParar, 1, 2);
this.movTogglesLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.movTogglesLayout.RowCount = 3;
this.movTogglesLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33F));
this.movTogglesLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33F));
this.movTogglesLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.34F));
this.toggleMovAutomatico.Dock = System.Windows.Forms.DockStyle.Fill;
this.toggleMovAutomatico.Titulo = "Movimento automático";
this.toggleMovSonar.Dock = System.Windows.Forms.DockStyle.Fill;
this.toggleMovSonar.Titulo = "Assistido por sonar";
this.toggleParadaObstaculo.Dock = System.Windows.Forms.DockStyle.Fill;
this.toggleParadaObstaculo.Titulo = "Parada por obstáculo";
this.toggleMovImu.Dock = System.Windows.Forms.DockStyle.Fill;
this.toggleMovImu.Titulo = "Assistido por IMU";
this.toggleParadaInclinacao.Dock = System.Windows.Forms.DockStyle.Fill;
this.toggleParadaInclinacao.Titulo = "Parada por inclinação";
this.toggleFrenagemParar.Dock = System.Windows.Forms.DockStyle.Fill;
this.toggleFrenagemParar.Titulo = "Frenagem ao parar";
this.movValuesLayout.ColumnCount = 1;
this.movValuesLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.movValuesLayout.Controls.Add(this.paramVelSemErvas, 0, 0);
this.movValuesLayout.Controls.Add(this.paramVelComErvas, 0, 1);
this.movValuesLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.movValuesLayout.RowCount = 2;
this.movValuesLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.movValuesLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
SetupValueBox(this.paramVelSemErvas, "Vel. sem ervas", "%", 50, 0, 100, 0);
SetupValueBox(this.paramVelComErvas, "Vel. com ervas", "%", 35, 0, 100, 0);
// direcional
this.direcionalLayout.ColumnCount = 2;
this.direcionalLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 45F));
this.direcionalLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 55F));
this.direcionalLayout.Controls.Add(this.lblDirecionalTitulo, 0, 0);
this.direcionalLayout.Controls.Add(this.dirTogglesLayout, 0, 1);
this.direcionalLayout.Controls.Add(this.dirValuesLayout, 1, 1);
this.direcionalLayout.SetColumnSpan(this.lblDirecionalTitulo, 2);
this.direcionalLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.direcionalLayout.RowCount = 2;
this.direcionalLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 23F));
this.direcionalLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
SetupTitle(this.lblDirecionalTitulo, "3 DIRECIONAL");
this.dirTogglesLayout.ColumnCount = 1;
this.dirTogglesLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.dirTogglesLayout.Controls.Add(this.toggleDirAutomatico, 0, 0);
this.dirTogglesLayout.Controls.Add(this.toggleDirSonar, 0, 1);
this.dirTogglesLayout.Controls.Add(this.toggleDirImu, 0, 2);
this.dirTogglesLayout.Controls.Add(this.toggleImuPrefereArco, 0, 3);
this.dirTogglesLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.dirTogglesLayout.RowCount = 4;
for (int i = 0; i < 4; i++)
this.dirTogglesLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.toggleDirAutomatico.Dock = System.Windows.Forms.DockStyle.Fill;
this.toggleDirAutomatico.Titulo = "Direcional automático";
this.toggleDirSonar.Dock = System.Windows.Forms.DockStyle.Fill;
this.toggleDirSonar.Titulo = "Assistido por sonar";
this.toggleDirImu.Dock = System.Windows.Forms.DockStyle.Fill;
this.toggleDirImu.Titulo = "Assistido por IMU";
this.toggleImuPrefereArco.Dock = System.Windows.Forms.DockStyle.Fill;
this.toggleImuPrefereArco.Titulo = "IMU prefere arco";
this.toggleImuPrefereArco.Checked = false;
this.dirValuesLayout.ColumnCount = 3;
this.dirValuesLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33F));
this.dirValuesLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33F));
this.dirValuesLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.34F));
this.dirValuesLayout.Controls.Add(this.paramAnguloMaximo, 0, 0);
this.dirValuesLayout.Controls.Add(this.paramVelMovimentoDir, 1, 0);
this.dirValuesLayout.Controls.Add(this.pnlTipoControle, 2, 0);
this.dirValuesLayout.Dock = System.Windows.Forms.DockStyle.Fill;
SetupValueBox(this.paramAnguloMaximo, "Ângulo máximo", "°", 45, 0, 90, 0);
SetupValueBox(this.paramVelMovimentoDir, "Vel. movimento", "%", 60, 0, 100, 0);
this.pnlTipoControle.BorderColor = AgroBase.Forms.IHM.Controls.HmiTheme.Border;
this.pnlTipoControle.Controls.Add(this.tipoControleLayout);
this.pnlTipoControle.CornerRadius = 7;
this.pnlTipoControle.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlTipoControle.FillColor = AgroBase.Forms.IHM.Controls.HmiTheme.SurfaceRaised;
this.pnlTipoControle.Margin = new System.Windows.Forms.Padding(2);
this.pnlTipoControle.Padding = new System.Windows.Forms.Padding(5);
this.tipoControleLayout.ColumnCount = 2;
this.tipoControleLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tipoControleLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tipoControleLayout.Controls.Add(this.lblTipoControle, 0, 0);
this.tipoControleLayout.Controls.Add(this.btnControleMpc, 0, 1);
this.tipoControleLayout.Controls.Add(this.btnControlePid, 1, 1);
this.tipoControleLayout.SetColumnSpan(this.lblTipoControle, 2);
this.tipoControleLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.tipoControleLayout.RowCount = 2;
this.tipoControleLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 23F));
this.tipoControleLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.lblTipoControle.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblTipoControle.Text = "Tipo de controle";
this.lblTipoControle.ForeColor = AgroBase.Forms.IHM.Controls.HmiTheme.TextMuted;
this.lblTipoControle.Font = new System.Drawing.Font("Segoe UI", 7F);
this.lblTipoControle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
SetupChoiceButton(this.btnControleMpc, "MPC");
SetupChoiceButton(this.btnControlePid, "PID");
// atuador
this.atuadorLayout.ColumnCount = 2;
this.atuadorLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 42F));
this.atuadorLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 58F));
this.atuadorLayout.Controls.Add(this.lblAtuadorTitulo, 0, 0);
this.atuadorLayout.Controls.Add(this.togglePulverizadorAutomatico, 1, 0);
this.atuadorLayout.Controls.Add(this.cmbModoAgitador, 0, 1);
this.atuadorLayout.Controls.Add(this.atuadorValuesLayout, 0, 2);
this.atuadorLayout.SetColumnSpan(this.atuadorValuesLayout, 2);
this.atuadorLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.atuadorLayout.RowCount = 3;
this.atuadorLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F));
this.atuadorLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 34F));
this.atuadorLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
SetupTitle(this.lblAtuadorTitulo, "4 ATUADOR");
this.togglePulverizadorAutomatico.Dock = System.Windows.Forms.DockStyle.Fill;
this.togglePulverizadorAutomatico.Titulo = "Pulverizador automático";
this.cmbModoAgitador.Dock = System.Windows.Forms.DockStyle.Fill;
this.cmbModoAgitador.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbModoAgitador.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cmbModoAgitador.BackColor = AgroBase.Forms.IHM.Controls.HmiTheme.SurfaceRaised;
this.cmbModoAgitador.ForeColor = AgroBase.Forms.IHM.Controls.HmiTheme.Text;
this.cmbModoAgitador.Items.AddRange(new object[] { "Sem agitação", "Contínuo", "Intermitente" });
this.cmbModoAgitador.SelectedIndex = 1;
this.atuadorLayout.SetColumnSpan(this.cmbModoAgitador, 2);
this.atuadorValuesLayout.ColumnCount = 4;
this.atuadorValuesLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.atuadorValuesLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.atuadorValuesLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.atuadorValuesLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.atuadorValuesLayout.Controls.Add(this.paramBicosEmUso, 0, 0);
this.atuadorValuesLayout.Controls.Add(this.paramCapacidadeReservatorio, 1, 0);
this.atuadorValuesLayout.Controls.Add(this.paramPressaoLinha, 2, 0);
this.atuadorValuesLayout.Controls.Add(this.paramTelaIniciar, 3, 0);
this.atuadorValuesLayout.Controls.Add(this.paramAlturaArea, 0, 1);
this.atuadorValuesLayout.Controls.Add(this.paramErvasOn, 1, 1);
this.atuadorValuesLayout.Controls.Add(this.paramErvasOff, 2, 1);
this.atuadorValuesLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.atuadorValuesLayout.RowCount = 2;
this.atuadorValuesLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.atuadorValuesLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
SetupValueBox(this.paramBicosEmUso, "Bicos em uso", "", 6, 1, 12, 0);
SetupValueBox(this.paramCapacidadeReservatorio, "Capacidade reservatório", "L", 200, 50, 500, 0);
SetupValueBox(this.paramPressaoLinha, "Pressão da linha", "psi", 45, 0, 120, 0);
SetupValueBox(this.paramTelaIniciar, "% tela para iniciar", "%", 40, 0, 100, 0);
SetupValueBox(this.paramAlturaArea, "Altura da área", "%", 60, 0, 100, 0);
SetupValueBox(this.paramErvasOn, "% ervas ON", "%", 25, 0, 100, 0);
SetupValueBox(this.paramErvasOff, "% ervas OFF", "%", 15, 0, 100, 0);
// MPC
this.mpcLayout.ColumnCount = 3;
this.mpcLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 30F));
this.mpcLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 35F));
this.mpcLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 35F));
this.mpcLayout.Controls.Add(this.lblMpcTitulo, 0, 0);
this.mpcLayout.Controls.Add(this.paramHorizonte, 1, 0);
this.mpcLayout.Controls.Add(this.paramAnteciparFim, 2, 0);
this.mpcLayout.Dock = System.Windows.Forms.DockStyle.Fill;
SetupTitle(this.lblMpcTitulo, "5 MPC E NAVEGAÇÃO");
SetupValueBox(this.paramHorizonte, "Horizonte de predição", "m", 12, 0, 30, 1);
SetupValueBox(this.paramAnteciparFim, "Antecipar fim corredor", "m", 5, 0, 15, 1);
// right
this.rightLayout.BackColor = System.Drawing.Color.Transparent;
this.rightLayout.ColumnCount = 1;
this.rightLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.rightLayout.Controls.Add(this.pnlMapa, 0, 0);
this.rightLayout.Controls.Add(this.footerLayout, 0, 1);
this.rightLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.rightLayout.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.rightLayout.RowCount = 2;
this.rightLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 80F));
this.rightLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
ConfigurePanel(this.pnlMapa, this.mapLayout);
this.mapLayout.ColumnCount = 1;
this.mapLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.mapLayout.Controls.Add(this.mapHeaderLayout, 0, 0);
this.mapLayout.Controls.Add(this.pnlMapaVisual, 0, 1);
this.mapLayout.Controls.Add(this.lblMapaAjuda, 0, 2);
this.mapLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.mapLayout.RowCount = 3;
this.mapLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 31F));
this.mapLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.mapLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
this.mapHeaderLayout.ColumnCount = 3;
this.mapHeaderLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.mapHeaderLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 82F));
this.mapHeaderLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 90F));
this.mapHeaderLayout.Controls.Add(this.lblMapaTitulo, 0, 0);
this.mapHeaderLayout.Controls.Add(this.btnMapaBonito, 1, 0);
this.mapHeaderLayout.Controls.Add(this.btnMapaDinamico, 2, 0);
this.mapHeaderLayout.Dock = System.Windows.Forms.DockStyle.Fill;
SetupTitle(this.lblMapaTitulo, "6 MAPA DA OPERAÇÃO");
SetupChoiceButton(this.btnMapaBonito, "Mapa bonito");
SetupChoiceButton(this.btnMapaDinamico, "Mapa dinâmico");
this.pnlMapaVisual.BorderColor = AgroBase.Forms.IHM.Controls.HmiTheme.Border;
this.pnlMapaVisual.Controls.Add(this.lblMapaPlaceholder);
this.pnlMapaVisual.CornerRadius = 8;
this.pnlMapaVisual.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlMapaVisual.FillColor = System.Drawing.Color.FromArgb(18, 29, 22);
this.lblMapaPlaceholder.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblMapaPlaceholder.BackColor = System.Drawing.Color.Transparent;
this.lblMapaPlaceholder.ForeColor = AgroBase.Forms.IHM.Controls.HmiTheme.Success;
this.lblMapaPlaceholder.Font = new System.Drawing.Font("Consolas", 8.5F, System.Drawing.FontStyle.Bold);
this.lblMapaPlaceholder.Text =
"MAPA DA OPERAÇÃO\n\n" +
"01 02 03 04 05\n" +
"│ │ │ │ │\n" +
"│ │ │ │ │\n" +
"│ │ [ROVER] │ │\n" +
"│ │ │ │ │\n" +
"09 10 11 12\n\n" +
"8 ruas selecionadas";
this.lblMapaPlaceholder.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.lblMapaAjuda.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblMapaAjuda.BackColor = AgroBase.Forms.IHM.Controls.HmiTheme.SurfaceRaised;
this.lblMapaAjuda.ForeColor = AgroBase.Forms.IHM.Controls.HmiTheme.TextMuted;
this.lblMapaAjuda.Font = new System.Drawing.Font("Segoe UI", 7F, System.Drawing.FontStyle.Italic);
this.lblMapaAjuda.Text = "Toque nas ruas para selecionar ou desmarcar.";
this.lblMapaAjuda.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// footer
this.footerLayout.ColumnCount = 2;
this.footerLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 48F));
this.footerLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 52F));
this.footerLayout.Controls.Add(this.btnAplicarAtual, 0, 0);
this.footerLayout.Controls.Add(this.btnSalvarParametros, 1, 0);
this.footerLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.footerLayout.Margin = new System.Windows.Forms.Padding(0);
SetupAction(this.btnAplicarAtual, "APLICAR À OPERAÇÃO ATUAL", "▤", AgroBase.Forms.IHM.Controls.HmiTheme.TextMuted);
SetupAction(this.btnSalvarParametros, "SALVAR PARÂMETROS", "▣", AgroBase.Forms.IHM.Controls.HmiTheme.Success);
// user control
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = AgroBase.Forms.IHM.Controls.HmiTheme.Background;
this.Controls.Add(this.rootLayout);
this.DoubleBuffered = true;
this.Name = "ucOperacaoParametros";
this.Size = new System.Drawing.Size(784, 435);
this.rootLayout.ResumeLayout(false);
this.leftLayout.ResumeLayout(false);
this.pnlGeral.ResumeLayout(false);
this.geralLayout.ResumeLayout(false);
this.pnlMovimento.ResumeLayout(false);
this.movimentoLayout.ResumeLayout(false);
this.movTogglesLayout.ResumeLayout(false);
this.movValuesLayout.ResumeLayout(false);
this.pnlDirecional.ResumeLayout(false);
this.direcionalLayout.ResumeLayout(false);
this.dirTogglesLayout.ResumeLayout(false);
this.dirValuesLayout.ResumeLayout(false);
this.pnlTipoControle.ResumeLayout(false);
this.tipoControleLayout.ResumeLayout(false);
this.pnlAtuador.ResumeLayout(false);
this.atuadorLayout.ResumeLayout(false);
this.atuadorValuesLayout.ResumeLayout(false);
this.pnlMpc.ResumeLayout(false);
this.mpcLayout.ResumeLayout(false);
this.rightLayout.ResumeLayout(false);
this.pnlMapa.ResumeLayout(false);
this.mapLayout.ResumeLayout(false);
this.mapHeaderLayout.ResumeLayout(false);
this.pnlMapaVisual.ResumeLayout(false);
this.footerLayout.ResumeLayout(false);
this.ResumeLayout(false);
}
private static void ConfigurePanel(
AgroBase.Forms.IHM.Controls.HmiRoundedPanel panel,
System.Windows.Forms.Control child)
{
panel.BorderColor = AgroBase.Forms.IHM.Controls.HmiTheme.Border;
panel.Controls.Add(child);
panel.CornerRadius = 9;
panel.Dock = System.Windows.Forms.DockStyle.Fill;
panel.FillColor = AgroBase.Forms.IHM.Controls.HmiTheme.Surface;
panel.Margin = new System.Windows.Forms.Padding(0, 0, 0, 3);
panel.Padding = new System.Windows.Forms.Padding(7);
}
private static void SetupTitle(
System.Windows.Forms.Label label,
string text)
{
label.Dock = System.Windows.Forms.DockStyle.Fill;
label.BackColor = System.Drawing.Color.Transparent;
label.ForeColor = AgroBase.Forms.IHM.Controls.HmiTheme.Text;
label.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold);
label.Text = text;
label.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
label.AutoEllipsis = true;
}
private static void SetupChoiceButton(
System.Windows.Forms.Button button,
string text)
{
button.Dock = System.Windows.Forms.DockStyle.Fill;
button.Text = text;
button.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
button.FlatAppearance.BorderColor = AgroBase.Forms.IHM.Controls.HmiTheme.Border;
button.BackColor = AgroBase.Forms.IHM.Controls.HmiTheme.SurfaceRaised;
button.ForeColor = AgroBase.Forms.IHM.Controls.HmiTheme.TextMuted;
button.Font = new System.Drawing.Font("Segoe UI", 7F, System.Drawing.FontStyle.Bold);
button.Margin = new System.Windows.Forms.Padding(2);
}
private static void SetupValueBox(
AgroBase.Forms.IHM.Controls.Operacao.HmiParameterValueBox control,
string title,
string unit,
decimal value,
decimal min,
decimal max,
int decimals)
{
control.Dock = System.Windows.Forms.DockStyle.Fill;
control.Titulo = title;
control.Unidade = unit;
control.Minimo = min;
control.Maximo = max;
control.CasasDecimais = decimals;
control.Valor = value;
}
private static void SetupAction(
AgroBase.Forms.IHM.Controls.HmiSidebarButton button,
string text,
string icon,
System.Drawing.Color accent)
{
button.Dock = System.Windows.Forms.DockStyle.Fill;
button.Text = text;
button.IconText = icon;
button.AccentColor = accent;
button.BorderColor = accent;
button.FillColor = AgroBase.Forms.IHM.Controls.HmiTheme.SurfaceRaised;
button.Margin = new System.Windows.Forms.Padding(3);
}
#endregion
private System.Windows.Forms.TableLayoutPanel rootLayout;
private System.Windows.Forms.TableLayoutPanel leftLayout;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlGeral;
private System.Windows.Forms.TableLayoutPanel geralLayout;
private System.Windows.Forms.Label lblGeralTitulo;
private System.Windows.Forms.Label lblModoOperacao;
private System.Windows.Forms.Button btnModoManual;
private System.Windows.Forms.Button btnModoMapaGps;
private AgroBase.Forms.IHM.Controls.Operacao.HmiParameterToggleRow toggleRegistrarDados;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlMovimento;
private System.Windows.Forms.TableLayoutPanel movimentoLayout;
private System.Windows.Forms.Label lblMovimentoTitulo;
private System.Windows.Forms.TableLayoutPanel movTogglesLayout;
private AgroBase.Forms.IHM.Controls.Operacao.HmiParameterToggleRow toggleMovAutomatico;
private AgroBase.Forms.IHM.Controls.Operacao.HmiParameterToggleRow toggleMovSonar;
private AgroBase.Forms.IHM.Controls.Operacao.HmiParameterToggleRow toggleParadaObstaculo;
private AgroBase.Forms.IHM.Controls.Operacao.HmiParameterToggleRow toggleMovImu;
private AgroBase.Forms.IHM.Controls.Operacao.HmiParameterToggleRow toggleParadaInclinacao;
private AgroBase.Forms.IHM.Controls.Operacao.HmiParameterToggleRow toggleFrenagemParar;
private System.Windows.Forms.TableLayoutPanel movValuesLayout;
private AgroBase.Forms.IHM.Controls.Operacao.HmiParameterValueBox paramVelSemErvas;
private AgroBase.Forms.IHM.Controls.Operacao.HmiParameterValueBox paramVelComErvas;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlDirecional;
private System.Windows.Forms.TableLayoutPanel direcionalLayout;
private System.Windows.Forms.Label lblDirecionalTitulo;
private System.Windows.Forms.TableLayoutPanel dirTogglesLayout;
private AgroBase.Forms.IHM.Controls.Operacao.HmiParameterToggleRow toggleDirAutomatico;
private AgroBase.Forms.IHM.Controls.Operacao.HmiParameterToggleRow toggleDirSonar;
private AgroBase.Forms.IHM.Controls.Operacao.HmiParameterToggleRow toggleDirImu;
private AgroBase.Forms.IHM.Controls.Operacao.HmiParameterToggleRow toggleImuPrefereArco;
private System.Windows.Forms.TableLayoutPanel dirValuesLayout;
private AgroBase.Forms.IHM.Controls.Operacao.HmiParameterValueBox paramAnguloMaximo;
private AgroBase.Forms.IHM.Controls.Operacao.HmiParameterValueBox paramVelMovimentoDir;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlTipoControle;
private System.Windows.Forms.TableLayoutPanel tipoControleLayout;
private System.Windows.Forms.Label lblTipoControle;
private System.Windows.Forms.Button btnControleMpc;
private System.Windows.Forms.Button btnControlePid;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlAtuador;
private System.Windows.Forms.TableLayoutPanel atuadorLayout;
private System.Windows.Forms.Label lblAtuadorTitulo;
private AgroBase.Forms.IHM.Controls.Operacao.HmiParameterToggleRow togglePulverizadorAutomatico;
private System.Windows.Forms.ComboBox cmbModoAgitador;
private System.Windows.Forms.TableLayoutPanel atuadorValuesLayout;
private AgroBase.Forms.IHM.Controls.Operacao.HmiParameterValueBox paramBicosEmUso;
private AgroBase.Forms.IHM.Controls.Operacao.HmiParameterValueBox paramCapacidadeReservatorio;
private AgroBase.Forms.IHM.Controls.Operacao.HmiParameterValueBox paramPressaoLinha;
private AgroBase.Forms.IHM.Controls.Operacao.HmiParameterValueBox paramTelaIniciar;
private AgroBase.Forms.IHM.Controls.Operacao.HmiParameterValueBox paramAlturaArea;
private AgroBase.Forms.IHM.Controls.Operacao.HmiParameterValueBox paramErvasOn;
private AgroBase.Forms.IHM.Controls.Operacao.HmiParameterValueBox paramErvasOff;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlMpc;
private System.Windows.Forms.TableLayoutPanel mpcLayout;
private System.Windows.Forms.Label lblMpcTitulo;
private AgroBase.Forms.IHM.Controls.Operacao.HmiParameterValueBox paramHorizonte;
private AgroBase.Forms.IHM.Controls.Operacao.HmiParameterValueBox paramAnteciparFim;
private System.Windows.Forms.TableLayoutPanel rightLayout;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlMapa;
private System.Windows.Forms.TableLayoutPanel mapLayout;
private System.Windows.Forms.TableLayoutPanel mapHeaderLayout;
private System.Windows.Forms.Label lblMapaTitulo;
private System.Windows.Forms.Button btnMapaBonito;
private System.Windows.Forms.Button btnMapaDinamico;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlMapaVisual;
private System.Windows.Forms.Label lblMapaPlaceholder;
private System.Windows.Forms.Label lblMapaAjuda;
private System.Windows.Forms.TableLayoutPanel footerLayout;
private AgroBase.Forms.IHM.Controls.HmiSidebarButton btnAplicarAtual;
private AgroBase.Forms.IHM.Controls.HmiSidebarButton btnSalvarParametros;
}
}

View File

@ -0,0 +1,133 @@
using AgroBase.Forms.IHM.Controls;
using System;
using System.Drawing;
using System.Windows.Forms;
namespace AgroBase.Forms.IHM.Operacao
{
public partial class ucOperacaoParametros : UserControl
{
public ucOperacaoParametros()
{
InitializeComponent();
ConfigurarEstadoInicial();
VincularEventos();
}
private void ConfigurarEstadoInicial()
{
btnMapaBonito.BackColor =
Color.FromArgb(31, 91, 43);
btnMapaBonito.ForeColor =
HmiTheme.Text;
btnMapaBonito.FlatAppearance.BorderColor =
HmiTheme.Success;
btnModoMapaGps.BackColor =
Color.FromArgb(31, 91, 43);
btnModoMapaGps.ForeColor =
HmiTheme.Text;
btnModoMapaGps.FlatAppearance.BorderColor =
HmiTheme.Success;
btnControleMpc.BackColor =
Color.FromArgb(31, 91, 43);
btnControleMpc.ForeColor =
HmiTheme.Text;
btnControleMpc.FlatAppearance.BorderColor =
HmiTheme.Success;
}
private void VincularEventos()
{
btnModoManual.Click += delegate
{
SelecionarBotaoDuplo(
btnModoManual,
btnModoMapaGps);
};
btnModoMapaGps.Click += delegate
{
SelecionarBotaoDuplo(
btnModoMapaGps,
btnModoManual);
};
btnControleMpc.Click += delegate
{
SelecionarBotaoDuplo(
btnControleMpc,
btnControlePid);
};
btnControlePid.Click += delegate
{
SelecionarBotaoDuplo(
btnControlePid,
btnControleMpc);
};
btnMapaBonito.Click += delegate
{
SelecionarBotaoDuplo(
btnMapaBonito,
btnMapaDinamico);
};
btnMapaDinamico.Click += delegate
{
SelecionarBotaoDuplo(
btnMapaDinamico,
btnMapaBonito);
};
}
private static void SelecionarBotaoDuplo(
Button selecionado,
Button outro)
{
AplicarEstadoBotao(
selecionado,
true);
AplicarEstadoBotao(
outro,
false);
}
private static void AplicarEstadoBotao(
Button button,
bool selecionado)
{
if (selecionado)
{
button.BackColor =
Color.FromArgb(31, 91, 43);
button.ForeColor =
HmiTheme.Text;
button.FlatAppearance.BorderColor =
HmiTheme.Success;
}
else
{
button.BackColor =
HmiTheme.SurfaceRaised;
button.ForeColor =
HmiTheme.TextMuted;
button.FlatAppearance.BorderColor =
HmiTheme.Border;
}
}
}
}

View File

@ -0,0 +1,527 @@
namespace AgroBase.Forms.IHM.Operacao
{
partial class ucOperacaoPulverizador
{
private System.ComponentModel.IContainer components = null;
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
components.Dispose();
base.Dispose(disposing);
}
#region Component Designer generated code
private void InitializeComponent()
{
this.rootLayout = new System.Windows.Forms.TableLayoutPanel();
this.leftLayout = new System.Windows.Forms.TableLayoutPanel();
this.pnlBomba = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.bombaLayout = new System.Windows.Forms.TableLayoutPanel();
this.lblBombaTitulo = new System.Windows.Forms.Label();
this.cardPressaoSp = new AgroBase.Forms.IHM.Controls.Operacao.HmiCompactMetricCard();
this.cardStatusBomba = new AgroBase.Forms.IHM.Controls.Operacao.HmiCompactMetricCard();
this.bombaButtonsLayout = new System.Windows.Forms.TableLayoutPanel();
this.btnLigarBomba = new AgroBase.Forms.IHM.Controls.HmiSidebarButton();
this.btnDesligarBomba = new AgroBase.Forms.IHM.Controls.HmiSidebarButton();
this.pnlAgitador = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.agitadorLayout = new System.Windows.Forms.TableLayoutPanel();
this.lblAgitadorTitulo = new System.Windows.Forms.Label();
this.cardModoAgitador = new AgroBase.Forms.IHM.Controls.Operacao.HmiCompactMetricCard();
this.cardStatusAgitador = new AgroBase.Forms.IHM.Controls.Operacao.HmiCompactMetricCard();
this.agitadorButtonsLayout = new System.Windows.Forms.TableLayoutPanel();
this.btnLigarAgitador = new AgroBase.Forms.IHM.Controls.HmiSidebarButton();
this.btnDesligarAgitador = new AgroBase.Forms.IHM.Controls.HmiSidebarButton();
this.pnlSaude = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.saudeLayout = new System.Windows.Forms.TableLayoutPanel();
this.lblSaudeTitulo = new System.Windows.Forms.Label();
this.healthBomba = new AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerModuleHealthRow();
this.healthAgitador = new AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerModuleHealthRow();
this.healthSensores = new AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerModuleHealthRow();
this.healthBicos = new AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerModuleHealthRow();
this.healthCamera = new AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerModuleHealthRow();
this.centerLayout = new System.Windows.Forms.TableLayoutPanel();
this.pnlVideo = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.videoLayout = new System.Windows.Forms.TableLayoutPanel();
this.videoHeaderLayout = new System.Windows.Forms.TableLayoutPanel();
this.lblVideoTitulo = new System.Windows.Forms.Label();
this.lblVideoStatus = new System.Windows.Forms.Label();
this.picVideo = new System.Windows.Forms.PictureBox();
this.cmbTipoFrame = new System.Windows.Forms.ComboBox();
this.pnlBicos = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.bicosLayout = new System.Windows.Forms.TableLayoutPanel();
this.bicosHeaderLayout = new System.Windows.Forms.TableLayoutPanel();
this.lblBicosTitulo = new System.Windows.Forms.Label();
this.lblBicosLegenda = new System.Windows.Forms.Label();
this.nozzleB01 = new AgroBase.Forms.IHM.Controls.Operacao.HmiNozzleCard();
this.nozzleB02 = new AgroBase.Forms.IHM.Controls.Operacao.HmiNozzleCard();
this.nozzleB03 = new AgroBase.Forms.IHM.Controls.Operacao.HmiNozzleCard();
this.nozzleB04 = new AgroBase.Forms.IHM.Controls.Operacao.HmiNozzleCard();
this.nozzleB05 = new AgroBase.Forms.IHM.Controls.Operacao.HmiNozzleCard();
this.nozzleB06 = new AgroBase.Forms.IHM.Controls.Operacao.HmiNozzleCard();
this.nozzleB07 = new AgroBase.Forms.IHM.Controls.Operacao.HmiNozzleCard();
this.pnlTelemetria = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.telemetryLayout = new System.Windows.Forms.TableLayoutPanel();
this.lblTelemetriaTitulo = new System.Windows.Forms.Label();
this.telemetryReservatorio = new AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerTelemetryRow();
this.telemetryVazaoInstantanea = new AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerTelemetryRow();
this.telemetryVazaoMedia = new AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerTelemetryRow();
this.telemetryPressaoSensor = new AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerTelemetryRow();
this.telemetryPressaoBomba = new AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerTelemetryRow();
this.telemetryAutonomiaM = new AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerTelemetryRow();
this.telemetryAutonomiaTempo = new AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerTelemetryRow();
this.telemetryVolumeAplicado = new AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerTelemetryRow();
this.telemetryLitroMetro = new AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerTelemetryRow();
this.telemetryInfestacao = new AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerTelemetryRow();
this.telemetryTempoLigado = new AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerTelemetryRow();
((System.ComponentModel.ISupportInitialize)(this.picVideo)).BeginInit();
this.SuspendLayout();
// root
this.rootLayout.BackColor = AgroBase.Forms.IHM.Controls.HmiTheme.Background;
this.rootLayout.ColumnCount = 3;
this.rootLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 23F));
this.rootLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 52F));
this.rootLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.rootLayout.Controls.Add(this.leftLayout, 0, 0);
this.rootLayout.Controls.Add(this.centerLayout, 1, 0);
this.rootLayout.Controls.Add(this.pnlTelemetria, 2, 0);
this.rootLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.rootLayout.Margin = System.Windows.Forms.Padding.Empty;
this.rootLayout.Padding = System.Windows.Forms.Padding.Empty;
// left
this.leftLayout.ColumnCount = 1;
this.leftLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.leftLayout.Controls.Add(this.pnlBomba, 0, 0);
this.leftLayout.Controls.Add(this.pnlAgitador, 0, 1);
this.leftLayout.Controls.Add(this.pnlSaude, 0, 2);
this.leftLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.leftLayout.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
this.leftLayout.RowCount = 3;
this.leftLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 26F));
this.leftLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 26F));
this.leftLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 48F));
ConfigurePanel(this.pnlBomba, this.bombaLayout);
ConfigurePanel(this.pnlAgitador, this.agitadorLayout);
ConfigurePanel(this.pnlSaude, this.saudeLayout);
ConfigurePanel(this.pnlVideo, this.videoLayout);
ConfigurePanel(this.pnlBicos, this.bicosLayout);
ConfigurePanel(this.pnlTelemetria, this.telemetryLayout);
// bomba
this.bombaLayout.ColumnCount = 2;
this.bombaLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.bombaLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.bombaLayout.Controls.Add(this.lblBombaTitulo, 0, 0);
this.bombaLayout.Controls.Add(this.cardPressaoSp, 0, 1);
this.bombaLayout.Controls.Add(this.cardStatusBomba, 1, 1);
this.bombaLayout.Controls.Add(this.bombaButtonsLayout, 0, 2);
this.bombaLayout.SetColumnSpan(this.lblBombaTitulo, 2);
this.bombaLayout.SetColumnSpan(this.bombaButtonsLayout, 2);
this.bombaLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.bombaLayout.RowCount = 3;
this.bombaLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 22F));
this.bombaLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.bombaLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 41F));
SetupTitle(this.lblBombaTitulo, "BOMBA PRESSURIZADORA");
SetupCompact(this.cardPressaoSp, "Pressão SP", "60,0 psi", AgroBase.Forms.IHM.Controls.HmiTheme.Info);
SetupCompact(this.cardStatusBomba, "Status", "Ligada", AgroBase.Forms.IHM.Controls.HmiTheme.Success);
SetupTwoButtons(
this.bombaButtonsLayout,
this.btnLigarBomba,
this.btnDesligarBomba,
"ON",
"OFF");
// agitador
this.agitadorLayout.ColumnCount = 2;
this.agitadorLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.agitadorLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.agitadorLayout.Controls.Add(this.lblAgitadorTitulo, 0, 0);
this.agitadorLayout.Controls.Add(this.cardModoAgitador, 0, 1);
this.agitadorLayout.Controls.Add(this.cardStatusAgitador, 1, 1);
this.agitadorLayout.Controls.Add(this.agitadorButtonsLayout, 0, 2);
this.agitadorLayout.SetColumnSpan(this.lblAgitadorTitulo, 2);
this.agitadorLayout.SetColumnSpan(this.agitadorButtonsLayout, 2);
this.agitadorLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.agitadorLayout.RowCount = 3;
this.agitadorLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 22F));
this.agitadorLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.agitadorLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 41F));
SetupTitle(this.lblAgitadorTitulo, "AGITADOR");
SetupCompact(this.cardModoAgitador, "Modo", "Contínuo", AgroBase.Forms.IHM.Controls.HmiTheme.Info);
SetupCompact(this.cardStatusAgitador, "Status", "Ligado", AgroBase.Forms.IHM.Controls.HmiTheme.Success);
SetupTwoButtons(
this.agitadorButtonsLayout,
this.btnLigarAgitador,
this.btnDesligarAgitador,
"ON",
"OFF");
// saude
this.saudeLayout.ColumnCount = 1;
this.saudeLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.saudeLayout.Controls.Add(this.lblSaudeTitulo, 0, 0);
this.saudeLayout.Controls.Add(this.healthBomba, 0, 1);
this.saudeLayout.Controls.Add(this.healthAgitador, 0, 2);
this.saudeLayout.Controls.Add(this.healthSensores, 0, 3);
this.saudeLayout.Controls.Add(this.healthBicos, 0, 4);
this.saudeLayout.Controls.Add(this.healthCamera, 0, 5);
this.saudeLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.saudeLayout.RowCount = 6;
this.saudeLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 23F));
for (int i = 1; i < 6; i++)
this.saudeLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
SetupTitle(this.lblSaudeTitulo, "SAÚDE DOS MÓDULOS");
SetupHealth(this.healthBomba, "⚙", "Bomba", "78%", "Atenção", AgroBase.Forms.IHM.Controls.HmiTheme.Warning);
SetupHealth(this.healthAgitador, "◉", "Agitador", "92%", "Operante", AgroBase.Forms.IHM.Controls.HmiTheme.Success);
SetupHealth(this.healthSensores, "⌁", "Sensores", "94%", "Operante", AgroBase.Forms.IHM.Controls.HmiTheme.Success);
SetupHealth(this.healthBicos, "⌄", "Bicos", "89%", "Operante", AgroBase.Forms.IHM.Controls.HmiTheme.Success);
SetupHealth(this.healthCamera, "▣", "Câmera", "96%", "Operante", AgroBase.Forms.IHM.Controls.HmiTheme.Success);
// center
this.centerLayout.ColumnCount = 1;
this.centerLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.centerLayout.Controls.Add(this.pnlVideo, 0, 0);
this.centerLayout.Controls.Add(this.pnlBicos, 0, 1);
this.centerLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.centerLayout.Margin = new System.Windows.Forms.Padding(3, 0, 3, 0);
this.centerLayout.RowCount = 2;
this.centerLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 56F));
this.centerLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 44F));
// video
this.videoLayout.ColumnCount = 1;
this.videoLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.videoLayout.Controls.Add(this.videoHeaderLayout, 0, 0);
this.videoLayout.Controls.Add(this.picVideo, 0, 1);
this.videoLayout.Controls.Add(this.cmbTipoFrame, 0, 2);
this.videoLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.videoLayout.RowCount = 3;
this.videoLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 22F));
this.videoLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.videoLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 31F));
this.videoHeaderLayout.ColumnCount = 2;
this.videoHeaderLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 35F));
this.videoHeaderLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 65F));
this.videoHeaderLayout.Dock = System.Windows.Forms.DockStyle.Fill;
SetupTitle(this.lblVideoTitulo, "VÍDEO");
this.lblVideoStatus.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblVideoStatus.Text = "FPS 28 · 6,4 MB/s · Saúde 96%";
this.lblVideoStatus.ForeColor = AgroBase.Forms.IHM.Controls.HmiTheme.Success;
this.lblVideoStatus.Font = new System.Drawing.Font("Segoe UI", 6.4F);
this.lblVideoStatus.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.videoHeaderLayout.Controls.Add(this.lblVideoTitulo, 0, 0);
this.videoHeaderLayout.Controls.Add(this.lblVideoStatus, 1, 0);
this.picVideo.Dock = System.Windows.Forms.DockStyle.Fill;
this.picVideo.BackColor = System.Drawing.Color.Black;
this.picVideo.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.picVideo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
SetupCombo(this.cmbTipoFrame);
this.cmbTipoFrame.Items.AddRange(new object[] { "Overlay", "RGB", "Segmentação", "Debug" });
// bicos
this.bicosLayout.ColumnCount = 7;
for (int i = 0; i < 7; i++)
this.bicosLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 14.2857F));
this.bicosLayout.Controls.Add(this.bicosHeaderLayout, 0, 0);
this.bicosLayout.SetColumnSpan(this.bicosHeaderLayout, 7);
this.bicosLayout.Controls.Add(this.nozzleB01, 0, 1);
this.bicosLayout.Controls.Add(this.nozzleB02, 1, 1);
this.bicosLayout.Controls.Add(this.nozzleB03, 2, 1);
this.bicosLayout.Controls.Add(this.nozzleB04, 3, 1);
this.bicosLayout.Controls.Add(this.nozzleB05, 4, 1);
this.bicosLayout.Controls.Add(this.nozzleB06, 5, 1);
this.bicosLayout.Controls.Add(this.nozzleB07, 6, 1);
this.bicosLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.bicosLayout.RowCount = 2;
this.bicosLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F));
this.bicosLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.bicosHeaderLayout.ColumnCount = 2;
this.bicosHeaderLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 30F));
this.bicosHeaderLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 70F));
this.bicosHeaderLayout.Dock = System.Windows.Forms.DockStyle.Fill;
SetupTitle(this.lblBicosTitulo, "BICOS");
this.lblBicosLegenda.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblBicosLegenda.Text = "Cinza desconectado · Azul conectado · Vermelho falha · Amarelo alerta · Verde operante";
this.lblBicosLegenda.ForeColor = AgroBase.Forms.IHM.Controls.HmiTheme.TextMuted;
this.lblBicosLegenda.Font = new System.Drawing.Font("Segoe UI", 5.8F);
this.lblBicosLegenda.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.bicosHeaderLayout.Controls.Add(this.lblBicosTitulo, 0, 0);
this.bicosHeaderLayout.Controls.Add(this.lblBicosLegenda, 1, 0);
SetupNozzle(this.nozzleB01, "B01");
SetupNozzle(this.nozzleB02, "B02");
SetupNozzle(this.nozzleB03, "B03");
SetupNozzle(this.nozzleB04, "B04");
SetupNozzle(this.nozzleB05, "B05");
SetupNozzle(this.nozzleB06, "B06");
SetupNozzle(this.nozzleB07, "B07");
// telemetry
this.telemetryLayout.ColumnCount = 1;
this.telemetryLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.telemetryLayout.Controls.Add(this.lblTelemetriaTitulo, 0, 0);
this.telemetryLayout.Controls.Add(this.telemetryReservatorio, 0, 1);
this.telemetryLayout.Controls.Add(this.telemetryVazaoInstantanea, 0, 2);
this.telemetryLayout.Controls.Add(this.telemetryVazaoMedia, 0, 3);
this.telemetryLayout.Controls.Add(this.telemetryPressaoSensor, 0, 4);
this.telemetryLayout.Controls.Add(this.telemetryPressaoBomba, 0, 5);
this.telemetryLayout.Controls.Add(this.telemetryAutonomiaM, 0, 6);
this.telemetryLayout.Controls.Add(this.telemetryAutonomiaTempo, 0, 7);
this.telemetryLayout.Controls.Add(this.telemetryVolumeAplicado, 0, 8);
this.telemetryLayout.Controls.Add(this.telemetryLitroMetro, 0, 9);
this.telemetryLayout.Controls.Add(this.telemetryInfestacao, 0, 10);
this.telemetryLayout.Controls.Add(this.telemetryTempoLigado, 0, 11);
this.telemetryLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.telemetryLayout.RowCount = 12;
this.telemetryLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 23F));
for (int i = 1; i < 12; i++)
this.telemetryLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 9.09F));
SetupTitle(this.lblTelemetriaTitulo, "TELEMETRIA");
SetupTelemetry(this.telemetryReservatorio, "◉", "Volume reservatório", "182,4 L", AgroBase.Forms.IHM.Controls.HmiTheme.Info);
SetupTelemetry(this.telemetryVazaoInstantanea, "≈", "Vazão instantânea", "632 mL/s", AgroBase.Forms.IHM.Controls.HmiTheme.Success);
SetupTelemetry(this.telemetryVazaoMedia, "≈", "Vazão média", "598 mL/s", AgroBase.Forms.IHM.Controls.HmiTheme.Success);
SetupTelemetry(this.telemetryPressaoSensor, "◌", "Pressão sensor", "58,7 psi", AgroBase.Forms.IHM.Controls.HmiTheme.Info);
SetupTelemetry(this.telemetryPressaoBomba, "▣", "Pressão bomba", "59,2 psi", AgroBase.Forms.IHM.Controls.HmiTheme.Info);
SetupTelemetry(this.telemetryAutonomiaM, "▥", "Autonomia", "456,0 m", AgroBase.Forms.IHM.Controls.HmiTheme.Warning);
SetupTelemetry(this.telemetryAutonomiaTempo, "◷", "Autonomia", "00:07:36", AgroBase.Forms.IHM.Controls.HmiTheme.Warning);
SetupTelemetry(this.telemetryVolumeAplicado, "△", "Volume aplicado", "37,6 L", AgroBase.Forms.IHM.Controls.HmiTheme.Info);
SetupTelemetry(this.telemetryLitroMetro, "⌁", "Litro por metro", "0,082 L/m", AgroBase.Forms.IHM.Controls.HmiTheme.Info);
SetupTelemetry(this.telemetryInfestacao, "⌖", "Infestação", "18,4% · Baixa", AgroBase.Forms.IHM.Controls.HmiTheme.Success);
SetupTelemetry(this.telemetryTempoLigado, "◴", "Tempo ativo", "00:18:42", AgroBase.Forms.IHM.Controls.HmiTheme.Manual);
// UC
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = AgroBase.Forms.IHM.Controls.HmiTheme.Background;
this.Controls.Add(this.rootLayout);
this.DoubleBuffered = true;
this.Name = "ucOperacaoPulverizador";
this.Size = new System.Drawing.Size(784, 435);
((System.ComponentModel.ISupportInitialize)(this.picVideo)).EndInit();
this.ResumeLayout(false);
}
private static void ConfigurePanel(
AgroBase.Forms.IHM.Controls.HmiRoundedPanel panel,
System.Windows.Forms.Control child)
{
panel.BorderColor = AgroBase.Forms.IHM.Controls.HmiTheme.Border;
panel.Controls.Add(child);
panel.CornerRadius = 9;
panel.Dock = System.Windows.Forms.DockStyle.Fill;
panel.FillColor = AgroBase.Forms.IHM.Controls.HmiTheme.Surface;
panel.Margin = new System.Windows.Forms.Padding(0, 0, 0, 3);
panel.Padding = new System.Windows.Forms.Padding(7);
}
private static void SetupTitle(
System.Windows.Forms.Label label,
string text)
{
label.Dock = System.Windows.Forms.DockStyle.Fill;
label.BackColor = System.Drawing.Color.Transparent;
label.ForeColor = AgroBase.Forms.IHM.Controls.HmiTheme.Text;
label.Font = new System.Drawing.Font("Segoe UI", 8.2F, System.Drawing.FontStyle.Bold);
label.Text = text;
label.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
label.AutoEllipsis = true;
}
private static void SetupCompact(
AgroBase.Forms.IHM.Controls.Operacao.HmiCompactMetricCard card,
string title,
string value,
System.Drawing.Color color)
{
card.Dock = System.Windows.Forms.DockStyle.Fill;
card.Titulo = title;
card.Valor = value;
card.CorValor = color;
card.Margin = new System.Windows.Forms.Padding(2);
card.MinimumSize = System.Drawing.Size.Empty;
card.Padding = new System.Windows.Forms.Padding(0, 0, 0, 2);
}
private static void SetupTwoButtons(
System.Windows.Forms.TableLayoutPanel layout,
AgroBase.Forms.IHM.Controls.HmiSidebarButton left,
AgroBase.Forms.IHM.Controls.HmiSidebarButton right,
string leftText,
string rightText)
{
layout.ColumnCount = 2;
layout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
layout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
layout.Controls.Add(left, 0, 0);
layout.Controls.Add(right, 1, 0);
layout.Dock = System.Windows.Forms.DockStyle.Fill;
layout.RowCount = 2;
layout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
layout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 1F));
SetupButton(left, leftText, AgroBase.Forms.IHM.Controls.HmiTheme.Success);
SetupButton(right, rightText, AgroBase.Forms.IHM.Controls.HmiTheme.Danger);
}
private static void SetupButton(
AgroBase.Forms.IHM.Controls.HmiSidebarButton button,
string text,
System.Drawing.Color color)
{
button.Dock = System.Windows.Forms.DockStyle.Fill;
button.Text = text;
button.IconText = string.Empty;
button.AccentColor = color;
button.BorderColor = color;
button.FillColor = AgroBase.Forms.IHM.Controls.HmiTheme.SurfaceRaised;
button.Margin = new System.Windows.Forms.Padding(2);
button.MinimumSize = System.Drawing.Size.Empty;
button.MaximumSize = System.Drawing.Size.Empty;
}
private static void SetupHealth(
AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerModuleHealthRow row,
string icon,
string title,
string health,
string status,
System.Drawing.Color color)
{
row.Dock = System.Windows.Forms.DockStyle.Fill;
row.IconText = icon;
row.Titulo = title;
row.Saude = health;
row.Status = status;
row.StatusColor = color;
}
private static void SetupCombo(
System.Windows.Forms.ComboBox combo)
{
combo.Dock = System.Windows.Forms.DockStyle.Fill;
combo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
combo.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
combo.BackColor = AgroBase.Forms.IHM.Controls.HmiTheme.SurfaceRaised;
combo.ForeColor = AgroBase.Forms.IHM.Controls.HmiTheme.Text;
combo.Font = new System.Drawing.Font("Segoe UI", 7.4F);
combo.Margin = new System.Windows.Forms.Padding(0, 1, 0, 1);
}
private static void SetupNozzle(
AgroBase.Forms.IHM.Controls.Operacao.HmiNozzleCard card,
string code)
{
card.Dock = System.Windows.Forms.DockStyle.Fill;
card.Codigo = code;
card.AllowCommand = true;
card.Margin = new System.Windows.Forms.Padding(2);
card.MinimumSize = System.Drawing.Size.Empty;
}
private static void SetupTelemetry(
AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerTelemetryRow row,
string icon,
string title,
string value,
System.Drawing.Color color)
{
row.Dock = System.Windows.Forms.DockStyle.Fill;
row.IconText = icon;
row.Titulo = title;
row.Valor = value;
row.CorValor = color;
}
#endregion
private System.Windows.Forms.TableLayoutPanel rootLayout;
private System.Windows.Forms.TableLayoutPanel leftLayout;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlBomba;
private System.Windows.Forms.TableLayoutPanel bombaLayout;
private System.Windows.Forms.Label lblBombaTitulo;
private AgroBase.Forms.IHM.Controls.Operacao.HmiCompactMetricCard cardPressaoSp;
private AgroBase.Forms.IHM.Controls.Operacao.HmiCompactMetricCard cardStatusBomba;
private System.Windows.Forms.TableLayoutPanel bombaButtonsLayout;
private AgroBase.Forms.IHM.Controls.HmiSidebarButton btnLigarBomba;
private AgroBase.Forms.IHM.Controls.HmiSidebarButton btnDesligarBomba;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlAgitador;
private System.Windows.Forms.TableLayoutPanel agitadorLayout;
private System.Windows.Forms.Label lblAgitadorTitulo;
private AgroBase.Forms.IHM.Controls.Operacao.HmiCompactMetricCard cardModoAgitador;
private AgroBase.Forms.IHM.Controls.Operacao.HmiCompactMetricCard cardStatusAgitador;
private System.Windows.Forms.TableLayoutPanel agitadorButtonsLayout;
private AgroBase.Forms.IHM.Controls.HmiSidebarButton btnLigarAgitador;
private AgroBase.Forms.IHM.Controls.HmiSidebarButton btnDesligarAgitador;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlSaude;
private System.Windows.Forms.TableLayoutPanel saudeLayout;
private System.Windows.Forms.Label lblSaudeTitulo;
private AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerModuleHealthRow healthBomba;
private AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerModuleHealthRow healthAgitador;
private AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerModuleHealthRow healthSensores;
private AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerModuleHealthRow healthBicos;
private AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerModuleHealthRow healthCamera;
private System.Windows.Forms.TableLayoutPanel centerLayout;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlVideo;
private System.Windows.Forms.TableLayoutPanel videoLayout;
private System.Windows.Forms.TableLayoutPanel videoHeaderLayout;
private System.Windows.Forms.Label lblVideoTitulo;
private System.Windows.Forms.Label lblVideoStatus;
private System.Windows.Forms.PictureBox picVideo;
private System.Windows.Forms.ComboBox cmbTipoFrame;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlBicos;
private System.Windows.Forms.TableLayoutPanel bicosLayout;
private System.Windows.Forms.TableLayoutPanel bicosHeaderLayout;
private System.Windows.Forms.Label lblBicosTitulo;
private System.Windows.Forms.Label lblBicosLegenda;
private AgroBase.Forms.IHM.Controls.Operacao.HmiNozzleCard nozzleB01;
private AgroBase.Forms.IHM.Controls.Operacao.HmiNozzleCard nozzleB02;
private AgroBase.Forms.IHM.Controls.Operacao.HmiNozzleCard nozzleB03;
private AgroBase.Forms.IHM.Controls.Operacao.HmiNozzleCard nozzleB04;
private AgroBase.Forms.IHM.Controls.Operacao.HmiNozzleCard nozzleB05;
private AgroBase.Forms.IHM.Controls.Operacao.HmiNozzleCard nozzleB06;
private AgroBase.Forms.IHM.Controls.Operacao.HmiNozzleCard nozzleB07;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlTelemetria;
private System.Windows.Forms.TableLayoutPanel telemetryLayout;
private System.Windows.Forms.Label lblTelemetriaTitulo;
private AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerTelemetryRow telemetryReservatorio;
private AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerTelemetryRow telemetryVazaoInstantanea;
private AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerTelemetryRow telemetryVazaoMedia;
private AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerTelemetryRow telemetryPressaoSensor;
private AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerTelemetryRow telemetryPressaoBomba;
private AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerTelemetryRow telemetryAutonomiaM;
private AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerTelemetryRow telemetryAutonomiaTempo;
private AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerTelemetryRow telemetryVolumeAplicado;
private AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerTelemetryRow telemetryLitroMetro;
private AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerTelemetryRow telemetryInfestacao;
private AgroBase.Forms.IHM.Controls.Operacao.HmiSprayerTelemetryRow telemetryTempoLigado;
}
}

View File

@ -0,0 +1,137 @@
using AgroBase.Forms.IHM.Controls;
using AgroBase.Forms.IHM.Controls.Operacao;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
namespace AgroBase.Forms.IHM.Operacao
{
public partial class ucOperacaoPulverizador : UserControl
{
private readonly List<HmiNozzleCard> _bicos =
new List<HmiNozzleCard>();
public ucOperacaoPulverizador()
{
InitializeComponent();
RegistrarBicos();
ConfigurarEstadoInicial();
VincularEventos();
}
private void RegistrarBicos()
{
_bicos.Add(nozzleB01);
_bicos.Add(nozzleB02);
_bicos.Add(nozzleB03);
_bicos.Add(nozzleB04);
_bicos.Add(nozzleB05);
_bicos.Add(nozzleB06);
_bicos.Add(nozzleB07);
}
private void ConfigurarEstadoInicial()
{
cmbTipoFrame.SelectedIndex = 0;
nozzleB01.State = HmiNozzleState.Operante;
nozzleB02.State = HmiNozzleState.Conectado;
nozzleB03.State = HmiNozzleState.Falha;
nozzleB04.State = HmiNozzleState.Alerta;
nozzleB05.State = HmiNozzleState.Operante;
nozzleB06.State = HmiNozzleState.Desconectado;
nozzleB07.State = HmiNozzleState.Operante;
nozzleB01.CommandOn = true;
nozzleB01.ReadOn = true;
nozzleB02.CommandOn = true;
nozzleB02.ReadOn = true;
nozzleB03.CommandOn = true;
nozzleB03.ReadOn = false;
nozzleB04.CommandOn = true;
nozzleB04.ReadOn = true;
nozzleB05.CommandOn = true;
nozzleB05.ReadOn = true;
nozzleB06.CommandOn = false;
nozzleB06.ReadOn = false;
nozzleB07.CommandOn = true;
nozzleB07.ReadOn = true;
nozzleB01.Atuacoes = 1258;
nozzleB02.Atuacoes = 1187;
nozzleB03.Atuacoes = 892;
nozzleB04.Atuacoes = 1023;
nozzleB05.Atuacoes = 1290;
nozzleB06.Atuacoes = 0;
nozzleB07.Atuacoes = 1211;
nozzleB01.VazaoInstantanea = 980;
nozzleB02.VazaoInstantanea = 1011;
nozzleB03.VazaoInstantanea = 421;
nozzleB04.VazaoInstantanea = 727;
nozzleB05.VazaoInstantanea = 951;
nozzleB06.VazaoInstantanea = 0;
nozzleB07.VazaoInstantanea = 972;
nozzleB01.VazaoMedia = 960;
nozzleB02.VazaoMedia = 990;
nozzleB03.VazaoMedia = 631;
nozzleB04.VazaoMedia = 701;
nozzleB05.VazaoMedia = 940;
nozzleB06.VazaoMedia = 0;
nozzleB07.VazaoMedia = 959;
nozzleB01.TempoLigado = "12:34";
nozzleB02.TempoLigado = "12:31";
nozzleB03.TempoLigado = "08:47";
nozzleB04.TempoLigado = "10:55";
nozzleB05.TempoLigado = "12:39";
nozzleB06.TempoLigado = "00:00";
nozzleB07.TempoLigado = "12:17";
telemetryReservatorio.CorValor = HmiTheme.Info;
telemetryVazaoInstantanea.CorValor = HmiTheme.Success;
telemetryVazaoMedia.CorValor = HmiTheme.Success;
telemetryPressaoSensor.CorValor = HmiTheme.Info;
telemetryPressaoBomba.CorValor = HmiTheme.Info;
telemetryAutonomiaM.CorValor = HmiTheme.Warning;
telemetryAutonomiaTempo.CorValor = HmiTheme.Warning;
telemetryVolumeAplicado.CorValor = HmiTheme.Info;
telemetryLitroMetro.CorValor = HmiTheme.Info;
telemetryInfestacao.CorValor = HmiTheme.Success;
telemetryTempoLigado.CorValor = HmiTheme.Manual;
AplicarEstadoPainel(pnlBomba, HmiTheme.Warning);
AplicarEstadoPainel(pnlAgitador, HmiTheme.Success);
}
private void VincularEventos()
{
foreach (HmiNozzleCard card in _bicos)
card.NozzleClick += NozzleCard_Click;
}
private void NozzleCard_Click(object sender, EventArgs e)
{
HmiNozzleCard card = sender as HmiNozzleCard;
if (card == null)
return;
card.CommandOn = !card.CommandOn;
}
private static void AplicarEstadoPainel(
HmiRoundedPanel panel,
Color color)
{
panel.BorderColor = color;
panel.Invalidate();
}
public IList<HmiNozzleCard> Bicos
{
get { return _bicos.AsReadOnly(); }
}
}
}

View File

@ -137,7 +137,7 @@
this.headerLayout.ColumnCount = 3;
this.headerLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 102F));
this.headerLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.headerLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 162F));
this.headerLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 176F));
this.headerLayout.Controls.Add(this.btnVoltar, 0, 0);
this.headerLayout.Controls.Add(this.headerTextLayout, 1, 0);
this.headerLayout.Controls.Add(this.pnlRover, 2, 0);
@ -160,9 +160,9 @@
this.btnVoltar.IconText = "←";
this.btnVoltar.Location = new System.Drawing.Point(0, 2);
this.btnVoltar.Margin = new System.Windows.Forms.Padding(0, 2, 8, 2);
this.btnVoltar.MinimumSize = new System.Drawing.Size(130, 36);
this.btnVoltar.MinimumSize = new System.Drawing.Size(102, 36);
this.btnVoltar.Name = "btnVoltar";
this.btnVoltar.Size = new System.Drawing.Size(130, 42);
this.btnVoltar.Size = new System.Drawing.Size(102, 36);
this.btnVoltar.TabIndex = 0;
this.btnVoltar.Text = "VOLTAR";
//

View File

@ -189,9 +189,9 @@
//
this.headerLayout.BackColor = System.Drawing.Color.Transparent;
this.headerLayout.ColumnCount = 4;
this.headerLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 104F));
this.headerLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 102F));
this.headerLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.headerLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 185F));
this.headerLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 187F));
this.headerLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 112F));
this.headerLayout.Controls.Add(this.btnVoltar, 0, 0);
this.headerLayout.Controls.Add(this.headerTextLayout, 1, 0);
@ -217,9 +217,9 @@
this.btnVoltar.IconText = "←";
this.btnVoltar.Location = new System.Drawing.Point(0, 3);
this.btnVoltar.Margin = new System.Windows.Forms.Padding(0, 3, 8, 3);
this.btnVoltar.MinimumSize = new System.Drawing.Size(90, 36);
this.btnVoltar.MinimumSize = new System.Drawing.Size(102, 36);
this.btnVoltar.Name = "btnVoltar";
this.btnVoltar.Size = new System.Drawing.Size(96, 40);
this.btnVoltar.Size = new System.Drawing.Size(102, 36);
this.btnVoltar.TabIndex = 0;
this.btnVoltar.Text = "VOLTAR";
//

View File

@ -19,7 +19,7 @@ namespace AgroBase.Forms.IHM
public frmMenu frmMenu = new frmMenu();
private frmAjustes _frmAjustes;
private frmDiagnosticos _frmDiagnosticos;
//private frmOperacao _frmOperacao;
private frmOperacao _frmOperacao;
//private frmTestes _frmTestes;
private StatusOperacaoControl cardBateria;
@ -58,7 +58,12 @@ namespace AgroBase.Forms.IHM
switch (e.Tela)
{
case TipoTelaIHM.Operacao:
//AbrirOperacao();
if (_frmOperacao == null || _frmOperacao.IsDisposed)
{
_frmOperacao = new frmOperacao();
_frmOperacao.VoltarSolicitado += TelaFilha_VoltarSolicitado;
}
AbrirTela(_frmOperacao);
break;
case TipoTelaIHM.Ajustes:

View File

@ -0,0 +1,333 @@

namespace AgroBase.Forms.IHM
{
partial class frmOperacao
{
private System.ComponentModel.IContainer components = null;
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
components.Dispose();
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.rootLayout = new System.Windows.Forms.TableLayoutPanel();
this.pnlHeader = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.headerLayout = new System.Windows.Forms.TableLayoutPanel();
this.btnVoltar = new AgroBase.Forms.IHM.Controls.HmiSidebarButton();
this.headerTextLayout = new System.Windows.Forms.TableLayoutPanel();
this.lblTitulo = new System.Windows.Forms.Label();
this.lblSubtitulo = new System.Windows.Forms.Label();
this.pnlModoAtual = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.modoLayout = new System.Windows.Forms.TableLayoutPanel();
this.lblModoIcone = new System.Windows.Forms.Label();
this.lblModoTitulo = new System.Windows.Forms.Label();
this.lblModoValor = new System.Windows.Forms.Label();
this.pnlTabs = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.tabsLayout = new System.Windows.Forms.TableLayoutPanel();
this.tabMovimentacao = new AgroBase.Forms.IHM.Controls.HmiOperationTabButton();
this.tabPulverizador = new AgroBase.Forms.IHM.Controls.HmiOperationTabButton();
this.tabNavegacao = new AgroBase.Forms.IHM.Controls.HmiOperationTabButton();
this.tabParametros = new AgroBase.Forms.IHM.Controls.HmiOperationTabButton();
this.pnlContexto = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.contextoLayout = new System.Windows.Forms.TableLayoutPanel();
this.lblContextoAba = new System.Windows.Forms.Label();
this.lblStatusOperacao = new System.Windows.Forms.Label();
this.pnlConteudoAba = new System.Windows.Forms.Panel();
this.pnlPlaceholder = new AgroBase.Forms.IHM.Controls.HmiRoundedPanel();
this.lblPlaceholder = new System.Windows.Forms.Label();
this.rootLayout.SuspendLayout();
this.pnlHeader.SuspendLayout();
this.headerLayout.SuspendLayout();
this.headerTextLayout.SuspendLayout();
this.pnlModoAtual.SuspendLayout();
this.modoLayout.SuspendLayout();
this.pnlTabs.SuspendLayout();
this.tabsLayout.SuspendLayout();
this.pnlContexto.SuspendLayout();
this.contextoLayout.SuspendLayout();
this.pnlConteudoAba.SuspendLayout();
this.pnlPlaceholder.SuspendLayout();
this.SuspendLayout();
this.rootLayout.BackColor = AgroBase.Forms.IHM.Controls.HmiTheme.Background;
this.rootLayout.ColumnCount = 1;
this.rootLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.rootLayout.Controls.Add(this.pnlHeader, 0, 0);
this.rootLayout.Controls.Add(this.pnlTabs, 0, 1);
this.rootLayout.Controls.Add(this.pnlContexto, 0, 2);
this.rootLayout.Controls.Add(this.pnlConteudoAba, 0, 3);
this.rootLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.rootLayout.Margin = new System.Windows.Forms.Padding(0);
this.rootLayout.Padding = new System.Windows.Forms.Padding(8, 7, 8, 7);
this.rootLayout.RowCount = 4;
this.rootLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 65F));
this.rootLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 51F));
this.rootLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
this.rootLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.pnlHeader.AccentColor = AgroBase.Forms.IHM.Controls.HmiTheme.Success;
this.pnlHeader.BorderColor = System.Drawing.Color.FromArgb(35, 76, 64);
this.pnlHeader.Controls.Add(this.headerLayout);
this.pnlHeader.CornerRadius = 11;
this.pnlHeader.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlHeader.FillColor = System.Drawing.Color.FromArgb(13, 48, 38);
this.pnlHeader.Margin = new System.Windows.Forms.Padding(0, 0, 0, 5);
this.pnlHeader.Padding = new System.Windows.Forms.Padding(10, 7, 10, 7);
this.pnlHeader.ShowAccent = true;
this.headerLayout.BackColor = System.Drawing.Color.Transparent;
this.headerLayout.ColumnCount = 3;
this.headerLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 102F));
this.headerLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.headerLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 176F));
this.headerLayout.Controls.Add(this.btnVoltar, 0, 0);
this.headerLayout.Controls.Add(this.headerTextLayout, 1, 0);
this.headerLayout.Controls.Add(this.pnlModoAtual, 2, 0);
this.headerLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.headerLayout.Margin = new System.Windows.Forms.Padding(0);
this.headerLayout.RowCount = 1;
this.headerLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.btnVoltar.AccentColor = AgroBase.Forms.IHM.Controls.HmiTheme.Info;
this.btnVoltar.BorderColor = AgroBase.Forms.IHM.Controls.HmiTheme.Info;
this.btnVoltar.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnVoltar.Dock = System.Windows.Forms.DockStyle.Fill;
this.btnVoltar.FillColor = AgroBase.Forms.IHM.Controls.HmiTheme.SurfaceRaised;
this.btnVoltar.IconText = "←";
this.btnVoltar.Margin = new System.Windows.Forms.Padding(0, 3, 8, 3);
this.btnVoltar.MinimumSize = new System.Drawing.Size(102, 36);
this.btnVoltar.Size = new System.Drawing.Size(102, 36);
this.btnVoltar.Text = "VOLTAR";
this.headerTextLayout.BackColor = System.Drawing.Color.Transparent;
this.headerTextLayout.ColumnCount = 1;
this.headerTextLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.headerTextLayout.Controls.Add(this.lblTitulo, 0, 0);
this.headerTextLayout.Controls.Add(this.lblSubtitulo, 0, 1);
this.headerTextLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.headerTextLayout.Margin = new System.Windows.Forms.Padding(7, 0, 5, 0);
this.headerTextLayout.RowCount = 2;
this.headerTextLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 58F));
this.headerTextLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 42F));
this.lblTitulo.AutoEllipsis = true;
this.lblTitulo.BackColor = System.Drawing.Color.Transparent;
this.lblTitulo.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblTitulo.Font = new System.Drawing.Font("Segoe UI", 14.5F, System.Drawing.FontStyle.Bold);
this.lblTitulo.ForeColor = AgroBase.Forms.IHM.Controls.HmiTheme.Text;
this.lblTitulo.Margin = new System.Windows.Forms.Padding(0);
this.lblTitulo.Text = "OPERAÇÃO DO ROVER";
this.lblTitulo.TextAlign = System.Drawing.ContentAlignment.BottomLeft;
this.lblSubtitulo.AutoEllipsis = true;
this.lblSubtitulo.BackColor = System.Drawing.Color.Transparent;
this.lblSubtitulo.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblSubtitulo.Font = new System.Drawing.Font("Segoe UI", 8F);
this.lblSubtitulo.ForeColor = System.Drawing.Color.FromArgb(202, 219, 211);
this.lblSubtitulo.Margin = new System.Windows.Forms.Padding(0);
this.lblSubtitulo.Text = "Acompanhamento, controle e parametrização da operação";
this.lblSubtitulo.TextAlign = System.Drawing.ContentAlignment.TopLeft;
this.pnlModoAtual.BorderColor = System.Drawing.Color.FromArgb(47, 105, 84);
this.pnlModoAtual.Controls.Add(this.modoLayout);
this.pnlModoAtual.CornerRadius = 8;
this.pnlModoAtual.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlModoAtual.FillColor = System.Drawing.Color.FromArgb(17, 57, 45);
this.pnlModoAtual.Margin = new System.Windows.Forms.Padding(5, 0, 0, 0);
this.pnlModoAtual.Padding = new System.Windows.Forms.Padding(7, 4, 7, 4);
this.modoLayout.BackColor = System.Drawing.Color.Transparent;
this.modoLayout.ColumnCount = 2;
this.modoLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 36F));
this.modoLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.modoLayout.Controls.Add(this.lblModoIcone, 0, 0);
this.modoLayout.Controls.Add(this.lblModoTitulo, 1, 0);
this.modoLayout.Controls.Add(this.lblModoValor, 1, 1);
this.modoLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.modoLayout.Margin = new System.Windows.Forms.Padding(0);
this.modoLayout.RowCount = 2;
this.modoLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 52F));
this.modoLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 48F));
this.modoLayout.SetRowSpan(this.lblModoIcone, 2);
this.lblModoIcone.BackColor = System.Drawing.Color.Transparent;
this.lblModoIcone.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblModoIcone.Font = new System.Drawing.Font("Segoe UI Symbol", 15F, System.Drawing.FontStyle.Bold);
this.lblModoIcone.ForeColor = AgroBase.Forms.IHM.Controls.HmiTheme.Manual;
this.lblModoIcone.Text = "◈";
this.lblModoIcone.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.lblModoTitulo.BackColor = System.Drawing.Color.Transparent;
this.lblModoTitulo.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblModoTitulo.Font = new System.Drawing.Font("Segoe UI", 8.5F, System.Drawing.FontStyle.Bold);
this.lblModoTitulo.ForeColor = AgroBase.Forms.IHM.Controls.HmiTheme.Text;
this.lblModoTitulo.Margin = new System.Windows.Forms.Padding(0);
this.lblModoTitulo.Text = "MODO ATUAL";
this.lblModoTitulo.TextAlign = System.Drawing.ContentAlignment.BottomLeft;
this.lblModoValor.AutoEllipsis = true;
this.lblModoValor.BackColor = System.Drawing.Color.Transparent;
this.lblModoValor.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblModoValor.Font = new System.Drawing.Font("Segoe UI", 7.5F, System.Drawing.FontStyle.Bold);
this.lblModoValor.ForeColor = AgroBase.Forms.IHM.Controls.HmiTheme.Success;
this.lblModoValor.Margin = new System.Windows.Forms.Padding(0);
this.lblModoValor.Text = "Automático";
this.lblModoValor.TextAlign = System.Drawing.ContentAlignment.TopLeft;
this.pnlTabs.BorderColor = AgroBase.Forms.IHM.Controls.HmiTheme.Border;
this.pnlTabs.Controls.Add(this.tabsLayout);
this.pnlTabs.CornerRadius = 10;
this.pnlTabs.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlTabs.FillColor = AgroBase.Forms.IHM.Controls.HmiTheme.Surface;
this.pnlTabs.Margin = new System.Windows.Forms.Padding(0, 0, 0, 4);
this.pnlTabs.Padding = new System.Windows.Forms.Padding(5, 3, 5, 3);
this.tabsLayout.BackColor = System.Drawing.Color.Transparent;
this.tabsLayout.ColumnCount = 4;
for (int i = 0; i < 4; i++)
this.tabsLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.tabsLayout.Controls.Add(this.tabMovimentacao, 0, 0);
this.tabsLayout.Controls.Add(this.tabPulverizador, 1, 0);
this.tabsLayout.Controls.Add(this.tabNavegacao, 2, 0);
this.tabsLayout.Controls.Add(this.tabParametros, 3, 0);
this.tabsLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabsLayout.Margin = new System.Windows.Forms.Padding(0);
this.tabsLayout.RowCount = 1;
this.tabsLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
SetupTab(this.tabMovimentacao, "Movimentação", "↔", AgroBase.Forms.IHM.Controls.HmiTheme.Success, new System.Windows.Forms.Padding(0, 0, 3, 0));
SetupTab(this.tabPulverizador, "Pulverizador", "♨", AgroBase.Forms.IHM.Controls.HmiTheme.Warning, new System.Windows.Forms.Padding(3, 0, 3, 0));
SetupTab(this.tabNavegacao, "Navegação", "⌖", AgroBase.Forms.IHM.Controls.HmiTheme.Info, new System.Windows.Forms.Padding(3, 0, 3, 0));
SetupTab(this.tabParametros, "Parâmetros", "⚙", AgroBase.Forms.IHM.Controls.HmiTheme.Manual, new System.Windows.Forms.Padding(3, 0, 0, 0));
this.pnlContexto.BorderColor = AgroBase.Forms.IHM.Controls.HmiTheme.Border;
this.pnlContexto.Controls.Add(this.contextoLayout);
this.pnlContexto.CornerRadius = 8;
this.pnlContexto.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlContexto.FillColor = System.Drawing.Color.FromArgb(14, 23, 29);
this.pnlContexto.Margin = new System.Windows.Forms.Padding(0, 0, 0, 4);
this.pnlContexto.Padding = new System.Windows.Forms.Padding(8, 2, 8, 2);
this.contextoLayout.BackColor = System.Drawing.Color.Transparent;
this.contextoLayout.ColumnCount = 2;
this.contextoLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.contextoLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 165F));
this.contextoLayout.Controls.Add(this.lblContextoAba, 0, 0);
this.contextoLayout.Controls.Add(this.lblStatusOperacao, 1, 0);
this.contextoLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.contextoLayout.Margin = new System.Windows.Forms.Padding(0);
this.lblContextoAba.AutoEllipsis = true;
this.lblContextoAba.BackColor = System.Drawing.Color.Transparent;
this.lblContextoAba.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblContextoAba.Font = new System.Drawing.Font("Segoe UI", 7.6F);
this.lblContextoAba.ForeColor = AgroBase.Forms.IHM.Controls.HmiTheme.TextMuted;
this.lblContextoAba.Text = "Movimento, controle manual, câmeras e telemetria";
this.lblContextoAba.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.lblStatusOperacao.AutoEllipsis = true;
this.lblStatusOperacao.BackColor = System.Drawing.Color.Transparent;
this.lblStatusOperacao.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblStatusOperacao.Font = new System.Drawing.Font("Segoe UI", 7.6F, System.Drawing.FontStyle.Bold);
this.lblStatusOperacao.ForeColor = AgroBase.Forms.IHM.Controls.HmiTheme.Warning;
this.lblStatusOperacao.Text = "Aguardando liberação";
this.lblStatusOperacao.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.pnlConteudoAba.BackColor = AgroBase.Forms.IHM.Controls.HmiTheme.Background;
this.pnlConteudoAba.Controls.Add(this.pnlPlaceholder);
this.pnlConteudoAba.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlConteudoAba.Margin = new System.Windows.Forms.Padding(0);
this.pnlPlaceholder.BorderColor = AgroBase.Forms.IHM.Controls.HmiTheme.Border;
this.pnlPlaceholder.Controls.Add(this.lblPlaceholder);
this.pnlPlaceholder.CornerRadius = 10;
this.pnlPlaceholder.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlPlaceholder.FillColor = AgroBase.Forms.IHM.Controls.HmiTheme.Surface;
this.pnlPlaceholder.Padding = new System.Windows.Forms.Padding(20);
this.lblPlaceholder.BackColor = System.Drawing.Color.Transparent;
this.lblPlaceholder.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblPlaceholder.Font = new System.Drawing.Font("Segoe UI", 10F);
this.lblPlaceholder.ForeColor = AgroBase.Forms.IHM.Controls.HmiTheme.TextMuted;
this.lblPlaceholder.Text = "ÁREA DA ABA\r\n\r\nOs UserControls de Movimentação, Pulverizador,\r\nNavegação e Parâmetros serão carregados aqui.";
this.lblPlaceholder.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = AgroBase.Forms.IHM.Controls.HmiTheme.Background;
this.ClientSize = new System.Drawing.Size(800, 600);
this.Controls.Add(this.rootLayout);
this.DoubleBuffered = true;
this.Font = new System.Drawing.Font("Segoe UI", 9F);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "frmOperacao";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Operação do Rover";
this.rootLayout.ResumeLayout(false);
this.pnlHeader.ResumeLayout(false);
this.headerLayout.ResumeLayout(false);
this.headerTextLayout.ResumeLayout(false);
this.pnlModoAtual.ResumeLayout(false);
this.modoLayout.ResumeLayout(false);
this.pnlTabs.ResumeLayout(false);
this.tabsLayout.ResumeLayout(false);
this.pnlContexto.ResumeLayout(false);
this.contextoLayout.ResumeLayout(false);
this.pnlConteudoAba.ResumeLayout(false);
this.pnlPlaceholder.ResumeLayout(false);
this.ResumeLayout(false);
}
private static void SetupTab(
AgroBase.Forms.IHM.Controls.HmiOperationTabButton tab,
string text,
string icon,
System.Drawing.Color accent,
System.Windows.Forms.Padding margin)
{
tab.AccentColor = accent;
tab.Dock = System.Windows.Forms.DockStyle.Fill;
tab.IconText = icon;
tab.Margin = margin;
tab.Text = text;
}
private System.Windows.Forms.TableLayoutPanel rootLayout;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlHeader;
private System.Windows.Forms.TableLayoutPanel headerLayout;
private AgroBase.Forms.IHM.Controls.HmiSidebarButton btnVoltar;
private System.Windows.Forms.TableLayoutPanel headerTextLayout;
private System.Windows.Forms.Label lblTitulo;
private System.Windows.Forms.Label lblSubtitulo;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlModoAtual;
private System.Windows.Forms.TableLayoutPanel modoLayout;
private System.Windows.Forms.Label lblModoIcone;
private System.Windows.Forms.Label lblModoTitulo;
private System.Windows.Forms.Label lblModoValor;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlTabs;
private System.Windows.Forms.TableLayoutPanel tabsLayout;
private AgroBase.Forms.IHM.Controls.HmiOperationTabButton tabMovimentacao;
private AgroBase.Forms.IHM.Controls.HmiOperationTabButton tabPulverizador;
private AgroBase.Forms.IHM.Controls.HmiOperationTabButton tabNavegacao;
private AgroBase.Forms.IHM.Controls.HmiOperationTabButton tabParametros;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlContexto;
private System.Windows.Forms.TableLayoutPanel contextoLayout;
private System.Windows.Forms.Label lblContextoAba;
private System.Windows.Forms.Label lblStatusOperacao;
private System.Windows.Forms.Panel pnlConteudoAba;
private AgroBase.Forms.IHM.Controls.HmiRoundedPanel pnlPlaceholder;
private System.Windows.Forms.Label lblPlaceholder;
}
}

View File

@ -0,0 +1,127 @@

using AgroBase.Forms.IHM.Operacao;
using System;
using System.Windows.Forms;
namespace AgroBase.Forms.IHM
{
public enum AbaOperacaoIHM
{
Movimentacao = 0,
Pulverizador = 1,
Navegacao = 2,
Parametros = 3
}
public class AbaOperacaoAlteradaEventArgs : EventArgs
{
public AbaOperacaoAlteradaEventArgs(AbaOperacaoIHM aba)
{
Aba = aba;
}
public AbaOperacaoIHM Aba { get; private set; }
}
public partial class frmOperacao : Form, ITelaNavegavel
{
private AbaOperacaoIHM _abaAtual;
public event EventHandler VoltarSolicitado;
public event EventHandler<AbaOperacaoAlteradaEventArgs> AbaAlterada;
private readonly ucOperacaoMovimentacao _ucMovimentacao = new ucOperacaoMovimentacao { Dock = DockStyle.Fill };
private readonly ucOperacaoPulverizador _ucPulverizador = new ucOperacaoPulverizador { Dock = DockStyle.Fill };
private readonly ucOperacaoNavegacao _ucNavegacao = new ucOperacaoNavegacao { Dock = DockStyle.Fill };
private readonly ucOperacaoParametros _ucParametros = new ucOperacaoParametros { Dock = DockStyle.Fill };
public frmOperacao()
{
InitializeComponent();
VincularEventos();
SelecionarAba(AbaOperacaoIHM.Movimentacao, false);
}
public Panel PainelConteudo { get { return pnlConteudoAba; } }
public AbaOperacaoIHM AbaAtual { get { return _abaAtual; } }
private void VincularEventos()
{
btnVoltar.Click += delegate
{
if (VoltarSolicitado != null)
VoltarSolicitado(this, EventArgs.Empty);
};
tabMovimentacao.Click += delegate { SelecionarAba(AbaOperacaoIHM.Movimentacao, true); };
tabPulverizador.Click += delegate { SelecionarAba(AbaOperacaoIHM.Pulverizador, true); };
tabNavegacao.Click += delegate { SelecionarAba(AbaOperacaoIHM.Navegacao, true); };
tabParametros.Click += delegate { SelecionarAba(AbaOperacaoIHM.Parametros, true); };
}
public void SelecionarAba(AbaOperacaoIHM aba)
{
SelecionarAba(aba, true);
}
private void SelecionarAba(AbaOperacaoIHM aba, bool dispararEvento)
{
_abaAtual = aba;
tabMovimentacao.Selected = aba == AbaOperacaoIHM.Movimentacao;
tabPulverizador.Selected = aba == AbaOperacaoIHM.Pulverizador;
tabNavegacao.Selected = aba == AbaOperacaoIHM.Navegacao;
tabParametros.Selected = aba == AbaOperacaoIHM.Parametros;
switch (aba)
{
case AbaOperacaoIHM.Pulverizador:
lblContextoAba.Text = "Pulverização, câmera de ervas e telemetria do atuador";
ExibirConteudo(_ucPulverizador);
break;
case AbaOperacaoIHM.Navegacao:
lblContextoAba.Text = "Mapa, GNSS, trajetória e autonomia por corredor";
ExibirConteudo(_ucNavegacao);
break;
case AbaOperacaoIHM.Parametros:
lblContextoAba.Text = "Parâmetros da operação atual e configuração local";
ExibirConteudo(_ucParametros);
break;
default:
lblContextoAba.Text = "Movimento, controle manual, câmeras e telemetria";
ExibirConteudo(_ucMovimentacao);
break;
}
if (dispararEvento && AbaAlterada != null)
AbaAlterada(this, new AbaOperacaoAlteradaEventArgs(aba));
}
public void ExibirConteudo(Control controle)
{
if (controle == null)
return;
pnlConteudoAba.SuspendLayout();
try
{
foreach (Control atual in pnlConteudoAba.Controls)
atual.Visible = false;
controle.Dock = DockStyle.Fill;
controle.Margin = Padding.Empty;
if (!pnlConteudoAba.Controls.Contains(controle))
pnlConteudoAba.Controls.Add(controle);
controle.Visible = true;
controle.BringToFront();
}
finally
{
pnlConteudoAba.ResumeLayout(true);
}
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>