示例#1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            try
            {
                BlueRose.GC();

                client.DownloadFileCompleted += new AsyncCompletedEventHandler(freeSODownloadCompleted);

                client.DownloadFileAsync(TeamCity.tcAddress("servo.freeso.org", "ProjectDollhouse_TsoClient"), "teamcity.zip");

                localBuild.Text = "...";

                btnUpdate.Text    = "Downloading";
                btnUpdate.Enabled = false;
                devBtn.Enabled    = false;
                playBtn.Enabled   = false;
            }
            catch (Exception ex)
            {
#if DEBUG
                MessageBox.Show(ex.Message);
#endif
                btnUpdate.Text    = errorBtn;
                btnUpdate.Enabled = false;
            }
        }
示例#2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            BlueRose.GC();

            try
            {
                localBuild.Text       = BlueRose.readBuild(buildFile);
                onlineBuildLabel.Text = "#" + BlueRose.distNum();
            }
            catch
            {
                onlineBuildLabel.Text = "Offline";
            }

            try
            {
                if (File.Exists(fsoConfigFile))
                {
                    File.Copy(fsoConfigFile, fsoConfigFile + ".backup", true);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
示例#3
0
        void freeSODownloadCompleted(object sender, AsyncCompletedEventArgs e)
        {
            btnUpdate.Text = "Installing";

            TeamCity.tcUnpack();

            File.Delete(Environment.CurrentDirectory + "teamcity.zip");

            BlueRose.wildUnZip();

            BlueRose.writeBuild(buildFile);

            btnUpdate.Enabled = true;
            devBtn.Enabled    = true;
            playBtn.Enabled   = true;

            localBuild.Text = BlueRose.readBuild(buildFile);

            if (File.Exists(fsoConfigFile))
            {
                File.Copy(fsoConfigFile, fsoConfigNormalBackup, true);
            }

            if (File.Exists(fsoConfigUserBackup))
            {
                File.Copy(fsoConfigUserBackup, fsoConfigFile, true);
            }

            btnUpdate.Text = "Update FreeSO";
        }
示例#4
0
 private void onlineBuildLabel_Click(object sender, EventArgs e)
 {
     try
     {
         onlineBuildLabel.Text = "#" + BlueRose.distNum();
     }
     catch
     {
         onlineBuildLabel.Text = "FAILED";
     }
 }
示例#5
0
 private void devBtn_Click(object sender, EventArgs e)
 {
     BlueRose.StartFSO("FSO.IDE.exe");
 }
示例#6
0
 private void playBtn_Click(object sender, EventArgs e)
 {
     BlueRose.StartFSO("FreeSO.exe");
 }