Esempio n. 1
0
        private void MapsTicketBooking_ShapeSelectionChanged(object sender, ShapeSelectedEventArgs e)
        {
            TicketData data = e.Data as TicketData;

            if (data != null)
            {
                // if ((this.Maps.Layers[0] as ShapeFileLayer).SelectedItems.Contains(e.Data))
                //  (this.Maps.Layers[0] as ShapeFileLayer).SelectedItems.Remove(e.Data);
                this.ClearButton.Opacity   = 1;
                this.ClearButton.IsEnabled = true;
                SelectedLabel.Text         = data.SeatNumber;
            }
        }
Esempio n. 2
0
        void UpdateSelection()
        {
            string selected = "";

            if ((Maps.Layers[0] as ShapeFileLayer).SelectedItems.Count == 0)
            {
                SelectedLabel.Text         = selected;
                SelectedLabelCount.Text    = " ";
                this.ClearButton.IsEnabled = false;
                this.ClearButton.Opacity   = 0.5;
            }
            else
            {
                int count = 0;

                for (int i = 0; i < (this.Maps.Layers[0] as ShapeFileLayer).SelectedItems.Count; i++)
                {
                    TicketData data = (this.Maps.Layers[0] as ShapeFileLayer).SelectedItems[i] as TicketData;

                    count++;
                    if ((this.Maps.Layers[0] as ShapeFileLayer).SelectedItems.Count <= 1 && (this.Maps.Layers[0] as ShapeFileLayer).SelectedItems.Count != 0)
                    {
                        selected += ("S" + data.SeatNumber);
                    }
                    else if (i == (this.Maps.Layers[0] as ShapeFileLayer).SelectedItems.Count - 1)
                    {
                        selected += ("S" + data.SeatNumber);
                    }
                    else
                    {
                        selected += ("S" + data.SeatNumber + ", ");
                    }

                    this.ClearButton.Opacity   = 1;
                    this.ClearButton.IsEnabled = true;
                    SelectedLabel.Text         = selected;
                }

                SelectedLabelCount.Text = "" + count;
            }
        }