コード例 #1
0
 protected virtual void OnDialogClosed(DialogClosedEventArgs e)
 {
     if (this.DialogClosed != null)
     {
         this.DialogClosed(this, e);
     }
 }
コード例 #2
0
 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;
     }
 }
コード例 #3
0
        void PropertyGridBrowseEditor_DialogClosed(object sender, DialogClosedEventArgs e)
        {
            PropertyGridItemElement visualItem = this.OwnerElement as PropertyGridItemElement;

            if (visualItem != null && visualItem.IsInValidState(true))
            {
                visualItem.PropertyTableElement.EndEdit();
            }
        }
コード例 #4
0
        protected virtual void OnDialogClosed(DialogClosedEventArgs e)
        {
            DialogClosedEventHandler dialogClosed = this.DialogClosed;

            if (dialogClosed == null)
            {
                return;
            }
            dialogClosed((object)this, e);
        }
コード例 #5
0
        private void PropertyGridColorEditor_DialogClosed(object sender, DialogClosedEventArgs e)
        {
            PropertyGridItemElement ownerElement = this.OwnerElement as PropertyGridItemElement;

            if (ownerElement == null || !ownerElement.IsInValidState(true))
            {
                return;
            }
            ownerElement.PropertyTableElement.EndEdit();
        }
コード例 #6
0
        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);
        }
コード例 #7
0
 private void editorElement_DialogClosed(object sender, DialogClosedEventArgs e)
 {
     (this.EditorElement as RadBrowseEditorElement).Focus();
 }