Ejemplo n.º 1
0
 public static void PluginText(StringBuilder sb, Plugin pl, BinLogFlags flags, int fileid)
 {
     if (HasFlag(flags, BinLogFlags.Show_PlugId) &&
         HasFlag(flags, BinLogFlags.Show_PlugFile))
     {
         sb.Append("\"");
         sb.Append(pl.File);
         if (pl.IsDebug())
         {
             sb.Append(", ");
             sb.Append(pl.FindFile(fileid));
         }
         sb.Append("\"");
         sb.Append(" (");
         sb.Append(pl.Index);
         sb.Append(")");
     }
     else if (HasFlag(flags, BinLogFlags.Show_PlugId))
     {
         sb.Append(pl.Index);
     }
     else if (HasFlag(flags, BinLogFlags.Show_PlugFile))
     {
         sb.Append("\"");
         sb.Append(pl.File);
         if (pl.IsDebug())
         {
             sb.Append(", ");
             sb.Append(pl.FindFile(fileid));
         }
         sb.Append("\"");
     }
 }
Ejemplo n.º 2
0
		public static void PluginText(StringBuilder sb, Plugin pl, BinLogFlags flags, int fileid)
		{
			if (HasFlag(flags, BinLogFlags.Show_PlugId)
				&& HasFlag(flags, BinLogFlags.Show_PlugFile))
			{
				sb.Append("\"");
				sb.Append(pl.File);
				if (pl.IsDebug())
				{
					sb.Append(", ");
					sb.Append(pl.FindFile(fileid));
				}
				sb.Append("\"");
				sb.Append(" (");
				sb.Append(pl.Index);
				sb.Append(")");
			} 
			else if (HasFlag(flags, BinLogFlags.Show_PlugId))
			{
				sb.Append(pl.Index);
			} 
			else if (HasFlag(flags, BinLogFlags.Show_PlugFile))
			{
				sb.Append("\"");
				sb.Append(pl.File);
				if (pl.IsDebug())
				{
					sb.Append(", ");
					sb.Append(pl.FindFile(fileid));
				}
				sb.Append("\"");
			}
		}
Ejemplo n.º 3
0
 public override void ToLogString(StringBuilder sb, BinLogFlags flags)
 {
     sb.Append("Plugin ");
     BinLogEntry.PluginText(sb, plugin, flags, fileid);
     sb.Append(" hit line ");
     sb.Append(Line);
     sb.Append(".");
 }
Ejemplo n.º 4
0
 public override void ToLogString(StringBuilder sb, BinLogFlags flags)
 {
     sb.Append("Plugin ");
     BinLogEntry.PluginText(sb, plugin, flags, fileid);
     sb.Append(" had public function \"");
     sb.Append(Public);
     sb.Append("\" (");
     sb.Append(pubidx);
     sb.Append(") called.");
 }
Ejemplo n.º 5
0
 public override void ToLogString(StringBuilder sb, BinLogFlags flags)
 {
     sb.Append("Retrieving string (addr ");
     sb.AppendFormat("0x{0:X}", address);
     sb.Append(") from Plugin ");
     BinLogEntry.PluginText(sb, plugin, flags);
     sb.Append(".  String:");
     sb.Append("\n\t ");
     sb.Append(text);
 }
Ejemplo n.º 6
0
 public override void ToLogString(StringBuilder sb, BinLogFlags flags)
 {
     sb.Append("Plugin ");
     BinLogEntry.PluginText(sb, pl, flags);
     sb.Append(" registered as (\"");
     sb.Append(_title);
     sb.Append("\", \"");
     sb.Append(_version);
     sb.Append("\")");
 }
Ejemplo n.º 7
0
 public override void ToLogString(StringBuilder sb, BinLogFlags flags)
 {
     sb.Append("Plugin ");
     BinLogEntry.PluginText(sb, pl, flags);
     sb.Append(" formatted parameter ");
     sb.Append(parm);
     sb.Append(" (maxlen ");
     sb.Append(maxlen);
     sb.Append("), result: \n\t");
     sb.Append(text);
 }
Ejemplo n.º 8
0
 public override void ToLogString(StringBuilder sb, BinLogFlags flags)
 {
     sb.Append("Setting string (addr ");
     sb.Append(address);
     sb.Append(") (maxlen ");
     sb.Append(maxlen);
     sb.Append(") from Plugin ");
     BinLogEntry.PluginText(sb, plugin, flags);
     sb.Append(".  String:");
     sb.Append("\n\t ");
     sb.Append(text);
 }
