/// <summary>
 /// Sets the layer transparency.
 /// </summary>
 private void SetLayerTransparency()
 {
     try
     {
         ILayerEffects layerEffects = this.m_pLayer as ILayerEffects;
         string        s            = this.zoomTrackBarControl1.EditValue.ToString();
         layerEffects.Transparency = short.Parse(s);
         IViewRefresh viewRefresh = this.m_pMap as IViewRefresh;
         viewRefresh.RefreshItem(this.m_pLayer);
     }
     catch (Exception ex)
     {
         //this.m_logger.Log(LogLevel.Error, EventType.UserManagement, this.Text, ex);
         Log.WriteLog(typeof(frmLayerTransparency), ex);
     }
 }
        private void RefreshGraphicObject(IElement elem, IAGAnimationContainer pContainer)
        {
            IActiveView view    = pContainer.CurrentView as IActiveView;
            IEnvelope   elemEnv = GetElementBound(elem, pContainer);

            IEnvelope           oldEnv     = new EnvelopeClass();
            IElementProperties2 elemProps2 = (IElementProperties2)elem;

            oldEnv = (IEnvelope)elemProps2.CustomProperty;

            IViewRefresh animRefresh = (IViewRefresh)view;

            if (oldEnv != null)
            {
                elemEnv.Union(oldEnv);
            }

            animRefresh.AnimationRefresh(esriViewDrawPhase.esriViewGraphics, elem, elemEnv);
        }
Esempio n. 3
0
 /// <summary>
 /// Called when the user clicks a command.
 /// </summary>
 /// <remarks>Note to inheritors: override OnClick and use this method to
 ///             perform the actual work of the custom command.</remarks>
 public override void OnClick()
 {
     if (this.m_currentLayer != null)
     {
         try
         {
             frmLayerRender frmLayerRender = new frmLayerRender(this.m_currentLayer);
             if (frmLayerRender.ShowDialog() != System.Windows.Forms.DialogResult.Cancel)
             {
                 GFS.BLL.EnviVars.instance.TOCControl.Update();
                 IViewRefresh viewRefresh = this.m_hookHelper.FocusMap as IViewRefresh;
                 viewRefresh.RefreshItem(this.m_currentLayer);
                 this.m_hookHelper.ActiveView.Refresh();
             }
         }
         catch (Exception ex)
         {
             XtraMessageBox.Show("渲染图层出错!原因如下:" + "\r\n" + ex.Message, "提示信息", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Asterisk);
             GFS.BLL.Log.WriteLog(typeof(CmdRendererLayer), ex);
         }
     }
 }