コード例 #1
0
            public InvokeHelper(RSSWeather rssWeather)
            {
                m_weather = rssWeather;

                CreateHandle();
                CreateControl();
            }
コード例 #2
0
        /// <summary>
        /// Occurs when this command is clicked
        /// </summary>
        public override void OnClick()
        {
            IBasicMap basicMap = null;

            if (m_hookHelper != null)
            {
                basicMap = m_hookHelper.FocusMap as IBasicMap;
            }
            else if (m_globeHookHelper != null)
            {
                basicMap = m_globeHookHelper.Globe as IBasicMap;
            }

            if (basicMap == null)
            {
                return;
            }

            try
            {
                if (!m_bConnected)
                {
                    m_rssWeather = new RSSWeather();
                    m_rssWeather.Init(basicMap);
                }
                else
                {
                    m_rssWeather.Remove();
                    m_rssWeather = null;
                }

                m_bConnected = !m_bConnected;
            }
            catch (Exception ex)
            {
                System.Diagnostics.Trace.WriteLine(ex.Message);
            }
        }
コード例 #3
0
      public InvokeHelper(RSSWeather rssWeather)
      {
        m_weather = rssWeather;

        CreateHandle();
        CreateControl();         
      }
コード例 #4
0
    /// <summary>
    /// Occurs when this command is clicked
    /// </summary>
    public override void OnClick()
    {
      IBasicMap basicMap = null;
      if (m_hookHelper != null)
      {
        basicMap = m_hookHelper.FocusMap as IBasicMap;
      }
      else if (m_globeHookHelper != null)
      {
        basicMap = m_globeHookHelper.Globe as IBasicMap;
      }

      if (basicMap == null)
        return;

      try
      {
        if (!m_bConnected)
        {
          m_rssWeather = new RSSWeather();
          m_rssWeather.Init(basicMap);
        }
        else
        {
          m_rssWeather.Remove();
          m_rssWeather = null;
        }

        m_bConnected = !m_bConnected;
      }
      catch (Exception ex)
      {
        System.Diagnostics.Trace.WriteLine(ex.Message);
      }
    }