BetterExplorer.ResizeImage.TextBoxes_Edited C# (CSharp) 메소드

TextBoxes_Edited() 개인적인 메소드

private TextBoxes_Edited ( object sender, System.Windows.Controls.TextChangedEventArgs e ) : void
sender object
e System.Windows.Controls.TextChangedEventArgs
리턴 void
        private void TextBoxes_Edited(object sender, TextChangedEventArgs e)
        {
            int this_Width = newwidth, This_Heighth = newheight;

            //TODO: Get the Value Before AND after the change THEN deal with keeping the ratio's the same

            if (textBox1 == null || textBox2 == null || percsetting)
            {
                return;
            }
            else if (!int.TryParse(textBox1.Text, out this_Width))
            {
                System.Windows.Forms.MessageBox.Show("Width cannot be less than 1");
                textBox1.Text = "1";
            }
            else if (!int.TryParse(textBox2.Text, out This_Heighth))
            {
                System.Windows.Forms.MessageBox.Show("Height cannot be less than 1");
                textBox2.Text = "1";
            }
            else if (cbxMaintainRatio != null && cbxMaintainRatio.IsChecked.Value)
            {
                if (sender == textBox1)
                {

                }
                else
                {

                }
            }

            newwidth = this_Width;
            newheight = This_Heighth;
        }
    }