Example #1
0
        private async void ConnectFrm_Shown(object sender, EventArgs e)
        {
            BrowseBtn.Enabled      =
                ConnectBtn.Enabled = ModePnl.Enabled = false;
            StatusTxt.SetDotAnimation("Checking for updates");

            try
            {
                if (await MainUI.UpdateUI.CheckForUpdatesAsync())
                {
                    WindowState = FormWindowState.Minimized;
                    StatusTxt.StopDotAnimation("Update Found!");
                    MainUI.UpdateUI.ShowDialog();
                }
            }
            catch { /* Update check failed. */ }
            finally
            {
                BrowseBtn.Enabled      =
                    ConnectBtn.Enabled = ModePnl.Enabled = true;

                StatusTxt.StopDotAnimation("Standing By...");
                WindowState = FormWindowState.Normal;
            }
        }
Example #2
0
 private void ResetInterface()
 {
     IsConnecting    = false;
     ConnectBtn.Text = "Connect";
     StatusTxt.StopDotAnimation("Standing By...");
     GameHostTxt.ReadOnly = GamePortTxt.ReadOnly = !ModePnl.IsManual;
     ModePnl.Enabled      = !(ExponentTxt.ReadOnly = ModulusTxt.ReadOnly = false);
 }
Example #3
0
        private void DoConnectCleanup()
        {
            IsConnecting    = false;
            ConnectBtn.Text = "Connect";
            StatusTxt.StopDotAnimation("Standing By...");
            GameHostTxt.ReadOnly = GamePortTxt.ReadOnly = !ModePnl.IsManual;
            ModePnl.Enabled      = !(ExponentTxt.ReadOnly = ModulusTxt.ReadOnly = false);

            Eavesdropper.Terminate();
            HConnection.RestoreHosts();
            Eavesdropper.EavesdropperRequest  -= InjectClient;
            Eavesdropper.EavesdropperResponse -= ReplaceClient;
            Eavesdropper.EavesdropperResponse -= ExtractHostPort;
        }
Example #4
0
        private async void BrowseBtn_Click(object sender, EventArgs e)
        {
            ChooseClientDlg.FileName = ChooseClientDlg.SafeFileName;
            if (ChooseClientDlg.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            bool verifySuccess = await VerifyGameClientAsync(
                ChooseClientDlg.FileName);

            StatusTxt.StopDotAnimation("Standing By...");
            if (!verifySuccess)
            {
                MessageBox.Show("Unable to disassemble the Shockwave Flash(.swf) file.",
                                "Tanji ~ Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            CustomClientTxt.Text = verifySuccess ?
                                   MainUI.Game.Location : string.Empty;
        }