public bool SubmitRun(IRun run, string username, string password, Func<System.Drawing.Image> screenShotFunction = null, bool attachSplits = false, TimingMethod method = TimingMethod.RealTime, string gameId = "", string categoryId = "", string version = "", string comment = "", string video = "", params string[] additionalParams)
        {
            string reason;
            var isValid = SpeedrunCom.ValidateRun(run.Metadata.LiveSplitRun, out reason);

            if (!isValid)
            {
                MessageBox.Show(reason, "Submitting Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return false;
            }

            using (var submitDialog = new SpeedrunComSubmitDialog(run.Metadata))
            {
                var result = submitDialog.ShowDialog();
                return result == DialogResult.OK;
            }
        }
Ejemplo n.º 2
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            string reason;
            var    isValid = SpeedrunCom.ValidateRun(Metadata.LiveSplitRun, out reason);

            if (!isValid)
            {
                MessageBox.Show(this, reason, "Submitting Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            using (var submitDialog = new SpeedrunComSubmitDialog(Metadata))
            {
                var result = submitDialog.ShowDialog();
                if (result == DialogResult.OK)
                {
                    RefreshAssociateButton();
                }
            }
        }
Ejemplo n.º 3
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            string reason;
            var isValid = SpeedrunCom.ValidateRun(Metadata.LiveSplitRun, out reason);

            if (!isValid)
            {
                MessageBox.Show(this, reason, "Submitting Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            using (var submitDialog = new SpeedrunComSubmitDialog(Metadata))
            {
                var result = submitDialog.ShowDialog();
                if (result == DialogResult.OK)
                {
                    RefreshAssociateButton();
                }
            }
        }