Пример #1
0
        public PluginEditor(EngineDescription buildInfo, TagEntry tag, MetaContainer parent, MetaEditor sibling)
        {
            InitializeComponent();

            txtPlugin.TextArea.TextEntered += PluginTextEntered;

            _parent  = parent;
            _sibling = sibling;

            LoadSyntaxHighlighting();
            SetHighlightColor();
            LoadCodeCompletion();

            App.AssemblyStorage.AssemblySettings.PropertyChanged += Settings_SettingsChanged;

            string groupName = VariousFunctions.SterilizeTagGroupName(CharConstant.ToString(tag.RawTag.Group.Magic)).Trim();

            _pluginPath = string.Format("{0}\\{1}\\{2}.xml", VariousFunctions.GetApplicationLocation() + @"Plugins",
                                        buildInfo.Settings.GetSetting <string>("plugins"), groupName.Trim());

            if (buildInfo.Settings.PathExists("fallbackPlugins"))
            {
                _fallbackPluginPath = string.Format("{0}\\{1}\\{2}.xml", VariousFunctions.GetApplicationLocation() + @"Plugins",
                                                    buildInfo.Settings.GetSetting <string>("fallbackPlugins"), groupName.Trim());
            }
            LoadPlugin();
        }
Пример #2
0
        public MetaEditor(BuildInformation buildInfo, TagEntry tag, MetaContainer parentContainer, TagHierarchy tags, ICacheFile cache, IStreamManager streamManager, IRTEProvider rteProvider, Trie stringIDTrie)
        {
            InitializeComponent();

            _parentMetaContainer = parentContainer;
            _tag = tag;
            _tags = tags;
            _buildInfo = buildInfo;
            _cache = cache;
            _streamManager = streamManager;
            _rteProvider = rteProvider;
            _searchTimer = new Timer(SearchTimer);
            _stringIDTrie = stringIDTrie;

            // Load Plugin Path
            string className = VariousFunctions.SterilizeTagClassName(CharConstant.ToString(tag.RawTag.Class.Magic)).Trim();
            _pluginPath = string.Format("{0}\\{1}\\{2}.xml", VariousFunctions.GetApplicationLocation() + @"Plugins", _buildInfo.PluginFolder, className);

            // Set Invisibility box
            cbShowInvisibles.IsChecked = Settings.pluginsShowInvisibles;

            // Load Meta
            RefreshEditor();

            // Set init finished
            hasInitFinished = true;
        }
Пример #3
0
        public MetaEditor(EngineDescription buildInfo, TagEntry tag, MetaContainer parentContainer, TagHierarchy tags,
                          ICacheFile cache, IStreamManager streamManager, IRTEProvider rteProvider, Trie stringIDTrie)
        {
            InitializeComponent();

            _parentMetaContainer = parentContainer;
            _tag          = tag;
            _tags         = tags;
            _buildInfo    = buildInfo;
            _cache        = cache;
            _fileManager  = streamManager;
            _rteProvider  = rteProvider;
            _searchTimer  = new Timer(SearchTimer);
            _stringIdTrie = stringIDTrie;

            // Load Plugin Path
            string className = VariousFunctions.SterilizeTagClassName(CharConstant.ToString(tag.RawTag.Class.Magic)).Trim();

            _pluginPath = string.Format("{0}\\{1}\\{2}.xml", VariousFunctions.GetApplicationLocation() + @"Plugins",
                                        _buildInfo.Settings.GetSetting <string>("plugins"), className);

            // Set Option boxes
            cbShowInvisibles.IsChecked  = App.AssemblyStorage.AssemblySettings.PluginsShowInvisibles;
            cbShowComments.IsChecked    = App.AssemblyStorage.AssemblySettings.PluginsShowComments;
            cbShowEnumIndex.IsChecked   = App.AssemblyStorage.AssemblySettings.PluginsShowEnumIndex;
            cbShowInformation.IsChecked = App.AssemblyStorage.AssemblySettings.PluginsShowInformation;

            // Load Meta
            RefreshEditor(MetaReader.LoadType.File);

            // Set init finished
            hasInitFinished = true;
        }
Пример #4
0
        public MetaEditor(EngineDescription buildInfo, TagEntry tag, MetaContainer parentContainer, TagHierarchy tags,
			ICacheFile cache, IStreamManager streamManager, IRTEProvider rteProvider, Trie stringIDTrie)
        {
            InitializeComponent();

            _parentMetaContainer = parentContainer;
            _tag = tag;
            _tags = tags;
            _buildInfo = buildInfo;
            _cache = cache;
            _fileManager = streamManager;
            _rteProvider = rteProvider;
            _searchTimer = new Timer(SearchTimer);
            _stringIdTrie = stringIDTrie;

            // Load Plugin Path
            string className = VariousFunctions.SterilizeTagClassName(CharConstant.ToString(tag.RawTag.Class.Magic)).Trim();
            _pluginPath = string.Format("{0}\\{1}\\{2}.xml", VariousFunctions.GetApplicationLocation() + @"Plugins",
                _buildInfo.Settings.GetSetting<string>("plugins"), className);

            // Set Option boxes
            cbShowInvisibles.IsChecked = App.AssemblyStorage.AssemblySettings.PluginsShowInvisibles;
            cbShowComments.IsChecked = App.AssemblyStorage.AssemblySettings.PluginsShowComments;
            cbShowEnumIndex.IsChecked = App.AssemblyStorage.AssemblySettings.PluginsShowEnumIndex;
            cbShowInformation.IsChecked = App.AssemblyStorage.AssemblySettings.PluginsShowInformation;

            // Load Meta
            RefreshEditor(MetaReader.LoadType.File);

            // Set init finished
            hasInitFinished = true;
        }
