public TodoDetailsView(TodoItem model)
        {
            InitializeComponent();

            sts = new SendToServer(this);

            Title = "New Todo Item";

            if (model != null)
            {
                isNew  = false;
                _model = new TodoItem(model);
                Description_Editor.Text    = _model.Description;
                Title_Entry.Text           = _model.Title;
                DueDate_DatePicker.Date    = _model.DueDateTime.Date;
                DueDate_TimePicker.Time    = _model.DueDateTime.TimeOfDay;
                HasDueDateSwitch.IsToggled = _model.HasDueDate;

                ToolbarItems.Add(new ToolbarItem("Delete", "Trashcan_Icon", ToolbarItem_OnDelete, ToolbarItemOrder.Primary));
            }
            else
            {
                isNew = true;
                DueDate_DatePicker.Date = DateTime.Now.Date.AddDays(1);
                //DueDate_TimePicker.Time = DateTime.Now.TimeOfDay;
                DueDate_TimePicker.Time = new TimeSpan(0, 0, 0); //12:00AM next day
            }
        }
Beispiel #2
0
        public cs441_projectPage()
        {
            NavigationPage.SetHasNavigationBar(this, false);             //remove navigation bar for sign in page
            InitializeComponent();

            sts = new SendToServer(this);
        }
Beispiel #3
0
        public InvitePage()
        {
            InitializeComponent();

            sts = new SendToServer(this);

            Title = "Invite";
        }
        public JoinClassroomPage()
        {
            InitializeComponent();

            sts = new SendToServer(this);

            Title = "Join Classroom";
        }
Beispiel #5
0
        public NewAccountPage()
        {
            InitializeComponent();

            sts = new SendToServer(this);

            thisPage = this;

            Title = "New Account";
        }
Beispiel #6
0
        public HomePage()
        {
            InitializeComponent();
            ClassroomListView.ItemsSource = _ClassroomListViewItems;

            sts = new SendToServer(this);

            ToolbarItems.Add(new ToolbarItem("Join", "Enter_Icon", ToolbarItem_OnJoin, ToolbarItemOrder.Primary));
            ToolbarItems.Add(new ToolbarItem("Create", "Add_Icon", ToolbarItem_OnCreate, ToolbarItemOrder.Primary));
        }
Beispiel #7
0
        public testPage3(TabbedPage containerPage)
        {
            InitializeComponent();

            sts            = new SendToServer(this);
            _ContainerPage = containerPage;

            ChatroomListView.ItemsSource = _ChatroomListViewItems;

            ToolbarItems.Add(new ToolbarItem("New Chatroom", "Add_Icon.png", ToolbarItem_OnNew, ToolbarItemOrder.Primary));
        }
        public NewChatroomPage()
        {
            InitializeComponent();

            sts = new SendToServer(this);

            Title = "New Chatroom";

            MemberIds = new List <string>();

            UsersListView.ItemsSource = _UsersListViewItems;
        }
Beispiel #9
0
        public InnerChatroomPage(ChatroomItem chatroom)
        {
            InitializeComponent();

            sts = new SendToServer(this);

            this.chatroom = chatroom;

            Title = "Messages";

            ChatroomMessagesListView.ItemsSource = _ChatroomMessagesListViewItems;

            ChatroomMessagesListView.HeightRequest = App.Current.MainPage.Height - 200;
        }
Beispiel #10
0
        public UsersPage(TabbedPage containerPage)
        {
            InitializeComponent();

            sts = new SendToServer(this);

            _ContainerPage = containerPage;

            UsersListView.ItemsSource = _UsersListViewItems;

            if (App.userEmail.ToLower() == App.curClassroom.OwnerEmail.ToLower())
            {
                ToolbarItems.Add(new ToolbarItem("Invite", "Invite_Icon.png", ToolbarItem_OnInvite, ToolbarItemOrder.Primary));
            }
        }
Beispiel #11
0
        public testPage1(TabbedPage containerPage)
        {
            InitializeComponent();

            sts = new SendToServer(this);

            _ContainerPage = containerPage;

            if (App.curClassroom.OwnerEmail == App.userEmail)
            {
                isOwner = true;
            }

            ForumListView.ItemsSource = _ForumListViewItems;

            ToolbarItems.Add(new ToolbarItem("New", "Add_Icon.png", ToolbarItem_OnAdd, ToolbarItemOrder.Primary));
        }
        public InnerForumThreadPage(ForumThreadItem forumThread)
        {
            InitializeComponent();

            sts = new SendToServer(this);

            if (forumThread == null) //should not be null
            {
                Navigation.PopAsync();
            }

            _forumThread = forumThread;

            Title = "Thread Posts";

            ForumPostsListView.ItemsSource = _ForumPostsListViewItems;

            ToolbarItems.Add(new ToolbarItem("New", "Add_Icon.png", ToolbarItem_OnAdd, ToolbarItemOrder.Primary));
        }
Beispiel #13
0
        public testPage2(TabbedPage containerPage)
        {
            InitializeComponent();

            BindingContext = this;

            sts = new SendToServer(this);

            _ContainerPage = containerPage;

            if (App.curClassroom.OwnerEmail.ToLower() == App.userEmail.ToLower())
            {
                isOwner = true;
            }

            TodoListView.ItemsSource = _TodoListViewItems;

            if (isOwner)
            {
                ToolbarItems.Add(new ToolbarItem("New", "Add_Icon.png", ToolbarItem_OnAdd, ToolbarItemOrder.Primary));
            }
        }
Beispiel #14
0
        public ClassroomDetailsPage(ClassroomInfoItem classroom)
        {
            InitializeComponent();

            sts = new SendToServer(this);

            Title = "Classroom Details";

            if (classroom != null)
            {
                isNew                   = false;
                this.classroom          = classroom;
                Description_Editor.Text = classroom.Description;
                Title_Entry.Text        = classroom.Title;

                //ToolbarItems.Add(new ToolbarItem("Delete", "Trashcan_Icon", ToolbarItem_OnDelete, ToolbarItemOrder.Primary));
            }
            else
            {
                isNew = true;
            }
        }
        public ForumPostDetailsPage(ForumThreadItem thread, ForumPostItem post)
        {
            InitializeComponent();

            sts = new SendToServer(this);

            if (thread == null)
            {
                isNewThread = true;
                Title       = "Create Thread";
            }
            else
            {
                isNewThread      = false;
                this.thread      = thread;
                Title_Entry.Text = thread.Title;
                if (post == null)
                {
                    isNewPost = true;
                    Title     = "Create Post";
                    Title_StackLayout.IsVisible = false;
                }
                else
                {
                    isNewPost = false;
                    this.post = post;
                    Description_Editor.Text = post.Content;
                    Title = "Edit Post";
                    if (!post.isFirstPost || App.curClassroom.curUserIsOwner)
                    {
                        ToolbarItems.Add(new ToolbarItem("Delete", "Trashcan_Icon", ToolbarItem_OnDelete, ToolbarItemOrder.Primary));
                    }
                    if (!post.isFirstPost)
                    {
                        Title_StackLayout.IsVisible = false;
                    }
                }
            }
        }