コード例 #1
0
        private void DesignArea_AddNewServer_Click(object sender, EventArgs e)
        {
            var newServer = new MDSServer
            {
                ServerInfo =
                    new ServerGraphInfo.ServerOnGraph
                {
                    Name      = "",
                    IpAddress = "",
                    Port      = CommunicationConsts.DefaultMDSPort,
                    Adjacents = "",
                    Location  = _designPanelLastX + "," + _designPanelLastY,
                }
            };

            var addServerForm = new EditServerForm(newServer.ServerInfo, true);

            addServerForm.ShowDialog();
            if (!addServerForm.Updated)
            {
                return;
            }

            newServer.LabelOfServer      = CreateServerLabel(newServer);
            newServer.LabelOfServer.Text = newServer.ServerInfo.Name + Environment.NewLine + newServer.ServerInfo.IpAddress;
            newServer.LabelOfServer.Left = _designPanelLastX;
            newServer.LabelOfServer.Top  = _designPanelLastY;
            _servers.Add(newServer);
            pnlDesign.Invalidate();
        }
コード例 #2
0
        private void ServerRightMenu_ServerProperties_Click(object sender, EventArgs e)
        {
            var editingServer = GetSelectedServer();

            if (editingServer == null)
            {
                return;
            }

            var editServerForm = new EditServerForm(editingServer.ServerInfo, false);

            editServerForm.ShowDialog();
            if (!editServerForm.Updated)
            {
                return;
            }

            editingServer.LabelOfServer.Text = editingServer.ServerInfo.Name + Environment.NewLine + editingServer.ServerInfo.IpAddress;
            pnlDesign.Invalidate();
        }
コード例 #3
0
ファイル: ServerGraphForm.cs プロジェクト: yonglehou/dotnetmq
        private void DesignArea_AddNewServer_Click(object sender, EventArgs e)
        {
            var newServer = new MDSServer
                                    {
                                        ServerInfo =
                                            new ServerGraphInfo.ServerOnGraph
                                                {
                                                    Name = "",
                                                    IpAddress = "",
                                                    Port = CommunicationConsts.DefaultMDSPort,
                                                    Adjacents = "",
                                                    Location = _designPanelLastX + "," + _designPanelLastY,
                                                }
                                    };

            var addServerForm = new EditServerForm(newServer.ServerInfo, true);
            addServerForm.ShowDialog();
            if (!addServerForm.Updated)
            {
                return;
            }

            newServer.LabelOfServer = CreateServerLabel(newServer);
            newServer.LabelOfServer.Text = newServer.ServerInfo.Name + Environment.NewLine + newServer.ServerInfo.IpAddress;
            newServer.LabelOfServer.Left = _designPanelLastX;
            newServer.LabelOfServer.Top = _designPanelLastY;
            _servers.Add(newServer);
            pnlDesign.Invalidate();
        }
コード例 #4
0
ファイル: ServerGraphForm.cs プロジェクト: yonglehou/dotnetmq
        private void ServerRightMenu_ServerProperties_Click(object sender, EventArgs e)
        {
            var editingServer = GetSelectedServer();
            if (editingServer == null)
            {
                return;
            }

            var editServerForm = new EditServerForm(editingServer.ServerInfo, false);
            editServerForm.ShowDialog();
            if (!editServerForm.Updated)
            {
                return;
            }

            editingServer.LabelOfServer.Text = editingServer.ServerInfo.Name + Environment.NewLine + editingServer.ServerInfo.IpAddress;
            pnlDesign.Invalidate();
        }