Ejemplo n.º 9
0
 public override void ToLogString(StringBuilder sb, BinLogFlags flags)
 {
     sb.Append("Plugin ");
     BinLogEntry.PluginText(sb, plugin, flags, fileid);
     sb.Append(" called native \"");
     sb.Append(Native);
     sb.Append("\" (");
     sb.Append(nativeidx);
     sb.Append(") with ");
     sb.Append(numparams);
     sb.Append(" parameters.");
 }
Ejemplo n.º 10
0
 public override void ToLogString(StringBuilder sb, BinLogFlags flags)
 {
     sb.Append("Native parameters: (");
     if (plist != null)
     {
         for (int i = 0; i < plist.Count; i++)
         {
             sb.Append(plist[i].ToString());
             if (i < plist.Count - 1)
             {
                 sb.Append(", ");
             }
         }
     }
     sb.Append(")");
 }
Ejemplo n.º 11
0
        private void UpdateViews(ViewAreas v, BinLogFlags b)
        {
            ClearViews(v);

            if (v == ViewAreas.Update_All ||
                ((v & ViewAreas.Update_Plugins) == ViewAreas.Update_Plugins) &&
                (binlog.GetPluginDB() != null))
            {
                PluginDb plugdb = binlog.GetPluginDB();
                PluginList.View = View.Details;
                PluginList.Columns.Add("Number", 60, HorizontalAlignment.Left);
                PluginList.Columns.Add("File", 100, HorizontalAlignment.Left);
                PluginList.Columns.Add("Title", 120, HorizontalAlignment.Left);
                PluginList.Columns.Add("Version", 60, HorizontalAlignment.Left);
                PluginList.Columns.Add("Status", 60, HorizontalAlignment.Left);

                int            num   = plugdb.Count;
                ListViewItem[] items = new ListViewItem[num];
                for (int i = 0; i < num; i++)
                {
                    Plugin       pl   = plugdb.GetPluginById(i);
                    ListViewItem item = new ListViewItem(i.ToString());
                    item.SubItems.Add(pl.File);
                    item.SubItems.Add(pl.Title);
                    item.SubItems.Add(pl.Version);
                    item.SubItems.Add(pl.Status);
                    items[i] = item;
                }
                PluginList.Items.AddRange(items);
            }
            if (v == ViewAreas.Update_Text ||
                ((v & ViewAreas.Update_Text) == ViewAreas.Update_Text) &&
                (binlog != null))
            {
                ArrayList     al = binlog.OpList;
                BinLogEntry   ble;
                StringBuilder sb    = new StringBuilder(al.Count * 10);
                BinLogFlags   flags = (BinLogFlags.Show_GameTime | BinLogFlags.Show_PlugFile | BinLogFlags.Show_PlugId);
                for (int i = 0; i < al.Count; i++)
                {
                    ble = (BinLogEntry)al[i];
                    BinLogEntry.BinLogString(sb, ble, flags);
                    sb.Append("\n");
                }
                TextLog.Text = sb.ToString();
            }
        }
Ejemplo n.º 12
0
		public static void PluginText(StringBuilder sb, Plugin pl, BinLogFlags flags)
		{
			if (HasFlag(flags, BinLogFlags.Show_PlugId)
				&& HasFlag(flags, BinLogFlags.Show_PlugFile))
			{
				sb.Append("\"");
				sb.Append(pl.File);
				sb.Append("\"");
				sb.Append(" (");
				sb.Append(pl.Index);
				sb.Append(")");
			} 
			else if (HasFlag(flags, BinLogFlags.Show_PlugId))
			{
				sb.Append(pl.Index);
			} 
			else if (HasFlag(flags, BinLogFlags.Show_PlugFile))
			{
				sb.Append("\"");
				sb.Append(pl.File);
				sb.Append("\"");
			}
		}
Ejemplo n.º 13
0
        public override void ToLogString(StringBuilder sb, BinLogFlags flags)
        {
            switch (my_op)
            {
            case BinLogOp.BinLog_Start:
            {
                sb.Append("Binary log started.");
                break;
            }

            case BinLogOp.BinLog_End:
            {
                sb.Append("Binary log ended.");
                break;
            }

            case BinLogOp.BinLog_Invalid:
            {
                sb.Append("Binary log corrupt past this point.");
                break;
            }
            }
        }
