Beispiel #1
0
 private void InitWindower()
 {
     pols = XIACE.ListPolProcess();
     if (pols.Length == 0)
     {
         MessageBox.Show("FFXIが起動してないようです");
         Environment.Exit(0);
         return;
     }
     xiw = new XIWindower(pols[0].Pid);
     to = xiw.CreateTextObject("WSPCounter");
     to.SetBGColor(128, 0, 0, 0);
     to.SetBGVisibilitiy(true);
     to.SetFontColor(255, 255, 255, 255);
     to.SetLocation(50, 50);
     to.Flush();
 }
Beispiel #2
0
 private string comRead(XIWindower w)
 {
     string text = "";
     short count;
     string ret = string.Empty;
     count = w.ArgCount;
     text = w.ConsoleGetArg(0);
     if (text == "rcm")
     {
         string[] args = new string[count - 1];
         for (short i = 1; i < count; i++)
         {
             args[i - 1] = w.ConsoleGetArg(i);
         }
         w.SendText("//rcmnop"); // send a dummy command (Required!!) // IsNewCommand がバグってるので
         ret = String.Join(" ", args);
     }
     return ret;
 }
Beispiel #3
0
 public XIWindowerSubBase(XIWindower windower)
 {
     this.windower = windower;
 }
Beispiel #4
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (button2.Text == "スタート")
     {
         System.Diagnostics.Process p;
         p = (System.Diagnostics.Process)WindowerPids[comboBox3.SelectedItem];
         w1 = new XIWindower(p.Id);
         button2.Text = "停止";
         comboBox3.Enabled = false;
         groupBox1.Enabled = false;
         radioButton1.Enabled = false;
         radioButton2.Enabled = false;
         textBoxAddress.Enabled = false;
         textBoxPassword.Enabled = false;
         numericUpDown1.Enabled = false;
         if (radioButton1.Checked)
         {
             serv = new RCMNetServer(this);
             serv.Start();
             thread1 = new Thread(new ThreadStart(comNetThread));
             thread1.IsBackground = true;
             thread1.Start();
         }
         else
         {
             client = new RCMNetClient(this);
             if (!client.Start())
             {
                 MessageBox.Show(this, "接続に失敗しました。");
                 enableNetGui();
             }
             else
             {
                 thread1 = new Thread(new ThreadStart(comNetThread));
                 thread1.IsBackground = true;
                 thread1.Start();
             }
         }
     }
     else
     {
         if (serv != null)
         {
             serv.Stop();
             serv = null;
         }
         else
         {
             client.Stop();
             client = null;
         }
         if (thread1 != null && thread1.IsAlive)
             thread1.Abort();
         thread1 = null;
         button2.Text = "スタート";
         radioButton1.Enabled = true;
         radioButton2.Enabled = true;
         textBoxAddress.Enabled = true;
         textBoxPassword.Enabled = true;
         numericUpDown1.Enabled = true;
         groupBox1.Enabled = true;
     }
 }
Beispiel #5
0
        public void RunP2()
        {
            System.Diagnostics.Process p;

            p = (System.Diagnostics.Process)WindowerPids[comboBox1.SelectedItem];
            w1 = new XIWindower(p.Id);
            p = (System.Diagnostics.Process)WindowerPids[comboBox2.SelectedItem];
            w2 = new XIWindower(p.Id);

            ThreadStart t1 = new ThreadStart(comThread1);
            thread1 = new Thread(t1);
            thread1.IsBackground = true;
            thread1.Start();
            ThreadStart t2 = new ThreadStart(comThread2);
            thread2 = new Thread(t2);
            thread2.IsBackground = true;
            thread2.Start();
        }
Beispiel #6
0
 public Menu(XIWindower windower)
     : base(windower)
 {
 }
Beispiel #7
0
 public Craft(XIWindower windower)
     : base(windower)
 {
 }
Beispiel #8
0
 public Fishing(XIWindower windower)
     : base(windower)
 {
 }
Beispiel #9
0
 public Player(XIWindower windower)
     : base(windower)
 {
     Read();
 }
Beispiel #10
0
        static void Main(string[] args)
        {
            PolProcess p = CheckFFXIRunning();
            XIWindower xiw = null;
            FFXI.TextObject to;
            if (p == null)
            {
                Finish("FFXi is not running.");
            }
            try
            {
                xiw = new XIWindower(p.Pid);
            }
            catch
            {
                Finish("WindowerHelper.dll がないかも");
            }
            to = WindowerTest(xiw);
            CheckPlayer(xiw.Player);
            if (Pause() == false)
            {
                to.Dispose();
                Environment.Exit(0);
            }
            CheckFishing(xiw.Fishing);
            if (Pause() == false)
            {
                to.Dispose();
                Environment.Exit(0);
            }
            CheckBuffs(xiw.Player);
            if (Pause() == false)
            {
                to.Dispose();
                Environment.Exit(0);
            }
            CheckEquipment(xiw.Inventory);
            if (Pause() == false)
            {
                to.Dispose();
                Environment.Exit(0);
            }
            CheckInventory(xiw.Inventory);

            Finish("== End of TEST ==");
                to.Dispose();
        }
Beispiel #11
0
 static FFXI.TextObject WindowerTest(XIWindower xiw)
 {
     FFXI.TextObject to;
     to = xiw.CreateTextObject("xitest");
     to.SetLocation(50, 50);
     to.SetBGColor(128, 0, 0, 0);
     to.SetFontColor(255, 255, 255, 255);
     to.SetText("This is XIACE Test Program");
     to.SetBold(true);
     to.SetItalic(true);
     to.SetBGVisibilitiy(true);
     to.Flush();
     return to;
 }
Beispiel #12
0
        static void Main(string[] args)
        {
            Process p = CheckFFXIRunning();
            XIWindower xiw = null;

            if (p == null)
            {
                Finish("FFXi is not running.");
            }
            try
            {
                xiw = new XIWindower(p.Id);
            }
            catch
            {
                Finish("WindowerHelper.dll がないかも");
            }
            CheckPlayer(xiw.Player);
            Pause();
            CheckBuffs(xiw.Player);
            Pause();
            CheckEquipment(xiw.Inventory);
            Pause();
            CheckInventory(xiw.Inventory);

            Finish("== End of TEST ==");
        }