Exemple #1
0
 private void LinkConfigurationManagementToolStripMenuItem_Click(object sender, EventArgs e)
 {
     LinkConfigurationManagementForm linkConfigurationMangementForm = new LinkConfigurationManagementForm();
     linkConfigurationMangementForm.ShowDialog();
 }
Exemple #2
0
        private void SetLinkToolStripMenuItem_Click(object sender, EventArgs e)
        {
            LinkConfigurationManagementForm linkConfigurationManagmentForm = new LinkConfigurationManagementForm();
            linkConfigurationManagmentForm.UseForSelect = true;
            if (linkConfigurationManagmentForm.ShowDialog() == DialogResult.Cancel)
                return;

            long selectedLink = linkConfigurationManagmentForm.SelectedLink;
            if (selectedLink == -1)
                return;

            TreeNode linkNode = WorkspaceTreeView.SelectedNode;
            SubRegion originRegion = (SubRegion)linkNode.Parent.Parent.Tag;

            UpdateRegionRequest request = new UpdateRegionRequest();
            request.Type = UpdateRegionType.UpdateLinkConfigID.ToString();
            request.Region = new SubRegion();
            request.Region.ID = originRegion.ID;
            request.Region.LinkConfigurationID = selectedLink;

            HTTPAgent.instance().updateRegion(this, DataCenter.Instance().GlobalRegion.Version, request,
                "Change link id to '" + selectedLink + "'", linkNode);
        }