private void XZ_Orientation_Click(object sender, EventArgs e) { try { Orientation = View3DOrientationEnum.XZ; } catch (BaseException ex) { ExceptionDialog.Show(ex); } }
private void SetOrientation(View3DOrientationEnum value) { _orientation = value; projectionToolStripButton.Image = Orientation switch { View3DOrientationEnum.XZ => Properties.Resources.zxProjection, View3DOrientationEnum.YX => Properties.Resources.xyProjection, View3DOrientationEnum.ZY => Properties.Resources.yzProjection, View3DOrientationEnum.ZX => Properties.Resources.xzProjection, View3DOrientationEnum.YZ => Properties.Resources.zyProjection, View3DOrientationEnum.XY => Properties.Resources.yxProjection, _ => throw new InvalidCaseException(nameof(Orientation), Orientation, 891466), }; OrientationChanged?.Invoke(this, new EventArgs()); }