private void ScrollWindow(bool scrollUp) { if (this.InvokeRequired) { ScrollWindowDelegate s = new ScrollWindowDelegate(ScrollWindow); this.Invoke(s, new object[] { scrollUp }); } else { if (FormMain.Instance.ServerTree.MouseHasFocus) { FormMain.Instance.ServerTree.ScrollWindow(scrollUp); return; } if (FormMain.Instance.CurrentWindowStyle != IceTabPage.WindowType.ChannelList) { if (FormMain.Instance.CurrentWindowStyle == IceTabPage.WindowType.Channel) { //check if mousewheel is hovering over nicklist if (FormMain.Instance.NickList.MouseHasFocus) { FormMain.Instance.NickList.ScrollWindow(scrollUp); return; } } FormMain.Instance.CurrentWindow.TextWindow.ScrollWindow(scrollUp); } else { // scroll the channel list FormMain.Instance.CurrentWindow.ScrollListWindow(scrollUp); } } }
private void ScrollWindow(bool scrollUp) { if (this.InvokeRequired) { ScrollWindowDelegate s = new ScrollWindowDelegate(ScrollWindow); this.Invoke(s, new object[] { scrollUp }); } else if (FormMain.Instance.CurrentWindowType != IceTabPage.WindowType.ChannelList) { if (FormMain.Instance.CurrentWindowType == IceTabPage.WindowType.Channel) { //check if mousewheel is hovering over nicklist if (FormMain.Instance.NickList.MouseHasFocus) { FormMain.Instance.NickList.ScrollWindow(scrollUp); return; } } FormMain.Instance.CurrentWindow.TextWindow.ScrollWindow(scrollUp); } }