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

Commit

Permalink
Assembly v 3.3 (15.11.23)
Browse files Browse the repository at this point in the history
  • Loading branch information
adslbarxatov committed Nov 14, 2023
1 parent e4d26ba commit cad3d3c
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 44 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: '3.2.5'
TAG: '3.3'

steps:
# Проверка состава репозитория (без анализа, как может показаться)
Expand Down
Binary file added .release/EnchantIt.apk
Binary file not shown.
5 changes: 4 additions & 1 deletion .release/Release.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
_Changes for v 3.2.5_:
_Changes for v 3.3_:
- “Talk to me” and “Show it to me” sections have been restored;
- Xamarin support packages have been updated;
- Fixed some graphical bugs;
- Updates and fixes have been applied to some auxiliary functions;
- New identity has been applied
5 changes: 5 additions & 0 deletions Changes.log
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
PA detector: changes log

Version 3.3:
• “Talk to me” and “Show it to me” sections have been restored;
• Xamarin support packages have been updated;
• Fixed some graphical bugs

Version 3.2.5:
• Updates and fixes have been applied to some auxiliary functions

Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# EnchantIt v 3.2.5

# EnchantIt

## Description

Paranormal activity detector (formerly known as EnchantIt), the paranormal activity search tool.

The task of the app is to discover and mathematically confirm your (or somebody’s, or something’s) ability
to influence the surrounding reality not only by actions and words. How does it work?
You can find an answer on the [page of the method’s description](https://adslbarxatov.github.io/EnchantIt)

---
 



## Описание

Paranormal activity detector (ранее известный как EnchantIt) – инструмент поиска паранормальной активности.

Expand Down
5 changes: 5 additions & 0 deletions src/AboutPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@
<Button x:Name="FontSizeDec" VerticalOptions="Center" />
</StackLayout>

<BoxView VerticalOptions="Center" HorizontalOptions="Center" HeightRequest="1"
WidthRequest="200" Color="#505050" Margin="9" />

<Label x:Name="HelpTextLabel" />

<Label />

</StackLayout>
Expand Down
71 changes: 34 additions & 37 deletions src/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ public partial class App: Application

// Фактор определения отклонения от нормы.
// Определён сейчас как сумма десяти максимальных (по практическим наблюдениям) отклонений (~ 1%),
// возникающих хотя бы в 59% случаев
private const double factor = 0.01 * countOfSummas * 0.59 * scaleSizeFactor;
// возникающих хотя бы в 55% случаев
private const double factor = 0.01 * countOfSummas * 0.55 * scaleSizeFactor;

// Минимальное количество срабатываний в ряд, необходимое для сертификации
private const uint certLimit = 3;
Expand Down Expand Up @@ -124,15 +124,15 @@ private readonly Color
private ContentPage solutionPage, aboutPage, ttm1Page, ttm2Page;
private const int pagesCount = 4;
private Label aboutLabel, measureLabel, resultsLabel, instructionsLabel,
space01, space02, resultsTTM1Label;
space01, space02, resultsTTM1Label, aboutFontSizeField;
private Label[] pixels = new Label[2];

private Xamarin.Forms.Button startButton, stopButton, shareButton, methodButton,
certButton, startTTM1Button, methodTTM1Button, resetTTM1Button,
startTTM2Button, stopTTM2Button, methodTTM2Button;
startTTM2Button, stopTTM2Button, methodTTM2Button, languageButton;
private Xamarin.Forms.ProgressBar[] scale = new Xamarin.Forms.ProgressBar[3],
factorScale = new Xamarin.Forms.ProgressBar[2];
private Xamarin.Forms.Editor messageTTM1Editor;
private Label[] pixels = new Label[2];

#else

Expand Down Expand Up @@ -172,9 +172,9 @@ public App (bool Huawei)

#if TTM
ttm1Page = AndroidSupport.ApplyPageSettings (MainPage, "TTM1Page",
Localization.GetText ("TTM1Page", al), solutionMasterBackColor);
Localization.GetText ("TTM1Page"), solutionMasterBackColor);
ttm2Page = AndroidSupport.ApplyPageSettings (MainPage, "TTM2Page",
Localization.GetText ("TTM2Page", al), solutionMasterBackColor);
Localization.GetText ("TTM2Page"), solutionMasterBackColor);
#endif

