コード例 #1
0
 private void CloseButtnClcl(StatusEntry stats)
 {
     Interrupt();
     VerticalStack.Children.Remove(stats);
     Entries.Remove(stats);
     Count.Text = Entries.Count.ToString();
 }
コード例 #2
0
        private void AddEntry(CustomStatus status = null)
        {
            StatusEntry statusEntry;

            if (status == null)
            {
                statusEntry = new StatusEntry();
                Interrupt();
            }
            else
            {
                statusEntry = new StatusEntry(status);
            }
            statusEntry.Margin                           = new Thickness(0, 0, 0, 10);
            statusEntry.CloseButton.Click               += (s, x) => CloseButtnClcl(statusEntry);
            statusEntry.Text.TextChanged                += (s, x) => Interrupt();
            statusEntry.EmojText.TextChanged            += (s, x) => Interrupt();
            statusEntry.TimeSeconds.TextBox.TextChanged += (s, x) => Interrupt();
            VerticalStack.Children.Insert(1, statusEntry);
            Entries.Insert(0, statusEntry);
            Count.Text = Entries.Count.ToString();
        }