Exemplo n.º 1
0
            public void Execute()
            {
                IExternalSource extsource;
                ICommandEventArgs args = new ICommandEventArgs();

                //Unpack archive
                Components.Submission sub=null;
                try {
                    extsource = CreateSource(m_upfile);

                    //Create submission
                    sub = m_subda.Create(m_asstID, m_prinID, extsource);
                } catch (Exception er) {
                    args.Exception = er;
                }

                args.ReturnValue = sub;
                if (Finished != null)
                    Finished(this, args);
            }
Exemplo n.º 2
0
 private void scmd_Finished(object sender, ICommandEventArgs args)
 {
     if (args.Exception != null)
         PageError(args.Exception.Message);
     else
         FireSubEvent(args);
 }
Exemplo n.º 3
0
            public void Execute()
            {
                IExternalSource extsrc;
                ICommandEventArgs args = new ICommandEventArgs();

                //Run CVS to get the files
                CVSTool cvs = new CVSTool();
                try {
                    extsrc = cvs.Checkout(m_cvsroot, m_module, m_password, out m_target);
                } catch (Exception er) {
                    args.Exception = er;
                    Finish(args); return;
                }

                //Sanity check on CVS
                if (extsrc == null) {
                    args.Exception = new ToolExecutionException("Failure during execution of CVS");
                    Finish(args); return;
                }

                //Create the submission
                Submissions subda = new Submissions(Globals.CurrentIdentity);
                Components.Submission sub = null;
                try {
                    sub = m_subda.Create(m_asstID, m_prinID, extsrc);
                } catch (Exception er) {
                    args.Exception = er;
                    Finish(args); return;
                }

                //Finish up
                args.ReturnValue = sub;
                Finish(args);
            }
Exemplo n.º 4
0
 private void Finish(ICommandEventArgs args)
 {
     Directory.Delete(m_target, true);
     if (Finished != null)
         Finished(this, args);
 }
Exemplo n.º 5
0
 private void task_Finished(object sender, ICommandEventArgs args)
 {
     m_threads.Remove(ViewState["thread"]);
     m_retargs[ViewState["thread"]] = args;
 }