Ejemplo n.º 1
0
        public override async void ActivateItem()
        {
            GuiBuilderWindow w = (GuiBuilderWindow)CurrentNode.GetParentDataItem(typeof(GuiBuilderWindow), false);

            if (w != null)
            {
                if (w.SourceCodeFile == FilePath.Null && !w.BindToClass())
                {
                    return;
                }

                Document doc = await IdeApp.Workbench.OpenDocument(w.SourceCodeFile, null, true);

                if (doc != null)
                {
                    GuiBuilderView view = doc.GetContent <GuiBuilderView> ();
                    if (view != null)
                    {
                        view.ShowActionDesignerView(((Stetic.ActionGroupInfo)CurrentNode.DataItem).Name);
                    }
                }
            }
            else
            {
                Project project = (Project)CurrentNode.GetParentDataItem(typeof(Project), false);
                Stetic.ActionGroupInfo group = (Stetic.ActionGroupInfo)CurrentNode.DataItem;
                await GuiBuilderService.OpenActionGroup(project, group);
            }
        }
Ejemplo n.º 2
0
        public override async void ActivateItem()
        {
            GuiBuilderWindow w = (GuiBuilderWindow)CurrentNode.DataItem;

            if (w.SourceCodeFile == FilePath.Null && !w.BindToClass())
            {
                return;
            }

            Document doc = await IdeApp.Workbench.OpenDocument(w.SourceCodeFile, true);

            if (doc != null)
            {
                GuiBuilderView view = doc.GetContent <GuiBuilderView> ();
                if (view != null)
                {
                    view.ShowDesignerView();
                }
            }
        }