public MainWindow() { InitializeComponent(); textBoxPlaintext.Text = "1122334455667700FFEEDDCCBBAA9988"; textBoxKey.Text = "8899AABBCCDDEEFF0011223344556677FEDCBA98765432100123456789ABCDEF"; KeyGenBox.GenerateContent(mainWindow, k); EncryptBox.GenerateContent(mainWindow, k); IntroBox.GenerateContent(mainWindow, k); }
public override void Initialize() { base.Initialize(); Manager.Scene.AddEntity(new PlayerSignedOut()); MusicPlayer.Play(MusicPlayer.LevelTheme); Manager.Graphics.OffSet = new Vector2(Manager.Graphics.ScreenSafeArea.X, Manager.Graphics.ScreenSafeArea.Y); Manager.Graphics.BeginShader(); GreyInfectiontitleScene background = new GreyInfectiontitleScene(); Manager.Scene.AddEntity(background); background.EnableGlitchColor = false; Manager.Scene.AddEntity(new BackBox()); intro1 = new IntroBox(); Manager.Scene.AddEntity(intro1); intro1.Index = 1; intro1.OnEndTypping = OnEndIntro1; intro1.Enabled = true; intro1.Visible = true; intro2 = new IntroBox(); Manager.Scene.AddEntity(intro2); intro2.Index = 2; intro2.OnEndTypping = OnEndIntro2; intro3 = new IntroBox(); Manager.Scene.AddEntity(intro3); intro3.Index = 3; intro3.OnEndTypping = OnEndIntro3; // Pistas: InputHintLabel inputHint = new InputHintLabel(); Manager.Scene.AddEntity(inputHint); inputHint.Button = InputHintLabel.GamepadButtonChar.A; inputHint.Caption = Session.Strings["button_continue"]; inputHint.Location = new Vector2(Manager.Graphics.ScreenBounds.Center.X - 40, Manager.Graphics.ScreenSafeArea.Bottom - 14); inputHint.ZOrder = -9999999; showIntro = false; showGameInput = false; timer = new Timer(); }
private void textBoxKey_TextChanged(object sender, TextChangedEventArgs e) { int x = textBoxKey.SelectionStart; textBoxKey.Text = textBoxKey.Text.ToUpper(); textBoxKey.SelectionStart = x; if ((textBoxKey != null && textBoxKey.Text.Length == 64) && ((encryptMode == true && textBoxPlaintext != null && textBoxPlaintext.Text.Length == 32) || (encryptMode == false && textBoxCiphertext != null && textBoxCiphertext.Text.Length == 32))) { if (XBoxVisualization.IsActive() == true) { XBoxVisualization.DeleteContent(mainWindow); } if (SBoxVisualization.IsActive() == true) { SBoxVisualization.DeleteContent(mainWindow); } if (LBoxVisualization.IsActive() == true) { LBoxVisualization.DeleteContent(mainWindow); } if (Reversed_LBoxVisualization.IsActive() == true) { Reversed_LBoxVisualization.DeleteContent(mainWindow); } if (encryptMode == true) { k = new Kuznyechik(textBoxPlaintext.Text, textBoxKey.Text, ""); textBoxCiphertext.Text = k.ToString(); EncryptBox.DeleteContent(mainWindow); EncryptBox.GenerateContent(mainWindow, k); } else //encryptMode == false { k = new Kuznyechik("", textBoxKey.Text, textBoxCiphertext.Text); textBoxPlaintext.Text = k.ToString(); DecryptBox.DeleteContent(mainWindow); DecryptBox.GenerateContent(mainWindow, k); } KeyGenBox.DeleteContent(mainWindow); KeyGenBox.GenerateContent(mainWindow, k); IntroBox.DeleteContent(mainWindow); IntroBox.GenerateContent(mainWindow, k); } }