Beispiel #1
0
 private void _expandPropertiesButton_Click(object sender, EventArgs e)
 {
     if ((this.Parent as DSDaggerUIGraph).ModalProperties && ((_dsfilternode._filter as IDMOWrapperFilter) == null))
     {
         try
         {
             PropertiesDialog pd = new PropertiesDialog(CaptionText, _dsfilternode._filter);
             SyncPinPropertyPages(pd.PropertyPagePanel);
             pd.ShowDialog(this.TopLevelControl);
             pd.Dispose();
             _dsfilternode.SyncPins();
             pd = null;
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message, "Error creating Proprty Page");
         }
     }
 }
Beispiel #2
0
        /// <summary>
        /// User has clicked on a pin properties menu item
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void tmi_Click(object sender, EventArgs e)
        {
            // if this pin implements ISpecifyPropertyPages, show that instead
            PropertiesDialog pd;
            IPin             pin = null;
            string           pinname;

            // get the DaggerPin
            DSOutputPin opin = (sender as ToolStripMenuItem).Tag as DSOutputPin;

            if (opin != null)
            {
                // it's an output pin
                pin     = opin._pin;
                pinname = opin.Name;
            }
            else
            {
                // it's an input pin
                pin     = ((sender as ToolStripMenuItem).Tag as DSInputPin)._pin;
                pinname = ((sender as ToolStripMenuItem).Tag as DSInputPin).Name;
            }

            ISpecifyPropertyPages proppage = pin as ISpecifyPropertyPages;
            bool displayed = false;

            if (proppage != null)
            {
                // display the pin's property pages
                displayed = DirectShowLib.Utils.FilterGraphTools.ShowPinFilterPropertyPage(pin, this.TopLevelControl.Handle, pinname);
            }

            // if ShowPinFilterPropertyPage failed, or there's no ISpecifyPropertyPages, show the default pin info
            if (!displayed)
            {
                pd = new PropertiesDialog(pinname, pin);
                pd.ShowDialog();
                pd.Dispose();
                pd = null;
            }
        }