private void SaveBtn_Click(object sender, RoutedEventArgs e) { PanoramaInfoIni panoInfoIni = new PanoramaInfoIni("PanoramaInfo"); panoInfoIni.ReadIni(m_nCh); try { panoInfoIni.dPanoImgFovH = double.Parse(this.PanoImageFovHeightTextBox.Text); panoInfoIni.nPanoCaptureZoomAbs = int.Parse(this.ZoomAbsTextBox.Text); panoInfoIni.dPanoImgTiltPivotDeg = double.Parse(PanoImageTiltDegTextBox.Text); } catch (Exception ee) { MessageBox.Show(String.Format("채널 {0} 잘못된 값이 입력 되었습니다.", m_nCh)); } panoInfoIni.WriteIni(m_nCh); }
public MainWindow() { InitializeComponent(); winInfoIni.ReadIni(); PanoramaCanvas[] arrCanvas = { panoramaCanvas1, panoramaCanvas2, panoramaCanvas3, panoramaCanvas4, panoramaCanvas5 }; PanBeltCanvas[] arrPanBeltCanvas = { panBeltCanvas1, panBeltCanvas2, panBeltCanvas3, panBeltCanvas4, panBeltCanvas5 }; for (int i = 0; i < MAX_CHANNEL; i++) { panoInfoIni.ReadIni(i + 1); // string imgName = "20170408141214.jpg"; //string baseDir = AppDomain.CurrentDomain.BaseDirectory; arrPanoInfo[i] = new PanoramaInfo(); arrPanoInfo[i].nPanoImgFovW = panoInfoIni.nPanoImgFovW; arrPanoInfo[i].dPanoImgFovH = panoInfoIni.dPanoImgFovH; arrPanoInfo[i].dPanoImgTiltPivotDeg = panoInfoIni.dPanoImgTiltPivotDeg; arrPanoInfo[i].nPanoCaptureZoomAbs = panoInfoIni.nPanoCaptureZoomAbs; for (int k = 0; k < 15; k++) { //panoInfoIni.arrPanoImagePathName[k] = baseDir + imgName; arrCanvas[i].SetImagePathName(k, panoInfoIni.arrPanoImagePathName[k]); } ////////////////////////////////// //팬 벨트 보정값 systemPTZEnvSetup.ReadIni(i + 1); double dPanOffset = double.Parse(systemPTZEnvSetup.azimuth); arrPanBeltCanvas[i].SetPanOffset(dPanOffset); SetAreaName(i + 1, systemPTZEnvSetup.area); //panoInfoIni.WriteIni(i+1); } udpSock.CreateUDPSocket(); for (int i = 0; i < MAX_CHANNEL; i++) { CreatePacketParsingThread(i + 1); } Minimize(); m_panoCanvasWidth = panoramaCanvas1.Width; m_panoCanvasHeight = panoramaCanvas1.Height; panoramaCanvas1.SetChInfo(1, arrPanoInfo[0], this); panoramaCanvas1.MouseLeftButtonUp += (sender, e) => { System.Console.WriteLine("MainWindow MouseLeftButtonUp"); }; panoramaCanvas2.SetChInfo(2, arrPanoInfo[1], this); panoramaCanvas2.MouseLeftButtonUp += (sender, e) => { System.Console.WriteLine("MainWindow MouseLeftButtonUp"); }; panoramaCanvas3.SetChInfo(3, arrPanoInfo[2], this); panoramaCanvas3.MouseLeftButtonUp += (sender, e) => { System.Console.WriteLine("MainWindow MouseLeftButtonUp"); }; panoramaCanvas4.SetChInfo(4, arrPanoInfo[3], this); panoramaCanvas4.MouseLeftButtonUp += (sender, e) => { System.Console.WriteLine("MainWindow MouseLeftButtonUp"); }; panoramaCanvas5.SetChInfo(5, arrPanoInfo[4], this); panoramaCanvas5.MouseLeftButtonUp += (sender, e) => { System.Console.WriteLine("MainWindow MouseLeftButtonUp"); }; //BitmapImage bmp = new BitmapImage( new Uri("20170408141214.jpg") ); //WriteableBitmap //Image img; //Bitmap 은 Abstract Image 클래스 에서 상속받습니다. /* * string imgName = "20170408141214.jpg"; * string baseDir = AppDomain.CurrentDomain.BaseDirectory; * Image img = new Image(); * img.ur * BitmapSource bmpSrc = new BitmapSource(); * * WriteableBitmap maskBmp = new WriteableBitmap(bmpSrc); */ // panoramaCanvas.ren //DrawingImage MyDrawingImage = new DrawingImage(MyDrawing); }