protected virtual void Update(int actual, int total, LongoMatch.Common.Image frame)
 {
     if(actual <= total) {
         progressbar.Text= Catalog.GetString("Capturing frame: ")+actual+"/"+total;
         progressbar.Fraction = (double)actual/(double)total;
         if(frame != null) {
             if(image.Pixbuf != null)
                 image.Pixbuf.Dispose();
             image.Pixbuf = frame.Value;
         }
     }
     if(actual == total) {
         progressbar.Text= Catalog.GetString("Done");
         cancelbutton.Visible = false;
         okbutton.Visible = true;
     }
 }
Beispiel #2
0
        public override void Draw(IDrawingToolkit tk, LongoMatch.Core.Common.Area area)
        {
            if (!UpdateDrawArea (tk, area, Area)) {
                return;
            }
            ;

            tk.Begin ();
            tk.DrawSurface (needle, TopLeft);
            tk.End ();
        }
 protected virtual void OnTagPlay(LongoMatch.Store.Play tNode)
 {
     if(TagPlay != null)
         TagPlay(tNode);
 }
 void HandleMainWindowGameUnitEvent(GameUnit gameUnit, LongoMatch.Common.GameUnitEventType eType)
 {
     Log.Debug("Received GameUnit event of type: " + eType);
     switch (eType) {
     case GameUnitEventType.Start:
     {
         StartGameUnit(gameUnit);
         break;
     }
     case GameUnitEventType.Cancel:
     {
         CancelGameUnit(gameUnit);
         break;
     }
     case GameUnitEventType.Stop:
     {
         StopGameUnit(gameUnit);
         break;
     }
     }
 }
 protected virtual void OnSnapshotSeriesEvent(LongoMatch.Store.Play tNode)
 {
     if(SnapshotSeriesEvent != null)
         SnapshotSeriesEvent(tNode);
 }