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