예제 #1
0
        /// <summary>
        /// 增加远程服务器链接
        /// </summary>
        private void button_CloudServer_AddConn_Click(object sender, RoutedEventArgs e)
        {
            DataRow currentRow = UI.Connections.NewRow();
            int     newIndex   = UI.Connections.Rows.Count + 1;

            if (m_Win_CloudConnection == null)
            {
                m_Win_CloudConnection = new CloudConnection(currentRow, true, newIndex);
            }

            m_Win_CloudConnection.CloudConnectionEvent += new CloudConnection.CloudConnectionHandler(window_ReceiveConnectionValues);
            m_Win_CloudConnection.Show();

            m_Win_CloudConnection.Closed += (object sender2, EventArgs e2) => { m_Win_CloudConnection = null; };
        }
예제 #2
0
        /// <summary>
        /// 编辑当前选中的远程服务器链接
        /// </summary>
        private void button_CloudServer_EditConn_Click(object sender, RoutedEventArgs e)
        {
            int indexConn = dataGrid_CloudServer_Connections.SelectedIndex;

            if (indexConn == -1)
            {
                return;
            }

            DataRow currentRow = UI.Connections.Rows[indexConn];

            if (m_Win_CloudConnection == null)
            {
                m_Win_CloudConnection = new CloudConnection(currentRow, false, 0);
            }

            m_Win_CloudConnection.CloudConnectionEvent += new CloudConnection.CloudConnectionHandler(window_ReceiveConnectionValues);
            m_Win_CloudConnection.Show();

            m_Win_CloudConnection.Closed += (object sender2, EventArgs e2) => { m_Win_CloudConnection = null; };
        }