#region Основная страница
Expand Down Expand Up @@ -268,6 +268,11 @@ public App (bool Huawei)
aboutFontSizeField = AndroidSupport.ApplyLabelSettings (aboutPage, "FontSizeField",
" ", ASLabelTypes.DefaultCenter);

AndroidSupport.ApplyLabelSettings (aboutPage, "HelpTextLabel",
RDGenerics.GetEncoding (SupportedEncodings.UTF8).
GetString ((byte[])RD_AAOW.Properties.Resources.ResourceManager.
GetObject (Localization.GetHelpFilePath ())), ASLabelTypes.SmallLeft);

FontSizeButton_Clicked (null, null);

#endregion
Expand All @@ -285,7 +290,8 @@ public App (bool Huawei)
AndroidSupport.ApplyButtonSettings (ttm1Page, "NightMode", ASButtonDefaultTypes.NightMode,
solutionFieldBackColor, SwitchNightMode);

resultsTTM1Label = AndroidSupport.ApplyLabelSettingsForKKT (ttm1Page, "Results", "", false, true);
resultsTTM1Label = AndroidSupport.ApplyLabelSettings (ttm1Page, "Results", "", ASLabelTypes.Field,
solutionMasterBackColor);
messageTTM1Editor = AndroidSupport.ApplyEditorSettings (ttm1Page, "Message", solutionFieldBackColor,
Keyboard.Text, 100, "", null, true);
#endif
Expand All @@ -308,8 +314,8 @@ public App (bool Huawei)

for (int i = 0; i < pixels.Length; i++)
{
pixels[i] = AndroidSupport.ApplyResultLabelSettings (ttm2Page, "Pixels" + (i + 1).ToString (), " ",
solutionFieldBackColor, true);
pixels[i] = AndroidSupport.ApplyLabelSettings (ttm2Page, "Pixels" + (i + 1).ToString (), " ",
ASLabelTypes.Field, solutionFieldBackColor);
pixels[i].TextType = TextType.Html;
pixels[i].HorizontalOptions = new LayoutOptions (LayoutAlignment.Center, false);
}
Expand Down Expand Up @@ -372,20 +378,12 @@ private async void ShowTips (bool Huawei)

await AndroidSupport.ShowMessage (Localization.GetText ("Tip00"),
Localization.GetDefaultText (LzDefaultTextValues.Button_OK));
}

if (AndroidSupport.AllowFontSizeTip)
{
await AndroidSupport.ShowMessage (
Localization.GetDefaultText (LzDefaultTextValues.Message_FontSizeAvailable),
Localization.GetDefaultText (LzDefaultTextValues.Button_OK));
}

#if TTM
await aboutPage.DiplayAlert (ProgramDescription.AssemblyVisibleName,
Localization.GetText ("Tip02"),
Localization.GetDefaultText (LzDefaultTextValues.Button_OK));
await AndroidSupport.ShowMessage (Localization.GetText ("Tip02"),
Localization.GetDefaultText (LzDefaultTextValues.Button_OK));
#endif
}
}

/// <summary>
Expand Down Expand Up @@ -792,6 +790,7 @@ private void SwitchNightMode (object sender, EventArgs e)
solutionPage.BackgroundColor =
#if TTM
ttm1Page.BackgroundColor = ttm2Page.BackgroundColor = messageTTM1Editor.TextColor =
resultsTTM1Label.BackgroundColor =
#endif
solutionMasterTextColor;
resultsLabel.TextColor =
Expand All @@ -807,6 +806,7 @@ private void SwitchNightMode (object sender, EventArgs e)
solutionPage.BackgroundColor =
#if TTM
ttm1Page.BackgroundColor = ttm2Page.BackgroundColor = messageTTM1Editor.TextColor =
resultsTTM1Label.BackgroundColor =
#endif
solutionMasterBackColor;
resultsLabel.TextColor =
Expand Down Expand Up @@ -893,24 +893,23 @@ private async void StartTalking (object sender, EventArgs e)

