Ejemplo n.º 1
0
        private void LoadNewerLogArrayAction()
        {
            Log9KUtil.ExecuteCommand(StartRemovingFromTopCommand);
            int  pageUpDownToLoad;
            bool success = int.TryParse(PageUpDownToLoad, out pageUpDownToLoad);

            if (!success)
            {
                pageUpDownToLoad = 10;
            }
            for (int i = 0; i < pageUpDownToLoad; i++)
            {
                CurrentTab.LoadNewerLogEntry();
            }
            SelectedEntry = CurrentTab.LogEntryCollection[CurrentTab.LogEntryCollection.Count - 1];
        }
Ejemplo n.º 2
0
//        private static int _meatspin = 0;
        private void OnPreviewMouseWheel(object sender, MouseWheelEventArgs mouseWheelEventArgs)
        {
            int  top, bottom;
            bool success = GetViewPortIndexes(this, out top, out bottom);

            if (!success)
            {
                return;
            }

            if (top == 0 && mouseWheelEventArgs.Delta > 0)
            {
                Log9KUtil.ExecuteCommand(LoadOlderLogCommand);
                Log9KUtil.ExecuteCommand(StartRemovingFromBottomCommand);
                return;
            }
            if (bottom != Items.Count || mouseWheelEventArgs.Delta >= 0)
            {
                return;
            }
            Log9KUtil.ExecuteCommand(LoadNewerLogCommand);
            Log9KUtil.ExecuteCommand(StartRemovingFromTopCommand);
        }