public void Init(CommandHistoryManager mgr) {

      tbName.SelectAllTextOnFocus = true;

      _mgr = mgr;

      BindRecent();
    }
Exemplo n.º 2
0
        private void Initialize()
        {
            AppDomain.CurrentDomain.AssemblyResolve += SbmqmDomain_AssemblyResolve;
            _monitorState = new SbmqmMonitorState();

            Config = SystemConfig.Load();

            Config.StartCount += 1;
            Config.Save();

            CreateServiceBusManager(Config.ServiceBus, Config.ServiceBusVersion, Config.ServiceBusQueueType);


            _history = new CommandHistoryManager(Config);

            AppInfo = new ApplicationInfo(Config.Id, Assembly.GetEntryAssembly());
        }
Exemplo n.º 3
0
        private void Initialize()
        {
            AppDomain.CurrentDomain.AssemblyResolve += SbmqmDomain_AssemblyResolve;
            _monitorState = new SbmqmMonitorState();

            Config = SystemConfig.Load();

            Config.StartCount += 1;
            Config.Save();

            // Check if we still have the ServiceBus Adapter available
            var availMgrs = ServiceBusFactory.AvailableServiceBusManagers();

            if (!availMgrs.Any(mgr => mgr.Name == Config.ServiceBus && mgr.Version == Config.ServiceBusVersion && mgr.QueueType == Config.ServiceBusQueueType))
            {
                // Check if we have any other versions available
                var m = availMgrs.FirstOrDefault(mgr => mgr.Name == Config.ServiceBus && mgr.QueueType == Config.ServiceBusQueueType);

                if (m != null)
                {
                    Config.CurrentServer.ServiceBusVersion = m.Version;
                }

                else // Check if we have this ServiceBus Type
                {
                    m = availMgrs.FirstOrDefault(mgr => mgr.Name == Config.ServiceBus);

                    if (m != null)
                    {
                        Config.CurrentServer.ServiceBusQueueType = m.QueueType;
                        Config.CurrentServer.ServiceBusVersion   = m.Version;
                    }
                    else
                    {
                        throw new NotSupportedException("Not Supported Service Bus type '{0}', Please re-install Service Bus MQ Manager.".With(Config.ServiceBus));
                    }
                }
            }

            CreateServiceBusManager(Config.ServiceBus, Config.ServiceBusVersion, Config.ServiceBusQueueType);


            _history = new CommandHistoryManager(Config);

            AppInfo = new ApplicationInfo(Config.Id, Assembly.GetEntryAssembly());
        }
Exemplo n.º 4
0
        private void Initialize()
        {
            AppDomain.CurrentDomain.AssemblyResolve += SbmqmDomain_AssemblyResolve;
            _monitorState = new SbmqmMonitorState();

            Config = SystemConfig.Load();

            Config.StartCount += 1;

            _mgr = ServiceBusFactory.CreateManager(Config.MessageBus, Config.MessageBusQueueType);
            _mgr.ErrorOccured += System_ErrorOccured;
            _mgr.ItemsChanged += System_ItemsChanged;

            _mgr.Initialize(Config.MonitorServer, Config.MonitorQueues.Select(mq => new Queue(mq.Name, mq.Type, mq.Color)).ToArray(), _monitorState);

            CanSendCommand       = (_mgr as ISendCommand) != null;
            CanViewSubscriptions = (_mgr as IViewSubscriptions) != null;

            _history = new CommandHistoryManager(Config);

            AppInfo = new ApplicationInfo(Config.Id, Assembly.GetEntryAssembly());
        }
Exemplo n.º 5
0
        private void Initialize()
        {
            AppDomain.CurrentDomain.AssemblyResolve += SbmqmDomain_AssemblyResolve;
              _monitorState = new SbmqmMonitorState();

              Config = SystemConfig.Load();

              Config.StartCount += 1;
              Config.Save();

              CreateServiceBusManager(Config.ServiceBus, Config.ServiceBusVersion, Config.ServiceBusQueueType);

              _history = new CommandHistoryManager(Config);

              AppInfo = new ApplicationInfo(Config.Id, Assembly.GetEntryAssembly());
        }
Exemplo n.º 6
0
        private void Init()
        {
            AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;

              Config = SystemConfig.Load();

              Config.StartCount += 1;

              _mgr = MessageBusFactory.Create(Config.MessageBus, Config.MessageBusQueueType);
              _mgr.ErrorOccured += MessageMgr_ErrorOccured;
              _mgr.ItemsChanged += _mgr_ItemsChanged;

              _mgr.Init(Config.MonitorServer, Config.WatchCommandQueues, Config.WatchEventQueues, Config.WatchMessageQueues, Config.WatchErrorQueues,
                                Config.CommandDefinition);

              _history = new CommandHistoryManager(Config);
        }
Exemplo n.º 7
0
    private void Initialize() {
      AppDomain.CurrentDomain.AssemblyResolve += SbmqmDomain_AssemblyResolve;
      _monitorState = new SbmqmMonitorState();

      Config = SystemConfig.Load();

      Config.StartCount += 1;
      Config.Save();

      // Check if we still have the ServiceBus Adapter available
      var availMgrs = ServiceBusFactory.AvailableServiceBusManagers();
      if( !availMgrs.Any(mgr => mgr.Name == Config.ServiceBus && mgr.Version == Config.ServiceBusVersion && mgr.QueueType == Config.ServiceBusQueueType) ) {

        // Check if we have any other versions available
        var m = availMgrs.FirstOrDefault(mgr => mgr.Name == Config.ServiceBus && mgr.QueueType == Config.ServiceBusQueueType);

        if( m != null )
          Config.CurrentServer.ServiceBusVersion = m.Version;

        else { // Check if we have this ServiceBus Type
          m = availMgrs.FirstOrDefault(mgr => mgr.Name == Config.ServiceBus);

          if( m != null ) {
            Config.CurrentServer.ServiceBusQueueType = m.QueueType;
            Config.CurrentServer.ServiceBusVersion = m.Version;
          } else throw new NotSupportedException("Not Supported Service Bus type '{0}', Please re-install Service Bus MQ Manager.".With(Config.ServiceBus));


        }


      }

      CreateServiceBusManager(Config.ServiceBus, Config.ServiceBusVersion, Config.ServiceBusQueueType);


      _history = new CommandHistoryManager(Config);

      AppInfo = new ApplicationInfo(Config.Id, Assembly.GetEntryAssembly());
    }
Exemplo n.º 8
0
        private void Initialize()
        {
            AppDomain.CurrentDomain.AssemblyResolve += SbmqmDomain_AssemblyResolve;
              _monitorState = new SbmqmMonitorState();

              Config = SystemConfig.Load();

              Config.StartCount += 1;

              _mgr = ServiceBusFactory.CreateManager(Config.MessageBus, Config.MessageBusQueueType);
              _mgr.ErrorOccured += System_ErrorOccured;
              _mgr.WarningOccured += System_WarningOccured;
              _mgr.ItemsChanged += System_ItemsChanged;

              _mgr.Initialize(Config.MonitorServer, Config.MonitorQueues.Select(mq => new Queue(mq.Name, mq.Type, mq.Color)).ToArray(), _monitorState);

              CanSendCommand = ( _mgr as ISendCommand ) != null;
              CanViewSubscriptions = ( _mgr as IViewSubscriptions ) != null;

              _history = new CommandHistoryManager(Config);

              AppInfo = new ApplicationInfo(Config.Id, Assembly.GetEntryAssembly());
        }