protected override string GetDefaultUrl(ISource source, IPageData pageData, OutputData outputData)
        {
            string  url     = string.Empty;
            KeyData keyData = outputData.Data.Convert <KeyData>();

            //string pageSource = pageData.SourceInfo.Source;
            switch (DestUrl)
            {
            case PageStyle.Custom:
                TkDebug.AssertNotNull(CustomUrl,
                                      "配置了DestUrl为Custom,却没有配置CustomUrl", this);
                url = Expression.Execute(CustomUrl, source);
                url = AppUtil.ResolveUrl(url);
                if (CustomUrl.UseKeyData)
                {
                    url = UriUtil.AppendQueryString(url, keyData.ToString());
                }
                break;

            case PageStyle.Insert:
            case PageStyle.Update:
            case PageStyle.Delete:
                url = WebUtil.GetTemplateUrl(DestUrl, pageData);
                url = UriUtil.AppendQueryString(url, keyData.ToString()).AppVirutalPath();
                break;

            case PageStyle.Detail:
            case PageStyle.List:
                string initValue = keyData.IsSingleValue ? keyData.SingleValue : string.Empty;
                url = WebUtil.GetTemplateUrl((PageStyleClass)string.Empty, pageData);
                url = UriUtil.AppendQueryString(url, "InitValue=" + initValue).AppVirutalPath();
                break;

            default:
                TkDebug.ThrowImpossibleCode(this);
                break;
            }

            return(url);
        }
Exemple #2
0
    public override string ToString()
    {
        var  sb      = new StringBuilder("E2EEPublicKey(");
        bool __first = true;

        if (__isset.version)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Version: ");
            Version.ToString(sb);
        }
        if (__isset.keyId)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("KeyId: ");
            KeyId.ToString(sb);
        }
        if (KeyData != null && __isset.keyData)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("KeyData: ");
            KeyData.ToString(sb);
        }
        if (__isset.createdTime)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("CreatedTime: ");
            CreatedTime.ToString(sb);
        }
        sb.Append(")");
        return(sb.ToString());
    }
        }//end Clone

        public override string ToString()
        {
            String sHotKey = "";

            if (KeyData.HasFlag(Keys.Control))
            {
                sHotKey += "Ctrl";
            }

            if (KeyData.HasFlag(Keys.Shift))
            {
                if (sHotKey.Length != 0)
                {
                    sHotKey += " + ";
                }
                sHotKey += "Shift";
            }//end if

            if (KeyData.HasFlag(Keys.Alt))
            {
                if (sHotKey.Length != 0)
                {
                    sHotKey += " + ";
                }
                sHotKey += "Alt";
            }//end if

            if (KeyData.HasFlag(Keys.LWin))
            {
                if (sHotKey.Length != 0)
                {
                    sHotKey += " + ";
                }
                sHotKey += "Win";
            }//end if

            if (sHotKey.Length != 0)
            {
                sHotKey += " + ";
            }

            sHotKey += KeyData.ToString().Substring(0, 1);

            return(sHotKey);
        }//end ToString
Exemple #4
0
 //-------------------------------------------------------------------------------
 /// <summary>
 /// コンストラクタ
 /// </summary>
 /// <param name="data">初期入力のKeyData</param>
 public KeyEditForm(KeyData data)
 {
     InitializeComponent();
     txtKey.Text = (data == null) ? "" : data.ToString();
     _keyData = data;
 }