Beispiel #1
0
        public void Fire()
        {
            AgentClass agent;

            try
            {
                agent = new AgentClass();
            }
            catch (Exception e)
            {
                ErrorDialog.Report(Strings.Call_Thunder_Error_Agent + "\n" + e.Message + "\n" + e.StackTrace);
                return;
            }
            try
            {
                Type type   = typeof(AgentClass);
                var  method = type.GetMethod("AddTask12");                      //only on x86
                method.Invoke(agent, new object[] { Url, FileName, "", PostData.ToString(), Refer, "", -1, 0, -1, Cookie, "", "", 0u, "rightup" });
            }
            catch (Exception)
            {
                try
                {
                    agent.AddTask5(bstrUrl: Url,
                                   bstrFileName: FileName,
                                   bstrCookie: Cookie,
                                   bstrReferUrl: Refer,
                                   bstrComments: PostData.ToString(),
                                   eCallType: _tag_Enum_CallType.ECT_Agent5);
                }
                catch (Exception)
                {
                    try
                    {
                        agent.AddTask(bstrUrl: Url,
                                      bstrFileName: FileName,
                                      bstrReferUrl: Refer,
                                      bstrComments: PostData.ToString());
                    }
                    catch (Exception e)
                    {
                        ErrorDialog.Report(Strings.Call_Thunder_Error_Agent + "\n" + e.Message + "\n" + e.StackTrace);
                        return;
                    }
                }
            }
            try
            {
                agent.CommitTasks4(1, 1);
            }
            catch (Exception e)
            {
                ErrorDialog.Report(Strings.Call_Thunder_Error_Agent + (Environment.Is64BitProcess?Strings.Recommand_32bit:"") + e.Message + "\n" + e.StackTrace);
                return;
            }
        }
Beispiel #2
0
        public void Fire()
        {
            AgentClass agent;

            try
            {
                agent = new AgentClass();
            }
            catch (Exception e)
            {
                MessageBox.Show(Strings.Call_Thunder_Error_Agent + "\n" + e.Message + "\n" + e.StackTrace);
                return;
            }
            try
            {
                agent.AddTask3(bstrUrl: Url,
                               bstrFileName: FileName);
            }
            catch (Exception)
            {
                try
                {
                    agent.AddTask(bstrUrl: Url,
                                  bstrFileName: FileName);
                }
                catch (Exception e)
                {
                    MessageBox.Show(Strings.Call_Thunder_Error_Agent + "\n" + e.Message + "\n" + e.StackTrace);
                    return;
                }
            }
            try
            {
                agent.CommitTasks4(1, 0);
            }
            catch (Exception)
            {
                try { agent.CommitTasks(); }
                catch (Exception e)
                {
                    MessageBox.Show(Strings.Call_Thunder_Error_Agent + "\n" + e.Message + "\n" + e.StackTrace);
                    return;
                }
            }
        }