예제 #1
0
        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();
             */
        }
예제 #2
0
 WicoLogger getTextStatusBlock(bool force_update = false)
 {
     if ((statustextblock != null || bLoggingInit) && !force_update)
     {
         return(statustextblock);
     }
     statustextblock = getTextBlock(sStatusName);
     return(statustextblock);
 }
예제 #3
0
        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;
        }
예제 #4
0
        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);
        }