コード例 #1
0
ファイル: WorkspaceForm.cs プロジェクト: hong1975/wats
 private void ChannelSettingManagementToolStripMenuItem_Click(object sender, EventArgs e)
 {
     ChannelSettingManagementForm channelManagementForm = new ChannelSettingManagementForm();
     channelManagementForm.ShowDialog();
 }
コード例 #2
0
ファイル: WorkspaceForm.cs プロジェクト: hong1975/wats
        private void SetChannelToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ChannelSettingManagementForm channelSettingManagmentForm = new ChannelSettingManagementForm();
            channelSettingManagmentForm.UseForSelect = true;
            if (channelSettingManagmentForm.ShowDialog() == DialogResult.Cancel)
                return;

            long selectedChannel = channelSettingManagmentForm.SelectedChannel;
            if (selectedChannel == -1)
                return;

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

            UpdateRegionRequest request = new UpdateRegionRequest();
            request.Type = UpdateRegionType.UpdateChanSettingID.ToString();
            request.Region = new SubRegion();
            request.Region.ID = originRegion.ID;
            request.Region.ChannelSettingID = selectedChannel;

            HTTPAgent.instance().updateRegion(this, DataCenter.Instance().GlobalRegion.Version, request,
                "Change channel id to '" + selectedChannel + "'", channelNode);
        }