示例#1
0
        private void swapToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int first  = count + 1;
            int Second = count + 1;

            if (!string.IsNullOrWhiteSpace(xHolder.Text))
            {
                first = int.Parse(xHolder.Text);
            }
            if (!string.IsNullOrWhiteSpace(yHolder.Text))
            {
                Second = int.Parse(yHolder.Text);
            }
            if (first < this.MdiChildren.Length && Second < this.MdiChildren.Length)
            {
                ImageHolder temp = (ImageHolder)(this.MdiChildren[first]);
                temp.sendImageX();
                ImageHolder temp2 = (ImageHolder)(this.MdiChildren[Second]);
                temp2.sendImageY();
                temp.setBackgroundY();
                temp2.setBackgroundX();
            }
        }