예제 #1
0
파일: MDIS.cs 프로젝트: jhston02/MDIExample
        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();
            }
        }