| 1 |
using System; |
| 2 |
using System.Collections.Generic; |
| 3 |
using System.ComponentModel; |
| 4 |
using System.Data; |
| 5 |
using System.Drawing; |
| 6 |
using System.Text; |
| 7 |
using System.Windows.Forms; |
| 8 |
|
| 9 |
namespace FeliCa2Money |
| 10 |
{ |
| 11 |
public partial class OptionDialog : Form |
| 12 |
{ |
| 13 |
public OptionDialog() |
| 14 |
{ |
| 15 |
InitializeComponent(); |
| 16 |
|
| 17 |
LoadProperties(); |
| 18 |
} |
| 19 |
|
| 20 |
public void LoadProperties() |
| 21 |
{ |
| 22 |
Properties.Settings s = Properties.Settings.Default; |
| 23 |
|
| 24 |
checkIgnoreZeroTransaction.Checked = s.IgnoreZeroTransaction; |
| 25 |
checkManualOfxPath.Checked = s.ManualOfxPath; |
| 26 |
checkAutoKickOfxFile.Checked = s.AutoKickOfxFile; |
| 27 |
checkOfxVer2.Checked = s.OfxVer2; |
| 28 |
|
| 29 |
//textSfcPeepPath.Text = s.SFCPeepPath; |
| 30 |
|
| 31 |
int p = s.ShopAreaPriority; |
| 32 |
switch (p) |
| 33 |
{ |
| 34 |
default: |
| 35 |
case Suica.AreaSuica: radioSuica.Checked = true; break; |
| 36 |
case Suica.AreaIcoca: radioIcoca.Checked = true; break; |
| 37 |
case Suica.AreaIruca: radioIruca.Checked = true; break; |
| 38 |
} |
| 39 |
} |
| 40 |
|
| 41 |
public void SaveProperties() |
| 42 |
{ |
| 43 |
Properties.Settings s = Properties.Settings.Default; |
| 44 |
|
| 45 |
s.IgnoreZeroTransaction = checkIgnoreZeroTransaction.Checked; |
| 46 |
s.ManualOfxPath = checkManualOfxPath.Checked; |
| 47 |
s.AutoKickOfxFile = checkAutoKickOfxFile.Checked; |
| 48 |
s.OfxVer2 = checkOfxVer2.Checked; |
| 49 |
//s.SFCPeepPath = textSfcPeepPath.Text; |
| 50 |
|
| 51 |
int p = Suica.AreaSuica; |
| 52 |
if (radioSuica.Checked) p = Suica.AreaSuica; |
| 53 |
else if (radioIcoca.Checked) p = Suica.AreaIcoca; |
| 54 |
else if (radioIruca.Checked) p = Suica.AreaIruca; |
| 55 |
s.ShopAreaPriority = p; |
| 56 |
|
| 57 |
s.Save(); |
| 58 |
} |
| 59 |
|
| 60 |
private void buttonCsvRulesUpdate_Click(object sender, EventArgs e) |
| 61 |
{ |
| 62 |
if (CsvRules.DownloadRule()) |
| 63 |
{ |
| 64 |
MessageBox.Show(Properties.Resources.UpdateCompleted); |
| 65 |
} |
| 66 |
} |
| 67 |
|
| 68 |
/* |
| 69 |
private void buttonSfcPath_Click(object sender, EventArgs e) |
| 70 |
{ |
| 71 |
openFileDialog.FileName = textSfcPeepPath.Text; |
| 72 |
openFileDialog.InitialDirectory = System.IO.Path.GetDirectoryName(textSfcPeepPath.Text); |
| 73 |
|
| 74 |
if (openFileDialog.ShowDialog() == DialogResult.OK) |
| 75 |
{ |
| 76 |
textSfcPeepPath.Text = openFileDialog.FileName; |
| 77 |
} |
| 78 |
} |
| 79 |
*/ |
| 80 |
} |
| 81 |
} |