Example #1
0
 // Phuong thuc them cac uy quyen vao mang (them hieu ung vao mang)
 public void AddToEffects(DoEffect theEffect)
 {
     if (numEffectsRegistered >= 10)
     {
         throw new Exception("Too many members in array");
     }
     arrayOfEffects[numEffectsRegistered++] = theEffect;
 }
Example #2
0
        private void DoEffect_DoWork(object sender, DoWorkEventArgs e)
        {
            mProgress = 0L;

            // var buffer = ;

            var task = Task.Factory.StartNew(
                () => mAction(mBitmap, ref mProgress)
                );

            while (!task.IsCompleted)
            {
                DoEffect.ReportProgress((int)mProgress);
                Thread.Sleep(100);
            }
        }
Example #3
0
 public BuildingEffect(string description, LightSequence sequence, DoEffect effectHandle, bool isKnown)
 {
     this.description = description;
     this.sequence = sequence;
     this.effectHandle = effectHandle;
     this.isKnown = isKnown;
 }
Example #4
0
 private void ProgressDialog_Load(object sender, EventArgs e)
 {
     DoEffect.RunWorkerAsync();
 }