Пример #5
0
        public MetaEditor(EngineDescription buildInfo, TagEntry tag, MetaContainer parentContainer, TagHierarchy tags,
                          ICacheFile cache, IStreamManager streamManager, IRTEProvider rteProvider, Trie stringIDTrie)
        {
            InitializeComponent();

            _parentMetaContainer = parentContainer;
            _tag          = tag;
            _tags         = tags;
            _buildInfo    = buildInfo;
            _cache        = cache;
            _fileManager  = streamManager;
            _rteProvider  = rteProvider;
            _searchTimer  = new Timer(SearchTimer);
            _stringIdTrie = stringIDTrie;

            // Load Plugin Path
            string groupName = VariousFunctions.SterilizeTagGroupName(CharConstant.ToString(tag.RawTag.Group.Magic)).Trim();

            _pluginPath = string.Format("{0}\\{1}\\{2}.xml", VariousFunctions.GetApplicationLocation() + @"Plugins",
                                        _buildInfo.Settings.GetSetting <string>("plugins"), groupName);

            if (_buildInfo.Settings.PathExists("fallbackPlugins"))
            {
                _fallbackPluginPath = string.Format("{0}\\{1}\\{2}.xml", VariousFunctions.GetApplicationLocation() + @"Plugins",
                                                    _buildInfo.Settings.GetSetting <string>("fallbackPlugins"), groupName);
            }

            // Set Option boxes
            cbShowInvisibles.IsChecked  = App.AssemblyStorage.AssemblySettings.PluginsShowInvisibles;
            cbShowComments.IsChecked    = App.AssemblyStorage.AssemblySettings.PluginsShowComments;
            cbShowInformation.IsChecked = App.AssemblyStorage.AssemblySettings.PluginsShowInformation;

            cbEnumPrefix.SelectedIndex = (int)App.AssemblyStorage.AssemblySettings.PluginsEnumPrefix;

            // Load Meta
            RefreshEditor(MetaReader.LoadType.File);

            // Load Info
            lblTagName.Text = tag.TagFileName != null
                                ? tag.TagFileName + "." + tag.GroupName
                                : "0x" + tag.RawTag.Index.Value.ToString("X");

            lblDatum.Text   = string.Format("{0}", tag.RawTag.Index);
            lblAddress.Text = string.Format("0x{0:X8}", tag.RawTag.MetaLocation.AsPointer());
            lblOffset.Text  = string.Format("0x{0:X}", tag.RawTag.MetaLocation.AsOffset());

            // Set init finished
            hasInitFinished = true;
        }
Пример #6
0
        public PluginEditor(BuildInformation buildInfo, TagEntry tag, MetaContainer parent, MetaEditor sibling)
        {
            InitializeComponent();

            txtPlugin.TextArea.TextEntered += PluginTextEntered;

            _parent = parent;
            _sibling = sibling;

            LoadSyntaxHighlighting();
            LoadCodeCompletion();

            Settings.SettingsChanged += Settings_SettingsChanged;

            string className = VariousFunctions.SterilizeTagClassName(CharConstant.ToString(tag.RawTag.Class.Magic));
            _pluginPath = string.Format("{0}\\{1}\\{2}.xml", VariousFunctions.GetApplicationLocation() + @"Plugins", buildInfo.PluginFolder, className);
            LoadPlugin();
        }
Пример #7
0
        public MetaEditor(EngineDescription buildInfo, TagEntry tag, MetaContainer parentContainer, TagHierarchy tags,
                          ICacheFile cache, IStreamManager streamManager, IRTEProvider rteProvider, Trie stringIDTrie)
        {
            InitializeComponent();

            _parentMetaContainer = parentContainer;
            _tags         = tags;
            _buildInfo    = buildInfo;
            _cache        = cache;
            _fileManager  = streamManager;
            _rteProvider  = rteProvider;
            _searchTimer  = new Timer(SearchTimer);
            _stringIdTrie = stringIDTrie;

            LoadNewTagEntry(tag);

            // Set init finished
            hasInitFinished = true;
        }
Пример #8
0
        public PluginEditor(EngineDescription buildInfo, TagEntry tag, MetaContainer parent, MetaEditor sibling)
        {
            InitializeComponent();

            txtPlugin.TextArea.TextEntered += PluginTextEntered;

            _parent = parent;
            _sibling = sibling;

            LoadSyntaxHighlighting();
            LoadCodeCompletion();

            App.AssemblyStorage.AssemblySettings.PropertyChanged += Settings_SettingsChanged;

            string className = VariousFunctions.SterilizeTagClassName(CharConstant.ToString(tag.RawTag.Class.Magic)).Trim();
            _pluginPath =
                string.Format("{0}\\{1}\\{2}.xml", VariousFunctions.GetApplicationLocation() + @"Plugins",
                    buildInfo.Settings.GetSetting<string>("plugins"), className.Trim());
            LoadPlugin();
        }