예제 #1
0
        private void tvOutline_AfterSelect(object sender, TreeViewEventArgs e)
        {
            if (m_Filling)
            {
                return;
            }
            TreeNode node = tvOutline.SelectedNode;

            if (node == null)
            {
                return;
            }
            object selected = node.Tag;

            while (node.Parent != null)
            {
                node = node.Parent;
            }
            Page pageWithin = (Page)node.Tag;

            if (pageWithin != Globals.Root.CurrentPage)
            {
                RequestSelectPage?.Invoke(this, pageWithin);
            }
            if (selected is Page page)
            {
                txtInfo.Text   = Strings.Item("Info_PageBounds") + " " + GUIUtilities.RectangleToUserString(page.Bounds, page);
                txtInfo.Cursor = Cursors.Arrow;
            }
            if (!(selected is Shape))             // presumably the page itself was clicked on
            {
                return;
            }
            pageWithin.SelectOnly((Shape)selected);
        }
예제 #2
0
파일: Scriptable.cs 프로젝트: stuart2w/SAW
        public override string StatusInformation(bool ongoing)
        {
            StringBuilder output = new StringBuilder();

            if (!ongoing)
            {
                output.Append(Strings.Item("ID")).Append("=").Append(SAWID).Append("   ");
            }
            var b = Bounds;

            output.Append(GUIUtilities.RectangleToUserString(b, FindPage()));
            //output.Append(Strings.Item("SAW_Edit_Bounds")).Append("={").Append(b.Left.ToString("0")).Append(" ").Append(b.Top.ToString("0")).Append(" ").Append(b.Width.ToString("0")).Append(" ").Append(b.Height.ToString("0")).Append("}");
            if (Popup)
            {
                output.Append("  Is Popup");
            }
            return(output.ToString());
        }