Example #1
0
        private void Zoom(float ratio /*int cWidth, int cHeight*/)
        {
            if (ratio > 3.0f)
            {
                ratio = 3.0f;
            }
            else if (ratio < 0.3f)
            {
                ratio = 0.3f;
            }

            this.Ratio = ratio;

            int v = (int)(this.Ratio * 100);

            this.comboBox.Text = v.ToString() + "%";

            PageNode pageNode = GetPageNode();

            pageNode.SetRatio(this.Ratio);

            RefreshThisTabPage(this.Ratio);

            this.hRuler.Zoom(this.Ratio);
            this.vRuler.Zoom(this.Ratio);
        }
Example #2
0
        public STTabPage(PageNode pageNode)
            : base()
        {
            InitControl();

            this.Text = pageNode.Text;
            this.Tag  = pageNode;

            this.Ratio     = 1.0f;
            this.CtrlPress = false;

            this.comboBox.SelectedText = "100%";
            //pageNode.DrawAt(null, this.Ratio);
            pageNode.SetRatio(this.Ratio);

            AddSTPage(new STPage(pageNode, this.Ratio));
        }