Skip to content

Commit

Permalink
Update Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ricaun committed Aug 9, 2022
1 parent a1dad4e commit 17b49a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,11 @@ Autodesk.Windows.RibbonTab awRibbonTab = ribbonPanel.GetRibbonTab();
Autodesk.Windows.RibbonTab awRibbonTab = RibbonTabExtension.GetRibbonTab("TabId");
IList<Autodesk.Windows.RibbonTab> awRibbonTabs = RibbonTabExtension.GetRibbonTabs();
```
The method `SetOrderPanels` allow reorder the `RibbonPanel` in the `RibbonTab` UI.
The method `SetPanelsOrderBy` and `SetPanelsOrderByTitle` allow reorder the `RibbonPanel` in the `RibbonTab` UI.
```C#
Autodesk.Windows.RibbonTab awRibbonTab = ribbonPanel.GetRibbonTab();
awRibbonTab.SetOrderPanels();
awRibbonTab.SetPanelsOrderBy(e => e.Source.Title);
awRibbonTab.SetPanelsOrderByTitle();
```
The method `Remove` allow to remove the `RibbonTab` from `Autodesk.Windows` UI.
```C#
Expand Down
16 changes: 0 additions & 16 deletions ricaun.Revit.UI/RibbonTabExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,22 +101,6 @@ public static Autodesk.Windows.RibbonTab SetPanelsOrderByTitle(this Autodesk.Win
public static void SetOrderPanels(this Autodesk.Windows.RibbonTab ribbonTab)
{
ribbonTab.SetPanelsOrderByTitle();
//var length = ribbonTab.Panels.Count;
//if (length <= 1) return;

//var order = ribbonTab.Panels.OrderBy(e => ComparationOrderByTitle(e)).ToList();
//for (int i = 0; i < length; i++)
//{
// var o = order[i];
// for (int j = i; j < length; j++)
// {
// if (j == i) continue;
// if (o == ribbonTab.Panels[j])
// {
// ribbonTab.Panels.Move(j, i);
// }
// }
//}
}

private static string ComparationOrderByTitle(Autodesk.Windows.RibbonPanel ribbonPanel)
Expand Down

0 comments on commit 17b49a8

Please sign in to comment.