public VolumeForm(float level, Coord?location = null) { InitializeComponent(); Level = Matht.Clamp(level, 0, 1); Location = location != null ? (Coord)location : new Coord(10, 10); ClientSize = volSize; BackColor = baseColor; Shown += (o, e) => { ClientSize = volSize; new Window(Handle).SetOpacity(0.9).SetAlwaysOnTop(true); }; }
public void SetLevel(float level) { Level = Matht.Clamp(level, 0, 1); Refresh(); }
public void SetValue(int value) { progressBar1.Value = Matht.Clamp(value, 0, Max); }