Exemplo n.º 1
0
        public MainForm()
        {
            int i;

            InitializeComponent();

             		int x1 = ax+os;
             		int x2 = x1+sd;
             		int y1 = ay+os;
             		int y2 = y1+sd;

             		for(i=0; i<4; i++)
             		{
             			pixpos.Add( new Point( x1,y1 ));
             			pixpos.Add( new Point( x2,y1 ));
             			pixpos.Add( new Point( x1,y2 ));
             			pixpos.Add( new Point( x2,y2 ));

                x1 += bd;
                x2 += bd;
             		}

             		boundingbox = WindowHelper.BoundingBox( pixpos );

             		myTimer.Tick += new EventHandler(myEvent);
            myTimer.Interval = 100;
            myTimer.Enabled = true;
            myTimer.Start();

            spells = new Spells();
            if (!spells.Load(@"C:\Users\jonas\Documents\WOW Scripts\MSBash\Gurguff-BM.txt"))
                spells = null;

             		/*
             			//This was to check the time for getting these pixel values - 0.004 to 0.008 s
             		Stopwatch sw = Stopwatch.StartNew();
             		List<uint> pxs = WindowHelper.GetSCListPixelColors( pixpos,bb );
             		sw.Stop();
             		Log( String.Format("Time Version 4: {0}", sw.Elapsed ));
             		*/

             		this.Load += MainForm_Load;
        }
Exemplo n.º 2
0
 void LoadToonToolStripMenuItemClick(object sender, EventArgs e)
 {
     DialogResult result = openFileDialog1.ShowDialog();
     if (result == DialogResult.OK)
     {
         Spells newtoon = new Spells();
         if ( newtoon.Load( openFileDialog1.FileName ) )
         {
             spells = newtoon;
         }
     }
 }