예제 #1
0
        void Label_MouseDown(object sender, RoutedEventArgs e)
        {
            MyLabel lbl = (MyLabel)sender;

            if (lbl.IsFocused)
            {
                lbl.Focusable = false;
            }
            else
            {
                lbl.Focusable = true;
                lbl.Focus();
                if (!lbl.IsLock)
                {
                    if ((bool)Erase.IsChecked)
                    {
                        controller.RemoveDigit(lbl);
                        Erase.IsChecked = false;
                    }
                    else
                    if ((bool)Hint.IsChecked)
                    {
                        controller.OpenDigit(lbl);
                        hints--;
                        Hint.IsChecked = false;
                    }
                }
                controller.SelectLabels(lbl);
            }
        }