예제 #1
0
파일: Form1.cs 프로젝트: gyod/lineage2tools
        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]);
        }
예제 #2
0
파일: Form1.cs 프로젝트: gyod/lineage2tools
        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();
        }
예제 #3
0
파일: Form1.cs 프로젝트: gyod/lineage2tools
 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;
 }
예제 #4
0
파일: Form1.cs 프로젝트: gyod/lineage2tools
        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;
        }
예제 #5
0
파일: Form1.cs 프로젝트: gyod/lineage2tools
        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;
                }
            }
        }
예제 #6
0
파일: Form1.cs 프로젝트: gyod/lineage2tools
        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();
        }
예제 #7
0
 public void DelServer(LaServer server)
 {
     this.serverList.Remove(server);
 }
예제 #8
0
 public void AddServer(LaServer server)
 {
     this.serverList.Add(server);
 }
예제 #9
0
파일: Form1.cs 프로젝트: gyod/lineage2tools
 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]);
 }
예제 #10
0
파일: Form1.cs 프로젝트: gyod/lineage2tools
        private void serverSubmenu_Click(object sender, EventArgs e)
        {
            LaServer srv = (LaServer)((ToolStripDropDownItem)sender).Tag;

            this.changeHostAndStartApp(srv);
        }
예제 #11
0
 public void DelServer(LaServer server)
 {
     this.serverList.Remove(server);
 }
예제 #12
0
 public void AddServer(LaServer server)
 {
     this.serverList.Add(server);
 }