public bool savefile()
        {
            var cof = new configClass();

            cof.DBaddress = this.DBaddress;
            cof.database  = this.database;
            cof.user      = this.user;
            cof.password  = this.password;

            cof.botname   = this.botname;
            cof.channelID = this.channelID.ToString();
            cof.token     = this.token;

            bool res = XmlFileIO.xmlSave(cof.GetType(), defaultXMLfile, cof);

            return(res);
        }
        public Configration(string filename = "config/config.xml", string filetype = "XML")
        {
            this.filename = filename;
            var    cof = new configClass();
            object cofObj;
            string nowFiletype = filetype;

            //bool isfileEnbale = false;

            if (XmlFileIO.isExist(filename) == false)
            {
                if (XmlFileIO.isExist(defaultXMLfile) == true)
                {
                    nowFiletype = "XML";
                }
                else
                {
                    logOutput.writeLog("設定ファイルが見つかりません。");
                    init();
                    return;
                }
            }

            if (nowFiletype == "TEXT")
            {
                configClass cofTmp;
                (cofTmp, this.isMigration) = setConfig(this.filename);

                if (cofTmp == null)  //読み込み失敗
                {
                    logOutput.writeLog("テキストの設定ファイルの読み込みに失敗しました。");
                    //init();
                }
                else
                {
                    //isfileEnbale = true;
                    setData(cofTmp);
                    savefile();
                    return;
                }
            }

            bool loaded = XmlFileIO.xmlLoad(cof.GetType(), defaultXMLfile, out cofObj);

            if (loaded == false || !(cofObj is configClass))
            {
                logOutput.writeLog("XML設定ファイルの読み込みに失敗しました。");
                init();
                return;
            }
            else
            {
                cof = cofObj as configClass;
                setData(cof);
                return;
            }

            //default
            //logOutput.writeLog("設定ファイルが見つかりません。");
            //init();
        }