示例#1
0
        protected virtual void OnToolRemoveClick(object sender, EventArgs e)
        {
            if (list.Selection.Count == 0 || list.Mode == LayoutListMode.Fields)
            {
                return;
            }
            for (int i = 0; i < list.Selection.Count; i++)
            {
                object o = list.Selection[i].Item;
                list.ItemRemove(o);

                if (list.ListSource != dataSource)
                {
                    ((IList)dataSource).Remove(o);
                }
                i--;
            }
            list.RefreshBounds(true);
        }
示例#2
0
        private void Callback()
        {
            Application.Invoke(() =>
            {
                toolProgress.Visible = false;
                list.RefreshBounds(false);
                if (message.Length != 0)
                {
                    MessageDialog.ShowMessage(Content.ParentWindow, message);
                }
                else if (!row.Attached)
                {
                    MessageDialog.ShowMessage(Content.ParentWindow, Locale.Get("RowDeleting", "Delete Complete!"));
                    Hide();
                }

                message = string.Empty;
            });
        }