Example #1
0
    // Start is called before the first frame update
    void Start()
    {
        //Determine if the user in in the game.
        bool isInGame = false;

        foreach (User player in ApplicationState.currentGameRoom.Players)
        {
            if (!isInGame && player.Id == ApplicationState.player.GetId())
            {
                isInGame = true;
            }
        }

        if (isInGame)
        {
            // Determine if the current user is the creator of the game
            Room room = ApplicationState.currentGameRoom;
            if (room.Creator.Id == ApplicationState.player.GetId())
            {
                Text buttonText = leaveButton.GetComponentInChildren <Text>();
                buttonText.text = StringFactory.GetString(GameString.GameLobby_Button_CancelGame);
            }
            else
            {
                Text buttonText = leaveButton.GetComponentInChildren <Text>();
                buttonText.text = StringFactory.GetString(GameString.GameLobby_Button_LeaveGame);
            }
            leaveButton.onClick.AddListener(onLeaveLobby);
        }
        else
        {
            leaveButton.gameObject.SetActive(false);
        }
    }
Example #2
0
    void Form_Main_Standard_Error(string string_Message)
    {
        if (this.IsHandleCreated == false)
        {
            return;
        }

        //this.Invoke((MethodInvoker)delegate
        {
            MessageBox.Show(string_Message, StringFactory.GetString(72, CommonEnvironment.CurrentLanguage));
        }//);
        try
        {
            if (InstallationProcessAborted != null)
            {
                InstallationProcessAborted(StringFactory.GetString(47, CommonEnvironment.CurrentLanguage));
            }
        }
        catch
        {
        }
        finally
        {
            this.CloseWindow();
        }
    }
    private void button_WorkingActivity_Cancel_Click(object sender, EventArgs e)
    {
        if (WorkingActivityProcessAborted != null)
        {
            WorkingActivityProcessAborted(StringFactory.GetString(65, CommonEnvironment.CurrentLanguage));
        }

        this.CloseWindow();
    }
Example #4
0
    public void ChangeControlsLanguage()
    {
        this.Text = StringFactory.GetString(72, CommonEnvironment.CurrentLanguage);

        this.button_WorkingProgress_Cancel.Text = StringFactory.GetString(27, CommonEnvironment.CurrentLanguage);

        this.columnHeader_WorkingProgress_Operation.Text = StringFactory.GetString(70, CommonEnvironment.CurrentLanguage);

        this.columnHeader_WorkingProgress_OperationResult.Text = StringFactory.GetString(71, CommonEnvironment.CurrentLanguage);
    }
    // Start is called before the first frame update
    void Start()
    {
        // Determine if the current user is the creator of the game
        Room room = ApplicationState.currentGameRoom;

        if (room.Creator.Id == ApplicationState.player.GetId())
        {
            // Determine if there are more players than just the creator.
            if (room.Players.Count > 1)
            {
                // Show start game early button.
                Text buttonText = actionButton.GetComponentInChildren <Text>();
                buttonText.text = StringFactory.GetString(GameString.GameLobby_Button_StartEarly);
                actionButton.onClick.AddListener(onStartEarly);
            }
            else
            {
                // Show start game early button.
                Text buttonText = actionButton.GetComponentInChildren <Text>();
                buttonText.text           = StringFactory.GetString(GameString.GameLobby_Label_WaitingForPlayers);
                actionButton.interactable = false;
            }
        }
        else
        {
            bool isInGame = false;
            foreach (User player in room.Players)
            {
                Debug.unityLogger.Log(ApplicationState.player.GetId());
                Debug.unityLogger.Log(room.Players);
                if (!isInGame && player.Id == ApplicationState.player.GetId())
                {
                    isInGame = true;
                }
            }

            if (isInGame)
            {
                // Show start game early button.
                Text buttonText = actionButton.GetComponentInChildren <Text>();
                buttonText.text           = StringFactory.GetString(GameString.GameLobby_Label_WaitingForPlayers);
                actionButton.interactable = false;
            }
            else
            {
                // Show start game early button.
                Text buttonText = actionButton.GetComponentInChildren <Text>();
                buttonText.text = StringFactory.GetString(GameString.GameLobby_Button_JoinGame);
                actionButton.onClick.AddListener(onJoinLobby);
            }
        }
    }
Example #6
0
    private void button_WorkingProgress_Cancel_Click(object sender, EventArgs e)
    {
        if (InstallationProcessAborted != null)
        {
            InstallationProcessAborted(StringFactory.GetString(48, CommonEnvironment.CurrentLanguage));
        }

        if (UninstallProcessAborted != null)
        {
            UninstallProcessAborted(StringFactory.GetString(49, CommonEnvironment.CurrentLanguage));
        }

        this.Close();

        this.CloseWindow();
    }
    public void ChangeControlsLanguage()
    {
        this.Text = StringFactory.GetString(73, CommonEnvironment.CurrentLanguage);

        this.button_WorkingActivity_Cancel.Text = StringFactory.GetString(27, CommonEnvironment.CurrentLanguage);
    }
Example #8
0
 void Form_Main_Standard_ObjectAlreadyExists(string string_Message)
 {
     Form_WorkingProgress.LatestOperationResult = StringFactory.GetString(46, CommonEnvironment.CurrentLanguage);
 }
Example #9
0
    void Form_Main_InstallationProcessSuccessfullyComplete(string string_Message)
    {
        MessageBox.Show(string_Message, StringFactory.GetString(72, CommonEnvironment.CurrentLanguage));

        this.CloseWindow();
    }