当前位置: 首页>>代码示例>>C#>>正文


C# Window.Expand方法代码示例

本文整理汇总了C#中Window.Expand方法的典型用法代码示例。如果您正苦于以下问题:C# Window.Expand方法的具体用法?C# Window.Expand怎么用?C# Window.Expand使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Window的用法示例。


在下文中一共展示了Window.Expand方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: FindIntersections

        /// <summary>
        /// Detects intersections
        /// </summary>
        /// <param name="index">The spatial index to search</param>
        private void FindIntersections(ISpatialIndex index)
        {
            // Get the window of the candidate object and add on a 2mm buffer (on the ground). This is
            // intended to help cover the fact that some circular arcs may be inaccurate by that much.
            Window searchwin = new Window(m_Geom.Extent);
            ILength dim = new Length(0.002);
            searchwin.Expand(dim);

            index.QueryWindow(searchwin, SpatialType.Line, OnQueryHit);
            m_Result.TrimExcess();
        }
开发者ID:steve-stanton,项目名称:backsight,代码行数:15,代码来源:FindIntersectionsQuery.cs

示例2: ZoomIn

 internal bool ZoomIn(double factor)
 {
     Window extent = new Window(m_MapPanelExtent);
     extent.Expand(-factor);
     SetNewWindow(extent, true);
     return true;
 }
开发者ID:steve-stanton,项目名称:backsight,代码行数:7,代码来源:MapControl.cs

示例3: ZoomOut

        internal bool ZoomOut(double factor)
        {
            // Expand the current draw window by 20% all the way round
            Window extent = new Window(m_MapPanelExtent);
            extent.Expand(factor);

            // Never allow expansion beyond the overview scale (restrict
            // to the area of common overlap)
            extent = new Window(extent, m_OverviewExtent);
            SetNewWindow(extent, true);
            return true;
        }
开发者ID:steve-stanton,项目名称:backsight,代码行数:12,代码来源:MapControl.cs

示例4: ShowCheck

        int ShowCheck(int index, bool advanceOnFix)
        {
            // Get the check object.
            CheckItem check = m_Cmd.GetResult(index);
            if (check==null)
                return -1;

            // If auto-advance is allowed, and the check has been fixed, keep going until
            // we find something that hasn't been fixed.
            int nShow = index;
            if (advanceOnFix)
            {
                while (check.Types==CheckType.Null)
                {
                    nShow++;
                    if (nShow >= m_nTotal)
                        return nShow;

                    check = m_Cmd.GetResult(nShow);
                    if (check==null)
                        return -1;
                }
            }

            // If there is even more, ensure the OK button says "Next".
            // Otherwise display "Finish" or "ReCheck" depending on
            // whether any edits have been performed.
            if ((nShow+1) == m_nTotal)
            {
                if (m_IsEdited)
                    okButton.Text = "Re-Chec&k";
                else
                    okButton.Text = "&Finish";
            }
            else
                okButton.Text = "&Next";

            // Enable the "Back" button if we're now beyond the 1st item.
            previousButton.Enabled = (nShow>0);

            // Display current sequence
            statusGroupBox.Text = String.Format("{0} of {1}", nShow+1, m_nTotal);

            // Get the check to provide an explanation.
            string msg = (check==null ? "sync lost" : check.Explanation);

            // Get a position for the check. If we can't get one, append a note to the explanation.
            IPosition pos = check.Position;
            if (pos==null)
                msg += " (cannot re-locate the problem)";

            explanationLabel.Text = msg;

            // Return if we did not get a position for the check, ensuring that this
            // focus is with THIS dialog.
            if (pos==null)
            {
                this.Focus();
                return nShow;
            }

            // Get the current draw window, and shrink it by 10% all the way round.
            ISpatialDisplay display = EditingController.Current.ActiveDisplay;
            Window win = new Window(display.Extent);
            win.Expand(-0.1);

            // If necessary, re-center the draw on the position we've got.
            if (!win.IsOverlap(pos))
                display.Center = pos;

            // Select the object involved, so long as it hasn't been de-activated (selecting
            // the object will highlight it and shift the focus to the main map window).
            if (check.Types != CheckType.Null)
                check.Select();

            // Return the index of the check that was actually shown.
            return nShow;
        }
开发者ID:steve-stanton,项目名称:backsight,代码行数:78,代码来源:CheckReviewForm.cs


注:本文中的Window.Expand方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。