示例#1
0
        private void Button_Click_ClearAllSpeeds(object sender, RoutedEventArgs e)
        {
            var nhmConfirmDialog = new CustomDialog()
            {
                Title       = Tr("Set default settings?"),
                Description = Tr("Are you sure you would like to clear all speeds for {0}?", _deviceData.Dev.FullName),
                OkText      = Tr("Yes"),
                CancelText  = Tr("No")
            };

            DeviceActionsButtonContext.IsOpen = false;
            nhmConfirmDialog.OKClick         += (s, e1) => { _deviceData.ClearAllSpeeds(); };
            CustomDialogManager.ShowModalDialog(nhmConfirmDialog);
        }
示例#2
0
        private void Button_Click_ClearAllSpeeds(object sender, RoutedEventArgs e)
        {
            TryCloseParentContextMenu();
            var nhmConfirmDialog = new CustomDialog()
            {
                Title            = Tr("Set default settings?"),
                Description      = Tr("Are you sure you would like to clear all speeds for {0}?", _deviceData.Dev.FullName),
                OkText           = Tr("Yes"),
                CancelText       = Tr("No"),
                AnimationVisible = Visibility.Collapsed
            };


            nhmConfirmDialog.OKClick += (s, e1) => { _deviceData.ClearAllSpeeds(); };
            CustomDialogManager.ShowModalDialog(nhmConfirmDialog);
        }