Beispiel #1
0
        private static void ReflushSetting(MenuFull_ButtonGroup menu)
        {
            String json = JsonConvert.SerializeObject(menu);
            SettingFile st = Config.PluginAttr.Settings;

            json = json.Replace(",\"sub_button\":null", "")
                .Replace(",\"url\":null", "")
                .Replace(",\"key\":null", "")
                .Replace("\"type\":null,","");

            st["Weixin_MenuButtons"] = json;
            st.Flush();

            Variables.MenuButtons = json;
            _buttonGroup = menu;
        }
Beispiel #2
0
 private static MenuFull_ButtonGroup GetButtonGroup()
 {
     if (_buttonGroup == null)
     {
         String menus = Variables.MenuButtons;
         _buttonGroup = JsonConvert.DeserializeObject<MenuFull_ButtonGroup>(menus);
     }
     return _buttonGroup;
 }