/// <summary> /// 显示窗口 /// </summary> /// <typeparam name="TResult">窗口返回的结果的类型</typeparam> /// <param name="windowmodel">窗口模式,为<see cref="DialogMode"/></param>类型 /// <param name="parent">窗口父容器</param> /// <param name="result">此参数未使用</param> /// <param name="close">此参数未使用</param> /// <param name="isResizable">窗口是否可拖拽大小</param> /// <param name="GUID"> /// 窗口标识. /// 可根据此ID限制此窗口只能弹出一个 /// </param> public void Show <TResult>(DialogMode windowmodel, FrameworkElement parent, TResult result, Action <TResult> close, bool isResizable, string GUID) { try { try { double height = SMT.SAAS.Main.CurrentContext.AppContext.AppHost.SilverlightHostRoot.ActualHeight; double width = SMT.SAAS.Main.CurrentContext.AppContext.AppHost.SilverlightHostRoot.ActualWidth; //MessageBox.Show("1高:" + (height - 50) + " 宽:" + (width - 50)); this.MinHeight = height - 50; this.MinWidth = width - 50; } catch (Exception ex) { } this._window = ProgramManager.ShowProgram(TitleContent.ToString(), string.Empty, GUID, this, isResizable, true, null); //MessageBox.Show("1高:" + this._window.MinHeight + " 宽:" + this._window.MinWidth); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } finally { //MessageBox.Show("Down"); } }
/// <summary> /// 显示窗口 /// </summary> /// <typeparam name="TResult">窗口返回的结果的类型</typeparam> /// <param name="windowmodel">窗口模式,为<see cref="DialogMode"/></param>类型 /// <param name="parent">窗口父容器</param> /// <param name="result">此参数未使用</param> /// <param name="close">此参数未使用</param> /// <param name="isResizable">窗口是否可拖拽大小</param> /// <param name="GUID"> /// 窗口标识. /// 可根据此ID限制此窗口只能弹出一个 /// </param> public void Show <TResult>(DialogMode windowmodel, FrameworkElement parent, TResult result, Action <TResult> close, bool isResizable, string GUID) { try { double height = 0; double width = 0; try { height = SMT.SAAS.Main.CurrentContext.AppContext.AppHost.SilverlightHostRoot.ActualHeight; width = SMT.SAAS.Main.CurrentContext.AppContext.AppHost.SilverlightHostRoot.ActualWidth; //MessageBox.Show("1高:" + (height - 50) + " 宽:" + (width - 50)); } catch (Exception ex) { } //string msg = "弹出窗内部Form指定高度:" + this.Height + "类型" + this.Height.GetType().Name + " 宽度:" + this.Width + "类型:" + this.Height.GetType().Name // + "弹出窗内部Form指定最小高度:" + this.MinHeight + "类型" + this.MinHeight.GetType().Name + " 最小宽度:" + this.MinWidth + "类型" + this.MinWidth.GetType().Name // + " 当前silverlight显示区高度:" + height + " 宽度:" + width; //SMT.SAAS.Main.CurrentContext.AppContext.SystemMessage(msg); //SMT.SAAS.Main.CurrentContext.AppContext.ShowSystemMessageText(); if (height > 0) { if (this.MinHeight > height) { this.MinHeight = height - 50; } if (this.Height > height) { this.MinHeight = height - 50; } } if (width > 0) { if (this.MinWidth > width) { this.MinWidth = width - 50; } if (this.Width > width) { this.MinWidth = width - 50; } } this._window = ProgramManager.ShowProgram(TitleContent.ToString(), string.Empty, GUID, this, isResizable, true, null); //MessageBox.Show("1高:" + this._window.MinHeight + " 宽:" + this._window.MinWidth); } catch (Exception ex) { SMT.SAAS.Main.CurrentContext.AppContext.SystemMessage(ex.ToString()); SMT.SAAS.Main.CurrentContext.AppContext.ShowSystemMessageText(); } finally { //MessageBox.Show("Down"); } }
protected override Announcement Parse() { return(new Announcement { Id = ToInt(AnnouncementID), Description = AnnouncementDesc.ToString(), SimbahanId = ToInt(SimbahanID), StartDate = ToDateTime(StartDate), StartTime = StartTime.ToString(), EndDate = ToDateTime(EndDate), EndTime = EndTime.ToString(), Title = TitleContent.ToString(), Venue = Address.ToString(), ImagePath = ImagePath.ToString() }); }
/// <summary> /// 显示窗口 /// 兼容MVC 平台弹出窗口 /// Author:傅意成 /// Date:2012-07-12 /// </summary> public void ShowMvcPlat <TResult>(DialogMode windowmodel, FrameworkElement parent, TResult result, Action <TResult> close) { this._window = ProgramManager.ShowMvcProgram(TitleContent.ToString(), string.Empty, Guid.NewGuid().ToString(), this, false, true, null); }
public void Show <TResult>(DialogMode windowmodel, FrameworkElement parent, TResult result, Action <TResult> close, bool isResizable, bool isSysApp, string GUID) { this._window = ProgramManager.ShowProgram(TitleContent.ToString(), string.Empty, GUID, this, isResizable, isSysApp, null); }
/// <summary> /// 显示窗口 /// </summary> /// <param name="GUID"> /// 窗口标识. /// 可根据此ID限制此窗口只能弹出一个 /// </param> public void Show(string GUID) { this._window = ProgramManager.ShowProgram(TitleContent.ToString(), string.Empty, GUID, this, true, false, null); }
/// <summary> /// 显示窗口 /// </summary> public void Show() { this._window = ProgramManager.ShowProgram(TitleContent.ToString(), string.Empty, Guid.NewGuid().ToString(), this, true, false, null); }