示例#1
0
        private void NotifyCheck()
        {
            while (true)
            {
                if (IsHandleCreated)
                {
                    //OnLineControl.SetOffline();
                    //OnLineControl.SetOfflineClient();
                    //OnLineControl.SetOfflineManager();

                    Invoke(OnlineFuck);
                    OnLineControl.IamOnline(OS.ModuleID, OS.TopMost);

                    if (ActiveNotifySystem.IsNewUpdates(Security.CurrentUserID) > 0)
                    {
                        if (ActiveNotifySystem.CheckLastUpdate())
                        {
                            ActiveNotifySystem.FillUpdates();

                            Invoke(NotifyRefreshT);
                        }
                    }
                }

                Thread.Sleep(iRefreshTime);
            }
        }
示例#2
0
        public LightStartForm(LoginForm tLoginForm)
        {
            InitializeComponent();

            LoginForm = tLoginForm;

            TM = new TablesManager();

            MaximumSize = Screen.PrimaryScreen.WorkingArea.Size;

            //CurrentTimeLabel.Text = DateTime.Now.ToString("HH:mm");
            //CurrentDayOfWeekLabel.Text = DateTime.Now.ToString("dddd");
            //CurrentDayMonthLabel.Text = DateTime.Now.ToString("dd MMMM");

            AnimateTimer.Enabled = true;

            UserLabel.Text = Security.CurrentUserRName;

            //UpdatesPanel.Width = UserPanel.Left - UpdatesPanel.Left - 5;

            PhotoBox.Image = UserProfile.GetUserPhoto();

            InfiniumStart = new Infinium.InfiniumStart();
            InfiniumTilesContainer.ItemsDataTable = InfiniumStart.ModulesDataTable;
            InfiniumTilesContainer.MenuItemID     = 0;
            InfiniumTilesContainer.InitializeItems();

            ActiveNotifySystem = new Infinium.ActiveNotifySystem();
            InfiniumNotifyList.ModulesDataTable = InfiniumStart.FullModulesDataTable;

            InfiniumStartMenu.ItemsDataTable = InfiniumStart.MenuItemsDataTable;
            InfiniumStartMenu.InitializeItems();
            InfiniumStartMenu.Selected = 0;

            InfiniumMinimizeList.ModulesDataTable = InfiniumStart.FullModulesDataTable;

            if (InfiniumStart.ModulesDataTable.Select("MenuItemID = 0").Count() == 0)
            {
                InfiniumStartMenu.Selected = 1;
            }

            TopForm = null;
            if (TopForm != null)
            {
                OnLineControl.IamOnline(ActiveNotifySystem.GetModuleIDByForm(TopForm.Name), true);
            }
            else
            {
                OnLineControl.IamOnline(0, true);
            }

            OnLineControl.SetOffline();

            NotifyRefreshT = new NotifyRefresh(FuckingNotify);
            OnlineFuck     = new OnlineFuckingDelegate(GetTopMostAndModuleName);

            NotifyThread = new Thread(delegate() { NotifyCheck(); });
            NotifyThread.Start();

            while (!SplashForm.bCreated)
            {
                ;
            }
        }