void StatusLog(string text, WicoLogger wLog, bool bReverse = false) { if (wLog == null) { return; } wLog.StatusLog(text, bReverse); /* * if (text.Equals("clear")) * { * wLog.WritePublicText(""); * } * else * { * if (bReverse) * { * string oldtext = wLog.GetPublicText(); * wLog.WritePublicText(text + "\n" + oldtext); * } * else wLog.WritePublicText(text + "\n", true); * // block.WritePublicTitle(DateTime.Now.ToString()); * } * wLog.ShowTextureOnScreen(); * wLog.ShowPublicTextOnScreen(); */ }
WicoLogger getTextStatusBlock(bool force_update = false) { if ((statustextblock != null || bLoggingInit) && !force_update) { return(statustextblock); } statustextblock = getTextBlock(sStatusName); return(statustextblock); }
void initLogging() { statustextblock = getTextStatusBlock(true); textLongStatus = getTextBlock(sLongStatus, true);; textPanelReport = getTextBlock(sTextPanelReport); /* * if (textPanelReport == null) * { * List<IMyTerminalBlock> lmtb = new List<IMyTerminalBlock>(); * lmtb = GetBlocksContains<IMyTerminalBlock>(sTextPanelReport); * if (lmtb.Count > 0) * textPanelReport = lmtb[0] as IMyTextPanel; * } */ textRangeReport = getTextBlock(sRangeReport); gpsPanel = getTextBlock(sGPSTextpanel); bLoggingInit = true; }
WicoLogger getTextBlock(string stheName, bool bRefresh = false) { WicoLogger wicoLogger = new WicoLogger(this, stheName, bRefresh); /* * IMyTextPanel textblock = null; * List<IMyTerminalBlock> blocks = new List<IMyTerminalBlock>(); * blocks = GetBlocksNamed<IMyTerminalBlock>(stheName); * if (blocks.Count < 1) * { * blocks = GetMeBlocksContains<IMyTextPanel>(stheName); * if (blocks.Count < 1) * blocks = GetBlocksContains<IMyTextPanel>(stheName); * } * if (blocks.Count > 1) * throw new OurException("Multiple status blocks found: \"" + stheName + "\""); * else * if (blocks.Count > 0) * textblock = blocks[0] as IMyTextPanel; * return textblock; */ return(wicoLogger); }