Generic interface viewer from a type
Inheritance: System.Windows.Forms.UserControl
 private void btnDispatch_Click(object sender, EventArgs e)
 {
     Control frm = new TypedObjectViewer(m_objName, m_pEntry, COMUtilities.GetDispatchTypeInfo(m_pObject)); ;
     if ((frm != null) && !frm.IsDisposed)
     {
         Program.GetMainForm().HostControl(frm);
     }
 }
Beispiel #2
0
        private void btnDispatch_Click(object sender, EventArgs e)
        {
            Control frm = new TypedObjectViewer(m_registry, m_objName, m_pEntry, COMUtilities.GetDispatchTypeInfo(m_pObject));;

            if ((frm != null) && !frm.IsDisposed)
            {
                Program.GetMainForm().HostControl(frm);
            }
        }
 private void btnDispatch_Click(object sender, EventArgs e)
 {
     DockContent frm = new TypedObjectViewer(m_objName, m_pObject, COMUtilities.GetDispatchTypeInfo(m_pObject)); ;
     if ((frm != null) && !frm.IsDisposed)
     {
         frm.ShowHint = DockState.Document;
         frm.Show(this.DockPanel);
     }
 }
        private void btnDispatch_Click(object sender, EventArgs e)
        {
            Type disp_type = COMUtilities.GetDispatchTypeInfo(this, m_pObject);

            if (disp_type != null)
            {
                Control frm = new TypedObjectViewer(m_registry, m_objName, m_pEntry, disp_type);
                if ((frm != null) && !frm.IsDisposed)
                {
                    EntryPoint.GetMainForm(m_registry).HostControl(frm);
                }
            }
        }
        private void OpenObject(ListView lv)
        {
            if (lv.SelectedItems.Count > 0)
            {
                ListViewItem item = lv.SelectedItems[0];
                if (item.Tag is PropertyInfo)
                {
                    PropertyInfo pi = (PropertyInfo)item.Tag;
                    object val = null;

                    try
                    {
                        if (pi.CanRead)
                        {
                            val = pi.GetValue(m_pObject, null);
                        }
                    }
                    catch (Exception ex)
                    {
                        System.Diagnostics.Debug.WriteLine(ex.ToString());
                        val = null;
                    }

                    if (val != null)
                    {
                        TypedObjectViewer view = new TypedObjectViewer(m_objName, val, pi.PropertyType);
                        view.ShowHint = DockState.Document;
                        view.Show(this.DockPanel);
                    }
                }
            }
        }
Beispiel #6
0
 public ConsoleTextWriter(TypedObjectViewer control, bool error)
 {
     _builder = new StringBuilder();
     _control = control;
     _error   = error;
 }
 public ConsoleTextWriter(TypedObjectViewer control, bool error)
 {
     _builder = new StringBuilder();
     _control = control;
     _error = error;
 }