private void OnDeleteClicked(object sender, EventArgs e)
 {
     DeleteClicked?.Invoke(this, new MatrixPanelEventArgs()
     {
         Matrix     = this.SelectedMatrix,
         Percentage = this.SelectedPercentage,
         Link       = this._linkToPercentage
     });
 }
Beispiel #2
0
        private void Delete_Click(object sender, EventArgs e)
        {
            var selItems = m_lvData.SelectedItems;

            int[] sels = new int[selItems.Count];

            for (int i = 0; i < sels.Length; ++i)
            {
                sels[i] = (selItems[i] as ListViewEntry).DatumIndex;
            }

            DeleteClicked?.Invoke(m_dataProvider, sels);
        }
Beispiel #3
0
        public NoteViewModel(Note note)
        {
            _model = note;

            OnEditCommand        = ReactiveCommand.Create(() => EditClicked.Invoke(this, null));
            OnArchiveCommand     = ReactiveCommand.Create(() => ArchiveClicked.Invoke(this, null));
            OnDeleteCommand      = ReactiveCommand.Create(() => DeleteClicked.Invoke(this, null));
            OnMiddleClickCommand = ReactiveCommand.Create(() => MiddleMouseClicked.Invoke(this, null));

            name          = note.Name;
            content       = note.Content;
            fontFamily    = FontFamilyUtil.FontFamilyFromFont(note.Metadata.FontFamily);
            fontSize      = note.Metadata.FontSize;
            caretPosition = note.Metadata.CaretPosition;
        }
Beispiel #4
0
        public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            var note           = notes[position];
            var noteViewHolder = holder as NoteViewHolder;

            noteViewHolder.Title.Text   = $"{note.Category} • {note.Title}";
            noteViewHolder.Content.Text = note.Content;

            noteViewHolder.EditNote.Click += delegate
            {
                EditClicked?.Invoke(position);
            };

            noteViewHolder.ViewNote.Click += delegate
            {
                ViewNoteClicked?.Invoke(position);
            };

            noteViewHolder.DeleteNote.Click += delegate
            {
                DeleteClicked?.Invoke(position);
            };
        }
Beispiel #5
0
        public AddRemovePropertyGrid()
        {
            _btnNew = new("New subscription")
            {
                Image   = global::DarcUI.Properties.Resources.add,
                Visible = false
            };
            _btnDelete = new("Delete subscription")
            {
                Image   = global::DarcUI.Properties.Resources.delete,
                Visible = false
            };

            _btnNew.Click    += (s, e) => NewClicked?.Invoke(this, e);
            _btnDelete.Click += (s, e) => DeleteClicked?.Invoke(this, e);

            ToolStrip toolbar = GetToolbar();

            toolbar.Items.Add(_separator = new ToolStripSeparator {
                Visible = false
            });
            toolbar.Items.Add(_btnNew);
            toolbar.Items.Add(_btnDelete);
        }
Beispiel #6
0
        public event Action <LoadUIElement> Tap;           // when this is tapped, share is tapped, or delete is tapped

        public LoadUIElement(String filePath) : base()
        {
            this.filePath = filePath;

            this.Orientation     = StackOrientation.Horizontal; //
            this.BackgroundColor = Color.Black;                 // Stylistic choices
            this.HeightRequest   = 50;                          //


            // Make a new label initialized with the song name

            Label songLabel = new Label
            {
                Text                    = FileUtilities.SongNameFromFilePath(filePath), // Make sure it displays the name of song
                FontSize                = 20,                                           //*
                BackgroundColor         = Color.Black,                                  //*
                TextColor               = Color.White,                                  //* Stylistic choices
                HorizontalTextAlignment = TextAlignment.Start,                          //*
                HorizontalOptions       = LayoutOptions.StartAndExpand,                 //*
                VerticalOptions         = LayoutOptions.CenterAndExpand,                //*
                InputTransparent        = true,                                         // Ensures the user can't tap on label instead of main body of this object
                Margin                  = new Thickness(17.0, 0.0)
            };


            // Make a button that lets user delete this object's song
            Button deleteButton = new Button
            {
                Text              = "DELETE",
                TextColor         = Color.Red,
                VerticalOptions   = LayoutOptions.CenterAndExpand,
                HorizontalOptions = LayoutOptions.End,
                Margin            = 7
            };

            // Make a button that prompts user to share this song
            Button shareButton = new Button
            {
                Text              = "SHARE",
                TextColor         = Color.Blue,
                VerticalOptions   = LayoutOptions.CenterAndExpand,
                HorizontalOptions = LayoutOptions.End,
                Margin            = 22
            };

            this.Children.Add(songLabel);       //
            this.Children.Add(shareButton);     // Add visual elements to this object
            this.Children.Add(deleteButton);    //


            // Ensure that gestures on the delete button, share button and rest of object are handled by public events

            deleteButton.Clicked += (s, e) => { DeleteClicked.Invoke(this); };
            shareButton.Clicked  += (s, e) => { ShareClicked.Invoke(this); };


            TapGestureRecognizer tgr = new TapGestureRecognizer()
            {
                Command = new Command(() => { Tap.Invoke(this); })
            };

            this.GestureRecognizers.Add(tgr);
        }
 private void DeleteButton_Click(object sender, EventArgs e)
 {
     DeleteClicked?.Invoke(this, e);
 }
Beispiel #8
0
 private void DeleteTime()
 {
     DeleteClicked?.Invoke(this, EventArgs.Empty);
 }
Beispiel #9
0
 private void hyDelete_Click(object sender, RoutedEventArgs e)
 {
     DeleteClicked?.Invoke(this, e);
 }
 private void DeleteClick(object sender, RoutedEventArgs e)
 {
     DeleteClicked?.Invoke(sender, e);
 }
 private void DeleteTagButton_Click(object sender, RoutedEventArgs e)
 {
     DeleteClicked?.Invoke(this, new EventArgs());
 }
Beispiel #12
0
 public void InvokeDeleteClicked() => DeleteClicked?.Invoke();
Beispiel #13
0
 private void OnDeleteJobClicked(object sender, RoutedEventArgs e)
 {
     DeleteClicked?.Invoke(this, e);
 }