public void setFocus() { imgNull.Opacity = 1; iprCtrl.curUnit.get_sNotReady(); if (iprCtrl.curUnit.sNotReady == 0) { imgErr.Opacity = 0; } else { imgErr.Opacity = 1; } iprCtrl.curUnit.get_sActName(); switch (iprCtrl.curUnit.sActName) { case 0: { //imgNullUsed.Visibility = Visibility.Hidden; //lnNull.Visibility = Visibility.Hidden; if (tbMenu != null) { cvsMenu.Children.Remove(tbMenu); tbMenu = null; } } break; case (int)menuType.ipr_op01_blank: { if (tbMenu != null) { cvsMenu.Children.Remove(tbMenu); tbMenu = null; } } break; default: { if (tbMenu == null) { tbMenu = new tbMenuCtrl(); cvsMenu.Children.Add(tbMenu); } tbMenu.setFocus(); } break; } int tmpPr_28 = iprCtrl.curUnit.sLinkNode;//valmoWin.dv.iprPr[28].valueNew; int tmpStartUp = tmpPr_28 & 0x01; int tmpStartMld = (tmpPr_28 >> 1) & 0x01; int tmpStartDown = (tmpPr_28 >> 2) & 0x01; flagStartMld = tmpStartMld == 1 ? true : false; flagStartUp = tmpStartUp == 1 ? true : false; flagStartDown = tmpStartDown == 1 ? true : false; int tmpUp = (tmpPr_28>>5)&0x01; int tmpMld = (tmpPr_28>>6)&0x01; int tmpDown = (tmpPr_28>>7)&0x01; flagBehind = tmpMld == 1 ? true : false; flagUp = tmpUp == 1 ? true : false; flagDown = tmpDown == 1 ? true : false; this.curUnit.getValue(iprCtrl.curUnit); }
public void cleanMsg() { imgErr.Opacity = 0; flagBehind = false; flagUp = false; flagDown = false; tmpBehind = false; tmpDown = false; tmpUp = false; imgNull.Opacity = 0; //imgNullUsed.Visibility = Visibility.Hidden; //lnNull.Visibility = Visibility.Hidden; cvsMenu.Children.Clear(); tbMenu = null; curUnit.init(); }