if (currentMethod == GenerationMethods.Core)
{
ttm = new TalkToMe (al);
ttm = new TalkToMe ();
}
else
{
if (!await InitTalkingFromWifi ())
return;

ttm = new TalkToMe (al, GetSeed, currentMethod == GenerationMethods.CorePlusWiFi);
ttm = new TalkToMe (GetSeed, currentMethod == GenerationMethods.CorePlusWiFi);
}

// Запрос предложения
resultsTTM1Label.Text = ("" + messageTTM1Editor.Text + Localization.RNRN) + resultsTTM1Label.Text;
messageTTM1Editor.Text = "";

To ast.MakeText (Android.App.Application.Context, Localization.GetText ("GettingSentence", al) +
AndroidSupport.ShowBalloon (Localization.GetText ("GettingSentence") +
Localization.RN + "(" +
Localization.GetText ("Method" + ((uint)currentMethod).ToString ("D2"), al) + ")",
ToastLength.Long).Show ();
Localization.GetText ("Method" + ((uint)currentMethod).ToString ("D2")) + ")", true);

string sentence = await Task.Run<string> (ttm.GetNextSentence);
resultsTTM1Label.Text = ("" + sentence + Localization.RNRN) + resultsTTM1Label.Text;
Expand All @@ -928,8 +927,7 @@ private async Task<bool> InitTalkingFromWifi ()
int seed = await Task.Run<int> (GetSeed);
if (seed == 0)
{
To ast.MakeText (Android.App.Application.Context, Localization.GetText ("ConnectionLost", al),
ToastLength.Long).Show ();
AndroidSupport.ShowBalloon (Localization.GetText ("ConnectionLost"), true);

ChangeButtonsState (false, true);
return false;
Expand All @@ -941,10 +939,9 @@ To ast.MakeText (Android.App.Application.Context, Localization.GetText ("Connect
// Метод сбрасывает чат
private async void ResetTheChat (object sender, EventArgs e)
{
if (await ttm1Page.DiplayAlert (ProgramDescription.AssemblyTitle,
Localization.GetText ("ChatResetRequest", al),
Localization.GetText ("NextButton", al),
Localization.GetText ("CancelButton", al)))
if (await AndroidSupport.ShowMessage (Localization.GetText ("ChatResetRequest"),
Localization.GetDefaultText (LzDefaultTextValues.Button_Yes),
Localization.GetDefaultText (LzDefaultTextValues.Button_Cancel)))
resultsTTM1Label.Text = "";
}
#endif
Expand All @@ -959,22 +956,22 @@ private async void StartTTM (object sender, EventArgs e)
{
ChangeButtonsState (true, true);

To ast.MakeText (Android.App.Application.Context, Localization.GetText ("StartingGeneration", al) +
AndroidSupport.ShowBalloon (Localization.GetText ("StartingGeneration") +
Localization.RN +
"(" + Localization.GetText ("Method" + ((uint)currentMethod).ToString ("D2"), al) + ")",
ToastLength.Long).Show ();
"(" + Localization.GetText ("Method" + ((uint)currentMethod).ToString ("D2")) + ")",
true);

// Инициализация потока
if (currentMethod == GenerationMethods.Core)
{
ttm = new TalkToMe (al);
ttm = new TalkToMe ();
}
else
{
if (!await InitTalkingFromWifi ())
return;

ttm = new TalkToMe (al, GetSeed, currentMethod == GenerationMethods.CorePlusWiFi);
ttm = new TalkToMe (GetSeed, currentMethod == GenerationMethods.CorePlusWiFi);
}

// Запуск
Expand Down
4 changes: 2 additions & 2 deletions src/MasterPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
x:Class="RD_AAOW.MasterPage">

<mypages:SolutionPage x:Name="SolutionPage" />
<!--<mypages:TTM1Page x:Name="TTM1Page" />
<mypages:TTM2Page x:Name="TTM2Page" />-->
<mypages:TTM1Page x:Name="TTM1Page" />
<mypages:TTM2Page x:Name="TTM2Page" />
<mypages:AboutPage x:Name="AboutPage" />
</CarouselPage>

0 comments on commit cad3d3c

Please sign in to comment.