Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Zharay/KanColleViewer int…
Browse files Browse the repository at this point in the history
…o master-horizontal
  • Loading branch information
Zharay committed Feb 19, 2014
2 parents 6874266 + 7a2667d commit 764f03b
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 62 deletions.
2 changes: 1 addition & 1 deletion Grabacr07.KanColleViewer/ViewModels/NavigatorViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public void Navigate()
public void CookieNavigate()
{
Uri uri;
string CookieInject = "javascript:void(eval(\"document.cookie = 'ckcy=1;expires=Sun, 09 Feb 2019 09:00:09 GMT;domain=osapi.dmm.com;path=/';document.cookie = 'ckcy=1;expires=Sun, 09 Feb 2019 09:00:09 GMT;domain=203.104.209.7;path=/';document.cookie = 'ckcy=1;expires=Sun, 09 Feb 2019 09:00:09 GMT;domain=www.dmm.com;path=/netgame/';\"));location.href=\"";
string CookieInject = "javascript:void(eval(\"document.cookie = 'ckcy=1;expires=Sun, 09 Feb " + DateTime.Now.AddYears(4).ToString("YYYY") + " 09:00:09 GMT;domain=osapi.dmm.com;path=/';document.cookie = 'ckcy=1;expires=Sun, 09 Feb " + DateTime.Now.AddYears(4).ToString("YYYY") + " 09:00:09 GMT;domain=203.104.209.7;path=/';document.cookie = 'ckcy=1;expires=Sun, 09 Feb " + DateTime.Now.AddYears(4).ToString("YYYY") + " 09:00:09 GMT;domain=www.dmm.com;path=/netgame/';\"));location.href=\"";
CookieInject += this.SourceString + "\";";
if (this.UriRequested != null && Uri.TryCreate(CookieInject, UriKind.Absolute, out uri))
{
Expand Down
29 changes: 17 additions & 12 deletions Grabacr07.KanColleWrapper/Logger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,27 @@ internal Logger(KanColleProxy proxy)

private string GetTranslation(string JPTerm, string FileName)
{
System.IO.StreamReader filereader = new System.IO.StreamReader(FileName, System.Text.Encoding.UTF8, true);
string read_line = null;
string jap_name = null;
string eng_name = null;
while (true)
try
{
read_line = filereader.ReadLine();
if (String.IsNullOrEmpty(read_line)) { filereader.Close(); break; }
else
System.IO.StreamReader filereader = new System.IO.StreamReader(FileName, System.Text.Encoding.UTF8, true);
string read_line = null;
string jap_name = null;
string eng_name = null;
while (true)
{
char[] delimiter = { ';', ',' };
jap_name = read_line.Split(delimiter)[0];
eng_name = read_line.Split(delimiter)[1];
if (String.Equals(JPTerm, jap_name)) { filereader.Close(); return eng_name; }
read_line = filereader.ReadLine();
if (String.IsNullOrEmpty(read_line)) { filereader.Close(); break; }
else
{
char[] delimiter = { ';', ',' };
jap_name = read_line.Split(delimiter)[0];
eng_name = read_line.Split(delimiter)[1];
if (String.Equals(JPTerm, jap_name)) { filereader.Close(); return eng_name; }
}
}
}
catch { }

return JPTerm;
}

Expand Down
58 changes: 34 additions & 24 deletions Grabacr07.KanColleWrapper/Models/Quest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,27 @@ public string Title
//get { return this.RawData.api_title; }
get
{
System.IO.StreamReader filereader = new System.IO.StreamReader("quest.txt", System.Text.Encoding.UTF8, true);
string read_line = null;
string jap_name = null;
string eng_name = null;
while (true)
try
{
read_line = filereader.ReadLine();
if (String.IsNullOrEmpty(read_line)) { filereader.Close(); break; }
else
System.IO.StreamReader filereader = new System.IO.StreamReader("quest.txt", System.Text.Encoding.UTF8, true);
string read_line = null;
string jap_name = null;
string eng_name = null;
while (true)
{
char[] delimiter = { ';' };
jap_name = read_line.Split(delimiter)[1];
eng_name = read_line.Split(delimiter)[2];
if (String.Equals(RawData.api_title, jap_name)) { filereader.Close(); return eng_name; }
read_line = filereader.ReadLine();
if (String.IsNullOrEmpty(read_line)) { filereader.Close(); break; }
else
{
char[] delimiter = { ';' };
jap_name = read_line.Split(delimiter)[1];
eng_name = read_line.Split(delimiter)[2];
if (String.Equals(RawData.api_title, jap_name)) { filereader.Close(); return eng_name; }
}
}
}
catch { }

return this.RawData.api_title;
}
}
Expand All @@ -83,22 +88,27 @@ public string Detail

get
{
System.IO.StreamReader filereader = new System.IO.StreamReader("quest.txt", System.Text.Encoding.UTF8, true);
string read_line = null;
string jap_name = null;
string eng_name = null;
while (true)
try
{
read_line = filereader.ReadLine();
if (String.IsNullOrEmpty(read_line)) { filereader.Close(); break; }
else
System.IO.StreamReader filereader = new System.IO.StreamReader("quest.txt", System.Text.Encoding.UTF8, true);
string read_line = null;
string jap_name = null;
string eng_name = null;
while (true)
{
char[] delimiter = { ';' };
jap_name = read_line.Split(delimiter)[3];
eng_name = read_line.Split(delimiter)[4];
if (String.Equals(RawData.api_detail, jap_name)) { filereader.Close(); return eng_name; }
read_line = filereader.ReadLine();
if (String.IsNullOrEmpty(read_line)) { filereader.Close(); break; }
else
{
char[] delimiter = { ';' };
jap_name = read_line.Split(delimiter)[3];
eng_name = read_line.Split(delimiter)[4];
if (String.Equals(RawData.api_detail, jap_name)) { filereader.Close(); return eng_name; }
}
}
}
catch { }

return this.RawData.api_detail;
}
}
Expand Down
29 changes: 17 additions & 12 deletions Grabacr07.KanColleWrapper/Models/ShipInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,27 @@ public string Name
//get { return this.RawData.api_name; }
get
{
System.IO.StreamReader filereader = new System.IO.StreamReader("ship.txt", System.Text.Encoding.UTF8, true);
string read_line = null;
string jap_name = null;
string eng_name = null;
while (true)
try
{
read_line = filereader.ReadLine();
if (String.IsNullOrEmpty(read_line)) { filereader.Close(); break; }
else
System.IO.StreamReader filereader = new System.IO.StreamReader("ship.txt", System.Text.Encoding.UTF8, true);
string read_line = null;
string jap_name = null;
string eng_name = null;
while (true)
{
char[] delimiter = { ';', ',' };
jap_name = read_line.Split(delimiter)[0];
eng_name = read_line.Split(delimiter)[1];
if (String.Equals(RawData.api_name, jap_name)) { filereader.Close(); return eng_name; }
read_line = filereader.ReadLine();
if (String.IsNullOrEmpty(read_line)) { filereader.Close(); break; }
else
{
char[] delimiter = { ';', ',' };
jap_name = read_line.Split(delimiter)[0];
eng_name = read_line.Split(delimiter)[1];
if (String.Equals(RawData.api_name, jap_name)) { filereader.Close(); return eng_name; }
}
}
}
catch { }

return this.RawData.api_name;
}
}
Expand Down
31 changes: 18 additions & 13 deletions Grabacr07.KanColleWrapper/Models/SlotItemInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,28 @@ public string Name
//get { return this.RawData.api_name; }
get
{
System.IO.StreamReader filereader = new System.IO.StreamReader("equipment.txt", System.Text.Encoding.UTF8, true);
string read_line = null;
string jap_name = null;
string eng_name = null;
while (true)
try
{
read_line = filereader.ReadLine();
if (String.IsNullOrEmpty(read_line)) { filereader.Close(); break; }
else
System.IO.StreamReader filereader = new System.IO.StreamReader("equipment.txt", System.Text.Encoding.UTF8, true);
string read_line = null;
string jap_name = null;
string eng_name = null;
while (true)
{
char[] delimiter = { ';', ',' };
jap_name = read_line.Split(delimiter)[0];
eng_name = read_line.Split(delimiter)[1];
if (String.Equals(RawData.api_name, jap_name))
{ filereader.Close(); return eng_name; }
read_line = filereader.ReadLine();
if (String.IsNullOrEmpty(read_line)) { filereader.Close(); break; }
else
{
char[] delimiter = { ';', ',' };
jap_name = read_line.Split(delimiter)[0];
eng_name = read_line.Split(delimiter)[1];
if (String.Equals(RawData.api_name, jap_name))
{ filereader.Close(); return eng_name; }
}
}
}
catch { }

return this.RawData.api_name;
}
}
Expand Down
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,37 @@ All builds can be found in the following links below.

