Refactoring my windowsFormApp code
Yeah, you can simplify your code. To have a single method for both of them, you would need to specify whether the check was negated and what action to perform (that could be done using a delegate).

To simplify it even more, use a loop over the three boxes (possibly using a Dictionary to connect each box to the date part).

Also, when working with DateTime.Now, you should make sure to access that property only once, then use its value. If you don't, you could get inconsistent results if the time changes while your method is executing.

private void AddValues()
{
    ProcessValues(true, (items, value) =&gt; items.Add(value));
}

private void RemoveValues()
{
    ProcessValues(false, (items, value) =&gt; items.Remove(value));
}

private void ProcessValues(
    bool negateContains, Action&lt;ListBox.ObjectCollection, int&gt; successAction)
{
    var now = DateTime.Now;

    var pairs = new Dictionary&lt;ListBox, int&gt;
    {
        { box_Hour, now.Hour },
        { box_Minute, now.Minute },
        { box_Second, now.Second }
    };

    foreach (var pair in pairs)
    {
        bool condition = pair.Key.Items.Contains(pair.Value);

        if (negateContains)
            condition = !condition;

        if (condition)
            successAction(pair.Key.Items, pair.Value);
    }
}


This makes your code less repetitive, but also more complicated. It's up to you to decide if that's worth it.