private void btnOpenDetails_Click(object sender, EventArgs e) { if (lsttrash.SelectedItems.Count <= 0) { MessageBox.Show("צריך לבחור שורה בטבלה"); return; } int id = int.Parse(lsttrash.SelectedItems[0].SubItems[5].Text); SqlDataReader reader; People p = new People(); p.ID = id; reader = People.ReadById(p.ID); while (reader.Read()) { PeopleManipulations.ReaderToPeople(ref p, ref reader, true, true); } reader.Close(); DBFunction.CloseConnections(); p.OpenForTrashPeople = true; DetailForm detail = new DetailForm(p); detail.Show(); ShiduchActivity.insertActivity( new ShiduchActivity() { Action = (int)ShiduchActivity.ActionType.openForms, Date = DateTime.Now, PeopleId = id, UserId = GLOBALVARS.MyUser.ID, }); }
public void SomeMethod() { using (var detailForm = new DetailForm(this)) { detailForm.ShowDialog(); } }
public void OpenDetailCallBack(object sender, OpenDetailEventArgs e) { // ZhongcihaoDlg dlg = (ZhongcihaoDlg)sender; for (int i = 0; i < e.Paths.Length; i++) { DetailForm child = null; if (!(Control.ModifierKeys == Keys.Control)) { child = this.TopDetailForm; } if (child == null) { child = new DetailForm(); child.MdiParent = this; child.Show(); } else { child.Activate(); } child.LoadRecord(e.Paths[i], null); } }
public void ExecuteOneStep() { if (interruptions is null) { interruptions = RootNode.Execute().GetEnumerator(); ProgramEnded = false; } if (ProgramEnded) { DetailForm.ShowError("Program end!"); return; } if (interruptions.MoveNext()) { Interruption interruption = interruptions.Current; DetailForm.ShowRectangles(interruption.Position.ID, false); if (interruption.Type != "pause") { DetailForm.ShowError(interruption.Type); } } else { ProgramEnded = true; DetailForm.HideAllRectangles(); } UpdateVisualizer(); }
// 自动创建数据 private void MenuItem_autoGenerate_Click(object sender, EventArgs e) { if (this.ActiveMdiChild is DetailForm) { DetailForm detail = (DetailForm)this.ActiveMdiChild; detail.AutoGenerate(); } }
// 保存到模板 private void MenuItem_saveToTemplate_Click(object sender, EventArgs e) { if (this.ActiveMdiChild is DetailForm) { DetailForm detail = (DetailForm)this.ActiveMdiChild; detail.SaveToTemplate(); } }
// 观察检索点 private void MenuItem_viewAccessPoint_Click(object sender, EventArgs e) { if (this.ActiveMdiChild is DetailForm) { DetailForm detail = (DetailForm)this.ActiveMdiChild; detail.ViewAccessPoint(null); } }
// 打开新详细窗[空白] private void MenuItem_openDetail_Click(object sender, EventArgs e) { DetailForm child = new DetailForm(); child.MdiParent = this; child.Show(); //SetFirstMdiWindowState(); }
// 设置字体 private void MenuItem_font_Click(object sender, EventArgs e) { if (this.ActiveMdiChild is DetailForm) { DetailForm detail = (DetailForm)this.ActiveMdiChild; detail.SetFont(); } }
// 查重 private void MenuItem_dup_Click(object sender, EventArgs e) { if (this.ActiveMdiChild is DetailForm) { DetailForm detail = (DetailForm)this.ActiveMdiChild; detail.SearchDup(null); } }
public void SomeMethod() { using (var detailForm = new DetailForm()) { detailForm.ShowDialog(); Name = detailForm.Name; Age = detailForm.Age; } }
private void ShowExceptionDetail(string title, Exception exception) { if (ExceptionDialog.IsPlatformSupported) { new ExceptionDialog(title, exception).ShowDialog(this); } else { DetailForm.ShowExceptionDetail(this, title, exception); } }
private void dgvAnimeList_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) { var i = e.RowIndex; if (dgvAnimeList.Rows.Count != 0) { var detail = new DetailForm(); detail.pkgID = allList[i].package_anim; detail.ShowDialog(); } }
// 属性 private void MenuItem_properties_Click(object sender, EventArgs e) { if (this.ActiveMdiChild is DetailForm) { DetailForm detail = (DetailForm)this.ActiveMdiChild; RecordPropertiesDlg dlg = new RecordPropertiesDlg(); MainForm.SetControlFont(dlg, this.DefaultFont); dlg.textBox_content.Text = detail.PropertiesText; dlg.ShowDialog(this); } }
private void btn_Add_Click(object sender, EventArgs e) { try { DetailForm df = new DetailForm(); df.addnv += add; df.updateNV += update; df.del += show; df.Show(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void btn_Edit_Click(object sender, EventArgs e) { try { string id = dataGridView1.SelectedRows[0].Cells["ID_Employee"].Value.ToString(); DetailForm df = new DetailForm(); df.showup(id); df.updateNV += update; df.del += show; df.Show(); }catch (Exception ex) { MessageBox.Show(ex.Message); } }
public void ExecuteToEnd() { if (interruptions is null) { interruptions = RootNode.Execute().GetEnumerator(); ProgramEnded = false; } if (ProgramEnded) { DetailForm.ShowError("Program end!"); return; } List <int> breakPoints = DetailForm.GetBreakLines(); bool broke = false; while (interruptions.MoveNext()) { Interruption interruption = interruptions.Current; if (interruption.Type != "pause") { DetailForm.ShowRectangles(interruption.Position.ID, false); DetailForm.ShowError(interruption.Type); broke = true; break; } else if (breakPoints.Contains(interruption.Position.RawNode.LineNumber)) { DetailForm.ShowRectangles(interruption.Position.ID, false); broke = true; break; } } if (!broke) { ProgramEnded = true; DetailForm.HideAllRectangles(); } UpdateVisualizer(); }
private void toolStrip_main_ItemClicked(object sender, ToolStripItemClickedEventArgs e) { if (e.ClickedItem == toolBarButton_stop) { stopManager.DoStopActive(); } if (e.ClickedItem == toolBarButton_save) { if (this.ActiveMdiChild is DetailForm) { ((DetailForm)this.ActiveMdiChild).SaveRecord(null); } } if (e.ClickedItem == toolBarButton_refresh) { if (this.ActiveMdiChild is DetailForm) { ((DetailForm)this.ActiveMdiChild).LoadRecord(null, null); } } if (e.ClickedItem == toolBarButton_loadTemplate) { if (this.ActiveMdiChild is DetailForm) { ((DetailForm)this.ActiveMdiChild).LoadTemplate(); } } if (e.ClickedItem == toolBarButton_delete) { if (this.ActiveMdiChild is DetailForm) { ((DetailForm)this.ActiveMdiChild).DeleteRecord(null); } } if (e.ClickedItem == toolBarButton_prev) { if (this.ActiveMdiChild is DetailForm) { DetailForm detail = (DetailForm)this.ActiveMdiChild; detail.LoadRecord(null, "prev"); } } if (e.ClickedItem == toolBarButton_next) { if (this.ActiveMdiChild is DetailForm) { DetailForm detail = (DetailForm)this.ActiveMdiChild; detail.LoadRecord(null, "next"); } } if (e.ClickedItem == this.toolBarButton_search) { if (this.ActiveMdiChild is SearchForm) { ((SearchForm)this.ActiveMdiChild).DoSearch(false); } } }
public void ShowNonReportable(IWin32Window owner = null) { DetailForm.ShowExceptionDetail(owner, Title, _report.ExceptionMessageRaw, _report.ExceptionDetailRaw); }