FilterDemoFramework.FilterView.UpdateControls C# (CSharp) Method

UpdateControls() private method

private UpdateControls ( bool refreshColor ) : void
refreshColor bool
return void
		void UpdateControls (bool refreshColor)
		{
			var color = touchDown ? TintColor.CGColor : UIColor.DarkGray.CGColor;

			CATransaction.Begin ();
			CATransaction.DisableActions = true;

			foreach (var layer in controls) {
				switch (layer.Name) {
				case "point":
					layer.Frame = new CGRect (editPoint.X - 3, editPoint.Y - 3, 7f, 7f).Integral ();
					layer.Position = editPoint;

					if (refreshColor)
						layer.BorderColor = color;
					break;
				case "x":
					layer.Frame = new CGRect (graphLayer.Frame.X, NMath.Floor (editPoint.Y + 0.5f), graphLayer.Frame.Width, 1f);

					if (refreshColor)
						layer.BackgroundColor = color;
					break;
				case "y":
					layer.Frame = new CGRect (NMath.Floor (editPoint.X) + 0.5f, bottomMargin, 1f, graphLayer.Frame.Height);

					if (refreshColor)
						layer.BackgroundColor = color;
					break;
				default:
					layer.Frame = CGRect.Empty;
					break;
				}
			}

			CATransaction.Commit ();
		}