Beispiel #1
0
        public static void Initialize()
        {
            if (init)
            {
                return;
            }

            init = true;

            rooms = ViewController.Client.Rooms;

            Avatar                 = new UIImageView();
            Avatar.Frame           = new CGRect(X + 4, Y, 64, 64);
            Avatar.BackgroundColor = UIColor.Clear;
            Avatar.Image           = ViewController.Client.Image;
            Avatar.ContentMode     = UIViewContentMode.ScaleAspectFit;

            AvatarFrame                 = new UIImageView();
            AvatarFrame.Frame           = new CGRect(X, Y - 10, C.X_MAX - 16, 74);
            AvatarFrame.BackgroundColor = UIColor.Clear;
            AvatarFrame.Image           = UIImage.FromBundle("avatar_frame");

            Username                 = new UITextView();
            Username.Frame           = new CGRect(C.X_MID - 64, Y - 16, 128, 32);
            Username.Text            = ViewController.Client.Username;
            Username.TextAlignment   = UITextAlignment.Center;
            Username.BackgroundColor = UIColor.Clear;
            Username.TextColor       = UIColor.White;
            Username.Font            = Fonts.Settings_Title;

            Bio                 = new UITextView();
            Bio.Frame           = new CGRect(C.X_MID - 96, Y + 8, 208, 56);
            Bio.Text            = ViewController.Client.Bio;
            Bio.TextAlignment   = UITextAlignment.Center;
            Bio.BackgroundColor = UIColor.Clear;
            Bio.TextColor       = UIColor.White;
            Bio.Font            = UIFont.SystemFontOfSize(8);

            Rooms = new SRButton(C.X_MID - 96, Y + 32, 128, 32, new Selector("ProfileRoomsFunc"));
            Rooms.SetText($"Classrooms: {ViewController.Client.Rooms.Count}");

            Grade                 = new UITextView();
            Grade.Frame           = new CGRect(C.X_MID, Y + 32, 128, 32);
            Grade.Text            = $"Grade: {ViewController.Client.Grade}";
            Grade.TextAlignment   = UITextAlignment.Center;
            Grade.BackgroundColor = UIColor.Clear;
            Grade.TextColor       = UIColor.White;
            Grade.Font            = UIFont.SystemFontOfSize(12);
        }
Beispiel #2
0
        public static void InitRooms()
        {
            RoomsInit = true;

            RoomsTitle                 = new UITextView();
            RoomsTitle.Text            = "Classrooms";
            RoomsTitle.Frame           = new CGRect(Access.vc.ViewWidth + C.X_MID - 64, 32, 128, 32);
            RoomsTitle.Font            = Fonts.Settings_Title;
            RoomsTitle.BackgroundColor = UIColor.Clear;
            RoomsTitle.Editable        = false;

            Back = new SRButton(0, 0, 32, 32, new Selector("RoomsBackToProfile"), "button_back");

            RoomsScrollView = new RoomsScrollView(rooms.Count);

            for (int i = 0; i < rooms.Count; i++)
            {
                new RoomListNode(rooms[i].Name, i).AddToSuperView(RoomsScrollView);
            }
        }
