//--------------------------------------------------------------------------------------------- public static void ShowWrapper(StatusFormWrapperType type) { if (GetCurrentWrapper(type) == null) { WindowManager.GetDefaultManager().CreateWindow(delegate() { var f = new StatusFormWrapper(type); return(f); }); } }
//--------------------------------------------------------------------------------------------- //TODO vyresit //public static StatusFormWrapper GetCurrentHoveringWrapper(Point location) //{ // foreach (StatusFormWrapper wrapper in GetAllWrappers()) // { // if (wrapper.Location.X < location.X && location.X < (wrapper.Location.X + wrapper.Width) && wrapper.Location.Y < location.Y && location.Y < (wrapper.Location.Y + wrapper.Height)) // return wrapper; // } // return null; //} //--------------------------------------------------------------------------------------------- public static StatusFormWrapper GetCurrentWrapper(StatusFormWrapperType type) { StatusFormWrapper form = WindowManager.GetDefaultManager().OwnedWindows.OfType <StatusFormWrapper>().Where(i => i.WrapperType == type).FirstOrDefault() as StatusFormWrapper; return(form); }