Esempio n. 1
0
 private void measureScreenRect()
 {
     this.mScreenDrawRect.X = (int)((double)this.mScreenRect.X +
                                    (double)this.mScreenRect.Width * (double)this.mScreenRectRatio.l);
     this.mScreenDrawRect.Y = (int)((double)this.mScreenRect.Y +
                                    (double)this.mScreenRect.Height * (double)this.mScreenRectRatio.t);
     this.mScreenDrawRect.Width = (int)((double)this.mScreenRect.Width *
                                        ((double)this.mScreenRectRatio.r - (double)this.mScreenRectRatio.l));
     this.mScreenDrawRect.Height = (int)((double)this.mScreenRect.Height *
                                         ((double)this.mScreenRectRatio.b - (double)this.mScreenRectRatio.t));
     if (this.ScreenRatioChanged != null)
     {
         this.ScreenRatioChanged((object)this, (EventArgs)RatioEventArgs.getInstance(this.ScreenRectRatio));
     }
     this.Refresh();
 }
Esempio n. 2
0
 private void measureDeviceRect()
 {
     this.mDeviceDrawRect.X = (int)((double)this.mDeviceRect.X +
                                    (double)this.mDeviceRect.Width * (double)this.mDeviceDrawRectRatio.l);
     this.mDeviceDrawRect.Y = (int)((double)this.mDeviceRect.Y +
                                    (double)this.mDeviceRect.Height * (double)this.mDeviceDrawRectRatio.t);
     this.mDeviceDrawRect.Width = (int)((double)this.mDeviceRect.Width *
                                        ((double)this.mDeviceDrawRectRatio.r -
                                         (double)this.mDeviceDrawRectRatio.l));
     this.mDeviceDrawRect.Height = (int)((double)this.mDeviceRect.Height *
                                         ((double)this.mDeviceDrawRectRatio.b -
                                          (double)this.mDeviceDrawRectRatio.t));
     if (this.DeviceRatioChanged != null)
     {
         this.DeviceRatioChanged((object)this,
                                 (EventArgs)RatioEventArgs.getInstance(Utils.rotateRatio(this.mDeviceDrawRectRatio,
                                                                                         -this.mDeviceRectRotate)));
     }
     this.Refresh();
 }