Skip to content
This repository has been archived by the owner on Oct 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #49 from RickDB/dev_installerReducedSize
Browse files Browse the repository at this point in the history
MPEI installer size reduction and misc fixes + improvements
  • Loading branch information
ElementalCrisis authored Sep 9, 2016
2 parents 65ca985 + ef2b127 commit aad6146
Show file tree
Hide file tree
Showing 651 changed files with 1,659 additions and 10,340 deletions.
11,364 changes: 1,249 additions & 10,115 deletions MPEI/MyAnime3.xmp2

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion MyAnimePlugin3.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
VisualStudioVersion = 14.0.25123.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyAnimePlugin3", "MyAnimePlugin3\MyAnimePlugin3.csproj", "{3951B061-720C-4D6A-A03D-87E033B71F41}"
EndProject
Expand Down
13 changes: 9 additions & 4 deletions MyAnimePlugin3/ConfigFiles/AnimePluginSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ public class AnimePluginSettings
public int FfdshowNotificationsAutoCloseTime = 3000;
public int FfdshowNotificationsLockTime = 5000;
public bool UseStreaming = true;
private string _subPaths;
public string ModeToggleKey = "]";
public string StartTextToggleKey = "[";
private string _subPaths;

public Dictionary<int, string> ImportFolderMappings
public Dictionary<int, string> ImportFolderMappings
{
get
{
Expand Down Expand Up @@ -436,8 +438,9 @@ public void Load()
FfdshowNotificationsAutoCloseTime = int.Parse(xmlreader.GetValueAsString("Anime3", "FfdshowNotificationsAutoCloseTime", "3000"));
FfdshowNotificationsLockTime = int.Parse(xmlreader.GetValueAsString("Anime3", "FfdshowNotificationsLockTime", "5000"));
UseStreaming = xmlreader.GetValueAsString("Anime3", "UseStreaming", "1") == "1";
ModeToggleKey = xmlreader.GetValueAsString("Anime3", "ModeToggleKey", "]");
StartTextToggleKey = xmlreader.GetValueAsString("Anime3", "StartTextToggleKey", "[");
_subPaths = xmlreader.GetValueAsString("subtitles", "paths", @".\");

xmlreader.Dispose();


Expand Down Expand Up @@ -533,8 +536,10 @@ public void Save()
xmlwriter.SetValue("Anime3", "FfdshowNotificationsAutoCloseTime", ((int)FfdshowNotificationsAutoCloseTime).ToString());
xmlwriter.SetValue("Anime3", "FfdshowNotificationsLockTime", ((int)FfdshowNotificationsLockTime).ToString());
xmlwriter.SetValue("Anime3", "UseStreaming", UseStreaming ? "1" : "0");
xmlwriter.SetValue("Anime3", "ModeToggleKey", ModeToggleKey);
xmlwriter.SetValue("Anime3", "StartTextToggleKey", StartTextToggleKey);

string pth = Path.GetTempPath();
string pth = Path.GetTempPath();
if (!_subPaths.Contains(pth))
{
_subPaths += "," + pth;
Expand Down
112 changes: 94 additions & 18 deletions MyAnimePlugin3/ConfigFiles/frmConfig.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

75 changes: 71 additions & 4 deletions MyAnimePlugin3/ConfigFiles/frmConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,8 @@ public frmConfig()
this.chkLoadlocalThumbnails.Text = Translation.TryToUseLocalThumb;
this.Text = Translation.Anime3Config;
this.chkUseStreaming.Text = Translation.UseStreaming;



this.lblModeToggleKey.Text = Translation.ModeToggle;
this.lblStarttextToggleKey.Text = Translation.StartTextToggle;

btnImagesLocation.Click += new EventHandler(btnImagesLocation_Click);
btnSelectLocalFolderPath.Click += new EventHandler(btnSelectLocalFolderPath_Click);
Expand Down Expand Up @@ -610,6 +609,24 @@ private void SaveSettings()
}
BaseConfig.Settings.UseStreaming = chkUseStreaming.Checked;

if (tbModeToggleKey.Text.Length == 1 && tbModeToggleKey.Text != tbStarttextToggleKey.Text)
{
BaseConfig.Settings.ModeToggleKey = tbModeToggleKey.Text.ToLower();
}
else
{
BaseConfig.Settings.ModeToggleKey = "]";
}

if (tbStarttextToggleKey.Text.Length == 1 && tbStarttextToggleKey.Text != tbModeToggleKey.Text)
{
BaseConfig.Settings.StartTextToggleKey = tbStarttextToggleKey.Text.ToLower();
}
else
{
BaseConfig.Settings.StartTextToggleKey = "[";
}

BaseConfig.Settings.Save();
AddTempPathToSubtilePaths();

Expand Down Expand Up @@ -798,12 +815,15 @@ private void LoadSettingsIntoForm()
}
chkUseStreaming.Checked = BaseConfig.Settings.UseStreaming;
chkUseStreaming_CheckedChanged(null, null);

tbModeToggleKey.Text = BaseConfig.Settings.ModeToggleKey;
tbStarttextToggleKey.Text = BaseConfig.Settings.StartTextToggleKey;
}
#endregion

#region Tab 'Main'

void btnImagesLocation_Click(object sender, EventArgs e)
void btnImagesLocation_Click(object sender, EventArgs e)
{
FolderBrowserDialog dlg = new FolderBrowserDialog();
dlg.Description = Translation.SelectAFolder;
Expand Down Expand Up @@ -854,5 +874,52 @@ private void chkUseStreaming_CheckedChanged(object sender, EventArgs e)
{
groupBox2.Enabled = !chkUseStreaming.Checked;
}
public static string TruncateText(string value, int maxLength)
{
if (string.IsNullOrEmpty(value)) return value;
return value.Length <= maxLength ? value : value.Substring(0, maxLength);
}

private void btnResetModeText_Click(object sender, EventArgs e)
{
tbModeToggleKey.Text = @"]";
}

private void btnClearStartText_Click(object sender, EventArgs e)
{
tbStarttextToggleKey.Text = @"[";
}

private void tbModeToggleKey_Validating(object sender, CancelEventArgs e)
{
if (tbModeToggleKey.Text.Length > 1)
{
tbModeToggleKey.Text = TruncateText(tbModeToggleKey.Text, 1);
}
}

private void tbStarttextToggleKey_Validating(object sender, CancelEventArgs e)
{
if (tbStarttextToggleKey.Text.Length > 1)
{
tbStarttextToggleKey.Text = TruncateText(tbStarttextToggleKey.Text, 1);
}
}

private void tbModeToggleKey_TextChanged(object sender, EventArgs e)
{
if (tbModeToggleKey.Text.Length > 1)
{
tbModeToggleKey.Text = TruncateText(tbModeToggleKey.Text, 1);
}
}

private void tbStarttextToggleKey_TextChanged(object sender, EventArgs e)
{
if (tbStarttextToggleKey.Text.Length > 1)
{
tbStarttextToggleKey.Text = TruncateText(tbStarttextToggleKey.Text, 1);
}
}
}
}
4 changes: 2 additions & 2 deletions MyAnimePlugin3/Skins/Avallonis/Anime3_Main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
<posY>915</posY>
<width>600</width>
<font>AvalonLight12</font>
<label>[ =Start Word (#Anime3.FindStartWord) TAB=Next Match</label>
<label>#Anime3.StartTextToggle =Start Word (#Anime3.FindStartWord) TAB=Next Match</label>
<visible>Control.IsVisible(3463)+Control.IsVisible(3465)+!Player.hasmedia</visible>
</control>
<control>
Expand All @@ -127,7 +127,7 @@
<width>600</width>
<font>AvalonLight12</font>
<align>left</align>
<label>] =Mode (#Anime3.FindMode)</label>
<label>#Anime3.ModeToggleKey =Mode (#Anime3.FindMode)</label>
<visible>Control.IsVisible(3463)</visible>
</control>
</controls>
Expand Down
4 changes: 2 additions & 2 deletions MyAnimePlugin3/Skins/Avalon/Anime3_Main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
<width>600</width>
<font>AvalonLight12</font>
<textcolor>6aa5cb</textcolor>
<label>[ =Start Word (#Anime3.FindStartWord) TAB=Next Match</label>
<label>#Anime3.StartTextToggle =Start Word (#Anime3.FindStartWord) TAB=Next Match</label>
<visible>Control.IsVisible(3463)+Control.IsVisible(3465)+!Player.hasmedia</visible>
</control>
<control>
Expand All @@ -131,7 +131,7 @@
<font>AvalonLight12</font>
<textcolor>6aa5cb</textcolor>
<align>left</align>
<label>] =Mode (#Anime3.FindMode)</label>
<label>#Anime3.ModeToggleKey =Mode (#Anime3.FindMode)</label>
<visible>Control.IsVisible(3463)</visible>
</control>
</controls>
Expand Down
4 changes: 2 additions & 2 deletions MyAnimePlugin3/Skins/Default/Anime3_Main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
<posY>75</posY>
<width>266</width>
<font>font10</font>
<label>[ =Start Word (#Anime3.FindStartWord)</label>
<label>#Anime3.StartTextToggle =Start Word (#Anime3.FindStartWord)</label>
<visible>[facadeview.list|facadeview.largeicons]+Control.IsVisible(3463)+Control.IsVisible(3465)</visible>
</control>

Expand All @@ -174,7 +174,7 @@
<posY>95</posY>
<width>266</width>
<font>font10</font>
<label>] =Mode (#Anime3.FindMode)</label>
<label>#Anime3.ModeToggleKey =Mode (#Anime3.FindMode)</label>
<visible>[facadeview.list|facadeview.largeicons]+Control.IsVisible(3463)</visible>
</control>

Expand Down
Loading

0 comments on commit aad6146

Please sign in to comment.