예제 #1
0
        /// <summary>
        /// Navigates the specified directions.
        /// </summary>
        /// <param name="jmcObject">The JMC object.</param>
        /// <param name="directions">The directions.</param>
        public static void Navigate(this JmcObj jmcObject, params Direction[] directions)
        {
            if (jmcObject == null)
            {
                return;
            }

            foreach (var direction in directions)
            {
                jmcObject.Send(direction.ToString());
            }
        }
예제 #2
0
 public void Initialize(JmcObj jmcObject, string configurationFile)
 {
     this.JmcObject     = jmcObject ?? throw new ArgumentNullException(nameof(jmcObject), @"The JMC Object cannot be null.");
     _configurationFile = configurationFile;
     try {
         this.JmcObject.Connected     += this.JmcObject_Connected;
         this.JmcObject.ConnectLost   += this.JmcObject_ConnectLost;
         this.JmcObject.Disconnected  += this.JmcObject_Disconnected;
         this.JmcObject.Incoming      += this.JmcObject_Incoming;
         this.JmcObject.Input         += this.JmcObject_Input;
         this.JmcObject.Load          += this.JmcObject_Load;
         this.JmcObject.MultiIncoming += this.JmcObject_MultiIncoming;
         this.JmcObject.PreTimer      += this.JmcObject_PreTimer;
         this.JmcObject.Prompt        += this.JmcObject_Prompt;
         this.JmcObject.Telnet        += this.JmcObject_Telnet;
         this.JmcObject.Timer         += this.JmcObject_Timer;
         this.JmcObject.Unload        += this.JmcObject_Unload;
         this.OnInitialize();
         this.ConfigurationSettingsLoad();
     }
     catch { }
 }