コード例 #1
0
        void OnJoinClicked( )
        {
            // launch the join group UI
            GroupFinderJoinViewController joinController = new GroupFinderJoinViewController();

            // set the group info
            MobileAppApi.GroupSearchResult currGroup = GroupEntry;
            joinController.GroupTitle  = currGroup.Name;
            joinController.MeetingTime = string.IsNullOrEmpty(currGroup.MeetingTime) == false ? currGroup.MeetingTime : ConnectStrings.GroupFinder_ContactForTime;
            joinController.GroupID     = currGroup.Id;

            joinController.Distance = string.Format("{0:##.0} {1}", currGroup.DistanceFromSource, ConnectStrings.GroupFinder_MilesSuffix);

            /*if ( row == 0 )
             * {
             *  joinController.Distance += " " + ConnectStrings.GroupFinder_ClosestTag;
             * }*/

            // launch the view
            Task.PerformSegue(this, joinController);
        }
コード例 #2
0
        public void RowButtonClicked( int row )
        {
            // create the view controller
            GroupFinderJoinViewController joinController = new GroupFinderJoinViewController();

            // set the group info
            GroupFinder.GroupEntry currGroup = GroupEntries[ row ];
            joinController.GroupTitle = currGroup.Title;
            joinController.MeetingTime = string.IsNullOrEmpty( currGroup.MeetingTime ) == false ? currGroup.MeetingTime : ConnectStrings.GroupFinder_ContactForTime;
            joinController.GroupID = currGroup.Id;

            joinController.Distance = string.Format( "{0:##.0} {1}", currGroup.Distance, ConnectStrings.GroupFinder_MilesSuffix );
            if ( row == 0 )
            {
                joinController.Distance += " " + ConnectStrings.GroupFinder_ClosestTag;
            }

            // launch the view
            Task.PerformSegue( this, joinController );
        }