Skip to content

Commit

Permalink
version 2.0.0.1
Browse files Browse the repository at this point in the history
Fix some bug,and clean using.
  • Loading branch information
flier268 committed Oct 8, 2017
1 parent e51f965 commit a9632a9
Show file tree
Hide file tree
Showing 16 changed files with 218 additions and 270 deletions.
16 changes: 8 additions & 8 deletions DataGetter/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows.Forms;
Expand Down Expand Up @@ -45,7 +44,7 @@ private void button1_Click(object sender, EventArgs e)
}

string reg1 = @"<tr><td><img\s+src=\'(.*?)\'\/>.*?<a\shref=.*?\'>(.*?)<\/a>.*?class=\'mod_grey\'>(.*?)<\/span>";
string reg_gem = @"<tr.*?>.*?<td><a\s+.*?<img\s+.*?src=\'(.*?)\'\/><\/a>.*?<a\s+class='gem_(.).*?\/>(.*?)<\/a><br>(.*?)<td>";
string reg_gem = @"<tr.*?>.*?<td><a\s+.*?<img\s+.*?src=\'(.*?)'/>.*?<a(.*?)'><img\s.*?>(.*?)</a><br>(.*?)<td>";
string reg_Currency = @"<tr.*?>.*?<td><a\s+.*?<img\s+.*?src=\'(.*?)\'\/>(.*?)<\/a>\((.*?)\)";
string reg_Flask = @"Flask'>(.*?)<\/a>\((.*?)\).*?<img\s+src='(.*?)'\/>";
string reg_Map = @"<tr><td><img\s+src=\'(.*?)\'\/><td><a\s+.*?'>(.*?)</a><br>.*?class='mod_grey'>(.*?)</span>";
Expand Down Expand Up @@ -247,15 +246,16 @@ private async void DownloadData_Async(cn l)

//從網址解析出物品大小
Regex r_url = new Regex(@"&w=(\d)&h=(\d)", RegexOptions.IgnoreCase);
Regex r_GemColor = new Regex(@"class='gem_(.)", RegexOptions.IgnoreCase);
List<RootObject> roots = new List<RootObject>();
if (mm.Count > 0)
{
//一般的順序
int o1 = 1, o2 = 2, o3 = 3, o4 = 4;

//由於藥水、地圖、通貨的排版特別,因此要另外處理
bool 順序不同 = (l.url.ToLower().Contains("flask"))|| l.url.ToLower().EndsWith("prophecy");
bool 沒有顯示大小 = ( l.url.ToLower().Contains("currency"));
bool 順序不同 = (l.url.ToLower().Contains("flask")) || l.url.ToLower().EndsWith("prophecy");
bool 沒有顯示大小 = (l.url.ToLower().Contains("currency"));
bool 技能寶石 = (l.url.ToLower().Contains("gem"));
if (順序不同)
{
Expand All @@ -274,16 +274,16 @@ private async void DownloadData_Async(cn l)

//地圖的大小沒有在圖片的網址寫出來,但都固定是1x1
Match m_url = 沒有顯示大小 ? null : r_url.Match(Icon_url);

var GemColor = r_GemColor.Match(m.Groups[o4].ToString()).Groups;
roots.Add(new RootObject
{
c = m.Groups[o2].ToString(),
e = m.Groups[o3].ToString(),
url = Icon_url,
GC = 技能寶石 ? char.Parse(m.Groups[o4].ToString()) : 'n',
GC = 技能寶石 ? char.Parse(GemColor.Count == 1 ? "w" : GemColor[1].ToString()) : 'n',
w = 沒有顯示大小 ? 1 : int.Parse(m_url.Groups[1].ToString()),
h = 沒有顯示大小 ? 1 : int.Parse(m_url.Groups[2].ToString()),
type=l.name_eng
h = 沒有顯示大小 ? 1 : int.Parse(m_url.Groups[2].ToString()),
type = l.name_eng
});
}
}
Expand Down
8 changes: 1 addition & 7 deletions DataGetter/JsonClass.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataGetter
namespace DataGetter
{
class JsonClass
{
Expand Down
3 changes: 0 additions & 3 deletions DataGetter/Program.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DataGetter
Expand Down
7 changes: 5 additions & 2 deletions Poe整理倉庫v2/ApplicationRunningHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ public override bool Equals(object obj)
else
return false;
}

public override int GetHashCode()
{
return base.GetHashCode();
}
}


Expand Down Expand Up @@ -124,7 +129,5 @@ public static RECT PathOfExileDimentions
return rect;
}
}
//Den buggede lidt :P MEGET^^ Men du trykkede os på den forkerte sorteings ting^^ <.< hvorfor er der to? Hvis den ene er forkert :P.. den
//er bare ikke fikset helt endnu, den anden burde virke... tester lige igen..Lave lige en fail safe, såen så hvis det seker, breaker den.
}
}
Loading

0 comments on commit a9632a9

Please sign in to comment.