All pastes #474033 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-05-06 15:55 UTC
rendered paste body
System.ArgumentException was unhandled
  Message="Delegate to an instance method cannot have null 'this'."
  Source="mscorlib"
  StackTrace:
       at System.MulticastDelegate.ThrowNullThisInDelegateToInstance()
       at System.MulticastDelegate.CtorClosed(Object target, IntPtr methodPtr)
       at ISX_Botfucker.ISX_Botfucker.buttonPlayPause1_Click(Object sender, EventArgs e) in C:\Documents and Settings\Jeremy\My Documents\Visual Studio 2005\Projects\ISX_Botfucker\ISX_Botfucker\Form1.cs:line 40
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(Form mainForm)
       at ISX_Botfucker.Program.Main() in C:\Documents and Settings\Jeremy\My Documents\Visual Studio 2005\Projects\ISX_Botfucker\ISX_Botfucker\Program.cs:line 17
       at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()



namespace ISX_Botfucker
{
    public partial class ISX_Botfucker : Form
    {
        public static ISX_Botfucker Instance;
        public static clsPulse PulseCls;
        public static clsMain MainCls;
        public ISX_Botfucker()
        {
            InitializeComponent();
            if (ISX_Botfucker.Instance == null)
            {
                ISX_Botfucker.Instance = this;
            }
        }
        int pulses;
        public void UpdateStats()
        {
            pulses += 100;
            counter.Text = pulses.ToString();
        }
        bool HasStarted;
        bool ThreadMade;
        Thread botMainThread;
        private void buttonPlayPause1_Click(object sender, EventArgs e)
        {
            if (!ThreadMade)
            {
                botMainThread = new Thread(PulseCls.Pulse);
                ThreadMade = true;
                HasStarted = true;
                botMainThread.Start();
            }
            if (!HasStarted)
            {
                botMainThread.Start();
                buttonPlayPause1.Text = "Pause";
                HasStarted = true;
                return;
            }
            if (HasStarted)
            {
                try
                {
                    botMainThread.Abort();
                }
                finally
                {
                    Application.Exit();
                }
                buttonPlayPause1.Text = "Play";
                HasStarted = false;
                return;
            }
        }
    }
}