public void Load_Image() { img = Bitmap.FromFile(m_strImagePath); string strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath.ini"); if (LauncherForm.resolution_width < 1920 && LauncherForm.resolution_height < 1080) { strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath_1600_1024.ini"); if (LauncherForm.resolution_width < 1600 && LauncherForm.resolution_height < 1024) { strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath_1280_768.ini"); } else if (LauncherForm.resolution_width < 1280) { strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath_LOW.ini"); } } else if (LauncherForm.resolution_width > 1920) { strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath_HIGH.ini"); } IniParser parser = new IniParser(strINIPath); string sZoom = parser.GetSetting("LOCATIONIMG", "ZOOM"); double dZoomSale = 1.0; if (Int32.Parse(sZoom) > 0) { dZoomSale = 1 + (Int32.Parse(sZoom) * 0.1); } img = DeadlyImageCommon.resizeImage(img, dZoomSale); }
public void Load_Image() { img = Bitmap.FromFile(m_strImagePath); string strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath.ini"); if (LauncherForm.resolution_width < 1920 && LauncherForm.resolution_height < 1080) { strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath_1600_1024.ini"); if (LauncherForm.resolution_width < 1600 && LauncherForm.resolution_height < 1024) { strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath_1280_768.ini"); } else if (LauncherForm.resolution_width < 1280) { strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath_LOW.ini"); } } else if (LauncherForm.resolution_width > 1920) { strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath_HIGH.ini"); } IniParser parser = new IniParser(strINIPath); string sZoom = parser.GetSetting("LOCATIONIMGMAP", "ZOOM"); // img = resizeImage(img, new Size(img.Width + Int32.Parse(sZoom), img.Height + Int32.Parse(sZoom))); img = DeadlyImageCommon.ScaleImage(img, img.Width + Int32.Parse(sZoom), img.Height + Int32.Parse(sZoom)); }
private void BtnZoomIn_Click(object sender, EventArgs e) { string strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath.ini"); if (LauncherForm.resolution_width < 1920 && LauncherForm.resolution_height < 1080) { strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath_1600_1024.ini"); if (LauncherForm.resolution_width < 1600 && LauncherForm.resolution_height < 1024) { strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath_1280_768.ini"); } else if (LauncherForm.resolution_width < 1280) { strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath_LOW.ini"); } } else if (LauncherForm.resolution_width > 1920) { strINIPath = String.Format("{0}\\{1}", Application.StartupPath, "ConfigPath_HIGH.ini"); } IniParser parser = new IniParser(strINIPath); string sZoom = parser.GetSetting("LOCATIONIMG", "ZOOM"); nZoom = Int32.Parse(sZoom); img = Bitmap.FromFile(m_strImagePath); nZoom = nZoom + 100; if (img.Width + nZoom <= 1920 && img.Height + nZoom <= 1080) { double dZoomSale = 1.0; if (nZoom > 0) { dZoomSale = 1 + (nZoom * 0.1); } img = DeadlyImageCommon.resizeImage(img, dZoomSale); parser.AddSetting("LOCATIONIMG", "ZOOM", nZoom.ToString()); parser.SaveSettings(); this.Invalidate(); this.Update(); this.Refresh(); } }
private void pictureUBER_Click(object sender, EventArgs e) { btnLaunchOverlay.Enabled = false; HidePanelMarker(); panelUBER.Visible = true; string strLABImagePath = String.Empty; strLABImagePath = String.Format(@"https://www.poelab.com/wp-content/labfiles/{0}_uber.jpg", GetPOELABDateTime()); labelAUDAteTime.Text = "GMT 0 DateTime : " + GetPOELABDateTimeDetail(); WebRequest TmpRequest = (HttpWebRequest)WebRequest.Create(strLABImagePath); TmpRequest.Timeout = 3000; try { WebResponse TmpResponse = TmpRequest.GetResponse(); g_OverlayLABBmp = new Bitmap(TmpResponse.GetResponseStream()); Rectangle rcCrop = new Rectangle(289, 110, 840, 268); g_OverlayLABBmp = DeadlyImageCommon.cropImage(g_OverlayLABBmp, rcCrop); pictureLabyrinthLayout.BackgroundImage = g_OverlayLABBmp; _LabName = "UBER"; btnLaunchOverlay.Enabled = true; } catch { pictureLabyrinthLayout.BackgroundImage = Properties.Resources.LABUber; pictureLabyrinthLayout.Invalidate(); labelAUDAteTime.Text = "Can't Get LAB Image from POE LAB. Try Later"; } }