Exemplo n.º 1
0
        public static PropertySheetForm Show(IUIObjectBasic Object, System.Windows.Forms.Form ParentForm)
        {
            PropertySheetForm PropertyForm;

            Debug.Assert(Object != null, "Cannot display properties for null object");
            if (Object == null)
                return null;

            //return PropertySheetForm.Show(Object.Row, ParentForm);
            if (ShownProperties.ContainsKey(Object))
            {
                PropertyForm = ShownProperties[Object] as PropertySheetForm;
                PropertyForm.Focus();
                return PropertyForm;
            }

            //If we aren't showing those properties, create a new property sheet and show it.
            PropertyForm = new PropertySheetForm(Object);

            ShownProperties.Add(Object, PropertyForm);

            PropertyForm.Show();

            return PropertyForm;
        }
Exemplo n.º 2
0
 public static System.Windows.Forms.DialogResult ShowDialog(IUIObjectBasic Object, System.Windows.Forms.Form ParentForm)
 {
     //If we aren't showing those properties, create a new property sheet and show it.
     using (PropertySheetForm PropertyForm = new PropertySheetForm(Object))
     {
         PropertyForm.Owner = ParentForm;
         return PropertyForm.ShowDialog();
     }
 }