Esempio n. 1
0
 private void timerBlink_Tick(object sender, EventArgs e)
 {
     //if (updater.SQLServerConnected())
     //{
     if (!tsbEnd.Enabled)
     {
         SelectEndRecords();
     }
     else
     {
         LoadLog(viewPos, viewCount);
     }
     tsbQuitAll.Enabled = (updater.UserLevel() >= UserLevel.Оператор);
     blink = !blink;
     //}
 }
Esempio n. 2
0
        private void drawBox_MouseMove(object sender, MouseEventArgs e)
        {
            Draw drw = GetDrawAt(e.X, e.Y);

            if (drw != null && !drw.Name.Equals("Background"))
            {
                bool isJump = drw.Plugin.PluginShortType.Equals("DinJump") &&
                              !String.IsNullOrWhiteSpace((string)drw.Props["ScreenName"]);
                bool isButton = drw.Plugin.PluginShortType.Equals("DinButton") &&
                                !String.IsNullOrWhiteSpace((string)drw.Props["PtName"]);
                int currlevel = (updater != null) ?
                                UserInfo.UserLevelToInt(updater.UserLevel()) : 0;
                if (isJump && (currlevel >= (int)drw.Props["UserLevel"]) ||
                    isButton && currlevel >= UserInfo.UserLevelToInt(UserLevel.Оператор))
                {
                    Cursor = Cursors.Hand;
                }
                else
                {
                    Cursor = Cursors.Default;
                }
                if (drw.Props.ContainsKey("PtName"))
                {
                    string ptname = drw.Props["PtName"].ToString().Trim();
                    if (ptname.Length > 0 && !lastdrw.Equals(drw.Name))
                    {
                        lastdrw = drw.Name;
                        Entity ent = Data.GetEntity(ptname);
                        if (!ent.Empty)
                        {
                            toolTip.Hide(drawBox);
                            toolTip.Show(ptname + " - " + ent.Values["PtDesc"], drawBox, e.X, e.Y, 1500);
                        }
                    }
                }
                else
                {
                    lastdrw = String.Empty;
                }
            }
            else
            {
                toolTip.Hide(drawBox);
                Cursor  = Cursors.Default;
                lastdrw = String.Empty;
            }
        }