Exemplo n.º 1
0
        private static double GetDecimalIncrement(int decimalPlaces)
        {
            string resultString = "0.";

            for (int i = 0; i < decimalPlaces - 1; i++)
            {
                resultString = resultString + "0";
            }
            resultString = resultString + "1";
            return(VersionFormatter.FromString(resultString));
        }
Exemplo n.º 2
0
        private void publishUpdateButton_Click(object sender, EventArgs e)
        {
            newUpdateInfo.summary     = summaryTextBox.Text;
            newUpdateInfo.version     = VersionFormatter.FromString(versionTextBox.Text);
            newUpdateInfo.changeLog   = newNotesTextBox.Text;
            newUpdateInfo.ReleaseDate = DateTime.UtcNow;

            try {
                project.PublishUpdate(newUpdateInfo);
            } catch (PublishingFailedException ex) {
                MessageBox.Show(ex.Message, "Failed to publish update", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            } catch (Exception ex) {
                string message = "An exception occured while trying to publish the update: " + ex.Message + Environment.NewLine
                                 + "Stacktrace:" + Environment.NewLine + ex.StackTrace;
                MessageBox.Show(message, "Failed to publish update", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            parentPage.RefreshUpdateList();
            parentPage.SelectUpdate(0);
        }