mirror of
https://github.com/claunia/cuetools.net.git
synced 2025-12-16 18:14:25 +00:00
CUERipper revamp
This commit is contained in:
31
ProgressODoom/RarProgressBar.cs
Normal file
31
ProgressODoom/RarProgressBar.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ProgressODoom {
|
||||
[ToolboxBitmapAttribute(typeof(ProgressODoom.RarProgressBar), "Icons.RarProgressBar.ico")]
|
||||
public class RarProgressBar : DualProgressBar {
|
||||
public RarProgressBar() {
|
||||
this.MasterPainter = new RarProgressPainter(RarProgressPainter.RarProgressType.Silver);
|
||||
((RarProgressPainter)this.MasterPainter).ShowEdge = false;
|
||||
this.ProgressPainter = new RarProgressPainter(RarProgressPainter.RarProgressType.Gold);
|
||||
((RarProgressPainter)this.ProgressPainter).ShowEdge = true;
|
||||
this.BorderPainter = new RarBorderPainter();
|
||||
this.BackgroundPainter = new RarBackgroundPainter();
|
||||
this.PaintMasterFirst = true;
|
||||
this.OnValueChanged += new EventHandler(onValueChanged);
|
||||
this.OnMasterValueChanged += new EventHandler(onValueChanged);
|
||||
}
|
||||
|
||||
private void onValueChanged(object sender, EventArgs e) {
|
||||
bool masterAhead = false;
|
||||
if (this.MasterValue > this.Value) {
|
||||
masterAhead = true;
|
||||
}
|
||||
((RarProgressPainter)this.MasterPainter).ShowEdge = masterAhead;
|
||||
((RarProgressPainter)this.ProgressPainter).ShowEdge = !masterAhead;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user