Example #1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            var cplusplusinstalled = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Wow6432Node\\Microsoft\\VisualStudio\\10.0\\VC\\VCRedist\\x64\\");

            if (cplusplusinstalled == null)
            {
                cplusplusinstalled = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\VisualStudio\\10.0\\VC\\VCRedist\\x86\\");
            }
            if ((cplusplusinstalled == null) || (cplusplusinstalled != null && (int)cplusplusinstalled.GetValue("Installed") != 1)) // If not installed or not existing
            {
                InfoPopup infoPopup = new InfoPopup();
                infoPopup.Message.Content  = "You need C++ 2010 installed to play DayZero. Download here:";
                infoPopup.Headline.Content = "C++ 2010 Redistributable not installed.";
                infoPopup.SetLink("http://www.microsoft.com/en-us/download/details.aspx?id=8328");
                infoPopup.SetWidth(500);
                infoPopup.Show();
            }
            AppDomain.CurrentDomain.UnhandledException += UncaughtThreadException;
            DispatcherUnhandledException += UncaughtUiThreadException;

            ApplyUpdateIfNeccessary();

            LocalMachineInfo.Current.Update();

            base.OnStartup(e);
        }
        private void Verify_Click(object sender, RoutedEventArgs e)
        {
            string torrentUrl;

            if (!GameUpdater.HttpGet("http://www.zombies.nu/dayzerotorrent.txt", out torrentUrl))
            {
                InfoPopup popup = new InfoPopup();
                popup.Headline.Content = "An Error occured.";
                popup.Message.Content  = "Could not contact Zombies.nu.\nPlease try again.";
                popup.Owner            = popup.Owner = MainWindow.GetWindow(this.Parent);
                popup.Title            = "Error";
                popup.Show();
                return;
            }
            else
            {
                TorrentState state = TorrentUpdater.CurrentState();
                if (state == TorrentState.Stopped)
                {
                    TorrentUpdater verifier = new TorrentUpdater(torrentUrl); // Sets up launcher to start checking files.
                    verifier.StartTorrents(1);
                }
                FileVerifierPopup popup = new FileVerifierPopup();
                popup.Owner            = MainWindow.GetWindow(this.Parent);
                popup.Headline.Content = "Please Wait";
                popup.Title            = "Please Wait";

                popup.Show();
            }
        }
Example #3
0
 void HandleTooltipTimerTimeout()
 {
     UpdateHoverItem();
     if (m_InfoPopup.Item != null)
     {
         m_InfoPopup.Show();
     }
 }
Example #4
0
        public void OnClick_About()
        {
            InfoPopup popup = InfoPopup.CreateFromResource("UserInterface/MainMenu/AboutPopup", Show);

            popup.Show();

            Hide();
        }
Example #5
0
    public void ShowInfoPopup()
    {
        if (m_currentState != eTabletViewState.kDefault || m_cityTabletGroup == null || m_infoPopup == null)
        {
            return;
        }

        if (m_guessPopup != null)
        {
            m_guessPopup.gameObject.SetActive(false);
        }
        if (m_defaultGUI != null)
        {
            m_defaultGUI.gameObject.SetActive(false);
        }

        m_infoPopup.Show();
        m_infoPopup.Setup(m_cityTabletGroup.GetCurrentTabletFace());
        m_currentState = eTabletViewState.kInfoPopup;
    }
Example #6
0
    private void UpdateLayerUI()
    {
        if (step == 0.0f)
        {
            return;
        }

        GameObject activeTile = tiles[tiles.Length - Mathf.CeilToInt(step)];

        if (infoPopUp.isActiveAndEnabled)
        {
            infoPopUp.SetAnchor(activeTile.transform.Find("TagAnchor"));
            infoPopUp.Show(tiles.Length - Mathf.CeilToInt(step));
        }

        if (quiz.isActiveAndEnabled)
        {
            quiz.transform.position = activeTile.transform.Find("TagAnchor").transform.position;
            quiz.transform.SetParent(activeTile.transform.Find("TagAnchor").transform);
        }
    }