Beispiel #1
0
 private void ZoomScrlBar_ValueChanged(object sender, EventArgs e)
 {
     if (ScreenScaling != ZoomScrlBar.Value)
     {
         MainPB.Refresh();
     }
 }
Beispiel #2
0
        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();
        }
Beispiel #3
0
 private void VertTransBox_ValueChanged(object sender, EventArgs e)
 {
     if ((float)VertTransBox.Value != TranslationVals.Y)
     {
         TranslationVals.Y = (float)VertTransBox.Value;
         MainPB.Refresh();
     }
 }
Beispiel #4
0
 private void RelatYTB_ValueChanged(object sender, EventArgs e)
 {
     if (!RelatPChangedByMouse)
     {
         SetRelativityPoint(new PointF((float)RelatXTB.Value, (float)RelatYTB.Value));
         MainPB.Refresh();
     }
 }
Beispiel #5
0
 //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();
 }
Beispiel #6
0
 //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();
 }
Beispiel #7
0
 private void Form1_Resize(object sender, EventArgs e)
 {
     ScreenSizeChanged = true;
     MainPB.Refresh();
 }
Beispiel #8
0
 //Screen scaling
 private void AutoRescalingBox_CheckStateChanged(object sender, EventArgs e)
 {
     ZoomScrlBar.Enabled = !AutoRescalingBox.Checked;
     MainPB.Refresh();
 }
Beispiel #9
0
 private void ReflectYButon_Click(object sender, EventArgs e)
 {
     GraphicsObject.Reflect(true, false, RealRelatPoint);
     MainPB.Refresh();
 }
Beispiel #10
0
 private void VertScalBox_ValueChanged(object sender, EventArgs e)
 {
     ScalingVals.Y = (float)VertScalBox.Value;
     MainPB.Refresh();
 }