Skip to content

Commit

Permalink
Assembly v 6.12 (12.04.24)
Browse files Browse the repository at this point in the history
  • Loading branch information
adslbarxatov committed Apr 11, 2024
1 parent 0b3d318 commit 037558d
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 59 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
# Константы, используемые далее по тексту
env:
PROJ: ${{ github.event.repository.name }}
TAG: '6.11.5'
TAG: '6.12'

steps:
# Проверка состава репозитория (без анализа, как может показаться)
Expand Down
Binary file added .release/DPArray.sfx.exe
Binary file not shown.
10 changes: 4 additions & 6 deletions .release/Release.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
_Changes for v 6.11.5_:
- Updated the HypeHelp links list;
- Updated some internal mechanics;
- Removed some obsolete code;
- Server messages are now localized too;
- XPUN control has been updated
_Changes for v 6.12_:
- Updated HypeHelp and Updates checker mechanics: this should fix apps freezing immediately after launch (on some PCs);
- The mini-launcher now can kill user-defined processes;
- Updated the HypeHelp links list
5 changes: 5 additions & 0 deletions Changes.log
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
DPArray: changes log

Version 6.12:
• Updated HypeHelp and Updates checker mechanics: this should fix apps freezing immediately
after launch (on some PCs);
• The mini-launcher now can kill user-defined processes

Version 6.11.5:
• Updated the HypeHelp links list;
• Updated some internal mechanics;
Expand Down
10 changes: 5 additions & 5 deletions Packages.dpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ n:DPArray
a:DPArray.dp
f:fvd
i:INFOPAGE
v:6.11.5
p:000940AE956EFA8C
v:6.12
p:00093EA9F079FEF9



Expand Down Expand Up @@ -59,8 +59,8 @@ a:KassArray.dp
f:F
i:INFOPAGE
l:r
v:5.3.5
p:0015D204130ED145
v:5.3.6
p:0015D0043E13A060

n:OS macros executor
a:OSMacrosExecutor.dp
Expand Down Expand Up @@ -266,7 +266,7 @@ n:KassArray
f:FVD
l:r
i:MS_STORE/9ND98F4C4Q60
v:5.3
v:5.3.6

n:Mafia helper
f:FVD
Expand Down
Binary file modified packages/DPArray.dp
Binary file not shown.
Binary file modified packages/KassArray.dp
Binary file not shown.
90 changes: 43 additions & 47 deletions src/Generics/AboutForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public partial class AboutForm: Form
private string updatesMessage = "", updatesMessageForText = "", description = "",
versionDescription = "", adpRevision = "";
private bool policyAccepted = false;
private bool startupMode = false;
private bool startupMode = false, acceptMode = false;
private bool desciptionHasBeenUpdated = false;
private const string newPolicyAlias = "!";

Expand All @@ -31,9 +31,8 @@ public partial class AboutForm: Form

// Элементы поддержки HypeHelp
private const string HypeHelpKey = "HypeHelp";
private bool hypeHelp;
/*private bool hypeHelp;*/
private const string LastHypeHelpKey = "LastHypeHelp";
/*private DateTime lastHypeHelp;*/

private string[] hypeHelpLinks = new string[] {
"https://vk.com/rd_aaow_fdl",
Expand Down Expand Up @@ -65,7 +64,6 @@ public partial class AboutForm: Form
"https://moddb.com/mods/eshq",
"https://moddb.com/mods/ccm",
};
/*private Random rnd = new Random ();*/

