private void ClearControls() { ////================Clear basic props====================== BasicVisibilityEditor.SetControlledObject(null); BasicPositionEditor.SetControlledObject(null); BasicColorEditor.SetControlledObject(null); BasicMiscEditor.SetControlledObject(null); ////================Clear effects====================== EffectsSpeedEditor.SetControlledObject(null); EffectsShadowEditor.SetControlledObject(null); EffectsBlurEditor.SetControlledObject(null); EffectsGlowEditor.SetControlledObject(null); //================Clear text====================== TextContEditor.SetControlledObject(null); TextColorEditor.SetControlledObject(null); TextOutlineEditor.SetControlledObject(null); TextFontEditor.SetControlledObject(null); //================Clear graphics====================== GraphicsShapeEditor.SetControlledObject(null); GraphicsColorEditor.SetControlledObject(null); GraphicsOutlineEditor.SetControlledObject(null); // //================Clear ticker====================== TickerNewContentEditor.SetControlledObject(null); TickerShapeEditor.SetControlledObject(null); TickerColorEditor.SetControlledObject(null); TickerOutlineEditor.SetControlledObject(null); TickerPropsEditor.SetControlledObject(null); TickerTextColorEditor.SetControlledObject(null); TickerTextOutlineEditor.SetControlledObject(null); TickerTextFontEditor.SetControlledObject(null); ////================Clear Image====================== ImageEditor.SetControlledObject(null); ////================Clear Falsh====================== FlashEditor.SetControlledObject(null); ////================================================= /// // ribbon1.ResumeUpdating(true); }
public void RibbonSetControlledObject(CGBaseItem cgItem) { try { m_BaseItem = cgItem; if (m_BaseItem != null) { BasicVisibilityEditor.SetControlledObject(cgItem); BasicVisibilityEditor.SetEditor(m_Editor); BasicPositionEditor.SetControlledObject(cgItem); BasicPositionEditor.SetEditor(m_Editor); BasicColorEditor.SetControlledObject(cgItem); BasicColorEditor.SetEditor(m_Editor); BasicMiscEditor.SetControlledObject(cgItem); BasicMiscEditor.SetEditor(m_Editor); EffectsSpeedEditor.SetControlledObject(cgItem); EffectsSpeedEditor.SetEditor(m_Editor); EffectsShadowEditor.SetControlledObject(cgItem); EffectsShadowEditor.SetEditor(m_Editor); EffectsBlurEditor.SetControlledObject(cgItem); EffectsBlurEditor.SetEditor(m_Editor); EffectsGlowEditor.SetControlledObject(cgItem); EffectsGlowEditor.SetEditor(m_Editor); if (m_BaseItem is CGTextItem || m_BaseItem is CGTickerLine) { TextContEditor.SetControlledObject(cgItem); TextContEditor.SetEditor(m_Editor); TextColorEditor.SetControlledObject(cgItem); TextColorEditor.SetEditor(m_Editor); TextOutlineEditor.SetControlledObject(cgItem); TextOutlineEditor.SetEditor(m_Editor); TextFontEditor.SetControlledObject(cgItem); TextFontEditor.SetEditor(m_Editor); ShowTab(PageText); } if (m_BaseItem is CGGraphicsItem) { GraphicsShapeEditor.SetControlledObject(cgItem); GraphicsShapeEditor.SetEditor(m_Editor); GraphicsColorEditor.SetControlledObject(cgItem); GraphicsColorEditor.SetEditor(m_Editor); GraphicsOutlineEditor.SetControlledObject(cgItem); GraphicsOutlineEditor.SetEditor(m_Editor); ShowTab(PageGraphics); } if (m_BaseItem is CGTickerItem) { TickerNewContentEditor.SetControlledObject(cgItem); TickerNewContentEditor.SetEditor(m_Editor); TickerPropsEditor.SetControlledObject(cgItem); TickerPropsEditor.SetEditor(m_Editor); TickerShapeEditor.SetControlledObject(cgItem); TickerShapeEditor.SetEditor(m_Editor); TickerColorEditor.SetControlledObject(cgItem); TickerColorEditor.SetEditor(m_Editor); TickerOutlineEditor.SetControlledObject(cgItem); TickerOutlineEditor.SetEditor(m_Editor); TickerTextColorEditor.SetControlledObject(cgItem); TickerTextColorEditor.SetEditor(m_Editor); TickerTextOutlineEditor.SetControlledObject(cgItem); TickerTextOutlineEditor.SetEditor(m_Editor); TickerTextFontEditor.SetControlledObject(cgItem); TickerTextFontEditor.SetEditor(m_Editor); ShowTab(PageTickerContent); } if (m_BaseItem is CGImageItem) { ImageEditor.SetControlledObject(cgItem); ImageEditor.SetEditor(m_Editor); ShowTab(PageImage); } if (m_BaseItem is CGVideoItem) { openVideoEditor1.SetControlledObject(cgItem); openVideoEditor1.SetEditor(m_Editor); ShowTab(PageVideo); } if (m_BaseItem is CGFlashItem) { FlashEditor.SetControlledObject(cgItem); FlashEditor.SetEditor(m_Editor); ShowTab(PageFlash); } } else { ClearControls(); HideTabs(); } } catch (System.Exception) { } }