private void SwitchDataRestItem() { ++Index_dataResetPageSwitch; Index_dataResetPageSwitch %= toggle_dataResetNumber; int temp = 0; for (int i = 0; i < view.dataRestPage.datarestToggleList.Count; i++) { if (Index_dataResetPageSwitch == temp) { view.dataRestPage.datarestToggleList[i].isOn = true; view.dataRestPage.datarestTextList[i].color = new Color(1, 0, 0); curDataResetItem = (SettingConfig.DataResetItem)Index_dataResetPageSwitch; } else { view.dataRestPage.datarestToggleList[i].isOn = false; view.dataRestPage.datarestTextList[i].color = new Color(1, 1, 1); } ++temp; } }
/// <summary> /// 查账数据清零选项切换 /// </summary> public void SwitchDataRestItem() { ++cur_rest_item; cur_rest_item %= total_rest_item; int temp = 0; foreach (Toggle tg in _View.dataRestPage.datarestToggleList) { if (cur_rest_item == temp) { tg.isOn = true; tg.transform.Find("Label").GetComponent <Text>().color = new Color(1, 0, 0); curDataResetItem = (SettingConfig.DataResetItem)cur_rest_item; } else { tg.isOn = false; tg.transform.Find("Label").GetComponent <Text>().color = new Color(1, 1, 1); } ++temp; } }
private SettingConfig.HomePageItem curHomeItem; // #region Private Function /// <summary> /// 处理后台A按钮操作 /// </summary> private void OnButtonA() { switch (curPage) { case SettingConfig.Page.HomePage: OPHomePage_A(); break; case SettingConfig.Page.SettingPage: OPSetPage_A(); break; case SettingConfig.Page.AccountPage: OPAccountPage_A(); break; case SettingConfig.Page.BusinessRecord_Page: curPage = SettingConfig.Page.AccountPage; ui.BusinessToAccount(); break; case SettingConfig.Page.DataReset_Page: SettingConfig.DataResetItem dataresetitem = ui.FindDataResetItem(); if (dataresetitem == SettingConfig.DataResetItem.Yes) { proxy.ClearAccount(); } curPage = SettingConfig.Page.AccountPage; ui.DataResetToAccount(); break; case SettingConfig.Page.TotalRecord_Page: curPage = SettingConfig.Page.AccountPage; ui.TotalRecordToAccount(); break; } }