public void start(BCMainForm _main, OHT_Form _ohtc_Form) { mainForm = _main; ohtc_Form = _ohtc_Form; initialMapSpace(); lbl_Through_Times_Lv1.BackColor = BCAppConstants.SEC_THROUGH_COLOR_LV1; lbl_Through_Times_Lv2.BackColor = BCAppConstants.SEC_THROUGH_COLOR_LV2; lbl_Through_Times_Lv3.BackColor = BCAppConstants.SEC_THROUGH_COLOR_LV3; lbl_Through_Times_Lv4.BackColor = BCAppConstants.SEC_THROUGH_COLOR_LV4; lbl_Through_Times_Lv5.BackColor = BCAppConstants.SEC_THROUGH_COLOR_LV5; lbl_Through_Times_Lv6.BackColor = BCAppConstants.SEC_THROUGH_COLOR_LV6; lbl_Through_Times_Lv7.BackColor = BCAppConstants.SEC_THROUGH_COLOR_LV7; lbl_Through_Times_Lv8.BackColor = BCAppConstants.SEC_THROUGH_COLOR_LV8; lbl_Through_Times_Lv9.BackColor = BCAppConstants.SEC_THROUGH_COLOR_LV9; lbl_Through_Times_Lv10.BackColor = BCAppConstants.SEC_THROUGH_COLOR_LV10; lbl_Through_Times_Lv1.Text = $"{0} ~ {BCAppConstants.SEC_THROUGH_TIMES_LV1}"; lbl_Through_Times_Lv2.Text = $"{BCAppConstants.SEC_THROUGH_TIMES_LV1} ~ {BCAppConstants.SEC_THROUGH_TIMES_LV2}"; lbl_Through_Times_Lv3.Text = $"{BCAppConstants.SEC_THROUGH_TIMES_LV2} ~ {BCAppConstants.SEC_THROUGH_TIMES_LV3}"; lbl_Through_Times_Lv4.Text = $"{BCAppConstants.SEC_THROUGH_TIMES_LV3} ~ {BCAppConstants.SEC_THROUGH_TIMES_LV4}"; lbl_Through_Times_Lv5.Text = $"{BCAppConstants.SEC_THROUGH_TIMES_LV4} ~ {BCAppConstants.SEC_THROUGH_TIMES_LV5}"; lbl_Through_Times_Lv6.Text = $"{BCAppConstants.SEC_THROUGH_TIMES_LV5} ~ {BCAppConstants.SEC_THROUGH_TIMES_LV6}"; lbl_Through_Times_Lv7.Text = $"{BCAppConstants.SEC_THROUGH_TIMES_LV6} ~ {BCAppConstants.SEC_THROUGH_TIMES_LV7}"; lbl_Through_Times_Lv8.Text = $"{BCAppConstants.SEC_THROUGH_TIMES_LV7} ~ {BCAppConstants.SEC_THROUGH_TIMES_LV8}"; lbl_Through_Times_Lv9.Text = $"{BCAppConstants.SEC_THROUGH_TIMES_LV8} ~ {BCAppConstants.SEC_THROUGH_TIMES_LV9}"; lbl_Through_Times_Lv10.Text = $"{BCAppConstants.SEC_THROUGH_TIMES_LV9} ~ "; readRailDatas(); readAddressPortDatas(); //readVehicleDatas(); readNewVehicleDatas(); readPortIconDatas(); m_DicSectionGroupRails = new Dictionary <string, GroupRails>(); m_DicSegmentGroupRails = new Dictionary <string, List <GroupRails> >(); BidingRailPointAndGroupForRail(); BidingGroupRailsAndAddress(); adjustTheLayerOrder(); if (m_objItemRail != null && m_objItemRail.Count() > 0) { RailOriginalColor = m_objItemRail[0].p_RailColor; zInitialIndex = pnl_Map.Controls.GetChildIndex(m_objItemRail.Last()); } List <string> selectSeg = new List <string>(); selectSeg.Add(""); selectSeg.AddRange(m_DicSegmentGroupRails.Keys.ToList()); cmb_selectSeg.DataSource = selectSeg; tmrRefresh.Start(); BCUtility.setScale(defaultMaxScale, zoon_Factor); ratioChanges(); BidingGroupRailsLable(); BidingAddressLable(); initialLineEvent(); }
private void initialMapSpace() { if (BCFUtility.isMatche(mainForm.BCApp.SCApplication.BC_ID, SCAppConstants.WorkVersion.VERSION_NAME_ASE)) { space_Height_m = 14000; space_Width_m = 40000; zoon_Factor = 100; defaultMaxScale = 10; trackBar_scale.SmallChange = 2; } else if (BCFUtility.isMatche(mainForm.BCApp.SCApplication.BC_ID, SCAppConstants.WorkVersion.VERSION_NAME_ASE_LOOP)) { space_Height_m = 14000; space_Width_m = 53000; zoon_Factor = 100; defaultMaxScale = 10; trackBar_scale.SmallChange = 2; } else if (BCFUtility.isMatche(mainForm.BCApp.SCApplication.BC_ID, SCAppConstants.WorkVersion.VERSION_NAME_ASE_LINE3)) { space_Height_m = 14000; space_Width_m = 50000; zoon_Factor = 100; defaultMaxScale = 10; trackBar_scale.SmallChange = 2; } else if (BCFUtility.isMatche(mainForm.BCApp.SCApplication.BC_ID, SCAppConstants.WorkVersion.VERSION_NAME_ASE_TEST)) { space_Height_m = 14000; space_Width_m = 40000; zoon_Factor = 100; defaultMaxScale = 10; trackBar_scale.SmallChange = 2; } else { space_Height_m = 14000; space_Width_m = 40000; zoon_Factor = 100; defaultMaxScale = 10; } trackBar_scale.Maximum = defaultMaxScale; trackBar_scale.Value = defaultMaxScale; lbl_maxScale.Text = defaultMaxScale.ToString(); //BCUtility.setScale(trackBar_scale.Value); BCUtility.setScale(10, zoon_Factor); double space_Height_PixelsHeight = BCUtility.RealLengthToPixelsWidthByScale(space_Height_m); double space_Height_PixelsWidth = BCUtility.RealLengthToPixelsWidthByScale(space_Width_m); pnl_Map.Height = (int)space_Height_PixelsHeight; pnl_Map.Width = (int)space_Height_PixelsWidth; this.pnl_Map.Resize += new System.EventHandler(this.pnl_Map_Resize); pnl_Map.Tag = pnl_Map.Height + "|" + pnl_Map.Width; }
private void initialMapSpace() { if (BCFUtility.isMatche(mainForm.BCApp.SCApplication.BC_ID, SCAppConstants.WorkVersion.VERSION_NAME_ASE_K21)) { space_Height_m = 55000; //ASE_K21 地圖地圖大小 space_Width_m = 52000; zoon_Factor = 130; defaultMaxScale = 13; } else if (BCFUtility.isMatche(mainForm.BCApp.SCApplication.BC_ID, SCAppConstants.WorkVersion.VERSION_NAME_ASE_K21_DEMO)) { space_Height_m = 7000; //AGVC 地圖地圖大小 space_Width_m = 10000; zoon_Factor = 50; defaultMaxScale = 10; } else if (BCFUtility.isMatche(mainForm.BCApp.SCApplication.BC_ID, SCAppConstants.WorkVersion.VERSION_NAME_TAICHUNG)) { space_Height_m = 10000; //AGVC 地圖地圖大小 space_Width_m = 26000; zoon_Factor = 70; defaultMaxScale = 10; } else if (BCFUtility.isMatche(mainForm.BCApp.SCApplication.BC_ID, SCAppConstants.WorkVersion.VERSION_NAME_AGC)) { space_Height_m = 35000; //AGVC 地圖地圖大小 space_Width_m = 135000; zoon_Factor = 130; defaultMaxScale = 10; } else { space_Height_m = 14000; space_Width_m = 40000; zoon_Factor = 100; defaultMaxScale = 10; } trackBar_scale.Maximum = defaultMaxScale; trackBar_scale.Value = defaultMaxScale; lbl_maxScale.Text = defaultMaxScale.ToString(); //BCUtility.setScale(trackBar_scale.Value); BCUtility.setScale(10, zoon_Factor); double space_Height_PixelsHeight = BCUtility.RealLengthToPixelsWidthByScale(space_Height_m); double space_Height_PixelsWidth = BCUtility.RealLengthToPixelsWidthByScale(space_Width_m); pnl_Map.Height = (int)space_Height_PixelsHeight; pnl_Map.Width = (int)space_Height_PixelsWidth; this.pnl_Map.Resize += new System.EventHandler(this.pnl_Map_Resize); pnl_Map.Tag = pnl_Map.Height + "|" + pnl_Map.Width; }
private void trackBar_scale_Scroll(object sender, EventArgs e) { BCUtility.setScale(trackBar_scale.Value, zoon_Factor); ratioChanges(); }
private void initialMapSpace() { if (BCFUtility.isMatche(mainForm.BCApp.SCApplication.BC_ID, SCAppConstants.WorkVersion.VERSION_NAME_AUO_CAAGV100) || BCFUtility.isMatche(mainForm.BCApp.SCApplication.BC_ID, SCAppConstants.WorkVersion.VERSION_NAME_AUO_CAAGV100_Beta)) { space_Height_m = 35000; //AGVC 地圖地圖大小 space_Width_m = 135000; zoon_Factor = 210; defaultMaxScale = 10; } else if (BCFUtility.isMatche(mainForm.BCApp.SCApplication.BC_ID, SCAppConstants.WorkVersion.VERSION_NAME_TAICHUNG)) { space_Height_m = 15000; //AGVC 地圖地圖大小 space_Width_m = 24000; zoon_Factor = 70; defaultMaxScale = 10; } else if (BCFUtility.isMatche(mainForm.BCApp.SCApplication.BC_ID, SCAppConstants.WorkVersion.VERSION_NAME_AUO_CAAGVC00)) { space_Height_m = 28000; //CAAGVC00 地圖地圖大小 space_Width_m = 12000; zoon_Factor = 130; defaultMaxScale = 10; } else if (BCFUtility.isMatche(mainForm.BCApp.SCApplication.BC_ID, SCAppConstants.WorkVersion.VERSION_NAME_AUO_CAAGV200)) { space_Height_m = 22000; //CAAGVC00 地圖地圖大小 space_Width_m = 60000; zoon_Factor = 130; defaultMaxScale = 10; } else if (BCFUtility.isMatche(mainForm.BCApp.SCApplication.BC_ID, SCAppConstants.WorkVersion.VERSION_NAME_AUO_FAXAGV03)) { space_Height_m = 27000; //4F 地圖地圖大小 space_Width_m = 15000; zoon_Factor = 130; defaultMaxScale = 10; } else if (BCFUtility.isMatche(mainForm.BCApp.SCApplication.BC_ID, SCAppConstants.WorkVersion.VERSION_NAME_NORTH_INNOLUX)) { space_Height_m = 109000; //Innolux North 地圖地圖大小 space_Width_m = 28000; zoon_Factor = 210; defaultMaxScale = 10; } else if (BCFUtility.isMatche(mainForm.BCApp.SCApplication.BC_ID, SCAppConstants.WorkVersion.VERSION_NAME_SOUTH_INNOLUX)) { space_Height_m = 21000; //Innolux South 地圖地圖大小 space_Width_m = 50000; zoon_Factor = 130; defaultMaxScale = 10; } else if (BCFUtility.isMatche(mainForm.BCApp.SCApplication.BC_ID, SCAppConstants.WorkVersion.VERSION_NAME_NORTH_INNOLUX_TEST_SITE)) { space_Height_m = 10000; //Innolux North Test Site 地圖地圖大小 space_Width_m = 26000; //space_Height_m = 10000; //Innolux North Test Site 地圖地圖大小 //space_Width_m = 20000; zoon_Factor = 70; defaultMaxScale = 10; } else if (BCFUtility.isMatche(mainForm.BCApp.SCApplication.BC_ID, SCAppConstants.WorkVersion.VERSION_NAME_UMTC_TEST_SITE)) { space_Height_m = 22000; //CAAGVC00 地圖地圖大小 space_Width_m = 60000; zoon_Factor = 130; defaultMaxScale = 10; } else if (BCFUtility.isMatche(mainForm.BCApp.SCApplication.BC_ID, SCAppConstants.WorkVersion.VERSION_NAME_AUO_CAAGV4F)) { space_Height_m = 55000; //CAAGV4F 地圖地圖大小 space_Width_m = 41000; zoon_Factor = 130; defaultMaxScale = 10; } else { space_Height_m = 14000; space_Width_m = 40000; zoon_Factor = 100; defaultMaxScale = 10; } trackBar_scale.Maximum = defaultMaxScale; trackBar_scale.Value = defaultMaxScale; lbl_maxScale.Text = defaultMaxScale.ToString(); //BCUtility.setScale(trackBar_scale.Value); BCUtility.setScale(10, zoon_Factor); double space_Height_PixelsHeight = BCUtility.RealLengthToPixelsWidthByScale(space_Height_m); double space_Height_PixelsWidth = BCUtility.RealLengthToPixelsWidthByScale(space_Width_m); pnl_Map.Height = (int)space_Height_PixelsHeight; pnl_Map.Width = (int)space_Height_PixelsWidth; this.pnl_Map.Resize += new System.EventHandler(this.pnl_Map_Resize); pnl_Map.Tag = pnl_Map.Height + "|" + pnl_Map.Width; }