Пример #1
0
        public InfoWindow NewWindow(System.Windows.Window owner, int time = 1000, string url = null)
        {
            InfoWindow iw = new InfoWindow(time, url);
            int nextIndex = _infoWindows.Count;
            for(int i = 0; i < _infoWindows.Count; i++)
            {
                if(_infoWindows[i] == null)
                {
                    nextIndex=i;
                    break;
                }
            }
            var screenSize = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea;
            iw.Top = screenSize.Height - (iw.Height + (nextIndex * iw.Height));
            iw.Left = screenSize.Width - (iw.Width + 0);

            iw.Owner = owner;
            if (nextIndex == _infoWindows.Count)
            {
                _infoWindows.Add(iw);
            }
            else
            {
                _infoWindows[nextIndex] = iw;
            }
            return iw;
        }
Пример #2
0
 public void RemoveWindow(InfoWindow iw)
 {
     _infoWindows[_infoWindows.IndexOf(iw)] = null;
 }
Пример #3
0
        public InfoWindow NewInfomation(int time, string url)
        {
            InfoWindow iw = InfomationManager.Instance.NewWindow(this, time, url);

            return(iw);
        }