Esempio n. 1
0
        /// <summary>
        /// Opens the View for SetAlarm, either in New Alarm mode (default) or
        /// in Edit mode (if a BasicAlarm is passed).
        /// </summary>
        /// <param name="alarm">The alarm to edit. If null, then create a new alarm.</param>
        private void SetAlarmView(BasicAlarm alarm = null)
        {
            SetAlarm setAlarm;

            if (alarm == null)
            {
                // set new alarm
                setAlarm = new SetAlarm();
            }
            else
            {
                // edit alarm
                setAlarm = new SetAlarm(alarm);
            }
            Main.Children.Add(setAlarm);
        }
Esempio n. 2
0
        private void setAlarm_Click(object sender, RoutedEventArgs e)
        {
            SetAlarm newSA = new SetAlarm();

            (this.Parent as Panel).Children.Add(newSA);
        }