}//左键选择,暂时取消 private async void GridView_RightTapped(object sender, RightTappedRoutedEventArgs e) { var Info = (e.OriginalSource as FrameworkElement)?.DataContext as ViewDevModel; DeviceModel DataInfo = ModelConverter.ViewToData(Info); ContentDialog detail_dialog = new ContentDialog() { Title = DataInfo.Type + "设备详情:", Content = "设备地址:" + DataInfo.IPAddress + ":" + DataInfo.NetPort, PrimaryButtonText = "发送命令", SecondaryButtonText = "删除设备", CloseButtonText = "返回", FullSizeDesired = true, }; ContentDialogResult Reslut = await detail_dialog.ShowAsync(); if (Reslut == ContentDialogResult.Primary) { if (DataInfo.IPAddress == "Zigbee设备")//关闭串口服务 { WriteCmdByte(new byte[] { 0x02 }); //SendCmd(Convert.ToInt16("9003"), "0000+B"); } else { if (FanFlag == false) { SendCmd(Convert.ToInt16(DataInfo.NetPort), "0000+A"); FanFlag = true; } else { SendCmd(Convert.ToInt16(DataInfo.NetPort), "0000+B"); FanFlag = false; } } //SendCmd(DataInfo.NetPort, "这是一条测试信息/"); } if (Reslut == ContentDialogResult.Secondary) { if (DataInfo.IPAddress == "Zigbee设备")//关闭串口服务 { try { CancelReadTask(); CloseDevice(); ListAvailablePorts(); } catch (Exception) { } btnAddZigBee.IsEnabled = true; } DisposeLine(DataInfo.NetPort);//移除监听服务 for (int i = 0; i < Obj.Count; i++) { if (Obj[i].NetPort == DataInfo.NetPort) { Obj.Remove(Obj[i]); } } gridView.Items.Remove(Info); DevicesMethod.UpdateDevices(Obj); } }//右键选择
private void paginaReceita_RightTapped(object sender, RightTappedRoutedEventArgs e) { lateralMenu.Visibility = lateralMenu.Visibility == Visibility.Visible ? Visibility.Collapsed : Visibility.Visible; }
private void RightTap_Rotate(object sender, RightTappedRoutedEventArgs e) { Data.Rotation(sender, e); }
private void FamilyList_RightTap(object sender, RightTappedRoutedEventArgs e) { FamilyListMethod(e.OriginalSource as Image); }
private void test(object sender, RightTappedRoutedEventArgs e) { Process.Start(e.Handled.ToString()); }
private void UIElement_OnRightTapped(object sender, RightTappedRoutedEventArgs e) { ImageSaveFlyout.ShowAt(sender as FrameworkElement); }
/// <summary> /// Selects the tapped order. /// </summary> private void DataGrid_RightTapped(object sender, RightTappedRoutedEventArgs e) => ViewModel.SelectedOrder = (e.OriginalSource as FrameworkElement).DataContext as Order;
private void StackPanel_RightTapped(object sender, RightTappedRoutedEventArgs e) { this.itemFlyout.ShowAt((UIElement)sender, e.GetPosition((UIElement)sender)); }
private void StatusLabel_RightTapped(object sender, RightTappedRoutedEventArgs e) { FlyoutBase.ShowAttachedFlyout(StatusLabel); e.Handled = true; }
public void AgendaDate_RightTapped(object sender, RightTappedRoutedEventArgs e) { SelectedAgendaDate = ((FrameworkElement)e.OriginalSource).DataContext as AgendaDates; FillAgendaItemByAgendaDate(SelectedAgendaDate); }
private void ConnectionItemWrapper_OnRightTapped(object sender, RightTappedRoutedEventArgs e) { FlyoutBase.ShowAttachedFlyout((FrameworkElement)sender); }
private void _img_RightTapped(object sender, RightTappedRoutedEventArgs e) { // Todo:增加图片另存为功能 }
private void CommunityItemPhotoImage_RightTapped(object sender, RightTappedRoutedEventArgs e) { Debug.WriteLine("RightTapped"); savePic(); }
private void UserControl_RightTapped(object sender, RightTappedRoutedEventArgs e) { FlyoutBase.ShowAttachedFlyout((FrameworkElement)sender); }
private void NotebookPanel_RightTapped(object sender, RightTappedRoutedEventArgs e) { FlyoutBase.ShowAttachedFlyout(sender as FrameworkElement); }
private void YearLabel_RightTapped(object sender, RightTappedRoutedEventArgs e) { FlyoutBase.ShowAttachedFlyout(YearFiltersMenuTextBlock); e.Handled = true; }
private void OpenBackgroundFlyout(object sender, RightTappedRoutedEventArgs e) { var s = (FrameworkElement)sender; BackgroundFlyout.ShowAt(s, e.GetPosition(s)); }
private void BindableGridControl_RightTapped(object sender, RightTappedRoutedEventArgs e) { e.Handled = true; m_ViewModel.IsMultipleSelect = !m_ViewModel.IsMultipleSelect; }
void OnOpenContext(object sender, RightTappedRoutedEventArgs e) { FlyoutBase.ShowAttachedFlyout(CellContent); }
private void Grid_RightTapped(object sender, RightTappedRoutedEventArgs e) => FlyoutBase.ShowAttachedFlyout(sender as FrameworkElement);
//show the context menu if right mouse is pressed private void MainWeb_RightTapped(object sender, RightTappedRoutedEventArgs e) { MainWeb.ContextFlyout.ShowAt(sender as FrameworkElement); }
private void VisualStateAwarePage_RightTapped(object sender, RightTappedRoutedEventArgs e) { TopAppBarShowValidationSummary.Visibility = Visibility.Collapsed; }
private void StaffList_RightTapped(object sender, RightTappedRoutedEventArgs e) { ResetStatus(); }
void maps_RightTapped(object sender, RightTappedRoutedEventArgs e) { AddMark(c1Maps1.ScreenToGeographic(e.GetPosition(c1Maps1))); }
protected override void OnRightTapped(RightTappedRoutedEventArgs e) { base.OnRightTapped(e); Show(); }
private void lstAllGames_RightTapped(object sender, RightTappedRoutedEventArgs e) { }
private void PlaceholderInteractionGrid_OnRightTapped(object sender, RightTappedRoutedEventArgs e) { var grid = sender as UIElement; VideoFlyout.ShowAt(grid, e.GetPosition(grid)); }
private void TimeEntryRightClicked(object sender, RightTappedRoutedEventArgs e) { Console.WriteLine(sender as DataGridTextColumn); }
private void Border_RightTapped(object sender, RightTappedRoutedEventArgs e) { ShowMenu(sender as Border); }
private void ImageClickR(object sender, RightTappedRoutedEventArgs e) { Button btn = (Button)sender; selectedImage = (int)btn.Tag; }