Holaaaaaaaaa:
Más novedad de ka simulación.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Drawing.Drawing2D; // No olvidar.
namespace Lavadora_4
{
public partial class Form1 : Form
{
private Pen lápiz2;
private Pen lápiz3;
private Pen lápiz4;
private float ángulo;
private SolidBrush agua;
private GraphicsPath m_lavadora;
private GraphicsPath m_agua;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
pictureBox1.Size = new Size(300, 300);
pictureBox1.BackColor = Color.AntiqueWhite;
lápiz2 = new Pen(Color.Green, 10);
lápiz2.StartCap = System.Drawing.Drawing2D.LineCap.ArrowAnchor;
lápiz2.EndCap = System.Drawing.Drawing2D.LineCap.RoundAnchor;
lápiz3 = new Pen(Color.Black);
lápiz4 = new Pen(Color.Red, 10);
ángulo = 0;
agua = new SolidBrush(Color.FromArgb(200, 0, 0, 255)); // Transparencia del agua 200.
trackBar2.Value = -90; // Para que empiece sin agua.
}
private void pictureBox1_Paint(object sender, PaintEventArgs e)
{
e.Graphics.DrawRectangle(lápiz3, 10, 10, pictureBox1.ClientSize.Width - 20, pictureBox1.ClientSize.Height - 20);
e.Graphics.DrawEllipse(lápiz4, 10, 10, pictureBox1.ClientSize.Height - 20, pictureBox1.ClientSize.Height - 20);
e.Graphics.TranslateTransform(pictureBox1.ClientSize.Width / 2, pictureBox1.ClientSize.Height / 2);
e.Graphics.RotateTransform(ángulo);
e.Graphics.TranslateTransform(-pictureBox1.ClientSize.Width / 2, -pictureBox1.ClientSize.Height / 2);
//e.Graphics.DrawLine(lápiz2, 20, pictureBox1.ClientSize.Height / 2, pictureBox1.ClientSize.Width / 2, pictureBox1.ClientSize.Height / 2);
e.Graphics.DrawPath(lápiz2, m_lavadora);
e.Graphics.ResetTransform();
e.Graphics.FillPath(agua, m_agua);
}
private void trackBar1_ValueChanged(object sender, EventArgs e)
{
ángulo = (float)trackBar1.Value;
pictureBox1.Refresh();
}
private void pictureBox1_Resize(object sender, EventArgs e)
{
int ancho = pictureBox1.ClientSize.Width;
int alto = pictureBox1.ClientSize.Height;
m_lavadora = new GraphicsPath();
m_lavadora.AddEllipse(20, 20, ancho - 40, alto - 40);
m_lavadora.CloseFigure();
m_lavadora.AddLine(20, (alto / 2), ancho - 20, (alto / 2));
m_lavadora.CloseFigure();
m_lavadora.AddLine(ancho / 2, 20, ancho / 2, alto - 20);
m_lavadora.CloseFigure();
m_agua = new GraphicsPath();
m_agua.AddArc(20, 20, ancho - 40, alto - 40, trackBar2.Value, 180 - 2 * trackBar2.Value);
m_agua.CloseFigure();
}
private void trackBar2_ValueChanged(object sender, EventArgs e)
{
m_agua = new GraphicsPath();
m_agua.AddArc(20, 20, pictureBox1.ClientSize.Width - 40, pictureBox1.ClientSize.Height - 40, -trackBar2.Value, 180 - 2 * -trackBar2.Value);
m_agua.CloseFigure();
pictureBox1.Refresh();
}
}
Ahora toca los tiempos.
Saludo.