예제 #1
0
 public MainForm()
 {
     InitializeComponent();
     _storage     = new AssetStorage();
     _loadedAsset = CommeillFautAsset.CreateInstance(_storage);
     OnAssetDataLoaded();
 }
예제 #2
0
        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);
        }
예제 #3
0
        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);
                }
            }
        }
예제 #4
0
 private void newToolStripMenuItem_Click(object sender, EventArgs e)
 {
     _currentFilePath = null;
     _storage         = new AssetStorage();
     _loadedAsset     = CommeillFautAsset.CreateInstance(_storage);
 }