Example #1
0
 public PelipisteClickEventArgs(RoutedEvent routedEvent, int x, int y, Pelialue alue)
     : base(routedEvent)
 {
     X = x;
     Y = y;
     Alue = alue;
 }
Example #2
0
        /// <summary>
        /// Siiirtää ja poistaa Pelinappulan tästä alueesta toiseen uuteen alueeseen.
        /// </summary>
        /// <param name="alue"></param>
        public void SiirraNappula(Pelialue alue)
        {
            Children.Remove(nappula);
            nappula.MouseLeftButtonUp -= UserControl_MouseLeftButtonUp;
            nappula.nappula.ValittuPoistettuHandler -= NappulaPoistettu;

            alue.lisaaNappula(nappula);
            nappula = null;
        }
Example #3
0
 /// <summary>
 /// Nostaa PelipisteClickEventin.
 /// </summary>
 /// <param name="x"></param>
 /// <param name="y"></param>
 /// <param name="alue"></param>
 void RaisePelipisteClickEvent(int x, int y, Pelialue alue)
 {
     // nyt luodaan oma args-luokan esiintymä, tarvitaan routeventin tyyppi (OmaArgsEvent! ei vahingossakaan sama kuin edellisessä!) ja varsinainen oma parametri
     PelipisteClickEventArgs newEventArgs = new PelipisteClickEventArgs(PelilautaController.PelipisteClickEvent, x, y, alue);
     RaiseEvent(newEventArgs);
 }
Example #4
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 2:
     this.lauta = ((System.Windows.Controls.Primitives.UniformGrid)(target));
     return;
     case 3:
     this.PerusAlue = ((PelilautaNamespace.Pelialue)(target));
     return;
     }
     this._contentLoaded = true;
 }