Example #1
0
        private void DialogMultichoiceClick(object sender, DialogMultiChoiceClickEventArgs e)
        {
            switch (e.Which)
            {
            case 0:     //0 is 'Blacklisted'
                if (e.IsChecked)
                {
                    levels |= LevelsOfAppBlocking.Blacklisted;
                }
                else
                {
                    levels &= ~LevelsOfAppBlocking.Blacklisted;
                }

                break;

            case 1:     //1 is 'Non allowed to turn on screen'
                if (e.IsChecked)
                {
                    levels |= LevelsOfAppBlocking.NonAllowedToTurnScreenOn;
                }
                else
                {
                    levels &= ~LevelsOfAppBlocking.NonAllowedToTurnScreenOn;
                }
                break;
            }
        }
Example #2
0
        private void DialogMultichoiceClick(object sender, DialogMultiChoiceClickEventArgs e)
        {
            switch (e.Which)
            {
            case 0:     //0 is 'Blacklisted'
                if (e.IsChecked)
                {
                    levels |= LevelsOfAppBlocking.Blacklisted;
                }
                else
                {
                    levels &= ~LevelsOfAppBlocking.Blacklisted;
                }

                break;

            case 1:     //1 is 'Only blocked in the app'
                if (e.IsChecked)
                {
                    levels |= LevelsOfAppBlocking.BlockInAppOnly;
                }
                else
                {
                    levels &= ~LevelsOfAppBlocking.BlockInAppOnly;
                }
                break;

            case 2:     //2 is Totally Blocked
                if (e.IsChecked)
                {
                    levels |= LevelsOfAppBlocking.NonAllowedToTurnScreenOn;
                }
                else
                {
                    levels &= ~LevelsOfAppBlocking.NonAllowedToTurnScreenOn;
                }
                break;
            }
        }