Ejemplo n.º 14
0
 public static void PluginText(StringBuilder sb, Plugin pl, BinLogFlags flags)
 {
     if (HasFlag(flags, BinLogFlags.Show_PlugId) &&
         HasFlag(flags, BinLogFlags.Show_PlugFile))
     {
         sb.Append("\"");
         sb.Append(pl.File);
         sb.Append("\"");
         sb.Append(" (");
         sb.Append(pl.Index);
         sb.Append(")");
     }
     else if (HasFlag(flags, BinLogFlags.Show_PlugId))
     {
         sb.Append(pl.Index);
     }
     else if (HasFlag(flags, BinLogFlags.Show_PlugFile))
     {
         sb.Append("\"");
         sb.Append(pl.File);
         sb.Append("\"");
     }
 }
Ejemplo n.º 15
0
        public static void BinLogString(StringBuilder sb, BinLogEntry ble, BinLogFlags flags)
        {
            bool realtime = false;

            if (HasFlag(flags, BinLogFlags.Show_RealTime))
            {
                sb.Append(ble.realtime.ToString());
                realtime = true;
            }
            if (HasFlag(flags, BinLogFlags.Show_GameTime))
            {
                if (realtime)
                {
                    sb.Append(", ");
                    sb.Append(ble.gametime.ToString());
                }
                else
                {
                    sb.Append(ble.gametime.ToString());
                }
            }
            sb.Append(": ");
            ble.ToLogString(sb, flags);
        }
Ejemplo n.º 16
0
		public override void ToLogString(StringBuilder sb, BinLogFlags flags)
		{
			sb.Append("Setting string (addr ");
			sb.Append(address);
			sb.Append(") (maxlen ");
			sb.Append(maxlen);
			sb.Append(") from Plugin ");
			BinLogEntry.PluginText(sb, plugin, flags);
			sb.Append(".  String:");
			sb.Append("\n\t ");
			sb.Append(text);
		}
Ejemplo n.º 17
0
		public override void ToLogString(StringBuilder sb, BinLogFlags flags)
		{
			sb.Append("Plugin ");
			BinLogEntry.PluginText(sb, plugin, flags, fileid);
			sb.Append(" had public function \"");
			sb.Append(Public);
			sb.Append("\" (");
			sb.Append(pubidx);
			sb.Append(") called.");
		}
Ejemplo n.º 18
0
 public static bool HasFlag(BinLogFlags a, BinLogFlags b)
 {
     return((a & b) == b);
 }
Ejemplo n.º 19
0
		public override void ToLogString(StringBuilder sb, BinLogFlags flags)
		{
			sb.Append("Retrieving string (addr ");
			sb.AppendFormat("0x{0:X}", address);
			sb.Append(") from Plugin ");
			BinLogEntry.PluginText(sb, plugin, flags);
			sb.Append(".  String:");
			sb.Append("\n\t ");
			sb.Append(text);
		}
Ejemplo n.º 20
0
		public override void ToLogString(StringBuilder sb, BinLogFlags flags)
		{
			sb.Append("Plugin ");
			BinLogEntry.PluginText(sb, plugin, flags, fileid);
			sb.Append(" called native \"");
			sb.Append(Native); 
			sb.Append("\" (");
			sb.Append(nativeidx);
			sb.Append(") with ");
			sb.Append(numparams);
			sb.Append(" parameters.");
		}
Ejemplo n.º 21
0
		public override void ToLogString(StringBuilder sb, BinLogFlags flags)
		{
			sb.Append("Native returned: ");
			sb.Append(returnval);
		}
Ejemplo n.º 22
0
 public override void ToLogString(StringBuilder sb, BinLogFlags flags)
 {
     sb.Append("Native returned: ");
     sb.Append(returnval);
 }
Ejemplo n.º 23
0
		public abstract void ToLogString(StringBuilder sb, BinLogFlags flags);
Ejemplo n.º 24
0
		public static bool HasFlag(BinLogFlags a, BinLogFlags b)
		{
			return ( (a & b) == b );
		}
Ejemplo n.º 25
0
		public override void ToLogString(StringBuilder sb, BinLogFlags flags)
		{
			sb.Append("Native parameters: (");
			if (plist != null)
			{
				for (int i=0; i<plist.Count; i++)
				{
					sb.Append(plist[i].ToString());
					if (i < plist.Count - 1)
						sb.Append(", ");
				}
			}
			sb.Append(")");
		}
