Esempio n. 1
0
        /**
         * 打开JSON View
         */
        private void showJSONItem_Click(object sender, EventArgs e)
        {
            if (String.IsNullOrEmpty(this.selectedJSONStr))
            {
                return;
            }

            string   hexStr   = this.selectedJSONStr.Replace(Global.JSON_TAG, String.Empty);
            int      index    = decodeJSONIndex(hexStr.Trim());
            JsonItem jsonItem = this.logFileItem.jsonList[index];

            if (jsonItem == null)
            {
                return;
            }

            if (null == this.oJsonViewForm || this.oJsonViewForm.IsDisposed)
            {
                this.oJsonViewForm = new JsonViewForm(jsonItem.Content);
            }

            this.oJsonViewForm.showJSONView(jsonItem.Content);
            this.oJsonViewForm.StartPosition = FormStartPosition.CenterScreen;
            this.oJsonViewForm.Show();
        }
Esempio n. 2
0
        /**
         * 打开JSON View
         */
        private void showJSONItem_Click(object sender, EventArgs e)
        {
            if(String.IsNullOrEmpty(this.selectedJSONStr))
            {
                return;
            }

            string hexStr = this.selectedJSONStr.Replace(Global.JSON_TAG, String.Empty);
            int index = decodeJSONIndex(hexStr.Trim());
            JsonItem jsonItem = this.logFileItem.jsonList[index];
            if (jsonItem == null)
            {
                return;
            }

            if (null == this.oJsonViewForm || this.oJsonViewForm.IsDisposed)
            {
                this.oJsonViewForm = new JsonViewForm(jsonItem.Content);
            }

            this.oJsonViewForm.showJSONView(jsonItem.Content);
            this.oJsonViewForm.StartPosition = FormStartPosition.CenterScreen;
            this.oJsonViewForm.Show();
        }