示例#1
0
 private void OnExpressSettingClicked(object sender, EventArgs e)
 {
     DefaultSettings setting = new DefaultSettings();
     SettingsDlg dlg = new SettingsDlg("快递单设置", setting);
     if (dlg.ShowDialog() == DialogResult.OK)
     {
         Settings.Default.Save();
     }
 }
示例#2
0
        private void OnItemDoubleClicked(object sender, MouseEventArgs e)
        {
            if (listView1.SelectedItems.Count != 1)
                return;

            ListViewItem lvItem = listView1.SelectedItems[0];
            Item item = lvItem.Tag as Item;
            if (item == null)
                return;

            ItemDataInfo itemInfo = new ItemDataInfo(item);
            SettingsDlg dlg = new SettingsDlg("修改宝贝的属性", itemInfo);
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                if (!String.IsNullOrEmpty(itemInfo.UserName) || !String.IsNullOrEmpty(itemInfo.ItemType))
                {
                    ItemData itemData = new ItemData();
                    itemData.ID = itemInfo.ItemID;
                    itemData.UserName = itemInfo.UserName;
                    itemData.ItemType = itemInfo.ItemType;
                    Global.ItemDataContainer.AddOrUpdate(itemData);

                    UpdateItemData(lvItem);
                }
            }
        }