Preview:
 private void CheckSuppExhPosition()
        {
            Point XtraTopLocation = new Point(xtraTabControl1.Location.X, xtraTabControl1.Location.Y);
            Point XtraButtomLocation = new Point(xtraTabControl2.Location.X, xtraTabControl2.Location.Y);
            Point GroupTopLocation = new Point(groupControl1.Location.X, groupControl1.Location.Y);
            Point GrouoButtomLocation = new Point(groupControl2.Location.X, groupControl2.Location.Y);
            
            if (Settings.GetUnit.SupplyPosition == "Top" || Settings.GetUnit.SupplyPosition == "Back")
            {
                xtraTabControl1.Location = XtraTopLocation;
                xtraTabControl2.Location = XtraButtomLocation;

                groupControl1.Location = GroupTopLocation;
                groupControl2.Location = GrouoButtomLocation;
            }
            else if (Settings.GetUnit.SupplyPosition == "Bottom" || Settings.GetUnit.SupplyPosition == "Front")
            {
                xtraTabControl1.Location = XtraButtomLocation;
                xtraTabControl2.Location = XtraTopLocation;

                groupControl1.Location = GrouoButtomLocation;
                groupControl2.Location = GroupTopLocation;
            }
          
          //refactor
          if (Settings.GetUnit.SupplyPosition == "Bottom" || Settings.GetUnit.SupplyPosition == "Front")
            {
                (xtraTabControl1.Location, xtraTabControl2.Location) = (xtraTabControl2.Location, xtraTabControl1.Location);
                (groupControl1.Location, groupControl2.Location) = (groupControl2.Location, groupControl1.Location);
            }
          
        }



downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter