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


C# IApplication.RefreshWindow方法代码示例

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


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

示例1: AddFlagsForSewerProfile


//.........这里部分代码省略.........
                            stepProgressor.StepValue = 1;
                            stepProgressor.Message = A4LGSharedFunctions.Localizer.GetString("GeoNetToolsDesc_19a");

                            // Create the ProgressDialog. This automatically displays the dialog
                            progressDialog2 = (ESRI.ArcGIS.Framework.IProgressDialog2)stepProgressor; // Explict Cast

                            // Set the properties of the ProgressDialog
                            progressDialog2.CancelEnabled = true;
                            progressDialog2.Description = A4LGSharedFunctions.Localizer.GetString("GeoNetToolsDesc_19a");
                            progressDialog2.Title = A4LGSharedFunctions.Localizer.GetString("GeoNetToolsTitle_19a");
                            progressDialog2.Animation = ESRI.ArcGIS.Framework.esriProgressAnimationTypes.esriProgressSpiral;

                            // Step. Do your big process here.
                            System.Boolean boolean_Continue = false;
                            boolean_Continue = true;

                            stepProgressor.Step();

                            GeoNetTools.TracePath(new double[] { (pProfileElemFirst.Geometry as IPoint).X, (element.Geometry as IPoint).X },
                                new double[] { (pProfileElemFirst.Geometry as IPoint).Y, (element.Geometry as IPoint).Y },
                                ProfileGraph[i].Network_Name, app, pMxDoc.FocusMap, true, snapTol, true, out juncEIDs, out edgeEIDs, out gn);
                            boolean_Continue = trackCancel.Continue();
                            if (!boolean_Continue)
                            {
                                return;
                            }
                            stepProgressor.Step();
                            stepProgressor.Message = A4LGSharedFunctions.Localizer.GetString("GeoNetToolsProc_19a");
                            if (juncEIDs != null && edgeEIDs != null)
                            {
                                GeoNetTools.ProfileGetRelatedElevData(app, ProfileGraph, gn, edgeEIDs, juncEIDs, i, ref pManholeLayer, ref pMainLayer, ref pTapLayer);
                            }
                            else
                            {

                            }

                            //ProfileFindPath();

                            // unpress the UIToolControl button
                            app.CurrentTool = null;
                            app.RefreshWindow();
                            progressDialog2.HideDialog();
                            progressDialog2 = null;
                            return;
                        }

                    }
                    else//Next Layer in the config
                    {
                    }

                }

                MessageBox.Show(A4LGSharedFunctions.Localizer.GetString("GeoNetToolsError_19a"));

            }
            catch (Exception Ex)
            {
                MessageBox.Show(A4LGSharedFunctions.Localizer.GetString("ErrorInThe") + "AddFlagsForSewerProfile " + Ex.Message);
            }
            finally
            {
                if (pFeatCursor != null)
                {
                    Marshal.ReleaseComObject(pFeatCursor);

                }
                pMxDoc.ActiveView.Refresh();
                pFeatCursor = null;
                pMxDoc = null;

                pTracePoint = null;
                pSpatialFilter = null;
                // set the symbol for the flag, red circle
                pMarkerSym = null;
                pRGBColor = null;

                pManholeLayer = null;
                pMainLayer = null;
                pTapLayer = null;
                gc = null;

                pProfileElemFirst = null;
                pProfileElemPropFirst = null;

                element = null;
                elementProp = null;
                pTopoOp = null;

                pFeature = null;

                pBuffGeometry = null;
                markerelem = null;
                gn = null;

                juncEIDs = null;
                edgeEIDs = null;
            }
        }
开发者ID:rlwarford,项目名称:local-government-desktop-addins,代码行数:101,代码来源:GeoNetTools.cs

示例2: MoveConnectionsToNewLine


//.........这里部分代码省略.........
                    ////        }
                    ////        else
                    ////        {
                    ////            msg = msg + "\n" + A4LGSharedFunctions.Localizer.GetString("FeatureIn") + (pF.Class as IFeatureClass).AliasName + A4LGSharedFunctions.Localizer.GetString("WithOID") + pMoveFeat.OID + A4LGSharedFunctions.Localizer.GetString("GeoNetToolsError_13b");

                    ////        }
                    ////    }

                    ////    if (msg != "")
                    ////    {
                    ////        MessageBox.Show(msg);

                    ////    }
                    ////}
                    //INetworkFeature pNetworkTargetFeature = (INetworkFeature)pFeature;
                    // IFeatureLayer pTargetLayer = Globals.FindLayerByClassID(pMxDoc.FocusMap,pFeature.Class.CLSID.ToString()) as IFeatureLayer;

                    boolean_Continue = trackCancel.Continue();
                    if (!boolean_Continue)
                    {
                        return;
                    }
                    stepProgressor.Step();
                    stepProgressor.Message = A4LGSharedFunctions.Localizer.GetString("Complete");

                    try
                    {
                        Globals.RemoveTraceGraphics(pMxDoc.FocusMap, true);
                    }
                    catch
                    { }
                    // unpress the UIToolControl button
                    app.CurrentTool = null;
                    app.RefreshWindow();
                    pMxDoc.ActiveView.Refresh();
                    return;
                }
            }
            catch (Exception ex)
            {
                try
                {
                    editor.AbortOperation();

                }
                catch
                { }

                MessageBox.Show(A4LGSharedFunctions.Localizer.GetString("GeoNetToolsError_13c") + ex.Message);
                return;
            }
            finally
            {
                try
                {
                    editor.StopOperation(A4LGSharedFunctions.Localizer.GetString("GeoNetToolsDone_13a"));
                }
                catch
                { }

                if (progressDialog2 != null)
                    progressDialog2.HideDialog();
                progressDialog2 = null;
                pCmdItem = Globals.GetCommand("ArcGIS4LocalGovernment_AttributeAssistantSuspendOnCommand", app);
                if (pCmdItem != null)
                {
开发者ID:rlwarford,项目名称:local-government-desktop-addins,代码行数:67,代码来源:GeoNetTools.cs


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