Beispiel #1
0
        public void ShowWindow()
        {
            if (childWindow == null)
            {
                childWindow = SystemHandler.GeneralChildWindow.GetNewInstance();
            }
            childWindow.Caption = "Custom Item";
            //childWindow.Init("Artigo:", true, true, null, this);

            //
            // Construir menus da janela
            // 1. Botões
            var xternderMenuItems = new ExtenderMenuItems();
            var m = xternderMenuItems.Add("xAction1", "Acção 1");

            m.ActionType = ExtenderActionType.ExtenderActionPrimary;

            m            = xternderMenuItems.Add("xAction2", "Acção 2");
            m.ActionType = ExtenderActionType.ExtenderActionSecondary;

            //
            //2. Opções
            m            = xternderMenuItems.Add("xOpcoes", "Opções");
            m.GroupType  = ExtenderGroupType.ExtenderGroupTypeExtraOptions;
            m.BeginGroup = true;
            m.ChildItems.Add("xOpcoes1", "Opção 1");
            m.ChildItems.Add("xOpcoes2", "Opção 2");


            childWindow.Init("Artigo:", false, false, xternderMenuItems, this);

            //Translate to twips
            childWindow.SetClientArea(this.Width * 15, this.Height * 15);
            childWindow.CenterOnScreen();

            this.Visible = true;
            childWindow.Show();

            //Enable panel
            if (childWindow.EditState == EditStateType.esNull)
            {
                childWindow.EditState = EditStateType.esNew;
            }
        }