﻿/******************************************************************************
 プロジェクト: loxXmlUtils
 ライセンス: MIT License (http://opensource.org/licenses/mit-license.php)
   http://sourceforge.jp/projects/opensource/wiki/licenses%2FMIT_license
 *****************************************************************************/
/******************************************************************************
 Copyright (c) 2012-2015 synctam

 Permission is hereby granted, free of charge, to any person obtaining a copy of
 this software and associated documentation files (the "Software"), to deal in
 the Software without restriction, including without limitation the rights to
 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
 of the Software, and to permit persons to whom the Software is furnished to do
 so, subject to the following conditions:

 The above copyright notice and this permission notice shall be included in all
 copies or substantial portions of the Software.

 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
 FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
 COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 *****************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace loxXmlUtils
{
    public class TJxDlgItems
    {
        protected string FCategory1 = null;
        public string Category1 { get { return this.FCategory1; } set { this.FCategory1 = value; } }

        protected string FCategory2 = null;
        public string Category2 { get { return this.FCategory2; } set { this.FCategory2 = value; } }

        private string FSpeaker = null;
        public string Speaker { get { return this.FSpeaker; } set { this.FSpeaker = value; } }

        private string FText = null;
        public string Text { get { return this.FText; } set { this.FText = value; } }



        public override string ToString()
        {
            StringBuilder msg = new StringBuilder(1024);

            msg.Append(
                string.Format(
                "Category1={0} Category2={1} Speaker={2} english={3}",
                this.Category1, this.Category2, this.Speaker, this.Text)
             );

            return msg.ToString();

        }

        public  Dictionary<string, string> ToDictionary()
        {
            Dictionary<string, string> dict = new Dictionary<string, string>();
            dict.Add("Category1", this.Category1);
            dict.Add("Category2", this.Category2);
            dict.Add("Speaker", this.Speaker);
            dict.Add("Text", this.Text);

            return dict;
        }
    }
}
