Ejemplo n.º 1
0
 public void Reg(T key, UpdaterDelegate action)
 {
     if (!updaterDict.ContainsKey(key))
     {
         updaterDict[key] = action;
     }
 }
 public ParticleLightManager(
     ParticleSystem <T> system,
     IEnumerable <LightingEnvironment> lightingEnvironments,
     UpdaterDelegate updater
     )
 {
     System               = system;
     _Partition           = new SpatialPartition <Sector>(system.Subdivision, (sectorIndex) => new Sector(this, sectorIndex));
     LightingEnvironments = lightingEnvironments;
     Updater              = updater;
 }
Ejemplo n.º 3
0
 public void RegisterUpdater(UpdaterDelegate up)
 {
     for (int i = 0; i < m_updaterDelegate.Count; ++i)
     {
         if (m_updaterDelegate[i] == up)
         {
             return;
         }
     }
     m_updaterDelegate.Add(up);
 }
Ejemplo n.º 4
0
 private void PictureBoxUpdater(PictureBox pctrbox, Color color)
 {
     if (pctrbox.InvokeRequired)
     {
         UpdaterDelegate <PictureBox, Color> d = new UpdaterDelegate <PictureBox, Color>(PictureBoxUpdater);
         this.Invoke(d, new object[] { pctrbox, color });
     }
     else
     {
         pctrbox.BackColor = color;
     }
 }
Ejemplo n.º 5
0
 private void LabelUpdater(Label label, string labelText)
 {
     if (label.InvokeRequired)
     {
         UpdaterDelegate <Label, string> d = new UpdaterDelegate <Label, string>(LabelUpdater);
         this.Invoke(d, new object[] { label, labelText });
     }
     else
     {
         label.Text = labelText;
     }
 }
Ejemplo n.º 6
0
 public void UnRegisterUpdater(UpdaterDelegate up)
 {
     m_updaterDelegate.Remove(up);
 }