Exemple #1
0
 private void SourceTree_AfterSelect(object sender, TreeViewEventArgs e)
 {
     if (e.Node == null)
     {
         return;
     }
     if (!SourceNodeToDef.ContainsKey(e.Node))
     {
         SourceTree.SelectedNode = OldSelect;
     }
     else
     {
         OldSelect = e.Node;
         var def = SourceNodeToDef[e.Node];
         SourceDesc.Text = def.Description;
         SelectedDef     = def;
     }
     DataSearch.Text = "";
     RefreshDataList(true);
 }
Exemple #2
0
        public VarScopeSelect(EditorScope scope, byte source, short data) : this()
        {
            Scope = scope;

            CategorisedScopes = new List <List <ScopeDefinition> >();
            for (int i = 0; i < 5; i++)
            {
                CategorisedScopes.Add(new List <ScopeDefinition>());
            }
            SourceIDToDef = new Dictionary <int, ScopeDefinition>();
            foreach (var def in Definitions)
            {
                if (def.ID == source)
                {
                    SelectedDef = def;
                }
                SourceIDToDef.Add(def.ID, def);
                CategorisedScopes[(int)(def.Group + 1)].Add(def);
            }

            RefreshScopeTree();
            SelectedData = data;
        }
Exemple #3
0
 private void SourceTree_AfterSelect(object sender, TreeViewEventArgs e)
 {
     if (e.Node == null) return;
     if (!SourceNodeToDef.ContainsKey(e.Node))
     {
         SourceTree.SelectedNode = OldSelect;
     }
     else
     {
         OldSelect = e.Node;
         var def = SourceNodeToDef[e.Node];
         SourceDesc.Text = def.Description;
         SelectedDef = def;
     }
     DataSearch.Text = "";
     RefreshDataList(true);
 }
Exemple #4
0
        public VarScopeSelect(EditorScope scope, byte source, short data)
            : this()
        {
            Scope = scope;

            CategorisedScopes = new List<List<ScopeDefinition>>();
            for (int i = 0; i < 5; i++)
            {
                CategorisedScopes.Add(new List<ScopeDefinition>());
            }
            SourceIDToDef = new Dictionary<int, ScopeDefinition>();
            foreach (var def in Definitions)
            {
                if (def.ID == source) SelectedDef = def;
                SourceIDToDef.Add(def.ID, def);
                CategorisedScopes[(int)(def.Group + 1)].Add(def);
            }

            RefreshScopeTree();
            SelectedData = data;
        }