protected override void BtnClickOk(IUIObject obj)
    {
        if (this._dummyComposeMaterialSol == null)
        {
            return;
        }
        this.HideTouch(false);
        short level = this._dummyComposeBaseSol.GetLevel();
        byte  grade = this._dummyComposeBaseSol.GetGrade();

        this._dummyComposeBaseSol.SetGrade(5);
        SolComposeDirection solComposeDirection = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.SOLCOMPOSE_DIRECTION_DLG) as SolComposeDirection;

        if (solComposeDirection == null)
        {
            return;
        }
        solComposeDirection.SetImage(this._dummyComposeBaseSol, 1);
        SolComposeSuccessDlg solComposeSuccessDlg = (SolComposeSuccessDlg)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.SOLCOMPOSE_SUCCESS_DLG);

        if (solComposeSuccessDlg != null)
        {
            solComposeSuccessDlg.SetData(grade, (int)level, 0L, this._dummyComposeBaseSol, 2000L, 0L);
            solComposeSuccessDlg.Hide();
        }
        this.Close();
    }
Exemple #2
0
    private void OnClickExtractOK(object obj)
    {
        this.m_SolExtract.Clear();
        base.ShowExtractSol(false);
        if (this._selectedDummySoldierList == null)
        {
            return;
        }
        NewListBox listBox = this.GetListBox();

        listBox.Clear();
        SolComposeDirection solComposeDirection = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.SOLCOMPOSE_DIRECTION_DLG) as SolComposeDirection;

        if (solComposeDirection == null)
        {
            return;
        }
        int[]  array  = new int[10];
        bool[] array2 = new bool[10];
        for (int i = 0; i < this._selectedDummySoldierList.Count; i++)
        {
            array[i]  = (int)Mathf.Ceil((float)UnityEngine.Random.Range(10, 90));
            array[i]  = array[0] - array[0] % 10;
            array2[i] = false;
        }
        solComposeDirection.SetExtractData(array2, array);
        solComposeDirection.AddCloseCallback(new OnCloseCallback(this.OnExtractDirectionEnd));
    }