Inheritance: PartModule
示例#1
0
        public bool PartIsKosProc(Part input, out kOSProcessor proc)
        {
            foreach (var processor in input.Modules.OfType <kOSProcessor>())
            {
                proc = processor;
                return(true);
            }

            proc = null;
            return(false);
        }
示例#2
0
        public bool PartIsKosProc(Part input, out kOSProcessor proc)
        {
            foreach (var processor in input.Modules.OfType<kOSProcessor>())
            {
                proc = processor;
                return true;
            }

            proc = null;
            return false;
        }
示例#3
0
 public ProcessorConnection(kOSProcessor processor, SharedObjects shared)
     : base()
 {
     this.shared = shared;
     this.processor = processor;
 }
示例#4
0
 public kOSProcessorFields(kOSProcessor processor, SharedObjects sharedObj)
     : base(processor, sharedObj)
 {
     this.processor = processor;
     InitializeSuffixes();
 }
示例#5
0
 /// <summary>
 /// Connect this TelnetSingletonServer to a CPU to start acting as its terminal.
 /// </summary>
 /// <param name="processor">The kOSProcessor PartModule to attach to</param>
 public void ConnectToProcessor(kOSProcessor processor)
 {
     ConnectedProcessor = processor;
     ConnectedProcessor.GetScreen().SetSize(ClientHeight, ClientWidth); // Reset the GUI terminal to match the telnet window.
     ConnectedProcessor.GetWindow().AttachTelnet(this); // Tell the GUI window that I am one of its telnets now (even when closed, it still does the heavy lifting).
     ConnectedProcessor.GetWindow().SendTitleToTelnet(this);
     ConnectedProcessor.GetWindow().RepaintTelnet(this, true); // Need to start with a full paint of the terminal.
 }