示例#1
0
 private void EquipmentParameterManagementToolStripMenuItem_Click(object sender, EventArgs e)
 {
     EquipmentParameterManagementForm equipmentParameterManagementForm = new EquipmentParameterManagementForm();
     equipmentParameterManagementForm.ShowDialog();
 }
示例#2
0
        private void SetEquipmentToolStripMenuItem_Click(object sender, EventArgs e)
        {
            EquipmentParameterManagementForm equipmentManagmentForm = new EquipmentParameterManagementForm();
            equipmentManagmentForm.UseForSelect = true;
            if (equipmentManagmentForm.ShowDialog() == DialogResult.Cancel)
                return;

            long selectedEquipment = equipmentManagmentForm.SelectedEquipment;
            if (selectedEquipment == -1)
                return;

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

            UpdateRegionRequest request = new UpdateRegionRequest();
            request.Type = UpdateRegionType.UpdateEquipParamID.ToString();
            request.Region = new SubRegion();
            request.Region.ID = originRegion.ID;
            request.Region.EquipmentParameterID = selectedEquipment;

            HTTPAgent.instance().updateRegion(this, DataCenter.Instance().GlobalRegion.Version, request,
                "Change equipment id to '" + selectedEquipment + "'", equipmentNode);
        }