void ucDataFileLoader1_ControlEnter(object sender, EventArgs e) { this.currentControl = sender as Control; Neusoft.FrameWork.EPRControl.IUserControlable ic = this.currentControl as Neusoft.FrameWork.EPRControl.IUserControlable; try { if (ic != null) { currentControl = ic.FocusedControl; } } catch { } }
private void setOtherControlVisible(bool bVisible, Control panel) { if (panel == null) { return; } if (bVisible == false) { alForVisibleControls = new ArrayList(); foreach (Control c in ((Neusoft.FrameWork.EPRControl.emrPanel)panel).Controls) { Neusoft.FrameWork.EPRControl.IUserControlable ip = c as Neusoft.FrameWork.EPRControl.IUserControlable; if (ip != null) { if (ip.FocusedControl.GetType().IsSubclassOf(typeof(RichTextBox)) == false) { if (c.Visible) { this.alForVisibleControls.Add(c.Handle); c.Visible = false; } } } else { if (c.GetType().IsSubclassOf(typeof(RichTextBox)) == false) { if (c.Visible) { c.Visible = false; this.alForVisibleControls.Add(c.Handle); } } } } } else { foreach (Control c in ((Neusoft.FrameWork.EPRControl.emrPanel)panel).Controls) { if (c.GetType().IsSubclassOf(typeof(RichTextBox)) == true) { } else { if (alForVisibleControls == null) { return; } foreach (System.IntPtr handle in alForVisibleControls) { if (c.Handle == handle) { c.Visible = true; break; } } } } } }