private void ZoomScrlBar_ValueChanged(object sender, EventArgs e) { if (ScreenScaling != ZoomScrlBar.Value) { MainPB.Refresh(); } }
private void CentreScreenButton_Click(object sender, EventArgs e) { float lb = GraphicsObject.GetLeftBorder(), rb = GraphicsObject.GetRightBorder(), bb = GraphicsObject.GetBottomBorder(), tb = GraphicsObject.GetTopBorder(); CalculateScreenDimentions(ScreenScaling, new PointF((rb - lb) / 2 + lb, (tb - bb) / 2 + bb)); MainPB.Refresh(); }
private void VertTransBox_ValueChanged(object sender, EventArgs e) { if ((float)VertTransBox.Value != TranslationVals.Y) { TranslationVals.Y = (float)VertTransBox.Value; MainPB.Refresh(); } }
private void RelatYTB_ValueChanged(object sender, EventArgs e) { if (!RelatPChangedByMouse) { SetRelativityPoint(new PointF((float)RelatXTB.Value, (float)RelatYTB.Value)); MainPB.Refresh(); } }
//The relativity point was set by mouse click private void MainPB_MouseClick(object sender, MouseEventArgs e) { RelatPChangedByMouse = true; SetRelativityPoint(e.Location); RelatXTB.Value = (decimal)RealRelatPoint.X; RelatYTB.Value = (decimal)RealRelatPoint.Y; RelatPChangedByMouse = false; MainPB.Refresh(); }
//Rotaion values changed private void RotDegBox_ValueChanged(object sender, EventArgs e) { if (RotDegBox.Value < 0) { RotDegBox.Value += 360; } else if (RotDegBox.Value >= 360) { RotDegBox.Value -= 360; } RotationValue = (float)RotDegBox.Value; MainPB.Refresh(); }
private void Form1_Resize(object sender, EventArgs e) { ScreenSizeChanged = true; MainPB.Refresh(); }
//Screen scaling private void AutoRescalingBox_CheckStateChanged(object sender, EventArgs e) { ZoomScrlBar.Enabled = !AutoRescalingBox.Checked; MainPB.Refresh(); }
private void ReflectYButon_Click(object sender, EventArgs e) { GraphicsObject.Reflect(true, false, RealRelatPoint); MainPB.Refresh(); }
private void VertScalBox_ValueChanged(object sender, EventArgs e) { ScalingVals.Y = (float)VertScalBox.Value; MainPB.Refresh(); }