Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TEMPLATEDEVICENAME"/> class.
        /// Must be public for COM registration.
        /// </summary>
        public Focuser()
        {
            _controller        = new DeviceFocuser();
            _controller.Server = comServer;
            _controller.trace  = trace;

            ReadProfile();                     // Read device configuration from the ASCOM Profile store

            utilities      = new Util();       //Initialise util object
            astroUtilities = new AstroUtils(); // Initialise astro utilities object
            //TODO: Implement your additional construction here
        }
Beispiel #2
0
 private void BuildController()
 {
     LogMessage("Focuser", "BuildController");
     if (string.IsNullOrEmpty(_controller.Server))
     {
         SetupDialog();
     }
     try
     {
         _controller        = new DeviceFocuser();
         _controller.Server = comServer;
         _controller.trace  = trace;
     }
     catch (Exception e)
     {
         Trace.WriteLine(e.Message);
         LogMessage("Focuser", "BuildController " + e.ToString());
         SetupDialog();
         _controller        = new DeviceFocuser();
         _controller.Server = comServer;
         _controller.trace  = trace;
     }
 }