protected virtual void OnDialogClosed(DialogClosedEventArgs e) { if (this.DialogClosed != null) { this.DialogClosed(this, e); } }
private void Doc_File_Browser_DialogClosed(object sender, Telerik.WinControls.UI.DialogClosedEventArgs e) { lbl_file_format.Text = ""; lbl_file_size.Text = ""; if (e.DialogResult == DialogResult.OK) { FileInfo file = new FileInfo(Doc_File_Browser.Value); if (file.Length <= 2097153) { string[] sizes = { "B", "KB", "MB", "GB", "TB" }; int order = 0; double len = file.Length; while (len >= 1024 && order < sizes.Length - 1) { order++; len = len / 1024; } lbl_file_size.Text = String.Format("{0:00.##} {1}", len, sizes[order]); lbl_file_format.Text = file.Extension.Replace(".", ""); } else { Doc_File_Browser.Value = null; RadMessageBox.Instance.FormElement.TitleBar.Font = new Font("Tahoma", 9f, FontStyle.Bold); RadMessageBox.Instance.Controls["radLabel1"].Font = new Font("Tahoma", 8.5f, FontStyle.Regular); RadMessageBox.Instance.ThemeName = "Fluent"; RadMessageBox.Show(this, "\n" + "آپلود فایل های بیشتر از 2 مگابایت مجاز نیست." + "\n", "پیغام", MessageBoxButtons.OK, RadMessageIcon.Error, MessageBoxDefaultButton.Button1, RightToLeft.Yes); } } else { Doc_File_Browser.Value = null; } }
void PropertyGridBrowseEditor_DialogClosed(object sender, DialogClosedEventArgs e) { PropertyGridItemElement visualItem = this.OwnerElement as PropertyGridItemElement; if (visualItem != null && visualItem.IsInValidState(true)) { visualItem.PropertyTableElement.EndEdit(); } }
protected virtual void OnDialogClosed(DialogClosedEventArgs e) { DialogClosedEventHandler dialogClosed = this.DialogClosed; if (dialogClosed == null) { return; } dialogClosed((object)this, e); }
private void PropertyGridColorEditor_DialogClosed(object sender, DialogClosedEventArgs e) { PropertyGridItemElement ownerElement = this.OwnerElement as PropertyGridItemElement; if (ownerElement == null || !ownerElement.IsInValidState(true)) { return; } ownerElement.PropertyTableElement.EndEdit(); }
private void editorElement_DialogClosed(object sender, DialogClosedEventArgs e) { RadColorPickerEditorElement editorElement = this.EditorElement as RadColorPickerEditorElement; editorElement.DialogClosed -= new DialogClosedEventHandler(this.editorElement_DialogClosed); DataFilterCriteriaElement ownerElement = this.OwnerElement as DataFilterCriteriaElement; if (ownerElement == null) { return; } ownerElement.CriteriaNode.DescriptorValue = (object)editorElement.Value; ownerElement.Synchronize(); ownerElement.InvalidateMeasure(true); ownerElement.UpdateLayout(); ownerElement.TreeViewElement.UpdateScrollersOnNodesNeeded(ownerElement.Data); }
private void editorElement_DialogClosed(object sender, DialogClosedEventArgs e) { (this.EditorElement as RadBrowseEditorElement).Focus(); }