private async void CancelTaskCommandExecute()
        {
            Debug.WriteLine($"{DateTime.Now}: Cancel Task: {FilePath.FullPath} Command");

            await TaskManager.GetTaskManagerByLocalDiskUser(UserMounted).RemoveTask(this.FileId);

            RemoveItemEvent?.Invoke(this);
        }
Beispiel #2
0
        /// <summary>
        /// right click removes a listing
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void listBox1_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                int index = listBox1.IndexFromPoint(e.Location);
                if (index >= 0)
                {
                    listBox1.Items.RemoveAt(index);
                    textBoxDeaths.Text = listBox1.Items.Count.ToString();

                    RemoveItemEventArgs args = new RemoveItemEventArgs {
                        index = index
                    };
                    RemoveItemEvent?.Invoke(listBox1, args);
                }
            }
        }
 public void OnRemoveItem(RemoveItemEvent evt)
 {
     Handler?.Remove(evt.Index);
 }
 public void OnRemoveItem(RemoveItemEvent evt)
 {
     EventNames.Remove(evt.GetType().Name);
 }