예제 #1
0
        private void buttonCreateCharacter_Click(object sender, EventArgs e)
        {
            _rpcForm = new RolePlayCharacterWF.MainForm();
            var asset = _rpcForm.CreateAndSaveEmptyAsset(false);

            if (asset == null)
            {
                return;
            }

            var rpcAsset = RolePlayCharacterAsset.LoadFromFile(asset.AssetFilePath);

            FormHelper.ShowFormInContainerControl(this.tabControlIAT.TabPages[1], _rpcForm);
            this.tabControlIAT.SelectTab(1);
            this.currentRPCTabIndex = 1;
            _rpcForm.LoadedAsset    = rpcAsset;

            LoadedAsset.AddNewCharacterSource(new CharacterSourceDTO()
            {
                Source = asset.AssetFilePath
            });
            _characterSources.DataSource = LoadedAsset.GetAllCharacterSources().ToList();
            _characterSources.Refresh();
            SetModified();
        }
예제 #2
0
        private void buttonAddCharacter_Click(object sender, EventArgs e)
        {
            _rpcForm = new RolePlayCharacterWF.MainForm();
            var rpc = _rpcForm.SelectAndOpenAssetFromBrowser();

            if (rpc == null)
            {
                return;
            }

            LoadedAsset.AddNewCharacterSource(new CharacterSourceDTO()
            {
                Source = rpc.AssetFilePath
            });

            _characterSources.DataSource = LoadedAsset.GetAllCharacterSources().ToList();
            _characterSources.Refresh();
            SetModified();
        }