void Awake() { gameObject.AddComponent("PositionModule"); Position_Script = gameObject.GetComponent<PositionModule>(); gameObject.AddComponent("SoftkeyModule"); Softkey_Script = gameObject.GetComponent<SoftkeyModule>(); gameObject.AddComponent("ProgramModule"); Program_Script = gameObject.GetComponent<ProgramModule>(); gameObject.AddComponent("OffsetSettingModule"); Offset_Script = gameObject.GetComponent<OffsetSettingModule>(); gameObject.AddComponent("MDIInputModule"); MDIInput_Script = gameObject.GetComponent<MDIInputModule>(); gameObject.AddComponent("MDIFunctionModule"); MDIFunction_Script = gameObject.GetComponent<MDIFunctionModule>(); gameObject.AddComponent("MDIEditModule"); MDIEdit_Script = gameObject.GetComponent<MDIEditModule>(); gameObject.AddComponent("ModeSelectModule"); ModeSelect_Script = gameObject.GetComponent<ModeSelectModule>(); gameObject.AddComponent("FeedrateModule"); Feedrate_Script = gameObject.GetComponent<FeedrateModule>(); gameObject.AddComponent("MachineFunctionModule"); MachineFunction_Script = gameObject.GetComponent<MachineFunctionModule>(); gameObject.AddComponent("AuxiliaryFunctionModule"); AuxiliaryFunction_Script = gameObject.GetComponent<AuxiliaryFunctionModule>(); GameObject.Find("move_control").AddComponent("MoveControl"); MoveControl_script = GameObject.Find("move_control").GetComponent<MoveControl>(); GameObject.Find("spindle_control").AddComponent("SpindleControl"); SpindleControl_script = GameObject.Find("spindle_control").GetComponent<SpindleControl>(); gameObject.AddComponent("CooSystem"); gameObject.AddComponent("AutoMove"); gameObject.AddComponent("CompileNC"); CooSystem_script = gameObject.GetComponent<CooSystem>(); CompileNC_script = gameObject.GetComponent<CompileNC>(); t2d_lock = (Texture2D)Resources.Load("Texture_Panel/Button/lock"); t2d_unlock = (Texture2D)Resources.Load("Texture_Panel/Button/unlock"); t2d_alarm = (Texture2D)Resources.Load("Texture_Panel/Button/alarm"); t2d_zero = (Texture2D)Resources.Load("Texture_Panel/Button/zero"); t2d_toolnum = (Texture2D)Resources.Load("Texture_Panel/Button/toolnum"); t2d_em_u = (Texture2D)Resources.Load("Texture_Panel/Button/em_u"); t2d_em_d = (Texture2D)Resources.Load("Texture_Panel/Button/em_d"); t2d_Protect = t2d_lock; t2d_Emergency = t2d_em_u; t2d_ModeSelectEDIT = (Texture2D)Resources.Load("Texture_Panel/Button/mode_edit"); t2d_ModeSelectDNC = (Texture2D)Resources.Load("Texture_Panel/Button/mode_dnc"); t2d_ModeSelectAUTO = (Texture2D)Resources.Load("Texture_Panel/Button/mode_auto"); t2d_ModeSelectMDI = (Texture2D)Resources.Load("Texture_Panel/Button/mode_mdi"); t2d_ModeSelectHANDLE = (Texture2D)Resources.Load("Texture_Panel/Button/mode_handle"); t2d_ModeSelectJOG = (Texture2D)Resources.Load("Texture_Panel/Button/mode_jog"); t2d_ModeSelectREF = (Texture2D)Resources.Load("Texture_Panel/Button/mode_ref"); if(PlayerPrefs.HasKey("ModeSelect")) mode_type = PlayerPrefs.GetInt("ModeSelect"); else { PlayerPrefs.SetInt("ModeSelect", 1); mode_type = 1; } switch(mode_type) { case 1: t2d_ModeSelect = t2d_ModeSelectEDIT; MenuDisplay = "编辑"; ProgEDIT = true; ProgDNC = false; ProgAUTO = false; ProgMDI = false; ProgHAN = false; ProgJOG = false; ProgREF = false; break; case 2: t2d_ModeSelect = t2d_ModeSelectDNC; MenuDisplay = "DNC"; ProgEDIT = false; ProgDNC = true; ProgAUTO = false; ProgMDI = false; ProgHAN = false; ProgJOG = false; ProgREF = false; break; case 3: t2d_ModeSelect = t2d_ModeSelectAUTO; MenuDisplay = "AUTO"; ProgEDIT = false; ProgDNC = false; ProgAUTO = true; ProgMDI = false; ProgHAN = false; ProgJOG = false; ProgREF = false; break; case 4: t2d_ModeSelect = t2d_ModeSelectMDI; MenuDisplay = "MDI"; ProgEDIT = false; ProgDNC = false; ProgAUTO = false; ProgMDI = true; ProgHAN = false; ProgJOG = false; ProgREF = false; break; case 5: t2d_ModeSelect = t2d_ModeSelectHANDLE; MenuDisplay = "HAN"; ProgEDIT = false; ProgDNC = false; ProgAUTO = false; ProgMDI = false; ProgHAN = true; ProgJOG = false; ProgREF = false; break; case 6: t2d_ModeSelect = t2d_ModeSelectJOG; MenuDisplay = "JOG"; MoveControl_script.speed_to_move = 0.10201F; ProgEDIT = false; ProgDNC = false; ProgAUTO = false; ProgMDI = false; ProgHAN = false; ProgJOG = true; ProgREF = false; break; case 7: t2d_ModeSelect = t2d_ModeSelectREF; MenuDisplay = "REF"; MoveControl_script.speed_to_move = 0.60201F; ProgEDIT = false; ProgDNC = false; ProgAUTO = false; ProgMDI = false; ProgHAN = false; ProgJOG = false; ProgREF = true; break; } t2d_FeedRate_0 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate1"); t2d_FeedRate_10 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate2"); t2d_FeedRate_20 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate3"); t2d_FeedRate_30 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate4"); t2d_FeedRate_40 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate5"); t2d_FeedRate_50 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate6"); t2d_FeedRate_60 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate7"); t2d_FeedRate_70 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate8"); t2d_FeedRate_80 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate9"); t2d_FeedRate_90 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate10"); t2d_FeedRate_100 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate11"); t2d_FeedRate_110 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate12"); t2d_FeedRate_120 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate13"); t2d_FeedRate_130 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate14"); t2d_FeedRate_140 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate15"); t2d_FeedRate_150 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate16"); if(PlayerPrefs.HasKey("FeedrateSelect")) feedrate_type = PlayerPrefs.GetInt("FeedrateSelect"); else { PlayerPrefs.SetInt("FeedrateSelect", 11); feedrate_type = 11; } switch(feedrate_type) { case 1: t2d_feedrate = t2d_FeedRate_0; move_rate = 0f; break; case 2: t2d_feedrate = t2d_FeedRate_10; move_rate = 0.1f; break; case 3: t2d_feedrate = t2d_FeedRate_20; move_rate = 0.2f; break; case 4: t2d_feedrate = t2d_FeedRate_30; move_rate = 0.3f; break; case 5: t2d_feedrate = t2d_FeedRate_40; move_rate = 0.4f; break; case 6: t2d_feedrate = t2d_FeedRate_50; move_rate = 0.5f; break; case 7: t2d_feedrate = t2d_FeedRate_60; move_rate = 0.6f; break; case 8: t2d_feedrate = t2d_FeedRate_70; move_rate = 0.7f; break; case 9: t2d_feedrate = t2d_FeedRate_80; move_rate = 0.8f; break; case 10: t2d_feedrate = t2d_FeedRate_90; move_rate = 0.9f; break; case 11: t2d_feedrate = t2d_FeedRate_100; move_rate = 1.0f; break; case 12: t2d_feedrate = t2d_FeedRate_110; move_rate = 1.1f; break; case 13: t2d_feedrate = t2d_FeedRate_120; move_rate = 1.2f; break; case 14: t2d_feedrate = t2d_FeedRate_130; move_rate = 1.3f; break; case 15: t2d_feedrate = t2d_FeedRate_140; move_rate = 1.4f; break; case 16: t2d_feedrate = t2d_FeedRate_150; move_rate = 1.5f; break; } MoveControl_script.move_rate = move_rate; t2d_NCPower_on_u = (Texture2D)Resources.Load("Texture_Panel/Button/NCPower_on_u"); t2d_NCPower_on_d = (Texture2D)Resources.Load("Texture_Panel/Button/NCPower_on_d"); t2d_NCPower_off_u = (Texture2D)Resources.Load("Texture_Panel/Button/NCPower_off_u"); t2d_NCPower_off_d = (Texture2D)Resources.Load("Texture_Panel/Button/NCPower_off_d"); sty_NCPowerOn.normal.background = t2d_NCPower_on_u; sty_NCPowerOn.active.background = t2d_NCPower_on_d; sty_NCPowerOff.normal.background = t2d_NCPower_off_u; sty_NCPowerOff.active.background = t2d_NCPower_off_d; t2d_spCW_off_d = (Texture2D)Resources.Load("Texture_Panel/Button/spCW_off_d"); t2d_spCW_off_u = (Texture2D)Resources.Load("Texture_Panel/Button/spCW_off_u"); t2d_spCW_on_d = (Texture2D)Resources.Load("Texture_Panel/Button/spCW_on_d"); t2d_spCW_on_u = (Texture2D)Resources.Load("Texture_Panel/Button/spCW_on_u"); sty_ButtonCW.normal.background = t2d_spCW_off_u; sty_ButtonCW.active.background = t2d_spCW_off_d; t2d_spCCW_on_u = (Texture2D)Resources.Load("Texture_Panel/Button/spCCW_on_u"); t2d_spCCW_on_d = (Texture2D)Resources.Load("Texture_Panel/Button/spCCW_on_d"); t2d_spCCW_off_u = (Texture2D)Resources.Load("Texture_Panel/Button/spCCW_off_u"); t2d_spCCW_off_d = (Texture2D)Resources.Load("Texture_Panel/Button/spCCW_off_d"); sty_ButtonCCW.normal.background = t2d_spCCW_off_u; sty_ButtonCCW.active.background = t2d_spCCW_off_d; t2d_spStop_on_u = (Texture2D)Resources.Load("Texture_Panel/Button/spStop_on_u"); t2d_spStop_on_d = (Texture2D)Resources.Load("Texture_Panel/Button/spStop_on_d"); t2d_spStop_off_u = (Texture2D)Resources.Load("Texture_Panel/Button/spStop_off_u"); t2d_spStop_off_d = (Texture2D)Resources.Load("Texture_Panel/Button/spStop_off_d"); sty_ButtonSTOP.normal.background = t2d_spStop_on_u; sty_ButtonSTOP.active.background = t2d_spStop_on_d; t2d_rapid_on_u = (Texture2D)Resources.Load("Texture_Panel/Button/rapid_on_u"); t2d_rapid_on_d = (Texture2D)Resources.Load("Texture_Panel/Button/rapid_on_d"); t2d_rapid_off_u = (Texture2D)Resources.Load("Texture_Panel/Button/rapid_off_u"); t2d_rapid_off_d = (Texture2D)Resources.Load("Texture_Panel/Button/rapid_off_d"); sty_ButtonRapid.normal.background = t2d_rapid_off_u; sty_ButtonRapid.active.background = t2d_rapid_off_d; sty_ButtonYN.normal.background = (Texture2D)Resources.Load("Texture_Panel/Button/yminus_off_u"); sty_ButtonYN.active.background = (Texture2D)Resources.Load("Texture_Panel/Button/yminus_on_d"); sty_ButtonYP.normal.background = (Texture2D)Resources.Load("Texture_Panel/Button/yplus_off_u"); sty_ButtonYP.active.background = (Texture2D)Resources.Load("Texture_Panel/Button/yplus_on_d"); sty_ButtonZP.normal.background = (Texture2D)Resources.Load("Texture_Panel/Button/zplus_off_u"); sty_ButtonZP.active.background = (Texture2D)Resources.Load("Texture_Panel/Button/zplus_on_d"); sty_ButtonZN.normal.background = (Texture2D)Resources.Load("Texture_Panel/Button/zminus_off_u"); sty_ButtonZN.active.background = (Texture2D)Resources.Load("Texture_Panel/Button/zminus_on_d"); sty_ButtonXP.normal.background = (Texture2D)Resources.Load("Texture_Panel/Button/xplus_off_u"); sty_ButtonXP.active.background = (Texture2D)Resources.Load("Texture_Panel/Button/xplus_on_d"); sty_ButtonXN.normal.background = (Texture2D)Resources.Load("Texture_Panel/Button/xminus_off_u"); sty_ButtonXN.active.background = (Texture2D)Resources.Load("Texture_Panel/Button/xminus_on_d"); sty_Button4P.normal.background = (Texture2D)Resources.Load("Texture_Panel/Button/4plus_off_u"); sty_Button4P.active.background = (Texture2D)Resources.Load("Texture_Panel/Button/4plus_on_d"); sty_Button4N.normal.background = (Texture2D)Resources.Load("Texture_Panel/Button/4minus_off_u"); sty_Button4N.active.background = (Texture2D)Resources.Load("Texture_Panel/Button/4minus_on_d"); sty_ProgEDITWindowO.font = (Font)Resources.Load("font/STSONG"); sty_ProgEDITWindowO.fontSize = 16; sty_ProgEDITWindowO.normal.textColor = Color.white; sty_Title.font = (Font)Resources.Load("font/digifaw"); sty_Title.fontSize = 15; sty_TitleLetter.font = (Font)Resources.Load("font/STSONG"); sty_TitleLetter.fontSize = 17; sty_BigXYZ.font = (Font)Resources.Load("font/LCD"); sty_BigXYZ.fontSize = 45; sty_SmallNum.font = (Font)Resources.Load("font/monoMMM_5"); sty_SmallNum.fontSize = 14; sty_ProgModeName.font = (Font)Resources.Load("font/times"); sty_ProgModeName.fontSize = 14; sty_Star.fontSize = 22; sty_Alarm.font = (Font)Resources.Load("font/times"); sty_Alarm.fontSize = 12; sty_Alarm.normal.background = (Texture2D)Resources.Load("Texture_Panel/Button/red"); sty_Alarm.normal.textColor = Color.white; sty_BottomChooseMenu.font = (Font)Resources.Load("font/monoMMM_5"); sty_BottomChooseMenu.fontSize = 14; sty_ProgEditProgNum.font = (Font)Resources.Load("font/monoMMM_5"); sty_ProgEditProgNum.fontSize = 15; sty_ProgEditProgNum.normal.textColor = Color.white; sty_PosSmallWord.font = (Font)Resources.Load("font/simfang"); sty_PosSmallWord.fontSize = 15; sty_SmallXYZ.font = (Font)Resources.Load("font/times"); sty_SmallXYZ.fontSize = 17; sty_ScreenCover.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/StartScreen"); sty_ProgEDITWindowFG.font = (Font)Resources.Load("font/simfang"); sty_ProgEDITWindowFG.fontSize = 15; sty_ProgEDITWindowFG.normal.textColor = Color.white; sty_BottomAST.font = (Font)Resources.Load("font/times"); sty_BottomAST.fontSize = 15; //sty_BottomAST.normal.textColor = Color.cyan; sty_MostWords.font = (Font)Resources.Load("font/simfang"); sty_MostWords.fontSize = 15; //sty_MostWords.normal.textColor = Color.cyan; //刀偏界面字体设置 sty_MostWords_ToolOffSet.font = (Font)Resources.Load("font/simfang"); sty_MostWords_ToolOffSet.fontSize = 13; //刀偏界面字体设置 sty_Code.fontSize = 17; sty_Code.fontStyle = FontStyle.Bold; sty_ProgEDITListWindowNum.font = (Font)Resources.Load("font/monoMMM_5"); sty_ProgEDITListWindowNum.fontSize = 13; sty_Cursor.font = (Font)Resources.Load("font/times"); sty_Cursor.fontSize = 15; sty_Warning.fontSize = 14; sty_Warning.normal.textColor = Color.red; sty_ScreenBackGround.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/ScreenBackground"); sty_TopLabel.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/toplabel"); t2d_BottomButton_u = (Texture2D)Resources.Load("Texture_Panel/Button/bottombutton_u"); t2d_BottomButton_d = (Texture2D)Resources.Load("Texture_Panel/Button/bottombutton_d"); sty_BottomButtonSmallest.normal.background = (Texture2D)Resources.Load("Texture_Panel/Button/bottombutton_smallest"); sty_BottomButton_1.normal.background = (Texture2D)Resources.Load("Texture_Panel/Button/bottombutton_d"); sty_BottomButton_2.normal.background = (Texture2D)Resources.Load("Texture_Panel/Button/bottombutton_u"); sty_BottomButton_3.normal.background = (Texture2D)Resources.Load("Texture_Panel/Button/bottombutton_u"); sty_BottomButton_4.normal.background = (Texture2D)Resources.Load("Texture_Panel/Button/bottombutton_u"); sty_BottomButton_5.normal.background = (Texture2D)Resources.Load("Texture_Panel/Button/bottombutton_u"); sty_BottomLabel_1.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/bottomLabel01"); sty_BottomLabel_2.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/bottomLabel02"); sty_BottomLabel_3.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/bottomLabel03"); sty_BottomLabel_4.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/bottomLabel04"); sty_ClockStyle.fontSize = 14; sty_EDITLabel.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/EDITLabel"); sty_EDITLabelWindow.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/EditWindow"); sty_EDITLabelBar_1.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/EditBar01"); sty_EDITLabelBar_2.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/EditBar02"); sty_EDITLabelBar_3.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/EditBar03"); sty_ProgSharedWindow.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/ProgSharedWindow"); sty_EDITCursor.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/EditCursor"); sty_EDITTextField.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/EditCursor"); sty_EDITTextField.normal.textColor = Color.yellow; sty_EDITTextField.fontSize = 17; sty_EDITTextField.fontStyle = FontStyle.Bold; sty_EDITList.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/EditList"); sty_InputTextField.font = (Font)Resources.Load("font/times"); sty_InputTextField.fontSize = 15; sty_OffSet_Coo.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/offset_coo"); sty_OffSet_Coo_mini.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/offset_coo_mini"); sty_OffSet_Coo_mid.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/offset_coo_mid"); width = 670F; height = 650F; PanelWindowRect = new Rect(0,0,width,height); EDITText.enabled = false; EDITText.font = sty_Code.font; EDITText.fontSize = sty_Code.fontSize; EDITText.fontStyle=FontStyle.Bold; EDITText.text = ""; ProgEDITCusorPos = 57f; CursorText.enabled = false; CursorText.font = sty_Cursor.font; CursorText.fontSize = sty_Cursor.fontSize; coo_setting_cursor_x = 131f; coo_setting_cursor_y = 120f; coo_setting_1 = 1; coo_setting_2 = 1; sty_SettingsBG.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/SettingsBG"); //设定界面 //argu_setting_cursor_x = 240f; argu_setting_cursor_y = 61.5f; argu_setting_cursor_w = 16f; argu_setting = 1; //设定界面 //刀偏界面 ToolOffSetPage_num = 0; //页面数 number = 0; //序号 tool_setting = 1; //黄色背景序号 tool_setting_cursor_y = 81.5f; tool_setting_cursor_w = 91.5f; //刀偏界面 }
void Awake() { gameObject.AddComponent("NCCodeFormat"); NCCodeFormat_Script=gameObject.GetComponent<NCCodeFormat>(); gameObject.AddComponent("PositionModule"); Position_Script = gameObject.GetComponent<PositionModule>(); gameObject.AddComponent("SystemModule");//添加脚本,姓名--刘旋,时间--2013-4-24 System_Script=gameObject.GetComponent<SystemModule>(); gameObject.AddComponent("MessageModule"); Message_Script=gameObject.GetComponent<MessageModule>(); gameObject.AddComponent("SoftkeyModule"); Softkey_Script = gameObject.GetComponent<SoftkeyModule>(); gameObject.AddComponent("ProgramModule"); Program_Script = gameObject.GetComponent<ProgramModule>(); gameObject.AddComponent("OffsetSettingModule"); Offset_Script = gameObject.GetComponent<OffsetSettingModule>(); gameObject.AddComponent("MDIInputModule"); MDIInput_Script = gameObject.GetComponent<MDIInputModule>(); gameObject.AddComponent("MDIFunctionModule"); MDIFunction_Script = gameObject.GetComponent<MDIFunctionModule>(); gameObject.AddComponent("MDIEditModule"); MDIEdit_Script = gameObject.GetComponent<MDIEditModule>(); gameObject.AddComponent("ModeSelectModule"); ModeSelect_Script = gameObject.GetComponent<ModeSelectModule>(); gameObject.AddComponent("FeedrateModule"); Feedrate_Script = gameObject.GetComponent<FeedrateModule>(); gameObject.AddComponent("MachineFunctionModule"); MachineFunction_Script = gameObject.GetComponent<MachineFunctionModule>(); gameObject.AddComponent("AuxiliaryFunctionModule"); AuxiliaryFunction_Script = gameObject.GetComponent<AuxiliaryFunctionModule>(); gameObject.AddComponent("AuxiliaryMoveModule"); AuxiliaryMove_Script = gameObject.GetComponent<AuxiliaryMoveModule>(); GameObject.Find("move_control").AddComponent("MoveControl"); MoveControl_script = GameObject.Find("move_control").GetComponent<MoveControl>(); GameObject.Find("spindle_control").AddComponent("SpindleControl"); SpindleControl_script = GameObject.Find("spindle_control").GetComponent<SpindleControl>(); gameObject.AddComponent("CooSystem"); gameObject.AddComponent("AutoMove"); gameObject.AddComponent("CompileNC"); CooSystem_script = gameObject.GetComponent<CooSystem>(); CompileNC_script = gameObject.GetComponent<CompileNC>(); t2d_lock = (Texture2D)Resources.Load("Texture_Panel/Button/lock"); t2d_unlock = (Texture2D)Resources.Load("Texture_Panel/Button/unlock"); t2d_alarm = (Texture2D)Resources.Load("Texture_Panel/Button/alarm"); t2d_zero = (Texture2D)Resources.Load("Texture_Panel/Button/zero"); t2d_toolnum = (Texture2D)Resources.Load("Texture_Panel/Button/toolnum"); t2d_em_u = (Texture2D)Resources.Load("Texture_Panel/Button/em_u"); t2d_em_d = (Texture2D)Resources.Load("Texture_Panel/Button/em_d"); t2d_Protect = t2d_lock; t2d_Emergency = t2d_em_u; t2d_ModeSelectEDIT = (Texture2D)Resources.Load("Texture_Panel/Button/mode_edit"); t2d_ModeSelectDNC = (Texture2D)Resources.Load("Texture_Panel/Button/mode_dnc"); t2d_ModeSelectAUTO = (Texture2D)Resources.Load("Texture_Panel/Button/mode_auto"); t2d_ModeSelectMDI = (Texture2D)Resources.Load("Texture_Panel/Button/mode_mdi"); t2d_ModeSelectHANDLE = (Texture2D)Resources.Load("Texture_Panel/Button/mode_handle"); t2d_ModeSelectJOG = (Texture2D)Resources.Load("Texture_Panel/Button/mode_jog"); t2d_ModeSelectREF = (Texture2D)Resources.Load("Texture_Panel/Button/mode_ref"); if(PlayerPrefs.HasKey("ModeSelect")) mode_type = PlayerPrefs.GetInt("ModeSelect"); else { PlayerPrefs.SetInt("ModeSelect", 1); mode_type = 1; } switch(mode_type) { case 1: t2d_ModeSelect = t2d_ModeSelectEDIT; MenuDisplay = "编辑"; ProgEDIT = true; ProgDNC = false; ProgAUTO = false; ProgMDI = false; ProgHAN = false; ProgJOG = false; ProgREF = false; editDisplay=true; break; case 2: t2d_ModeSelect = t2d_ModeSelectDNC; MenuDisplay = "DNC"; ProgEDIT = false; ProgDNC = true; ProgAUTO = false; ProgMDI = false; ProgHAN = false; ProgJOG = false; ProgREF = false; break; case 3: t2d_ModeSelect = t2d_ModeSelectAUTO; MenuDisplay = "MEM"; ProgEDIT = false; ProgDNC = false; ProgAUTO = true; ProgMDI = false; ProgHAN = false; ProgJOG = false; ProgREF = false; break; case 4: t2d_ModeSelect = t2d_ModeSelectMDI; MenuDisplay = "MDI"; ProgEDIT = false; ProgDNC = false; ProgAUTO = false; ProgMDI = true; ProgHAN = false; ProgJOG = false; ProgREF = false; editDisplay=false; break; case 5: t2d_ModeSelect = t2d_ModeSelectHANDLE; MenuDisplay = "HAN"; ProgEDIT = false; ProgDNC = false; ProgAUTO = false; ProgMDI = false; ProgHAN = true; ProgJOG = false; ProgREF = false; break; case 6: t2d_ModeSelect = t2d_ModeSelectJOG; MenuDisplay = "JOG"; MoveControl_script.speed_to_move = 0.16667F;//内容--JOG模式下,慢常速为10m/min=(10/60)m/s,因此spee-to-move=10/60,姓名--刘旋,时间--2013-4-8 ProgEDIT = false; ProgDNC = false; ProgAUTO = false; ProgMDI = false; ProgHAN = false; ProgJOG = true; ProgREF = false; break; case 7: t2d_ModeSelect = t2d_ModeSelectREF; MenuDisplay = "REF"; MoveControl_script.speed_to_move = 0.6F;//内容--归零操作的实际速度为5m/min=(5/60)m/s,而实际速度RunningSpeed=speed—to-move*move-rate,因此speed-to-move应设为5/60,姓名--刘旋,时间--2013-4-8 ProgEDIT = false; ProgDNC = false; ProgAUTO = false; ProgMDI = false; ProgHAN = false; ProgJOG = false; ProgREF = true; break; } t2d_FeedRate_0 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate1"); t2d_FeedRate_10 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate2"); t2d_FeedRate_20 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate3"); t2d_FeedRate_30 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate4"); t2d_FeedRate_40 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate5"); t2d_FeedRate_50 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate6"); t2d_FeedRate_60 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate7"); t2d_FeedRate_70 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate8"); t2d_FeedRate_80 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate9"); t2d_FeedRate_90 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate10"); t2d_FeedRate_100 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate11"); t2d_FeedRate_110 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate12"); t2d_FeedRate_120 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate13"); t2d_FeedRate_130 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate14"); t2d_FeedRate_140 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate15"); t2d_FeedRate_150 = (Texture2D)Resources.Load("Texture_Panel/Button/feedrate16"); if(PlayerPrefs.HasKey("FeedrateSelect")) feedrate_type = PlayerPrefs.GetInt("FeedrateSelect"); else { PlayerPrefs.SetInt("FeedrateSelect", 11); feedrate_type = 11; } switch(feedrate_type) { case 1: t2d_feedrate = t2d_FeedRate_0; move_rate = 0f; break; case 2: t2d_feedrate = t2d_FeedRate_10; move_rate = 0.1f; break; case 3: t2d_feedrate = t2d_FeedRate_20; move_rate = 0.2f; break; case 4: t2d_feedrate = t2d_FeedRate_30; move_rate = 0.3f; break; case 5: t2d_feedrate = t2d_FeedRate_40; move_rate = 0.4f; break; case 6: t2d_feedrate = t2d_FeedRate_50; move_rate = 0.5f; break; case 7: t2d_feedrate = t2d_FeedRate_60; move_rate = 0.6f; break; case 8: t2d_feedrate = t2d_FeedRate_70; move_rate = 0.7f; break; case 9: t2d_feedrate = t2d_FeedRate_80; move_rate = 0.8f; break; case 10: t2d_feedrate = t2d_FeedRate_90; move_rate = 0.9f; break; case 11: t2d_feedrate = t2d_FeedRate_100; move_rate = 1.0f; break; case 12: t2d_feedrate = t2d_FeedRate_110; move_rate = 1.1f; break; case 13: t2d_feedrate = t2d_FeedRate_120; move_rate = 1.2f; break; case 14: t2d_feedrate = t2d_FeedRate_130; move_rate = 1.3f; break; case 15: t2d_feedrate = t2d_FeedRate_140; move_rate = 1.4f; break; case 16: t2d_feedrate = t2d_FeedRate_150; move_rate = 1.5f; break; } MoveControl_script.move_rate = move_rate; t2d_NCPower_on_u = (Texture2D)Resources.Load("Texture_Panel/Button/NCPower_on_u"); t2d_NCPower_on_d = (Texture2D)Resources.Load("Texture_Panel/Button/NCPower_on_d"); t2d_NCPower_off_u = (Texture2D)Resources.Load("Texture_Panel/Button/NCPower_off_u"); t2d_NCPower_off_d = (Texture2D)Resources.Load("Texture_Panel/Button/NCPower_off_d"); sty_NCPowerOn.normal.background = t2d_NCPower_on_u; sty_NCPowerOn.active.background = t2d_NCPower_on_d; sty_NCPowerOff.normal.background = t2d_NCPower_off_u; sty_NCPowerOff.active.background = t2d_NCPower_off_d; t2d_spCW_off_d = (Texture2D)Resources.Load("Texture_Panel/Button/spCW_off_d"); t2d_spCW_off_u = (Texture2D)Resources.Load("Texture_Panel/Button/spCW_off_u"); t2d_spCW_on_d = (Texture2D)Resources.Load("Texture_Panel/Button/spCW_on_d"); t2d_spCW_on_u = (Texture2D)Resources.Load("Texture_Panel/Button/spCW_on_u"); sty_ButtonCW.normal.background = t2d_spCW_off_u; sty_ButtonCW.active.background = t2d_spCW_off_d; t2d_spCCW_on_u = (Texture2D)Resources.Load("Texture_Panel/Button/spCCW_on_u"); t2d_spCCW_on_d = (Texture2D)Resources.Load("Texture_Panel/Button/spCCW_on_d"); t2d_spCCW_off_u = (Texture2D)Resources.Load("Texture_Panel/Button/spCCW_off_u"); t2d_spCCW_off_d = (Texture2D)Resources.Load("Texture_Panel/Button/spCCW_off_d"); sty_ButtonCCW.normal.background = t2d_spCCW_off_u; sty_ButtonCCW.active.background = t2d_spCCW_off_d; t2d_spStop_on_u = (Texture2D)Resources.Load("Texture_Panel/Button/spStop_on_u"); t2d_spStop_on_d = (Texture2D)Resources.Load("Texture_Panel/Button/spStop_on_d"); t2d_spStop_off_u = (Texture2D)Resources.Load("Texture_Panel/Button/spStop_off_u"); t2d_spStop_off_d = (Texture2D)Resources.Load("Texture_Panel/Button/spStop_off_d"); sty_ButtonSTOP.normal.background = t2d_spStop_on_u; sty_ButtonSTOP.active.background = t2d_spStop_on_d; t2d_rapid_on_u = (Texture2D)Resources.Load("Texture_Panel/Button/rapid_on_u"); t2d_rapid_on_d = (Texture2D)Resources.Load("Texture_Panel/Button/rapid_on_d"); t2d_rapid_off_u = (Texture2D)Resources.Load("Texture_Panel/Button/rapid_off_u"); t2d_rapid_off_d = (Texture2D)Resources.Load("Texture_Panel/Button/rapid_off_d"); sty_ButtonRapid.normal.background = t2d_rapid_off_u; sty_ButtonRapid.active.background = t2d_rapid_off_d; //内容--为变量赋值,用于实现JOG模式下F0,25%、50%、100%四个按钮的显示 //姓名--刘旋,时间--2013-4-8 t2d_f0_on_u=(Texture2D)Resources.Load("Texture_Panel/Button/f0_on_u"); t2d_f0_on_d=(Texture2D)Resources.Load("Texture_Panel/Button/f0_on_d"); t2d_f0_off_u=(Texture2D)Resources.Load("Texture_Panel/Button/f0_off_u"); t2d_f0_off_d=(Texture2D)Resources.Load("Texture_Panel/Button/f0_off_d"); sty_ButtonF0.normal.background=t2d_f0_off_u; sty_ButtonF0.active.background=t2d_f0_off_d; t2d_f25_on_u=(Texture2D)Resources.Load("Texture_Panel/Button/f25_on_u"); t2d_f25_on_d=(Texture2D)Resources.Load("Texture_Panel/Button/f25_on_d"); t2d_f25_off_u=(Texture2D)Resources.Load("Texture_Panel/Button/f25_off_u"); t2d_f25_off_d=(Texture2D)Resources.Load("Texture_Panel/Button/f25_off_d"); sty_ButtonF25.normal.background=t2d_f25_off_u; sty_ButtonF25.active.background=t2d_f25_off_d; t2d_f50_on_u=(Texture2D)Resources.Load("Texture_Panel/Button/f50_on_u"); t2d_f50_on_d=(Texture2D)Resources.Load("Texture_Panel/Button/f50_on_d"); t2d_f50_off_u=(Texture2D)Resources.Load("Texture_Panel/Button/f50_off_u"); t2d_f50_off_d=(Texture2D)Resources.Load("Texture_Panel/Button/f50_off_d"); sty_ButtonF50.normal.background=t2d_f50_off_u; sty_ButtonF50.active.background=t2d_f50_off_d; t2d_f100_on_u=(Texture2D)Resources.Load("Texture_Panel/Button/f100_on_u"); t2d_f100_on_d=(Texture2D)Resources.Load("Texture_Panel/Button/f100_on_d"); t2d_f100_off_u=(Texture2D)Resources.Load("Texture_Panel/Button/f100_off_u"); t2d_f100_off_d=(Texture2D)Resources.Load("Texture_Panel/Button/f100_off_d"); sty_ButtonF100.normal.background=t2d_f100_off_u; sty_ButtonF100.active.background=t2d_f100_off_d;//增加内容到此 2013-4-8 sty_ButtonYN.normal.background = (Texture2D)Resources.Load("Texture_Panel/Button/yminus_off_u"); sty_ButtonYN.active.background = (Texture2D)Resources.Load("Texture_Panel/Button/yminus_on_d"); sty_ButtonYP.normal.background = (Texture2D)Resources.Load("Texture_Panel/Button/yplus_off_u"); sty_ButtonYP.active.background = (Texture2D)Resources.Load("Texture_Panel/Button/yplus_on_d"); sty_ButtonZP.normal.background = (Texture2D)Resources.Load("Texture_Panel/Button/zplus_off_u"); sty_ButtonZP.active.background = (Texture2D)Resources.Load("Texture_Panel/Button/zplus_on_d"); sty_ButtonZN.normal.background = (Texture2D)Resources.Load("Texture_Panel/Button/zminus_off_u"); sty_ButtonZN.active.background = (Texture2D)Resources.Load("Texture_Panel/Button/zminus_on_d"); sty_ButtonXP.normal.background = (Texture2D)Resources.Load("Texture_Panel/Button/xplus_off_u"); sty_ButtonXP.active.background = (Texture2D)Resources.Load("Texture_Panel/Button/xplus_on_d"); sty_ButtonXN.normal.background = (Texture2D)Resources.Load("Texture_Panel/Button/xminus_off_u"); sty_ButtonXN.active.background = (Texture2D)Resources.Load("Texture_Panel/Button/xminus_on_d"); sty_Button4P.normal.background = (Texture2D)Resources.Load("Texture_Panel/Button/4plus_off_u"); sty_Button4P.active.background = (Texture2D)Resources.Load("Texture_Panel/Button/4plus_on_d"); sty_Button4N.normal.background = (Texture2D)Resources.Load("Texture_Panel/Button/4minus_off_u"); sty_Button4N.active.background = (Texture2D)Resources.Load("Texture_Panel/Button/4minus_on_d"); sty_ProgEDITWindowO.font = (Font)Resources.Load("font/STSONG"); sty_ProgEDITWindowO.fontSize = 16; sty_ProgEDITWindowO.normal.textColor = Color.white; sty_Title.font = (Font)Resources.Load("font/digifaw"); sty_Title.fontSize = 15; sty_TitleLetter.font = (Font)Resources.Load("font/STSONG"); sty_TitleLetter.fontSize = 17; sty_BigXYZ.font = (Font)Resources.Load("font/LCD"); sty_BigXYZ.fontSize = 45; sty_SmallNum.font = (Font)Resources.Load("font/monoMMM_5"); sty_SmallNum.fontSize = 14; sty_ProgModeName.font = (Font)Resources.Load("font/times"); sty_ProgModeName.fontSize = 14; sty_Star.fontSize = 22; sty_Alarm.font = (Font)Resources.Load("font/times"); sty_Alarm.fontSize = 12; sty_Alarm.normal.background = (Texture2D)Resources.Load("Texture_Panel/Button/red"); sty_Alarm.normal.textColor = Color.white; sty_BottomChooseMenu.font = (Font)Resources.Load("font/monoMMM_5"); //sty_BottomChooseMenu.font = (Font)Resources.Load("font/times"); sty_BottomChooseMenu.fontSize = 14; sty_ProgEditProgNum.font = (Font)Resources.Load("font/monoMMM_5"); sty_ProgEditProgNum.fontSize = 15; sty_ProgEditProgNum.normal.textColor = Color.white; sty_PosSmallWord.font = (Font)Resources.Load("font/simfang"); sty_PosSmallWord.fontSize = 15; sty_SmallXYZ.font = (Font)Resources.Load("font/times"); sty_SmallXYZ.fontSize = 17; sty_ScreenCover.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/StartScreen"); sty_ProgEDITWindowFG.font = (Font)Resources.Load("font/simfang"); sty_ProgEDITWindowFG.fontSize = 15; sty_ProgEDITWindowFG.normal.textColor = Color.white; sty_BottomAST.font = (Font)Resources.Load("font/times"); sty_BottomAST.fontSize = 15; //sty_BottomAST.normal.textColor = Color.cyan; sty_MostWords.font = (Font)Resources.Load("font/simfang"); sty_MostWords.fontSize = 15; //sty_MostWords.normal.textColor = Color.cyan; //sty_Code.font = (Font)Resources.Load("font/dutch"); sty_Code.fontSize = 17; sty_Code.fontStyle = FontStyle.Bold; sty_ModeCode.fontSize=15; sty_ModeCode.fontStyle=FontStyle.Bold; //内容--sty-Mode赋值为蓝色 //姓名--刘旋,时间--2013-3-29 sty_Mode.fontSize=15; sty_Mode.fontStyle=FontStyle.Bold; sty_Mode.normal.textColor=Color.blue; sty_ProgEDITListWindowNum.font = (Font)Resources.Load("font/monoMMM_5"); sty_ProgEDITListWindowNum.fontSize = 13; sty_Cursor.font = (Font)Resources.Load("font/times"); sty_Cursor.fontSize = 15; sty_Warning.fontSize = 14; sty_Warning.normal.textColor = Color.red; sty_ScreenBackGround.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/ScreenBackground"); sty_TopLabel.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/toplabel"); sty_MessAlarm.font=(Font)Resources.Load("font/simfang"); sty_MessAlarm.normal.textColor=Color.red; sty_MessAlarm.fontSize=13; sty_MessRecordID.font=(Font)Resources.Load("font/simfang"); sty_MessRecordID.normal.textColor=Color.blue; sty_MessRecordID.fontSize=13; sty_MessRecordTime.font=(Font)Resources.Load("font/simfang"); sty_MessRecordTime.fontSize=14; sty_MessRecordInfo.font=(Font)Resources.Load("font/simfang"); sty_MessRecordInfo.fontSize=15; sty_SysID.font=(Font)Resources.Load("font/monoMMM_5"); sty_SysID.fontSize=13; sty_SysInfo.font=(Font)Resources.Load("font/simfang"); sty_SysInfo.fontSize=15; sty_SysInfo.normal.textColor=Color.blue; t2d_BottomButton_u = (Texture2D)Resources.Load("Texture_Panel/Button/bottombutton_u"); t2d_BottomButton_d = (Texture2D)Resources.Load("Texture_Panel/Button/bottombutton_d"); sty_BottomButtonSmallest.normal.background = (Texture2D)Resources.Load("Texture_Panel/Button/bottombutton_smallest"); sty_BottomButton_1.normal.background = (Texture2D)Resources.Load("Texture_Panel/Button/bottombutton_d"); sty_BottomButton_2.normal.background = (Texture2D)Resources.Load("Texture_Panel/Button/bottombutton_u"); sty_BottomButton_3.normal.background = (Texture2D)Resources.Load("Texture_Panel/Button/bottombutton_u"); sty_BottomButton_4.normal.background = (Texture2D)Resources.Load("Texture_Panel/Button/bottombutton_u"); sty_BottomButton_5.normal.background = (Texture2D)Resources.Load("Texture_Panel/Button/bottombutton_u"); sty_BottomLabel_1.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/bottomLabel01"); sty_BottomLabel_2.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/bottomLabel02"); sty_BottomLabel_3.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/bottomLabel03"); sty_BottomLabel_4.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/bottomLabel04"); sty_ClockStyle.fontSize = 14; sty_EDITLabel.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/EDITLabel"); sty_EDITLabelWindow.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/EditWindow"); sty_EDITLabelBar_1.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/EditBar01"); sty_EDITLabelBar_2.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/EditBar02"); sty_EDITLabelBar_3.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/EditBar03"); sty_ProgSharedWindow.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/ProgSharedWindow"); sty_EDITCursor.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/EditCursor"); sty_EDITCursor.fontSize = 17; sty_EDITCursor.fontStyle = FontStyle.Bold; sty_EDITTextField.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/EditCursor"); sty_EDITTextField.normal.textColor = Color.yellow; sty_EDITTextField.fontSize = 17; sty_EDITTextField.fontStyle = FontStyle.Bold; sty_EDITList.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/EditList"); sty_InputTextField.font = (Font)Resources.Load("font/times"); sty_InputTextField.fontSize = 15; sty_OffSet_Coo.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/offset_coo"); width = 670F; height = 650F; left = -700f; PanelWindowRect = new Rect(left, 30f, width, height); EDITText.enabled = false; EDITText.font = sty_Code.font; EDITText.fontSize = sty_Code.fontSize; //EDITText.fontStyle=FontStyle.Bold; EDITText.text = ""; ProgEDITCusorPos = 57f; CursorText.enabled = false; CursorText.font = sty_Cursor.font; CursorText.fontSize = sty_Cursor.fontSize; coo_setting_cursor_x = 131f; coo_setting_cursor_y = 120f; coo_setting_1 = 1; coo_setting_2 = 1; sty_SettingsBG.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/SettingsBG"); //设定界面修改---陈振华---03.11 sty_OffSet_Coo_mini.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/offset_coo_mini"); sty_OffSet_Coo_mid.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/offset_coo_mid"); //设定界面修改---陈振华---03.11 sty_EditListTop.normal.background = (Texture2D)Resources.Load("Texture_Panel/Label/EditListTop"); OffSetTool = true; OffSetSetting = false; OffSetCoo = false; //刀偏界面完善---张振华---03.30 sty_MostWords_ToolOffSet.font = (Font)Resources.Load("font/simfang"); sty_MostWords_ToolOffSet.fontSize = 13; ToolOffSetPage_num = 0; //页面数 number = 0; //序号 tool_setting = 1; //黄色背景序号 tool_setting_cursor_y = 81.5f; tool_setting_cursor_w = 91.5f; //刀偏界面完善---张振华---03.30 /*---------------------AUTO模式下测试数据-----------------------*/ CodeForAUTO.Add("O0001"); CodeForAUTO.Add(";"); CodeForAUTO.Add("G21"); CodeForAUTO.Add(";"); CodeForAUTO.Add("M06"); CodeForAUTO.Add("T01"); CodeForAUTO.Add(";"); CodeForAUTO.Add("G54"); CodeForAUTO.Add("G90"); CodeForAUTO.Add("G00"); CodeForAUTO.Add("X0."); CodeForAUTO.Add("Y0."); CodeForAUTO.Add("Z50."); CodeForAUTO.Add("Z51."); CodeForAUTO.Add("Z52."); CodeForAUTO.Add("Z53."); CodeForAUTO.Add("Z54."); CodeForAUTO.Add("Z55."); CodeForAUTO.Add("Z56."); CodeForAUTO.Add("Z57."); CodeForAUTO.Add("Z58."); CodeForAUTO.Add("Z59."); CodeForAUTO.Add("Z60."); CodeForAUTO.Add("Z61."); CodeForAUTO.Add("Z62."); CodeForAUTO.Add(";"); CodeForAUTO.Add("M3"); CodeForAUTO.Add("S800"); CodeForAUTO.Add(";"); CodeForAUTO.Add("M08"); CodeForAUTO.Add(";"); CodeForAUTO.Add("X0.646"); CodeForAUTO.Add("Y-8.648"); CodeForAUTO.Add(";"); CodeForAUTO.Add("G55"); CodeForAUTO.Add("S1000"); CodeForAUTO.Add(";"); CodeForAUTO.Add("G70"); CodeForAUTO.Add("X5.5"); CodeForAUTO.Add(";"); CodeForAUTO.Add("M3"); CodeForAUTO.Add(";"); SeparatePos = new int[100000]; AUTOSeparatePos=new int[100000]; //AutoDisplayFindRows(2,true); }