コード例 #1
0
        private void cmdAddNewPage(string arg)
        {
            if (templateDesigner.template == null)
                return;

            Page page = new Page();
            templateDesigner.AddPageDesignerForPage(page);
            templateDesigner.template.Pages.Add(page);
        }
コード例 #2
0
ファイル: TemplateDesigner.cs プロジェクト: fizikci/Cinar
        public void AddPageDesignerForPage(Page page)
        {
            page.ScaleFactor = this.ActivePage != null ? this.ActivePage.page.ScaleFactor : 1f;

            PageDesigner pd = new PageDesigner();
            pd.ClickToAdd = "None";
            pd.OnElementAdded = this.OnElementAdded;
            pd.OnSelectedElementChanged = this.OnSelectedElementChanged;
            pd.OnSelectedElementMoved = this.OnSelectedElementMoved;
            pd.OnSelectedElementResized = this.OnSelectedElementResized;
            pd.page = page;
            pd.Width = Convert.ToInt32(page.Width * page.ScaleFactor);
            pd.Height = Convert.ToInt32(page.Height * page.ScaleFactor);
            flowLayoutPanel.Controls.Add(pd);
            this.ActivePage = pd;
        }