コード例 #1
0
ファイル: PopupList.cs プロジェクト: alexfordc/Au
 void _Selected(TreeNodeAdv node, bool isKey)
 {
     ResultItem   = node.Tag;
     ResultWasKey = isKey;
     _Close();
     SelectedAction?.Invoke(this);
 }
コード例 #2
0
 protected virtual void OnActionSelected()
 {
     if (SelectedAction != null)
     {
         SelectedAction.Invoke();
     }
 }
コード例 #3
0
        private void TreeElement_Selected(object sender, RoutedEventArgs e)
        {
            var node = e.OriginalSource as TreeViewItem ?? throw new NullReferenceException("Bad tree node");

            var trueNode = node.Header as ITreeNodeViewModel ?? throw new NullReferenceException("Bad tree node");

            SelectedAction?.Invoke(trueNode);
        }
コード例 #4
0
 private void NativeControl_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (SelectedAction != null || SelectionChangedAction != null)
     {
         SelectedAction?.Invoke(e.CurrentSelection.Count > 0 ? (VisualNode)e.CurrentSelection[0] : null);
         SelectionChangedAction?.Invoke(e.CurrentSelection.Cast <VisualNode>().ToList(), e.PreviousSelection.Cast <VisualNode>().ToList());
         Invalidate();
     }
 }
コード例 #5
0
        public UIActionSheet ShowActionSheetForBelowiOS8(string[] menuItems)
        {
            UIActionSheet actionSheet = new UIActionSheet(null, null, "Cancel", null, menuItems);

            actionSheet.Clicked += (sender, e) =>
            {
                SelectedAction?.Invoke(sender, e);
            };
            return(actionSheet);
        }
コード例 #6
0
 public void ActionSheetDelegateMethod(string selectedMenu)
 {
     SelectedAction?.Invoke(selectedMenu, new EventArgs());
 }