Example #1
0
        internal static void ShowCode(this ListBox self, AssemblyLocation al, Executable exec)
        {
            var sf = exec.GetSourceFile(al.CodePos.SourceName);

            if (sf != null)
            {
                _listIndexByLocation.Clear();
                self.Items.Clear();

                ShowCommandSet(self, sf, al, exec);
            }
        }
Example #2
0
        internal static void SetCurrLine(this ListBox self, AssemblyLocation al)
        {
            if (lastAL.IsDiff(al))
            {
                ShowCode(self, al, Exe);
                lastAL = al;
            }


            int index = -1;

            if (!string.IsNullOrEmpty(al.CodePos.SourceName))
            {
                _listIndexByLocation.TryGetValue(al, out index);
            }


            if (self.Items.Count > 0)
            {
                currIndex          = index;
                self.SelectedIndex = index;
                self.Refresh();
            }
        }
 public bool IsDiff(AssemblyLocation other)
 {
     return(this.FuncID != other.FuncID ||
            this.CodePos.SourceName != other.CodePos.SourceName);
 }