示例#1
0
        static DXPopupMenu ConstructMainMenu(DXMenuMain mainMenu, Object obj, ChartControl chartControl, Image legendImage, Image alignmentHorizontalImage, Image alignmentVerticalImage, Image directionImage, Image axisXImage, Image axisYImage)
        {
            DXPopupMenu extraMenu;

            if (obj is Legend)
            {
                extraMenu = new DXMenuLegend(chartControl, legendImage, alignmentHorizontalImage, alignmentVerticalImage, directionImage);
            }
            else if (obj is AxisXBase)
            {
                extraMenu = new DXMenuAxisX((AxisXBase)obj, axisXImage);
            }
            else if (obj is AxisYBase)
            {
                extraMenu = new DXMenuAxisY((AxisYBase)obj, axisXImage);
            }
            else
            {
                return(mainMenu);
            }
            for (int i = 0; i < extraMenu.Items.Count; i++)
            {
                if (i == 0)
                {
                    extraMenu.Items[i].BeginGroup = true;
                }
                mainMenu.Items.Add(extraMenu.Items[i]);
            }
            return(mainMenu);
        }
示例#2
0
 static DXPopupMenu ConstructMainMenu(DXMenuMain mainMenu, Object obj, ChartControl chartControl)
 {
     return(ConstructMainMenu(mainMenu, obj, chartControl, null, null, null, null, null, null));
 }