/// <summary> /// Singleton instance /// </summary> public static GroundLineGripPointOverrule Instance() { if (_instance != null) { return(_instance); } _instance = new GroundLineGripPointOverrule(); // Фильтр "отлова" примитива по расширенным данным. Работает лучше, чем проверка вручную! _instance.SetXDataFilter(GroundLine.GetDescriptor().Name); return(_instance); }
/// <summary> /// Панель "Линии" /// </summary> private static void AddLinesPanel(RibbonTab ribbonTab) { // create the panel source var ribSourcePanel = new RibbonPanelSource { Title = Language.GetItem("tab1") }; // now the panel var ribPanel = new RibbonPanel { Source = ribSourcePanel }; ribbonTab.Panels.Add(ribPanel); var ribRowPanel = new RibbonRowPanel(); // mpBreakLine ribRowPanel.Items.Add(GetBigSplitButton(BreakLine.GetDescriptor())); // mpWeldJoint ribRowPanel.Items.Add(GetBigSplitButton(WeldJoint.GetDescriptor())); if (ribRowPanel.Items.Any()) { ribSourcePanel.Items.Add(ribRowPanel); } ribRowPanel = new RibbonRowPanel(); // mpGroundLine ribRowPanel.Items.Add(GetSmallSplitButton(GroundLine.GetDescriptor())); ribRowPanel.Items.Add(new RibbonRowBreak()); // mpWaterProofing ribRowPanel.Items.Add(GetSmallSplitButton(WaterProofing.GetDescriptor())); if (ribRowPanel.Items.Any()) { ribSourcePanel.Items.Add(ribRowPanel); } }
/// <inheritdoc /> public override bool IsApplicable(RXObject overruledSubject) { return(ExtendedDataUtils.IsApplicable(overruledSubject, GroundLine.GetDescriptor().Name)); }