コード例 #1
0
ファイル: rootPage.cs プロジェクト: yingy996/SEBTender
        public rootPage(bool isUserLoggedIn)
        {
            if (isUserLoggedIn)
            {
                //set the menu list items for logged in user
                menuData data = new menuData(true);
                menuPage = new menuPage();
                menuPage.menu.ItemsSource = data;

                Master = menuPage;
                //var displayPage = new tenderEligiblePage();
                var displayPage = new tenderPage();
                //var displayPage = new accountRegistrationPage();
                Detail = new NavigationPage(displayPage);

                menuPage.menu.ItemSelected += onItemSelected;
            }
            else
            {
                //Admin is logged in
                //set the menu list items for logged in admin
                menuData data = new menuData(false);
                menuPage = new menuPage();
                menuPage.menu.ItemsSource = data;

                Master = menuPage;
                var displayPage = new announcementPage();
                Detail = new NavigationPage(displayPage);

                menuPage.menu.ItemSelected += onItemSelected;
            }
        }
コード例 #2
0
ファイル: filterPage.xaml.cs プロジェクト: yingy996/SEBTender
        public filterPage(List <string> originatingSources, tenderPage atenderPage, List <string> currentFilter)
        {
            InitializeComponent();
            tenderPage = atenderPage;

            //Set whether the filter options should be toggled or not toggled
            foreach (string source in originatingSources)
            {
                if (currentFilter.Contains(source))
                {
                    filterList[source] = true;
                }
                else
                {
                    filterList[source] = false;
                }
            }
            if (currentFilter.Count() == originatingSources.Count())
            {
                //Set "All" switch to true if all the filter is selected
                isSourceToggled     = true;
                allSwitch.IsToggled = true;
                isSourceToggled     = false;
            }
            else
            {
                isSourceToggled     = true;
                allSwitch.IsToggled = false;
                isSourceToggled     = false;
            }
            listView.ItemsSource = filterList;
        }
コード例 #3
0
ファイル: rootPage.cs プロジェクト: josephsim/SEBTender
        public rootPage()
        {
            menuPage = new menuPage();
            Master   = menuPage;
            var displayPage = new tenderPage();

            Detail = new NavigationPage(displayPage);

            menuPage.menu.ItemSelected += onItemSelected;
        }
コード例 #4
0
ファイル: sortPage.xaml.cs プロジェクト: yingy996/SEBTender
        public sortPage(tenderPage atenderPage)
        {
            InitializeComponent();
            List <string> sortList = new List <string>();

            sortList.Add("Closing date");
            sortList.Add("Originating source");
            sortPicker.ItemsSource = sortList;

            tenderPage = atenderPage;
        }