示例#1
0
        /// <summary>
        /// Makes a floating button invisible on stopwatch or timer page
        /// </summary>
        /// <param name="title">string</param>
        public void HideFloatingButton(string title)
        {
            floatingButton.Hide();
            if (title == "Alarm")
            {
#if ALARM_XAML
                floatingButton.FirstButton.Clicked -= mainTabbed.AlarmXaml_OnFloatingButtonClicked;
#else
                floatingButton.FirstButton.Clicked -= mainTabbed.Alarm_FloatingButton_Clicked;
#endif
            }
            else if (title == "World clock")
            {
                floatingButton.FirstButton.Clicked -= mainTabbed.WorldClock_FloatingButton_Clicked;
            }
        }
示例#2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="App"/> class.
        /// </summary>
        public App()
        {
#if ALARM_XAML
            InitializeComponent();
#endif
            // The root page of your application
            mainTabbed = new MainTabbedPage();
            MainPage   = new NavigationPage(mainTabbed);
            mainNavi   = MainPage as NavigationPage;

            // Create a FloatingButton
            FloatingButtonItem item = new FloatingButtonItem
            {
                Icon = "alarm/clock_floating_icon.png"
            };
            floatingButton = new FloatingButton
            {
                FirstButton = item
            };

            // By default, FloatingButton is shown when it's created and therefore it is needed to make it hidden.
            floatingButton.Hide();
        }