示例#1
0
        public IDialog ShowDialog(string title, string url, ResultHandler callback, Size size, Panel container, IPageBrowser pageBrowser)
        {
            this.Title = title;

            if (!double.IsNaN(size.Height) && !double.IsInfinity(size.Height))
            {
                this.Height = size.Height;
            }

            if (!double.IsNaN(size.Width) && !double.IsInfinity(size.Width))
            {
                this.Width = size.Width;
            }

            var gridContainer = new GridContainer();

            gridContainer.LoadModule += container_LoadModule;
            gridContainer.Load(url);

            this.Content = gridContainer;

            if (callback != null)
            {
                this.m_handler = callback;
            }

            return(this);
        }
示例#2
0
        public void ShowDialog(string title, string url, bool isModal, Size size, ResultHandler handler)
        {
            if (handler != null)
            {
                ResultHandler = handler;
            }
            GridContainer gridContainer = new GridContainer();

            gridContainer.LoadModule += new EventHandler <Newegg.Oversea.Silverlight.Core.Components.LoadedMoudleEventArgs>(canvasContainer_LoadModule);
            gridContainer.Tag         = isModal;
            CPApplication.Current.CurrentPage.Context.Window.LoadingSpin.Show();
            gridContainer.Load(url);
            Content = gridContainer;
            PopType = PopType.Dialog;
            this.RootElementSize = size;
            this.Title           = title;
        }