示例#1
0
 private void Tg_OnKeyDownInCell(int asciikeycode, int rowno, int colno, bool note)
 {
     if (note)           // links a TG with a system info to allow note taking
     {
         UserControlSysInfo s = GetUserControl <UserControlSysInfo>();
         if (s != null && s.IsNotesShowing)
         {
             s.FocusOnNote(asciikeycode);
         }
     }
 }
        private void OnKeyDownInCell(int keyvalue, int rowno, int colno, bool note)
        {
            if (note)
            {
                UserControlSysInfo si = tabStripTopRight.CurrentControl as UserControlSysInfo;
                if (si == null || !si.IsNotesShowing)
                {
                    si = tabStripMiddleRight.CurrentControl as UserControlSysInfo;
                }
                if (si == null || !si.IsNotesShowing)
                {
                    si = tabStripBottomRight.CurrentControl as UserControlSysInfo;
                }

                if (si != null && si.IsNotesShowing)      // if its note, and we have a system info window
                {
                    si.FocusOnNote(keyvalue);
                }
            }
        }