private void RightButtonHandler(object sender, MouseButtonEventArgs e)
        {
            Button     button    = sender as Button;
            ChangeName changeWin = new ChangeName();

            changeWin.Top  = this.Top + 50;
            changeWin.Left = this.Left + 50;
            changeWin.ShowDialog();

            if (changeWin.DialogResult.HasValue && changeWin.DialogResult.Value)
            {
                button.Uid     = changeWin.inputName.Text;
                button.Content = changeWin.inputName.Text;
            }
        }
Esempio n. 2
0
        private void button_compare_Click(object sender, RoutedEventArgs e)
        {
            ChangeName changeWin = new ChangeName();

            changeWin.Top         = this.Top + 50;
            changeWin.Left        = this.Left + 50;
            changeWin.header.Text = "Compare To ";
            changeWin.ShowDialog();

            if (changeWin.DialogResult.HasValue && changeWin.DialogResult.Value)
            {
                compareName = changeWin.inputName.Text;
                CompareSetUp();
            }
        }
        private void button_ex_Click(object sender, RoutedEventArgs e)
        {
            ChangeName changeWin = new ChangeName();

            changeWin.Top  = this.Top + 50;
            changeWin.Left = this.Left + 50;
            changeWin.ShowDialog();

            if (changeWin.DialogResult.HasValue && changeWin.DialogResult.Value)
            {
                button_ex.Uid     = changeWin.inputName.Text;
                button_ex.Content = changeWin.inputName.Text;
                button_ex.Click  -= button_ex_Click;
                button_ex.Click  += ButtonHandler;
            }
        }
        private void button_compare_Click(object sender, RoutedEventArgs e)
        {
            ChangeName changeWin = new ChangeName();

            changeWin.Top         = this.Top + 50;
            changeWin.Left        = this.Left + 50;
            changeWin.header.Text = "Compare To ";
            changeWin.ShowDialog();

            if (changeWin.DialogResult.HasValue && changeWin.DialogResult.Value)
            {
                compareName       = changeWin.inputName.Text;
                comparingMode     = true;
                obj_x1.Visibility = obj_x2.Visibility = obj_back.Visibility = Visibility.Visible;
                Console.WriteLine("input " + compareName);
            }
        }