示例#1
0
        private void NextClick(object sender, RoutedEventArgs e)
        {
            int next = (int)Fleischart + 1;

            if (next > Enum.GetValues(typeof(Fleischart)).Length)
            {
                next = 0;
            }
            Fleischart = (Fleischart)next;
        }
示例#2
0
        private void PrevClick(object sender, RoutedEventArgs e)
        {
            int prev = (int)Fleischart - 1;

            if (prev < 0)
            {
                prev = Enum.GetValues(typeof(Fleischart)).Length - 1;
            }
            Fleischart = (Fleischart)prev;
        }