Ejemplo n.º 1
0
 public void RemovePiece(ProgressBarExPiece piece)
 {
     lock (locky)
     {
         if (pieces.ContainsKey(piece.ItemId))
         {
             pieces.Remove(piece.ItemId);
         }
         CalcWidth();
     }
 }
Ejemplo n.º 2
0
 public ProgressBarExPiece AddPiece(int PieceId)
 {
     lock (locky)
     {
         ProgressBarExPiece piece = new ProgressBarExPiece();
         piece.ProgressBarEx = this;
         piece.ItemId        = PieceCounter;
         pieces.Add(piece.ItemId, piece);
         PieceCounter++;
         CalcWidth();
         this.RedrawProgressBar();
         return(piece);
     }
 }
 public void RemovePiece(ProgressBarExPiece piece)
 {
     lock (locky)
     {
         if (pieces.ContainsKey(piece.ItemId))
             pieces.Remove(piece.ItemId);
         CalcWidth();
     }
 }
 public ProgressBarExPiece AddPiece(int PieceId)
 {
     lock (locky)
     {
         ProgressBarExPiece piece = new ProgressBarExPiece();
         piece.ProgressBarEx = this;
         piece.ItemId = PieceCounter;
         pieces.Add(piece.ItemId, piece);
         PieceCounter++;
         CalcWidth();
         this.RedrawProgressBar();
         return piece;
     }
 }