private void StyleEditor_ContentRendered(object sender, EventArgs e) { try { Styles = new List <StyleToBind>(); GetSylesFromFiles(); TvStyles.ItemsSource = Styles; } catch (Exception exception) { MpExWin.Show(exception); } }
public static void RemoveRibbon() { try { if (IsLoaded()) { var ribCntrl = ComponentManager.Ribbon; foreach (var tab in ribCntrl.Tabs.Where( tab => tab.Id.Equals("ModPlus_ESKD") & tab.Title.Equals("ModPlus ЕСКД"))) { ribCntrl.Tabs.Remove(tab); AcApp.SystemVariableChanged -= acadApp_SystemVariableChanged; break; } } } catch (Exception exception) { MpExWin.Show(exception); } }
private static void CreateRibbon() { try { var ribCntrl = ComponentManager.Ribbon; // add the tab var ribTab = new RibbonTab { Title = "ModPlus ЕСКД", Id = "ModPlus_ESKD" }; ribCntrl.Tabs.Add(ribTab); // add content AddPanels(ribTab); // add settings panel AddSettingsPanel(ribTab); //////////////////////// ribCntrl.UpdateLayout(); } catch (Exception exception) { MpExWin.Show(exception); } }