Example #1
0
        private void Publish_Click(object sender, EventArgs e)
        {
            string appName = applicationName.Text;
            string slnPath = appPath.Text;
            string slnName = openFileDialog.SafeFileName;

            appName = slnName.Remove(slnName.Length - 4, 4);
            int    appSlnLength = slnName.Length + 1;
            string folderpath   = slnPath.Remove(slnPath.Length - appSlnLength, appSlnLength);

            mainAppName = appName;
            mainAppPath = folderpath;

            string servername = serverName.Text;
            string username   = serUsername.Text;
            string password   = serPassword.Text;
            string website    = websiteName.Text;

            string relese = "Debug";

            if (release.Checked == true)
            {
                relese = "Release";
            }

            if (debug.Checked == true)
            {
                relese = "Debug";
            }
            string status = appInter.DoPublish(folderpath, appName, slnPath, mainAppPath, mainAppName, relese);

            if (status == "OK")
            {
                //editXml(folderpath, appName, relese, "", "publish");
                MessageBox.Show("Application Published..");
            }
            else
            {
                MessageBox.Show(status);
                MessageBox.Show("Error occured while publishing.");
            }

            publish.Enabled = false;
        }