* [SkyDrive](http://sdrv.ms/1b01S24) -- Major revision binaries

## Frequently Asked Questions

#### How do I use KCV to play Kancolle without a VPN?
Before or after logging in, press the "Set Regional Cookie" button. This will change your status from being an IP from outside Japan to being a Japanese native one. It doesn't change your IP or do anything else except change a flag value on your visitor cookie.

#### Is this cookie safe?
By all means it is. But it does mean that it makes playing Kancolle a ton more easier for regions that DMM does not support. From their twitter responses, they are alright with foreigners playing the game, but they will not provide any support for those outside of Japan. Until they change this rather open method of delegating foreigners from non-foreigners, this is probably the easiest way to play (and possible register for) the game itself.

#### My game is choppy when it plays fine in Chrome/Firefox/Flash Projector
Update Internet Explorer to the latest version available for your build of Windows. Windows 7 can go all the way to [Internet Explorer 11](http://windows.microsoft.com/en-us/internet-explorer/ie-11-worldwide-languages) which is by far the fastest version of IE they've made in years.

Also be sure to have the latest version of [Flash for Internet Explorer](http://get.adobe.com/flashplayer/otherversions/) installed!

#### The game will not start or KCV makes me download a flash file instead of opening the link
Install [Flash for Internet Explorer](http://get.adobe.com/flashplayer/otherversions/). You may also have to disable any programs that have been installed on to IE without your consent such as antivirus software and other programs.

#### I'm on Windows 7/XP and the program does not run!
You need to have [.NET Framework 4.5](http://www.microsoft.com/en-us/download/details.aspx?id=30653) installed for your version of Windows. Those on Windows 8 do not have to do this.

#### I want the original Japanese names for ships/items/etc.
Easiest way is to just delete the text file corrisponding to the things you don't wish to be translated. You are also encouraged to use the [original version of KCV](http://grabacr.net/kancolleviewer) as it has an english UI now.

#### What is the difference between this and the original?
* Horizontal version is unique (for now) to this project.
* The translation of all equipment, ships, and quests
* Logging features (for now)
* Regional cookie setting.
* Ranking information (for now)

Other than the above, this version is the same with just some minor tweaks to make it fit for an English translation. The plan is to hopefully add some features into the main project for all to enjoy.

## About This Project
KanColleViewer uses the web browser component of the Windows Presentation Foundation (WPF) in combination of [FiddlerCore](http://fiddler2.com/fiddlercore) to capture communication packets inbetween the server and the page itself.

Expand Down

0 comments on commit 764f03b

Please sign in to comment.