Ejemplo n.º 1
0
        private void changeHostAndStartApp(LaServer srv)
        {
            List <HostChanger.hostEntry> entries = new List <HostChanger.hostEntry>();

            if (srv.L2auth)
            {
                entries.Add(new HostChanger.hostEntry {
                    ip       = srv.ServerIp,
                    hostname = "l2authd.lineage2.com",
                    comment  = srv.ServerName
                });
            }
            if (srv.L2testauth)
            {
                entries.Add(new HostChanger.hostEntry
                {
                    ip       = srv.ServerIp,
                    hostname = "l2testauthd.lineage2.com",
                    comment  = srv.ServerName
                });
            }
            if (srv.GgServer)
            {
                // 216.107.250.194 nprotect.lineage2.com
                entries.Add(new HostChanger.hostEntry
                {
                    ip       = this.serverList.GgServer,
                    hostname = "nprotect.lineage2.com",
                    comment  = "Gameguard Server"
                });
            }
            HostChanger.GetInstance().AddEntries(entries.ToArray());
            this.checkHostEntry(entries[0]);
        }
Ejemplo n.º 2
0
        private void buttonDeleteSrv_Click(object sender, EventArgs e)
        {
            LaServer srv = (LaServer)this.comboBoxServerlist.SelectedItem;

            if (srv != null)
            {
                this.serverList.DelServer(srv);
                this.selectedIndex = 0;
            }
            updateListBox();
            updateUi();
        }
Ejemplo n.º 3
0
 private void buttonAddSrv_Click(object sender, EventArgs e)
 {
     LaServer srv = new LaServer();
     srv.ServerName = "ServerName";
     srv.ServerIp = "127.0.0.1";
     srv.AppToStart = @"C:\Lineage2\system\L2.exe";
     srv.L2auth = true;
     srv.L2testauth = true;
     srv.GgServer = false;
     this.serverList.AddServer(srv);
     this.updateListBox();
     this.comboBoxServerlist.SelectedItem = srv;
 }
Ejemplo n.º 4
0
        private void buttonAddSrv_Click(object sender, EventArgs e)
        {
            LaServer srv = new LaServer();

            srv.ServerName = "ServerName";
            srv.ServerIp   = "127.0.0.1";
            srv.AppToStart = @"C:\Lineage2\system\L2.exe";
            srv.L2auth     = true;
            srv.L2testauth = true;
            srv.GgServer   = false;
            this.serverList.AddServer(srv);
            this.updateListBox();
            this.comboBoxServerlist.SelectedItem = srv;
        }
Ejemplo n.º 5
0
        private void updateUi()
        {
            LaServer srv = (LaServer)this.comboBoxServerlist.SelectedItem;

            if (srv != null)
            {
                this.textBoxServerIp.Text     = srv.ServerIp;
                this.textBoxLaPath.Text       = srv.AppToStart;
                this.checkBoxAuth.Checked     = srv.L2auth;
                this.checkBoxTestAuth.Checked = srv.L2testauth;
                this.checkBoxGG.Checked       = srv.GgServer;
                if (this.serverList[this.serverList.DefaultServer] != null &&
                    this.serverList[this.serverList.DefaultServer].Equals(srv))
                {
                    this.checkBoxDefault.Checked = true;
                }
                else
                {
                    this.checkBoxDefault.Checked = false;
                }
            }
        }
Ejemplo n.º 6
0
        private void buttonSet_Click(object sender, EventArgs e)
        {
            string temp = this.comboBoxServerlist.Text;

            if (this.comboBoxServerlist.Items.Count > 0)
            {
                this.comboBoxServerlist.SelectedIndex = this.selectedIndex;
            }

            LaServer srv = (LaServer)this.comboBoxServerlist.SelectedItem;

            if (srv != null)
            {
                srv.ServerName = temp;
                srv.ServerIp   = this.textBoxServerIp.Text;
                srv.AppToStart = this.textBoxLaPath.Text;
                srv.L2auth     = this.checkBoxAuth.Checked;
                srv.L2testauth = this.checkBoxTestAuth.Checked;
                srv.GgServer   = this.checkBoxGG.Checked;
                this.serverList.DefaultServer = this.serverList.ServerList.IndexOf(srv);
            }
            updateListBox();
            updateUi();
        }
Ejemplo n.º 7
0
 public void DelServer(LaServer server)
 {
     this.serverList.Remove(server);
 }
Ejemplo n.º 8
0
 public void AddServer(LaServer server)
 {
     this.serverList.Add(server);
 }
Ejemplo n.º 9
0
 private void changeHostAndStartApp(LaServer srv)
 {
     List<HostChanger.hostEntry> entries = new List<HostChanger.hostEntry>();
     if(srv.L2auth)
     {
         entries.Add(new HostChanger.hostEntry {
             ip = srv.ServerIp,
             hostname = "l2authd.lineage2.com",
             comment = srv.ServerName });
     }
     if (srv.L2testauth)
     {
         entries.Add(new HostChanger.hostEntry
         {
             ip = srv.ServerIp,
             hostname = "l2testauthd.lineage2.com",
             comment = srv.ServerName
         });
     }
     if (srv.GgServer)
     {
         // 216.107.250.194 nprotect.lineage2.com
         entries.Add(new HostChanger.hostEntry
         {
             ip = this.serverList.GgServer,
             hostname = "nprotect.lineage2.com",
             comment = "Gameguard Server"
         });
     }
     HostChanger.GetInstance().AddEntries(entries.ToArray());
     this.checkHostEntry(entries[0]);
 }
Ejemplo n.º 10
0
        private void serverSubmenu_Click(object sender, EventArgs e)
        {
            LaServer srv = (LaServer)((ToolStripDropDownItem)sender).Tag;

            this.changeHostAndStartApp(srv);
        }
Ejemplo n.º 11
0
 public void DelServer(LaServer server)
 {
     this.serverList.Remove(server);
 }
Ejemplo n.º 12
0
 public void AddServer(LaServer server)
 {
     this.serverList.Add(server);
 }