示例#1
0
        public static void DoDialog(IList <Item> items)
        {
            if (items.Count == 0)
            {
                Debug.Assert(false);
                //throw new ArgumentException();
                return;
            }

            if (items.Count == 1)
            {
                DoDialog(items[0]);
                return;
            }

            // TODO: indeterminate state UI
            Options options = new Options(items[0]);

            using (ItemOptionsDialog dialog = new ItemOptionsDialog(options, String.Format("[{0} Items]", items.Count)))
            {
                if (dialog.ShowDialog() == DialogResult.OK)
                {
                    foreach (Item item in items)
                    {
                        options.Save(item);
                    }
                }
            }
        }
示例#2
0
        //

        public static void DoDialog(Item item)
        {
            Options options = new Options(item);

            using (ItemOptionsDialog dialog = new ItemOptionsDialog(options, item.RenamedFileName))
            {
                if (dialog.ShowDialog() == DialogResult.OK)
                {
                    options.Save(item);
                }
            }
        }