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); }
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; }