/// <summary>
/// Левый маркер лога изменений
Expand Down Expand Up @@ -203,29 +201,6 @@ public int AcceptEULA ()
// Основной метод запуска окна
private int LaunchForm (bool StartupMode, bool AcceptMode)
{
// HypeHelp
hypeHelp = RDGenerics.GetDPArraySettingsValue (HypeHelpKey) == "1";
if (hypeHelp)
{
DateTime lastHypeHelp;
try
{
lastHypeHelp = DateTime.Parse (RDGenerics.GetDPArraySettingsValue (LastHypeHelpKey));
}
catch
{
lastHypeHelp = DateTime.Now;
}

if (/*hypeHelp &&*/ (StartupMode || AcceptMode) && (lastHypeHelp <= DateTime.Now))
{
RDGenerics.RunWork (HypeHelper, null, null, RDRunWorkFlags.DontSuspendExecution);

lastHypeHelp = DateTime.Now.AddMinutes (RDGenerics.RND.Next (65, 95));
RDGenerics.SetDPArraySettingsValue (LastHypeHelpKey, lastHypeHelp.ToString ());
}
}

// Запрос настроек
adpRevision = RDGenerics.GetDPArraySettingsValue (ADPRevisionKey);
string helpShownAt = RDGenerics.GetAppSettingsValue (LastShownVersionKey);
Expand All @@ -239,6 +214,7 @@ private int LaunchForm (bool StartupMode, bool AcceptMode)

// Контроль
startupMode = StartupMode;
acceptMode = AcceptMode;
if (StartupMode && (helpShownAt == ProgramDescription.AssemblyVersion) || // Справка уже отображалась
AcceptMode && (!adpRevision.EndsWith (newPolicyAlias))) // Политика уже принята
return 1;
Expand Down Expand Up @@ -309,16 +285,18 @@ private int LaunchForm (bool StartupMode, bool AcceptMode)
RDLocale.GetDefaultText (RDLDefaultTexts.Control_PolicyEULA) :
RDLocale.GetDefaultText (RDLDefaultTexts.Control_AppAbout);

// Запуск проверки обновлений
if (!AcceptMode)
/*if (!AcceptMode)
{
// Запуск проверки обновлений
UpdatesPageButton.Enabled = false;
RDGenerics.RunWork (UpdatesChecker, null, null, RDRunWorkFlags.DontSuspendExecution);
UpdatesTimer.Enabled = true;
}
else*/

// Получение Политики
else
if (AcceptMode)
{
RDGenerics.RunWork (PolicyLoader, null,
RDLocale.GetDefaultText (RDLDefaultTexts.Message_PreparingForLaunch),
Expand Down Expand Up @@ -350,7 +328,7 @@ private int LaunchForm (bool StartupMode, bool AcceptMode)
if (RDGenerics.StartedFromMSStore)
HypeHelpFlag.Checked = HypeHelpFlag.Visible = false;
else
HypeHelpFlag.Checked = hypeHelp;
HypeHelpFlag.Checked = /*hypeHelp*/ (RDGenerics.GetDPArraySettingsValue (HypeHelpKey) == "1");

RDGenerics.LoadAppAboutWindowDimensions (this);

Expand All @@ -359,6 +337,29 @@ private int LaunchForm (bool StartupMode, bool AcceptMode)
RDGenerics.SaveAppAboutWindowDimensions (this);
RDGenerics.SetDPArraySettingsValue (HypeHelpKey, HypeHelpFlag.Checked ? "1" : "0");

// HypeHelp (только если окно отображено)
/*hypeHelp = RDGenerics.GetDPArraySettingsValue (HypeHelpKey) == "1";*/
if (/*hypeHelp*/ HypeHelpFlag.Checked)
{
DateTime lastHypeHelp;
try
{
lastHypeHelp = DateTime.Parse (RDGenerics.GetDPArraySettingsValue (LastHypeHelpKey));
}
catch
{
lastHypeHelp = DateTime.Now;
}

if (/*(StartupMode || AcceptMode)*/ !AcceptMode && (lastHypeHelp <= DateTime.Now))
{
RDGenerics.RunWork (HypeHelper, null, null, RDRunWorkFlags.DontSuspendExecution);

lastHypeHelp = DateTime.Now.AddMinutes (RDGenerics.RND.Next (65, 95));
RDGenerics.SetDPArraySettingsValue (LastHypeHelpKey, lastHypeHelp.ToString ());
}
}

// Запись версий по завершению
if (StartupMode)
RDGenerics.SetAppSettingsValue (LastShownVersionKey, ProgramDescription.AssemblyVersion);
Expand All @@ -372,6 +373,17 @@ private int LaunchForm (bool StartupMode, bool AcceptMode)
return policyAccepted ? 0 : -1;
}

// Запуск проверки обновлений (только при отображённом окне)
private void AboutForm_Shown (object sender, EventArgs e)
{
if (acceptMode)
return;

UpdatesPageButton.Enabled = false;
RDGenerics.RunWork (UpdatesChecker, null, null, RDRunWorkFlags.DontSuspendExecution);
UpdatesTimer.Enabled = true;
}

// Метод получает Политику разработки
private void PolicyLoader (object sender, DoWorkEventArgs e)
{
Expand Down Expand Up @@ -435,22 +447,6 @@ public static bool VeryFirstStart
}
private static int veryFirstStart = -1;

/*
/// <summary>
/// Конструктор. Открывает указанную ссылку без запуска формы
/// </summary>
/// <param name="Link">Ссылка для отображения;
/// если указан null, запускается ссылка на релизы продукта</param>
public AboutForm (string Link)
{
if (string.IsNullOrWhiteSpace (Link))
RDGenerics.RunURL (RDGenerics.DefaultGitLink + ProgramDescription.AssemblyMainName +
RDGenerics.GitUpdatesSublink + "/latest");
else
RDGenerics.RunURL (Link);
}
*/

// Закрытие окна
private void ExitButton_Click (object sender, EventArgs e)
{
Expand Down

0 comments on commit 037558d

Please sign in to comment.