Esempio n. 1
0
        private void DoFind()
        {
            string findValue = string.Empty;

            if (FormEditBox.DialogShow("Find item in global list", "Enter item name", "Find...", Resources.file_find,
                                       true, false, (sender, args) => FindItem(args.Value), ref findValue) == DialogResult.Cancel)
            {
                return;
            }

            //FindItem(findValue);
        }
Esempio n. 2
0
        private void FindUserBy(object sender, EventArgs e)
        {
            ToolStripItem btn    = sender as ToolStripItem;
            string        action = btn.Tag as string;

            string ident     = action == "0" ? "name" : "SID";
            string ident2    = action == "0" ? ":" : " (full sid):";
            string findValue = string.Empty;

            if (FormEditBox.DialogShow("Find user by " + ident, "User " + ident + ident2, "Find", Resources.file_find,
                                       true, false, (o, args) =>
            {
                string accountName = action == "0" ? args.Value : null;
                string userSID = action == "1" ? args.Value : null;
                lvUsers.SelectedItems.Clear();
                SelectUsers(accountName, userSID);
            },
                                       ref findValue) != DialogResult.OK)
            {
                return;
            }
        }
Esempio n. 3
0
        private void mniChangeDefaultDropLocation_Click(object sender, EventArgs e)
        {
            if (lvBuildTemplates.SelectedIndices.Count == 0)
            {
                return;
            }

            BuildTemplate buildTemplate = lvBuildTemplates.SelectedItems[0].Tag as BuildTemplate;

            string newValue = buildTemplate.DefaultDropLocation;

            if (FormEditBox.DialogShow("Change Default Drop Location", "Enter new default drop location", "Ok", null,
                                       true, true, ref newValue) == DialogResult.OK)
            {
                var buildTemplates = this.lvBuildTemplates.SelectedItems.ToCollection(o => (o as ListViewItem).Tag as BuildTemplate);

                MakeMultipleChangesOnBuildTemplates(buildTemplates, true,
                                                    delegate(BuildTemplate template)
                {
                    template.DefaultDropLocation = newValue;
                });
            }
        }