Beispiel #3
0
        public void Initialize()
        {
            Background       = new UIView();
            Background.Frame = new CGRect(0, Y, C.X_MAX, C.Y_MAX - 64);

            ImageView             = new UIImageView();
            ImageView.Image       = Image;
            ImageView.Frame       = new CGRect(C.X_MID - 128, Y, 64, 64);
            ImageView.ContentMode = UIViewContentMode.ScaleAspectFit;

            TitleView                 = new UITextView();
            TitleView.Frame           = new CGRect(C.X_MID - 64, Y, 128, 64);
            TitleView.Font            = Fonts.Settings_Title;
            TitleView.Text            = Name;
            TitleView.BackgroundColor = UIColor.Clear;
            TitleView.TextColor       = UIColor.White;

            DescView                 = new UITextView();
            DescView.Frame           = new CGRect(C.X_MID - 186, Y + 40, 368, 64);
            DescView.Font            = Fonts.Announcements_Text;
            DescView.Text            = Desc;
            DescView.BackgroundColor = UIColor.Clear;
            DescView.TextColor       = UIColor.White;
            DescView.TextAlignment   = UITextAlignment.Center;

            StudentsView                 = new UITextView();
            StudentsView.Frame           = new CGRect(C.X_MID + 64, Y, 128, 64);
            StudentsView.Font            = Fonts.Announcements_Text;
            StudentsView.Text            = $"Students: {StudentIds.Count}";
            StudentsView.BackgroundColor = UIColor.Clear;
            StudentsView.TextColor       = UIColor.White;

            MessageScroll       = new UIScrollView();
            MessageScroll.Frame = new CGRect(0, Y + 96, C.X_MAX, C.Y_MAX - 128);
            MessageScroll.DirectionalLockEnabled = true;
            MessageScroll.ScrollEnabled          = true;
            MessageScroll.Bounces = true;
            MessageScroll.AlwaysBounceVertical = true;

            Back = new SRButton(0, 0, 32, 32, new Selector("RoomBackToProfileRoomList"), "button_back");
        }
Beispiel #4
0
        void ReleaseDesignerOutlets()
        {
            if (ACButton != null)
            {
                ACButton.Dispose();
                ACButton = null;
            }

            if (ACModsView != null)
            {
                ACModsView.Dispose();
                ACModsView = null;
            }

            if (ACView != null)
            {
                ACView.Dispose();
                ACView = null;
            }

            if (ArmorButton != null)
            {
                ArmorButton.Dispose();
                ArmorButton = null;
            }

            if (DefensiveAbilitiesButton != null)
            {
                DefensiveAbilitiesButton.Dispose();
                DefensiveAbilitiesButton = null;
            }

            if (DeflectionButton != null)
            {
                DeflectionButton.Dispose();
                DeflectionButton = null;
            }

            if (DodgeButon != null)
            {
                DodgeButon.Dispose();
                DodgeButon = null;
            }

            if (DRButton != null)
            {
                DRButton.Dispose();
                DRButton = null;
            }

            if (FlatFootedButton != null)
            {
                FlatFootedButton.Dispose();
                FlatFootedButton = null;
            }

            if (FortButton != null)
            {
                FortButton.Dispose();
                FortButton = null;
            }

            if (HDButton != null)
            {
                HDButton.Dispose();
                HDButton = null;
            }

            if (HPButton != null)
            {
                HPButton.Dispose();
                HPButton = null;
            }

            if (HPModsButton != null)
            {
                HPModsButton.Dispose();
                HPModsButton = null;
            }

            if (HPView != null)
            {
                HPView.Dispose();
                HPView = null;
            }

            if (ImmuneButton != null)
            {
                ImmuneButton.Dispose();
                ImmuneButton = null;
            }

            if (NaturalButton != null)
            {
                NaturalButton.Dispose();
                NaturalButton = null;
            }

            if (OtherView != null)
            {
                OtherView.Dispose();
                OtherView = null;
            }

            if (RefButton != null)
            {
                RefButton.Dispose();
                RefButton = null;
            }

            if (ResistButton != null)
            {
                ResistButton.Dispose();
                ResistButton = null;
            }

            if (SavesView != null)
            {
                SavesView.Dispose();
                SavesView = null;
            }

            if (ShieldButton != null)
            {
                ShieldButton.Dispose();
                ShieldButton = null;
            }

            if (SRButton != null)
            {
                SRButton.Dispose();
                SRButton = null;
            }

            if (TouchButton != null)
            {
                TouchButton.Dispose();
                TouchButton = null;
            }

            if (WeaknessButton != null)
            {
                WeaknessButton.Dispose();
                WeaknessButton = null;
            }

            if (WillButton != null)
            {
                WillButton.Dispose();
                WillButton = null;
            }
        }