Пример #1
0
        void ribbonServices_RibbonPaletteSetCreated(object sender, EventArgs e)
        {
            Autodesk.AutoCAD.Ribbon.RibbonPaletteSet pset = (Autodesk.AutoCAD.Ribbon.RibbonPaletteSet)sender;
            pset.RibbonControl.Loaded += ribbonControl_Loaded;

#if ACAD2015
            pset.WorkspaceUnloading += ribbonPaletteSet_WorkspaceUnloading;
#endif
        }
Пример #2
0
 void ribbonPaletteSet_WorkspaceLoaded(object sender, EventArgs e)
 {
     Autodesk.AutoCAD.Ribbon.RibbonPaletteSet pset = (Autodesk.AutoCAD.Ribbon.RibbonPaletteSet)sender;
     Initialize(_applications.First(x => x is Ribbons.ICmdRibbonPane));
     pset.WorkspaceLoaded -= ribbonPaletteSet_WorkspaceLoaded;
 }
Пример #3
0
// Добавил 07.08.15 не работал без акад 2015
#if ACAD2015
        void ribbonPaletteSet_WorkspaceUnloading(object sender, EventArgs e)
        {
            Autodesk.AutoCAD.Ribbon.RibbonPaletteSet pset = (Autodesk.AutoCAD.Ribbon.RibbonPaletteSet)sender;
            pset.WorkspaceLoaded += ribbonPaletteSet_WorkspaceLoaded;
        }