Beispiel #1
0
        /// <summary>
        /// Charger la fenêtre de dialogue
        /// </summary>
        /// <param name="row">Ligne référence</param>
        private void LoadDialogPanel(DataGridViewRow row)
        {
            Guid      id     = (Guid)row.Cells[0].Value;
            VO_Dialog dialog = CurrentClass.BadInteractions.Find(p => p.Id == id).Dialog;

            FormsManager.Instance.DialogManager.FormClosed += new FormClosedEventHandler(DialogManager_FormClosed);
            FormsManager.Instance.DialogManager.LoadDialog(dialog.Clone(), Enums.ScriptType.ClassDialogs);
            FormsManager.Instance.DialogManager.ShowDialog(this);
        }
Beispiel #2
0
        /// <summary>
        /// Chargement du dialogue
        /// </summary>
        /// <param name="dialog">VO_Dialog</param>
        public void LoadDialog(VO_Dialog dialog, Enums.ScriptType scriptType)
        {
            Cursor.Current = Cursors.WaitCursor;
            this.grdDialog.SuspendLayout();

            CurrentDialog   = dialog.Clone();
            CanceledChanges = false;

            _ScriptType = scriptType;
            if (scriptType == Enums.ScriptType.AnimationEvents ||
                scriptType == Enums.ScriptType.CharacterEvents ||
                scriptType == Enums.ScriptType.Events ||
                scriptType == Enums.ScriptType.StageEvents)
            {
                _UseCurrentStage = true;
            }
            else
            {
                _UseCurrentStage = false;
            }

            //Désactiver les eventhandlers
            grdDialog.CellValueChanged -= new DataGridViewCellEventHandler(grdDialog_CellValueChanged);
            grdDialog.CellClick        -= new DataGridViewCellEventHandler(grdDialog_CellClick);

            //Charger les listes
            LoadLists();

            chkShowFaces.Checked = CurrentDialog.UseFaces;

            //Charger la gridview
            grdDialog.Rows.Clear();
            foreach (VO_Message message in CurrentDialog.Messages)
            {
                InsertMessage(message);
            }

            //Activer les eventhandlers
            grdDialog.CellValueChanged += new DataGridViewCellEventHandler(grdDialog_CellValueChanged);
            grdDialog.CellClick        += new DataGridViewCellEventHandler(grdDialog_CellClick);

            this.grdDialog.ResumeLayout();
            Cursor.Current = DefaultCursor;
        }