private void SwitchAccountItem() { ++Index_accountPageSwitch; Index_accountPageSwitch %= toggle_accountNumber; int temp = 0; for (int i = 0; i < view.accountPage.accountToggleList.Count; i++) { if (Index_accountPageSwitch == temp) { view.accountPage.accountToggleList[i].isOn = true; view.accountPage.accountTextList[i].color = new Color(1, 0, 0); curAccountItem = (SettingConfig.AccountPageItem)Index_accountPageSwitch; } else { view.accountPage.accountToggleList[i].isOn = false; view.accountPage.accountTextList[i].color = new Color(1, 1, 1); } ++temp; } }
/// <summary> /// 查账主页面选项切换 /// </summary> public void SwitchAccountItem() { ++cur_account_item; cur_account_item %= total_account_item; int temp = 0; foreach (Toggle tg in _View.accountPage.accountToggleList) { if (cur_account_item == temp) { tg.isOn = true; tg.transform.Find("Label").GetComponent <Text>().color = new Color(1, 0, 0); curAccountItem = (SettingConfig.AccountPageItem)cur_account_item; } else { tg.isOn = false; tg.transform.Find("Label").GetComponent <Text>().color = new Color(1, 1, 1); } ++temp; } }
/// <summary> /// 查账页面 A操作 /// </summary> private void OPAccountPage_A() { SettingConfig.AccountPageItem accountitem = ui.FindAccountItem(); switch (accountitem) { case SettingConfig.AccountPageItem.BusinessRecords: proxy.UpdateMonthData(SettingManager.Instance.GetMonthData()); break; case SettingConfig.AccountPageItem.TotalRecords: proxy.UpdateTotalData(SettingManager.Instance.TotalRecord()); break; case SettingConfig.AccountPageItem.DataReset: curPage = SettingConfig.Page.DataReset_Page; ui.AccountToDataReset(); break; case SettingConfig.AccountPageItem.Exit: curPage = SettingConfig.Page.HomePage; ui.AccountToHome(); break; } }