//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- partial void ServerButtonTouch(UIButton sender) { DataManager.CurrentServer++; NSUserDefaults.StandardUserDefaults.SetInt(DataManager.CurrentServer, "CurrentServer"); NSUserDefaults.StandardUserDefaults.Synchronize(); ServerButton.SetTitle("Загрузка...", UIControlState.Normal); }
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- partial void ServerButton_TouchUpInside(UIButton sender) { DataManager.SwitchToNextServer(); Application.StoreValues(); ServerButton.SetTitle("Загрузка...", UIControlState.Normal); DataManager.ReconnectToServer(ChangeServerCallback); }
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- private void UpdateViewValues() { FilterTable.ReloadData(); int index = DataManager.nodesFilters.FindIndex((NodeFilter obj) => obj.group == DataManager.selectedNodesFilter); if (index >= 0) { FilterTable.SelectRow(NSIndexPath.FromRowSection(index, 0), false, UITableViewScrollPosition.Middle); } ServerButton.SetTitle(DataManager.ServerName, UIControlState.Normal); UserButton.SetTitle(DataManager.UserName, UIControlState.Normal); }
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- private void UpdateViewValues() { ServerButton.SetTitle(DataManager.ServerName, UIControlState.Normal); if (DataManager.ConnectState == ConnectStates.AuthPassed) { UserNameLabel.Text = DataManager.UserName; } else if (DataManager.ConnectState == ConnectStates.SocketConnected) { UserNameLabel.Text = "Нет авторизации"; } else { UserNameLabel.Text = "Нет связи"; } NotificationsFromHoursField.Text = DataManager.userSettings.notificationsFrom.Hour.ToString("D2"); NotificationsFromMinutesField.Text = DataManager.userSettings.notificationsFrom.Minute.ToString("D2"); NotificationsToHoursField.Text = DataManager.userSettings.notificationsTo.Hour.ToString("D2"); NotificationsToMinutesField.Text = DataManager.userSettings.notificationsTo.Minute.ToString("D2"); SendNodesOfflineNotificationsSwitch.SetState(DataManager.userSettings.sendNodesOfflineNotifications, false); }