private void timer1_Tick(object sender, EventArgs e) { try { //监控状态指示的小东东,嘻嘻 count = (++count) % 3; string star = "\\"; switch (count) { case 0: star = "-"; break; case 1: star = "\\"; break; case 2: star = "/"; break; } //得到选中的东东 NXObject[] nxobs; int num = NXFun.GetSelectObjects(out nxobs); label1.Text = star + " 请选择加工面 (" + System.Convert.ToString(num) + ")"; string[] obs = new string[num]; for (int i = 0; i < num; i++) { if (isShowFullType) { obs[i] = nxobs[i].GetType().FullName; } else { obs[i] = nxobs[i].ToString(); } } //检测有无改变 if (!NXFun.isArrayEqual(ob_list, obs)) { listBox1.Items.Clear(); foreach (string str in obs) { listBox1.Items.Add(str); } } ob_list = obs; } catch (System.Exception ex) { UI.GetUI().NXMessageBox.Show("Message", NXMessageBox.DialogType.Error, ex.Message); } }