예제 #1
0
        public override bool Equals(object obj)
        {
            PlaceTypeDesc desc = obj as PlaceTypeDesc;

            if (desc != null)
            {
                return(this.Name.Equals(desc.Name));
            }
            return(false);
        }
예제 #2
0
        private void cboPlaceType_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            // Collapse all place specific elements.
            WildernessElement.Visibility = Visibility.Collapsed;

            // Show the selected place specific element.
            PlaceTypeDesc desc = cboPlaceType.SelectedItem as PlaceTypeDesc;

            if (desc != null)
            {
                if (desc.Name.Contains("Wilderness"))
                {
                    WildernessElement.Visibility = Visibility.Visible;
                }
            }
        }