예제 #1
0
        /// <summary>
        /// WorldExPotisionオブジェクトを文字列型に変換する
        /// </summary>
        /// <param name="context"></param>
        /// <param name="culture"></param>
        /// <param name="value"></param>
        /// <param name="destinationType"></param>
        /// <returns></returns>
        public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
        {
            if (destinationType == typeof(string) && value is WorldExPotision)
            {
                WorldExPotision pos = (WorldExPotision)value;
                return(pos.ToString());
            }

            return(base.ConvertTo(context, culture, value, destinationType));
        }
예제 #2
0
        /// <summary>
        /// オブジェクト内容ををKAG属性としてとして出力する
        /// </summary>
        /// <returns></returns>
        public virtual string ToKagTagAttr()
        {
            string attr = "";

            if (m_type != "")
            {
                attr += String.Format("type=\"{0}\" ", m_type);
            }
            if (m_opacity.ToString() != "")
            {
                attr += String.Format("opacity={0} ", m_opacity);
            }
            if (m_rotate.ToString() != "")
            {
                attr += String.Format("rotate={0} ", m_rotate);
            }
            if (m_zoom.ToString() != "")
            {
                attr += String.Format("zoom={0} ", m_zoom);
            }
            if (m_afx.ToString() != "")
            {
                attr += String.Format("afx={0} ", m_afx);
            }
            if (m_afy.ToString() != "")
            {
                attr += String.Format("afy={0} ", m_afy);
            }
            if (m_reset != "")
            {
                attr += String.Format("reset ");
            }
            if (m_xpos.ToString() != "")
            {
                attr += String.Format("xpos={0} ", m_xpos);
            }
            if (m_ypos.ToString() != "")
            {
                attr += String.Format("ypos={0} ", m_ypos);
            }
            if (m_time != "")
            {
                attr += String.Format("time={0} ", m_time);
            }

            if (m_accel != "")
            {
                attr += String.Format("accel={0} ", m_accel);
            }
            if (m_action != "")
            {
                attr += String.Format("action=\"{0}\" ", m_action);
            }
            if (m_trans != "")
            {
                attr += String.Format("trans=\"{0}\" ", m_trans);
            }
            if (m_stopaction != "")
            {
                attr += String.Format("stopaction ");
            }
            if (m_stoptrans != "")
            {
                attr += String.Format("stoptrans ");
            }
            if (m_sync != "")
            {
                attr += String.Format("sync ");
            }
            if (m_nosync != "")
            {
                attr += String.Format("nosync ");
            }
            if (m_nowait != "")
            {
                attr += String.Format("nowait ");
            }
            if (m_fade != "")
            {
                attr += String.Format("fade ");
            }
            if (m_visible != "")
            {
                attr += String.Format("visible={0} ", m_visible);
            }
            if (m_show != "")
            {
                attr += String.Format("show ");
            }
            if (m_hide != "")
            {
                attr += String.Format("hide ");
            }
            if (m_grayscale != "")
            {
                attr += String.Format("grayscale={0} ", m_grayscale);
            }
            if (m_rgamma != "")
            {
                attr += String.Format("rgamma={0} ", m_rgamma);
            }
            if (m_ggamma != "")
            {
                attr += String.Format("ggamma={0} ", m_ggamma);
            }
            if (m_bgamma != "")
            {
                attr += String.Format("bgamma={0} ", m_bgamma);
            }
            if (m_resetcolor != "")
            {
                attr += String.Format("resetcolor ");
            }

            return(attr);
        }