void ReleaseDesignerOutlets() { if (BottomConstraint != null) { BottomConstraint.Dispose(); BottomConstraint = null; } if (ChatEditMessage != null) { ChatEditMessage.Dispose(); ChatEditMessage = null; } if (ChatEditMessageContainer != null) { ChatEditMessageContainer.Dispose(); ChatEditMessageContainer = null; } if (ChatMessageWindow != null) { ChatMessageWindow.Dispose(); ChatMessageWindow = null; } if (ChatOneBack != null) { ChatOneBack.Dispose(); ChatOneBack = null; } if (ChatOneLeftConstraint != null) { ChatOneLeftConstraint.Dispose(); ChatOneLeftConstraint = null; } if (ChatOneRightConstraint != null) { ChatOneRightConstraint.Dispose(); ChatOneRightConstraint = null; } if (ChatSendMessage != null) { ChatSendMessage.Dispose(); ChatSendMessage = null; } if (ChatTargetImage != null) { ChatTargetImage.Dispose(); ChatTargetImage = null; } if (ChatViewProfile != null) { ChatViewProfile.Dispose(); ChatViewProfile = null; } if (MatchDate != null) { MatchDate.Dispose(); MatchDate = null; } if (MenuBlock != null) { MenuBlock.Dispose(); MenuBlock = null; } if (MenuContainer != null) { MenuContainer.Dispose(); MenuContainer = null; } if (MenuFriend != null) { MenuFriend.Dispose(); MenuFriend = null; } if (MenuIcon != null) { MenuIcon.Dispose(); MenuIcon = null; } if (MenuLayer != null) { MenuLayer.Dispose(); MenuLayer = null; } if (MenuLocationUpdates != null) { MenuLocationUpdates.Dispose(); MenuLocationUpdates = null; } if (MenuReport != null) { MenuReport.Dispose(); MenuReport = null; } if (MenuUnmatch != null) { MenuUnmatch.Dispose(); MenuUnmatch = null; } if (NoMessages != null) { NoMessages.Dispose(); NoMessages = null; } if (RoundBottom != null) { RoundBottom.Dispose(); RoundBottom = null; } if (Snackbar != null) { Snackbar.Dispose(); Snackbar = null; } if (SnackBottomConstraint != null) { SnackBottomConstraint.Dispose(); SnackBottomConstraint = null; } if (SnackTopConstraint != null) { SnackTopConstraint.Dispose(); SnackTopConstraint = null; } if (TargetName != null) { TargetName.Dispose(); TargetName = null; } if (UnmatchDate != null) { UnmatchDate.Dispose(); UnmatchDate = null; } }
public override void ViewDidLoad() { try { base.ViewDidLoad(); if (!foregroundNotificationSet) { UIApplication.Notifications.ObserveDidBecomeActive((sender, args) => { c.Log("Entered foreground, registering for notifications"); c.RequestNotification(); BaseActivity currentController = CommonMethods.GetCurrentViewController(); if (currentController is ChatOneActivity) { ((ChatOneActivity)currentController).SetMenu(); //needed in case location updates were running before backgrounding ((ChatOneActivity)currentController).RefreshPage(); } }); foregroundNotificationSet = true; } NoMessages.Text = LangEnglish.NoMessages; NoMessages.Hidden = true; c.DrawBorder(ChatEditMessage); c.AddViews(Snackbar, Snackbar.SnackText, Snackbar.SnackButton); MenuUnmatch.SetTitle(LangEnglish.MenuUnmatch, UIControlState.Normal); MenuBlock.SetTitle(LangEnglish.MenuBlock, UIControlState.Normal); MenuReport.SetTitle(LangEnglish.MenuReport, UIControlState.Normal); c.HideMenu(MenuLayer, MenuContainer, false); ChatMessageWindow.RowHeight = UITableView.AutomaticDimension; ChatMessageWindow.EstimatedRowHeight = 100; ChatOneBack.TouchUpInside += ChatOneBack_Click; ChatSendMessage.TouchUpInside += ChatSendMessage_Click; MenuIcon.TouchUpInside += MenuIcon_Click; MenuLayer.TouchDown += MenuLayer_TouchDown; MenuLocationUpdates.TouchUpInside += MenuLocationUpdates_Click; MenuFriend.TouchUpInside += MenuFriend_Click; MenuUnmatch.TouchUpInside += MenuUnmatch_Click; MenuReport.TouchUpInside += MenuReport_Click; MenuBlock.TouchUpInside += MenuBlock_Click; RoundBottom_Base = RoundBottom; Snackbar_Base = Snackbar; BottomConstraint_Base = BottomConstraint; SnackTopConstraint_Base = SnackTopConstraint; SnackBottomConstraint_Base = SnackBottomConstraint; ChatOneLeftConstraint_Base = ChatOneLeftConstraint; ChatOneRightConstraint_Base = ChatOneRightConstraint; ChatMessageWindow_Base = ChatMessageWindow; } catch (Exception ex) { c.ReportErrorSilent(ex.Message + Environment.NewLine + ex.StackTrace); } }