public MainForm() { InitializeComponent(); _storage = new AssetStorage(); _loadedAsset = CommeillFautAsset.CreateInstance(_storage); OnAssetDataLoaded(); }
public void LoadAssociatedAssets(AssetStorage storage) { var charName = CharacterName.ToString(); m_emotionalAppraisalAsset = EmotionalAppraisalAsset.CreateInstance(storage); m_emotionalDecisionMakingAsset = EmotionalDecisionMakingAsset.CreateInstance(storage); m_socialImportanceAsset = SocialImportanceAsset.CreateInstance(storage); m_commeillFautAsset = CommeillFautAsset.CreateInstance(storage); //Dynamic properties BindToRegistry(m_kb); m_emotionalDecisionMakingAsset.RegisterKnowledgeBase(m_kb); m_commeillFautAsset.RegisterKnowledgeBase(m_kb); m_socialImportanceAsset.RegisterKnowledgeBase(m_kb); }
private void openToolStripMenuItem_Click(object sender, EventArgs e) { var aux = EditorTools.OpenFileDialog("Asset Storage File (*.json)|*.json|All Files|*.*"); if (aux != null) { try { _currentFilePath = aux; _storage = AssetStorage.FromJson(File.ReadAllText(_currentFilePath)); _loadedAsset = CommeillFautAsset.CreateInstance(_storage); } catch (Exception ex) { MessageBox.Show("Exception: " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
private void newToolStripMenuItem_Click(object sender, EventArgs e) { _currentFilePath = null; _storage = new AssetStorage(); _loadedAsset = CommeillFautAsset.CreateInstance(_storage); }