private void btnLogin_Click(object sender, RoutedEventArgs e)
        {
            chan = mockChannel.IChannel.CreateChannel();
            StringBuilder builder = new StringBuilder();
            builder.Append(txtUsername.Text);
            builder.Append("*");
            builder.Append(txtPassword.Text);
            builder.Append("&");
            builder.Append(txtIP.Text);
            builder.Append("&");
            builder.Append(txtSrcPort.Text);
            builder.Append("&");
            builder.Append(txtRmtPort.Text);
            string msg = builder.ToString();
            chan.postMessage(msg);

            string retmsg = chan.getMessage();
            if (retmsg == null)
                while (chan.getMessage() != null) ;
            else if (retmsg == "succeed")
            {
                this.Hide();
                new sendXMLMetaData().Show();
                this.Close();
            }
            else if (retmsg == "failed")
            {
                System.Windows.MessageBox.Show("UserAccount Information Invalid");
                return;
            }
        }
        private void btnSendXML_Click(object sender, RoutedEventArgs e)
        {
            chan = mockChannel.IChannel.CreateChannel();
            StringBuilder builder = new StringBuilder();
            builder.Append(txtOwnername.Text);
            builder.Append("*");
            builder.Append(txtVersionNumber.Text);
            builder.Append("*");
            builder.Append(txtDependency.Text);
            builder.Append("$");
            builder.Append(txtSendingFileName.Text);
            builder.Append("&");
            builder.Append(txtIP.Text);
            builder.Append("&");
            builder.Append(txtSrcPort.Text);
            builder.Append("&");
            builder.Append(txtRmtPort.Text);
            string msg = builder.ToString();
            chan.postMessage(msg);

            string retmsg = chan.getMessage();
            if (retmsg == null)
                while (chan.getMessage() != null) ;
            else if (retmsg == "succeed")
            {
                this.Hide();
                new MainWindow().Show();
                this.Close();
            }
            else if (retmsg == "failed")
            {
                System.Windows.MessageBox.Show("Invalid Access,UserName is different From file's ownername");
                return;
            }

        }