Exemplo n.º 1
0
        private void ContentMenuOtherCountClick(object sender, EventArgs e)
        {
            if (!CheckUser())
            {
                return;
            }
            ListView listview = GetItemMenu(sender);

            if (listview == null)
            {
                return;
            }
            Item item = listview.GetSelectItem <Item>();

            if (item == null)
            {
                return;
            }
            using (ItemModCountDialog dlg = new ItemModCountDialog(this))
            {
                dlg.SetUserAndItem(CurUser, item);
                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    if (this.ModItemCount(CurUser, item, dlg.Count))
                    {
                        contentMenuOtherRefresh_Click(sender, e);
                    }
                }
            }
        }
Exemplo n.º 2
0
        void ItemCountToolStripMenuItemClick(object sender, EventArgs e)
        {
            if (!CheckUser() || curListView == null)
            {
                return;
            }
            Item item = curListView.GetSelectItem <Item>();

            if (item == null)
            {
                return;
            }
            using (var dlg = new ItemModCountDialog(this))
            {
                dlg.SetUserAndItem(CurUser, item);
                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    if (this.ModItemCount(CurUser, item, dlg.Count))
                    {
                        ReadPackage(PackageType.All);
                    }
                }
            }
        }
Exemplo n.º 3
0
        private void ContentMenuItemCountClick(object sender, EventArgs e)
        {
            if (!CheckUser())
            {
                return;
            }
            Item item = list_items_normal.GetSelectItem <Item>();

            if (item == null)
            {
                return;
            }
            using (ItemModCountDialog dlg = new ItemModCountDialog(this))
            {
                dlg.SetUserAndItem(CurUser, item);
                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    if (this.ModItemCount(CurUser, item, dlg.Count))
                    {
                        ReadPackage(PackageType.Normal);
                    }
                }
            }
        }