private void buttonOpenDocument_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(DataID) || string.IsNullOrEmpty(ModuleID)) { MessageBox.Show("没有获取到足够的依据来打开文档, 请稍后再试", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (Yqun.Common.ContextCache.ApplicationContext.Current.IsAdministrator) { ModuleViewer Viewer = new ModuleViewer(new Guid(DataID), new Guid(ModuleID), Yqun.Common.ContextCache.ApplicationContext.Current.InTestRoom.Code); Form Owner = Cache.CustomCache[SystemString.主窗口] as Form; Viewer.Location = Owner.PointToScreen(Owner.ClientRectangle.Location); Viewer.Size = Owner.ClientRectangle.Size; Viewer.ReadOnly = false; Viewer.isNewData = false; Viewer.viewControl = null; Viewer.ShowDialog(); } else { DataDialog Dialog = new DataDialog(new Guid(DataID), new Guid(ModuleID)); Form Owner = Cache.CustomCache[SystemString.主窗口] as Form; Dialog.Owner = Owner; Dialog.Location = Owner.PointToScreen(Owner.ClientRectangle.Location); Dialog.Size = Owner.ClientRectangle.Size; Dialog.ReadOnly = true; Dialog.ShowDialog(); } }
private void spread_invalide_CellDoubleClick(object sender, CellClickEventArgs e) { Row Row = spread_invalide.ActiveSheet.ActiveRow; if (Row != null && Row.Tag is String) { String[] Tokens = Row.Tag.ToString().Split(','); DataDialog Dialog = new DataDialog(new Guid(Tokens[0]), new Guid(Tokens[1])); Form Owner = Cache.CustomCache[SystemString.主窗口] as Form; Dialog.Location = Owner.PointToScreen(Owner.ClientRectangle.Location); Dialog.Size = Owner.ClientRectangle.Size; Dialog.ReadOnly = true; Dialog.ShowDialog(Owner); } }
static void spread_stadium_CellDoubleClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e) { FpSpread fpSpread = sender as FpSpread; Row Row = fpSpread.ActiveSheet.ActiveRow; if (Row != null && Row.Tag is String) { String[] Tokens = Row.Tag.ToString().Split(','); DataDialog Dialog = new DataDialog(new Guid(Tokens[0]), new Guid(Tokens[1])); Form Owner = Cache.CustomCache[SystemString.主窗口] as Form; Dialog.Owner = Owner; Dialog.Location = Owner.PointToScreen(Owner.ClientRectangle.Location); Dialog.Size = Owner.ClientRectangle.Size; Dialog.ReadOnly = true; Dialog.ShowDialog(); } }