Ejemplo n.º 26
0
		public override void ToLogString(StringBuilder sb, BinLogFlags flags)
		{
			sb.Append("Plugin ");
			BinLogEntry.PluginText(sb, pl, flags);
			sb.Append(" formatted parameter ");
			sb.Append(parm);
			sb.Append(" (maxlen ");
			sb.Append(maxlen);
			sb.Append("), result: \n\t");
			sb.Append(text);
		}
Ejemplo n.º 27
0
		public override void ToLogString(StringBuilder sb, BinLogFlags flags)
		{
			sb.Append("Plugin "); 
			BinLogEntry.PluginText(sb, pl, flags);
			sb.Append(" registered as (\"");
			sb.Append(_title);
			sb.Append("\", \"");
			sb.Append(_version);
			sb.Append("\")");
		}
Ejemplo n.º 28
0
 public abstract void ToLogString(StringBuilder sb, BinLogFlags flags);
Ejemplo n.º 29
0
		public override void ToLogString(StringBuilder sb, BinLogFlags flags)
		{
			sb.Append("Plugin ");
			BinLogEntry.PluginText(sb, plugin, flags, fileid);
			sb.Append(" hit line ");
			sb.Append(Line);
			sb.Append(".");
		}
Ejemplo n.º 30
0
		public override void ToLogString(StringBuilder sb, BinLogFlags flags)
		{
			switch (my_op)
			{
				case BinLogOp.BinLog_Start:
				{
					sb.Append("Binary log started.");
					break;
				}
				case BinLogOp.BinLog_End:
				{
					sb.Append("Binary log ended.");
					break;
				}
				case BinLogOp.BinLog_Invalid:
				{
					sb.Append("Binary log corrupt past this point.");
					break;
				}
			}
		}
Ejemplo n.º 31
0
		public static void BinLogString(StringBuilder sb, BinLogEntry ble, BinLogFlags flags)
		{
			bool realtime = false;
			if (HasFlag(flags, BinLogFlags.Show_RealTime))
			{
				sb.Append(ble.realtime.ToString());
				realtime = true;
			}
			if (HasFlag(flags, BinLogFlags.Show_GameTime))
			{
				if (realtime)
				{
					sb.Append(", ");
					sb.Append(ble.gametime.ToString());
				}
				else
				{
					sb.Append(ble.gametime.ToString());
				}
			}
			sb.Append(": ");
			ble.ToLogString(sb, flags);
		}
Ejemplo n.º 32
0
		private void UpdateViews(ViewAreas v, BinLogFlags b)
		{
			ClearViews(v);

			if (v == ViewAreas.Update_All || 
				((v & ViewAreas.Update_Plugins) == ViewAreas.Update_Plugins)
				&& (binlog.GetPluginDB() != null))
			{
				PluginDb plugdb = binlog.GetPluginDB();
				PluginList.View = View.Details;
				PluginList.Columns.Add("Number", 60, HorizontalAlignment.Left);
				PluginList.Columns.Add("File", 100, HorizontalAlignment.Left);
				PluginList.Columns.Add("Title", 120, HorizontalAlignment.Left);
				PluginList.Columns.Add("Version", 60, HorizontalAlignment.Left);
				PluginList.Columns.Add("Status", 60, HorizontalAlignment.Left);

				int num = plugdb.Count;
				ListViewItem[] items = new ListViewItem[num];
				for (int i=0; i<num; i++)
				{
					Plugin pl = plugdb.GetPluginById(i);
					ListViewItem item = new ListViewItem(i.ToString());
					item.SubItems.Add(pl.File);
					item.SubItems.Add(pl.Title);
					item.SubItems.Add(pl.Version);
					item.SubItems.Add(pl.Status);
					items[i] = item;
				}
				PluginList.Items.AddRange(items);
			}
			if (v == ViewAreas.Update_Text || 
				((v & ViewAreas.Update_Text) == ViewAreas.Update_Text)
				&& (binlog != null))
			{
				ArrayList al = binlog.OpList;
				BinLogEntry ble;
				StringBuilder sb = new StringBuilder(al.Count * 10);
				BinLogFlags flags = (BinLogFlags.Show_GameTime | BinLogFlags.Show_PlugFile | BinLogFlags.Show_PlugId);
				for (int i=0; i<al.Count; i++)
				{
					ble = (BinLogEntry)al[i];
					BinLogEntry.BinLogString(sb, ble, flags);
					sb.Append("\n");
				}
				TextLog.Text = sb.ToString();
			}
		}