Exemplo n.º 1
0
        private void btnNewResource_Click(object sender, EventArgs e)
        {
            CreateWebResourceDialog cwrDialog = new CreateWebResourceDialog((CreateWebResourceDialog.WebResourceType)requestedType, service);

            cwrDialog.StartPosition = FormStartPosition.CenterParent;

            if (cwrDialog.ShowDialog() == DialogResult.OK)
            {
                ListViewItem item = new ListViewItem(cwrDialog.CreatedEntity["displayname"].ToString());
                item.SubItems.Add(cwrDialog.CreatedEntity["name"].ToString());
                item.Tag = cwrDialog.CreatedEntity;

                lstWebResources.Items.Add(item);
                lstWebResources.Sort();
            }
        }
Exemplo n.º 2
0
        private void btnNewResource_Click(object sender, EventArgs e)
        {
            CreateWebResourceDialog cwrDialog = new CreateWebResourceDialog((CreateWebResourceDialog.WebResourceType)requestedType, service);
            cwrDialog.StartPosition = FormStartPosition.CenterParent;

            if (cwrDialog.ShowDialog() == DialogResult.OK)
            {
                ListViewItem item = new ListViewItem(cwrDialog.CreatedEntity["displayname"].ToString());
                item.SubItems.Add(cwrDialog.CreatedEntity["name"].ToString());
                item.Tag = cwrDialog.CreatedEntity;

                lstWebResources.Items.Add(item);
                lstWebResources.Sort();
            }
        }