protected void lstAirport_UpdateRowBatch(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e) { DS_Flight.AirportCodeRow row = airportTable.NewAirportCodeRow(); foreach (UltraGridCell c in e.Row.Cells) { if(c.Value!=null) row[c.Column.Key] = c.Value; } AirportBiz biz = new AirportBiz(); bool b = false; switch (e.Row.DataChanged) { case (DataChanged.Added): b = biz.AddAirportCode(row.airportCode, row.name, row.name_cn, row.country); break; case (DataChanged.Modified): b = biz.UpdateAirportCode(row.airportID, row.airportCode, row.name, row.name_cn, row.country); break; } if (b) e.Row.Style.BackColor = ColorSuccess; else e.Row.Style.BackColor = ColorFailure; }
private void Materias_RecordUpdated(object sender, Infragistics.Windows.DataPresenter.Events.RecordUpdatedEventArgs e) { try { DataRecord myRecord = (DataRecord)e.Record; // Display the selected Records values in the appropriate // editor ClasificacionSga materia = new ClasificacionSga(myRecord.Cells[3].Value.ToString()); materia.IdClasificacion = Convert.ToInt32(myRecord.Cells[0].Value); materia.Nivel = Convert.ToInt32(myRecord.Cells[1].Value); materia.Padre = Convert.ToInt32(myRecord.Cells[2].Value); materia.Descripcion = myRecord.Cells[3].Value.ToString(); materia.SeccionPadre = Convert.ToInt32(myRecord.Cells[4].Value); materia.Historica = Convert.ToInt32(myRecord.Cells[5].Value); materia.Consec = Convert.ToInt32(myRecord.Cells[6].Value); materia.Hoja = Convert.ToInt32(myRecord.Cells[7].Value); materia.NvlImpresion = Convert.ToInt32(myRecord.Cells[8].Value); if (registroNuevo) new ClasificacionSgaModel().InsertarRegistro(materia); else new ClasificacionSgaModel().ActualizaRegistroMaterias(materia); registroNuevo = false; } catch (InvalidCastException) { e.Record.Visibility = System.Windows.Visibility.Collapsed; e.Record.CancelUpdate(); MessageBox.Show("Debe completar todos los campos para poder ingresar un elemento", "Atención:", MessageBoxButton.OK, MessageBoxImage.Warning); } }
private void grdQuery_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { e.Layout.Bands[0].Columns["supplementdate"].Format = "yyyy-MM-dd HH:mm:ss"; UltraGridColumn column = e.Layout.Bands[0].Columns["isreinspect"]; column.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.CheckBox; column.Editor.DataFilter = new CheckEditorStringDataFilter(); if (!e.Layout.ValueLists.Exists("vlstep")) { e.Layout.ValueLists.Add("vlstep"); e.Layout.ValueLists["vlstep"].ValueListItems.AddRange(DropDown.GetValueList_StaticValue(MES_StaticValue_Type.Step)); e.Layout.Bands[0].Columns["step"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList; e.Layout.Bands[0].Columns["step"].ValueList = e.Layout.ValueLists["vlstep"]; } if (!e.Layout.ValueLists.Exists("vlchecktype")) { e.Layout.ValueLists.Add("vlchecktype"); e.Layout.ValueLists["vlchecktype"].ValueListItems.AddRange(DropDown.GetValueList_StaticValue(MES_StaticValue_Type.CheckType)); e.Layout.Bands[0].Columns["checktype"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList; e.Layout.Bands[0].Columns["checktype"].ValueList = e.Layout.ValueLists["vlchecktype"]; } e.Layout.Override.SummaryDisplayArea = SummaryDisplayAreas.Default; e.Layout.Bands[0].Override.SummaryFooterCaptionVisible = DefaultableBoolean.False; if (!e.Layout.Bands[0].Summaries.Exists("SumPairqty")) { e.Layout.Bands[0].Summaries.Add("SumPairqty", SummaryType.Sum, e.Layout.Bands[0].Columns["pairqty"], SummaryPosition.UseSummaryPositionColumn); } }
protected override void processRightClick(Infragistics.Win.UltraWinGrid.UltraGridCell cellClicked_) { while (contextMenuStrip1.Items.Count > 0) contextMenuStrip1.Items[0].Dispose(); if (cellClicked_ != null && cellClicked_.Row.ListObject is SpreadWeightGenerator) { SpreadWeightGenerator sw = (SpreadWeightGenerator)cellClicked_.Row.ListObject; if (sw.Spread.HasBuiltData) { contextMenuStrip1.Items.Add(new MenuItems.MenuItem_ShowSeasonality(sw)); contextMenuStrip1.Items.Add(new MenuItems.MenuItem_ShowTrades(sw)); contextMenuStrip1.Items.Add(new MenuItems.MenuItems_ShowPnlResult(sw)); contextMenuStrip1.Items.Add(new MenuItems.MenuItem_ShowPnlDetailed(sw)); contextMenuStrip1.Items.Add(new MenuItems.MenuItem_GenericAction(sw_: sw, title_: "Show trade points on spread", action_: (x) => x.ShowTradePointsOnGraph())); contextMenuStrip1.Items.Add(new ToolStripSeparator()); contextMenuStrip1.Items.Add(new MenuItems.MenuItem_GenericAction(sw_: sw, title_: "Remove from list", action_: (x) => { m_list.Remove(x); })); } } if (contextMenuStrip1.Items.Count > 0) { contextMenuStrip1.Show(Cursor.Position); } }
private void exbarGroups_ContextMenuInitializing(object sender, Infragistics.Win.UltraWinExplorerBar.CancelableContextMenuInitializingEventArgs e) { if(e.ClickArea == ClickArea.GroupHeader) { e.Cancel = true; } var menuTarget = new ContextMenuHelper(); if( e.ClickArea == ClickArea.Item) { menuTarget.Item = e.Item; menuTarget.Group = e.Item.Group; } else { menuTarget.Group = e.Group; } this.exbarGroups.ResetGroupItemAreaContextMenu(); this.exbarGroups.ResetItemContextMenu(); var menuItemAdd = new IGMenuItem("Add", new EventHandler(this.OnMenuItemClicked)); menuItemAdd.Tag = menuTarget; e.ContextMenu.MenuItems.Add(menuItemAdd); if(e.ClickArea == ClickArea.Item) { var menuItemEdit = new IGMenuItem("Edit / Delete", new EventHandler(this.OnMenuItemClicked)); menuItemEdit.Tag = menuTarget; e.ContextMenu.MenuItems.Add(menuItemEdit); } }
/// <summary> /// Handles Item selected menu event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void NavigationBar_ItemSelected(object sender, Infragistics.Web.UI.NavigationControls.ExplorerBarItemSelectedEventArgs e) { if (e.IsExplorerBarGroup() != true) { Session["SelectedGroup"] = e.NewSelectedItem.ParentItem.Index; Session["SelectedIndex"] = e.NewSelectedItem.Index; } int cnt = NavigationBar.Groups.Count; string redirectURL = e.NewSelectedItem.Value.ToString(); bool[] state = new bool[cnt]; //bool[] VisibleState = new bool[cnt]; for (int i = 0; i < cnt; i++) { state[i] = NavigationBar.Groups[i].Expanded; //VisibleState[i] = NavigationBar.Groups[i].Visible; } Session["WebExplorerState"] = state; //Session["VisibleState"] = VisibleState; if (redirectURL != "") Response.Redirect(redirectURL); }
object Infragistics.Win.IEditorDataFilter.Convert(Infragistics.Win.EditorDataFilterConvertArgs args) { switch (args.Direction) { case ConversionDirection.EditorToOwner: args.Handled = true; CheckState state = (CheckState)args.Value; switch (state) { case CheckState.Checked: return MES_Misc.Y.ToString(); case CheckState.Unchecked: return MES_Misc.N.ToString(); case CheckState.Indeterminate: return "?"; } break; case ConversionDirection.OwnerToEditor: args.Handled = true; if (args.Value.ToString() == MES_Misc.Y.ToString()) return CheckState.Checked; else if (args.Value.ToString() == MES_Misc.N.ToString()) return CheckState.Unchecked; else return CheckState.Indeterminate; } return args.Value; }
private void listaClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { if (e.Cell.Row.IsDataRow && e.Cell.Row.ListObject is SpedizioneArchiviazioneOtticaDTO) { var item = (SpedizioneArchiviazioneOtticaDTO)e.Cell.Row.ListObject; } }
public static void SetQueryGridStyle(Infragistics.Win.UltraWinGrid.UltraGrid grid) { SetGridReadOnly(grid, true); grid.DisplayLayout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.True; grid.DisplayLayout.Override.SelectTypeRow = Infragistics.Win.UltraWinGrid.SelectType.Extended; grid.DisplayLayout.Override.SelectTypeCell = SelectType.Extended; grid.DisplayLayout.Override.SelectTypeCol = SelectType.Extended; grid.DisplayLayout.Override.AllowAddNew = Infragistics.Win.UltraWinGrid.AllowAddNew.No; grid.DisplayLayout.Override.AllowDelete = Infragistics.Win.DefaultableBoolean.False; grid.DisplayLayout.Override.AllowUpdate = Infragistics.Win.DefaultableBoolean.False; grid.DisplayLayout.ViewStyleBand = Infragistics.Win.UltraWinGrid.ViewStyleBand.Horizontal; grid.DisplayLayout.NewColumnLoadStyle = NewColumnLoadStyle.Hide; grid.DisplayLayout.CaptionVisible = DefaultableBoolean.False; grid.DisplayLayout.Override.BorderStyleCell = UIElementBorderStyle.Dotted; grid.DisplayLayout.Override.BorderStyleRow = UIElementBorderStyle.Dotted; grid.DisplayLayout.BorderStyle = UIElementBorderStyle.Solid; grid.DisplayLayout.Appearance.BackColor = Color.White; grid.DisplayLayout.Override.CellAppearance.BorderColor = System.Drawing.Color.Silver; grid.DisplayLayout.Override.RowAppearance.BorderColor = System.Drawing.Color.Silver; grid.DisplayLayout.Override.HeaderClickAction = HeaderClickAction.SortMulti; //Grid cell can be copy to clipboard grid.DisplayLayout.Override.AllowMultiCellOperations = AllowMultiCellOperation.Copy; grid.PerformAction(UltraGridAction.Copy); }
private void listaDoubleClickRow(object sender, Infragistics.Win.UltraWinGrid.DoubleClickRowEventArgs e) { if (e.Row.IsDataRow && e.Row.ListObject is SpedizioneArchiviazioneOtticaDTO) { } }
private void ugPaydates_ClickCell(object sender, Infragistics.Win.UltraWinGrid.ClickCellEventArgs e) { DataRow dr = ((System.Data.DataRowView)(((Infragistics.Win.UltraWinGrid.UltraGridRow)(ugPaydates.Selected.Rows.All[0])).ListObject)).Row; TimeConnector.Export.SelectedInvoiceNumber = dr.ItemArray[5].ToString(); TimeConnector.Export.SetReportPath(); UpdateForm(); }
private void ultraToolbarsManager3_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e) { switch (e.Tool.Key.ToString()) { case "Query": { DateTime begintime = this.dtTimeBegin.Value; DateTime endtime = this.dtTimeEnd.Value; if (begintime > endtime) { MessageBox.Show("截止日期不能小于开始日期!"); return; } String begintime_str = begintime.ToString("yyyy-MM-dd 00:00:00"); String endtime_str = endtime.ToString("yyyy-MM-dd 23:59:59"); //String strSelectSql = "select t.fs_enterfacno as 进厂流水号,t.fs_plancode as 预报编号,t.fs_cardnumber 卡号,t.fs_carno 车号,t.fd_enterfactime,t.fs_enterfacplace,t.fs_enterfacchecker,"; //strSelectSql+="t.fs_enterfacremark,t.fd_exitfactime,t.fs_exitfacplace,t.fs_exitfacchecker,t.fs_exitfacremark from dt_enterfacrecord t "; string strSelectSql = " SELECT FS_ENTERFACNO,FS_CARDNUMBER,FS_CARNO ,FS_PLANCODE ,to_char(FD_ENTERFACTIME,'YYYY-MM-DD HH24:MI:SS') FD_ENTERFACTIME,FS_ENTERFACPLACE ,FS_ENTERFACCHECKER ,to_char(FD_EXITFACTIME,'YYYY-MM-DD HH24:MI:SS') FD_EXITFACTIME ,FS_EXITFACPLACE,FS_EXITFACCHECKER,FS_ENTERFACREMARK,FS_EXITFACREMARK FROM DT_ENTERFACRECORD t "; strSelectSql += "where t.fd_enterfactime >=TO_DATE('" + begintime_str + "','YYYY-MM-DD HH24:MI:SS') and t.fd_exitfactime<=TO_DATE('" + endtime_str + "','YYYY-MM-DD HH24:MI:SS') "; strSelectSql += "or (t.fd_enterfactime >=TO_DATE('" + begintime_str + "','YYYY-MM-DD HH24:MI:SS') and fn_enterfacflag=1)"; strSelectSql += " and FS_CARNO='" + txtCarNo.Text.Replace("'", "''") + "'"; CoreClientParam selectccp = new CoreClientParam(); selectccp.ServerName = "ygjzjl.carcard"; selectccp.MethodName = "queryByClientSql"; selectccp.ServerParams = new object[] { strSelectSql }; dataSet1.Tables["车辆入出厂信息"].Clear(); selectccp.SourceDataTable = dataSet1.Tables["车辆入出厂信息"]; this.ExecuteQueryToDataTable(selectccp, CoreInvokeType.Internal); break; } } }
void ultraChart1_FillSceneGraph(object sender, Infragistics.UltraChart.Shared.Events.FillSceneGraphEventArgs e) { IAdvanceAxis xaxis = e.Grid["X"] as IAdvanceAxis; IAdvanceAxis yaxis = e.Grid["Y"] as IAdvanceAxis; if (xaxis == null) { return; } int xloc1 = (int)xaxis.MapMinimum; int xloc2 = (int)xaxis.MapMaximum; int yloc = (int)yaxis.Map(6); Box b = new Box(new Point(xloc1, yloc - 2), xloc2 - xloc1, 5, new LineStyle(LineCapStyle.NoAnchor, LineCapStyle.NoAnchor, LineDrawStyle.Solid)); b.PE.Fill = Color.LightGreen; b.Value = 6d; // has to be a double for the value b.Caps = PCaps.HitTest | PCaps.Skin | PCaps.Tooltip; b.Chart = e.ChartCore.ChartType; b.Layer = e.ChartCore.GetChartLayer(); b.Row = b.Column = -1; // have to set these to -1 e.SceneGraph.Add(b); }
protected void uwgProjects_PageIndexChanged(object sender, Infragistics.WebUI.UltraWebGrid.PageEventArgs e) { this.uwgProjects.DisplayLayout.Pager.CurrentPageIndex = e.NewPageIndex; PopulateDataset(); FormatGrid(); this.uwgProjects.DisplayLayout.ActiveRow = this.uwgProjects.Rows[0]; }
protected void wdtWeek_ValueChanged(object sender, Infragistics.WebUI.WebSchedule.WebDateChooser.WebDateChooserEventArgs e) { WyFirst = Schedule.GetWeekYear(DateTime.Parse(this.wdtWeek.Value.ToString())); WyLast = Schedule.GetWeekYearLast(WyFirst); BindGrid(); }
private void captionFont_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e) { if (e.Button.Key == "font") { if (captionFontDialog.ShowDialog() != DialogResult.Cancel) { _impostazioneReportDTO.LegendaUnitaCaptionFontName = captionFontDialog.Font.Name; _impostazioneReportDTO.LegendaUnitaCaptionFontSize = captionFontDialog.Font.Size; _impostazioneReportDTO.LegendaUnitaCaptionFontStyle = "regular"; if (captionFontDialog.Font.Bold) _impostazioneReportDTO.LegendaUnitaCaptionFontStyle = "bold"; else if (captionFontDialog.Font.Italic) _impostazioneReportDTO.LegendaUnitaCaptionFontStyle = "italic"; else if (captionFontDialog.Font.Underline) _impostazioneReportDTO.LegendaUnitaCaptionFontStyle = "underline"; else if (captionFontDialog.Font.Strikeout) _impostazioneReportDTO.LegendaUnitaCaptionFontStyle = "strikeout"; captionFont.Text = $"{captionFontDialog.Font.Name}; {captionFontDialog.Font.Size}; {captionFontDialog.Font.Style}"; } captionFontDialog.Dispose(); } }
void xamDataChart_PointerMoved(object sender, PointerRoutedEventArgs e, Infragistics.Controls.Charts.XamDataChart targetChart) { XamDataChart chart = sender as XamDataChart; if (chart == null) { return; } //System.Diagnostics.Debug.WriteLine(targetChart.GetHashCode().ToString() + " PointerMoved: " + e.GetCurrentPoint(null).Position.ToString()); chart = targetChart; foreach (var series in chart.Series) { var seriesPos = e.GetCurrentPoint(series).Position; //System.Diagnostics.Debug.WriteLine("TrySelectClosest: " + seriesPos.ToString()); if (seriesPos.X >= 0 && seriesPos.X < series.ActualWidth && (sender != targetChart || (seriesPos.Y >= 0 && seriesPos.Y < series.ActualHeight))) { SelectClosest( series, seriesPos); } } if (sender == targetChart) CategoryChart_PointerMoved(sender, e, targetChart); if (sender == targetChart) { this.NotifyOtherTracker(sender, e); } }
private void nomeFileEditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e) { if (e.Button.Key == "scelta") { if (openFileDialog1.ShowDialog() != DialogResult.Cancel) { nomeFile.Text = openFileDialog1.FileName; var documentMessages = _modelloLetteraService.SaveDocumento(nomeFile.Text); if (documentMessages.Documento != null) { _checksum = documentMessages.Documento.Checksum; if (ChecksumChanged != null) ChecksumChanged(this, EventArgs.Empty); } else CommonMessages.DisplayWarning(string.Format("Si è verificato un errore nel salvataggio del documento.{0}{1}", Environment.NewLine, documentMessages.Message)); } openFileDialog1.Dispose(); } else if (e.Button.Key == "apri") { if (!string.IsNullOrEmpty(_checksum)) { if (ApriModello != null) ApriModello(this, EventArgs.Empty); } } }
public void OnOtherTrackerNotify(object sender, PointerRoutedEventArgs e, Infragistics.Controls.Charts.XamDataChart targetChart) { if (sender == targetChart) return; this.xamDataChart_PointerMoved(sender, e, targetChart); }
private void ultraMonthViewSingle1_MoreActivityIndicatorClicked(object sender, Infragistics.Win.UltraWinSchedule.MoreActivityIndicatorClickedEventArgs e) { System.Text.StringBuilder builder = new StringBuilder(e.Day.Date.ToString("dd-MMM-yyyy")); builder.AppendLine(":"); foreach (Infragistics.Win.UltraWinSchedule.Appointment app in e.Day.Appointments.All) builder.AppendLine(app.Subject); MessageBox.Show(builder.ToString()); }
private void listaInitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e) { if ((string)e.Row.GetCellValue("Stato") == StatoFornitore.Obsoleto.ToString()) { e.Row.Appearance.BackColor = Color.Empty; e.Row.Appearance.ForeColor = Color.LightGray; } }
private void ChangePriceGrid_Click(object sender, Infragistics.Controls.Grids.CellClickedEventArgs e) { InstrumentForFloatingPLCalc instrumentForPL = e.Cell.Row.Data as InstrumentForFloatingPLCalc; this.InstrumentText.Text = instrumentForPL.InstrumentCode; this.BidText.Text = instrumentForPL.Bid; this.SpreadText.Text = instrumentForPL.SpreadPoint.ToString(); }
private void uGridBomDetail_ClickCell(object sender, Infragistics.Win.UltraWinGrid.ClickCellEventArgs e) { if (e.Cell.Row.Index < 0) return; uGridCurrentStock.DisplayLayout.Bands[0].ColumnFilters["FNumber"].FilterConditions.Clear(); uGridCurrentStock.DisplayLayout.Bands[0].ColumnFilters["FNumber"].FilterConditions.Add( FilterComparisionOperator.Contains, e.Cell.Row.Cells["cInvCode"].Value.ToString()); }
protected override void handleDataClicked(object sender, Infragistics.UltraChart.Shared.Events.ChartDataEventArgs e_) { var point = m_data.Points.First(x => e_.ColumnLabel.Equals(x.X.ToString()) && e_.RowLabel.Equals(x.Y.ToString())); if (point != null) point.Eval.Display(string.Format("{0} : {1} : {2}", point.X, point.Y, point.Eval.Name)); }
private void _dataGrid_EditModeEnding(object sender, Infragistics.Windows.DataPresenter.Events.EditModeEndingEventArgs e) { if (e.Cell.Field.Name != "AssemblyFile") return; var combo = (XamComboEditor)e.Editor; combo.SelectedItemChanged -= XamComboEditor_SelectedItemChanged; }
protected void uwgPhases_UpdateGrid(object sender, Infragistics.WebUI.UltraWebGrid.UpdateEventArgs e) { PopulateDataSource(); // UltraGridRow uwgRow = default(UltraGridRow); DataRow dtRow = default(DataRow); UltraGridRowsEnumerator updatedRows = default(UltraGridRowsEnumerator); // // Get Updated rows updatedRows = e.Grid.Bands[0].GetBatchUpdates(); // for each row in the Updated rows check if the current row is an addedrow, // if so create the row and add it to the dataset while (updatedRows.MoveNext()) { uwgRow = updatedRows.Current; int i = 0; if (uwgRow.DataChanged == DataChanged.Added) { dtRow = dtProjectStatus.NewRow(); for (i = 1; i <= uwgRow.Cells.Count - 1; i++) { if (uwgRow.Cells[i].Value == null) { dtRow[i] = DBNull.Value; } else { dtRow[i] = uwgRow.Cells[i].Value; } } dtProjectStatus.Rows.Add(dtRow); } else if (uwgRow.DataChanged == DataChanged.Modified) { dtRow = dtProjectStatus.Rows.Find(uwgRow.DataKey); if ((dtRow != null)) { for (i = 1; i <= uwgRow.Cells.Count - 1; i++) { if (uwgRow.Cells[i].Value == null) { dtRow[i] = DBNull.Value; } else { dtRow[i] = uwgRow.Cells[i].Value; } } } } } // // Now update database da.Update(dsProjectStatus.Tables["ProjectStatus"]); // Populate Grid DataBindGrid(); this.uwgProjectStatus.DisplayLayout.ActiveRow = this.uwgProjectStatus.Rows[0]; }
private void listaClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { if (e.Cell.Column.Key == "DeleteColumn") { var contratto = (ContrattoListaDTO)e.Cell.Row.ListObject; if (e.Cell.Row.Delete()) _contrattoService.Delete(contratto.ID.GetValueOrDefault()); } }
private void listaInitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e) { var condominio = e.Row.ListObject as CondominioDTO; if (condominio != null) { if (condominio.Deleted == "Y") e.Row.Appearance.ForeColor = Color.LightGray; } }
private void listaDoubleClickRow(object sender, Infragistics.Win.UltraWinGrid.DoubleClickRowEventArgs e) { var batchDTO = e.Row.ListObject as StampaBatchDTO; if(e.Row.ListObject != null && batchDTO != null) { var dto = batchDTO; getStampeBatchUIService().ShowElaborazione(dto.Key, dto.IdEsercizio, dto.DataSource, dto.Parameters); } }
private void uGridCustomer_DoubleClickCell(object sender, Infragistics.Win.UltraWinGrid.DoubleClickCellEventArgs e) { if (e.Cell.Row.Index < 0) return; CCusCode = e.Cell.Row.Cells["FNumber"].Value.ToString(); CCusName = e.Cell.Row.Cells["FName"].Value.ToString(); DialogResult = DialogResult.Yes; }