public CommandHistoryManager(SystemConfig2 config)
        {
            _config = config;

            _itemsFolder = SbmqSystem.AppDataPath + @"\savedCommands\";
            _itemsFile   = SbmqSystem.AppDataPath + "savedCommands.dat";

            if (!Directory.Exists(_itemsFolder))
            {
                Directory.CreateDirectory(_itemsFolder);
            }
        }
Ejemplo n.º 2
0
        public ConfigWindow(SbmqSystem system, bool showSendCommand = false)
        {
            InitializeComponent();

            Topmost = SbmqSystem.UIState.AlwaysOnTop;

            _sys    = system;
            _config = system.Config;


            _managerTypes = ServiceBusFactory.AvailableServiceBusManagers();

            cbServiceBus.ItemsSource       = _managerTypes;
            cbServiceBus.DisplayMemberPath = "Name";
            cbServiceBus.SelectedValuePath = "Name";
            cbServiceBus.SelectedIndex     = 0;

            cbTransport.ItemsSource = _managerTypes[0].QueueTypes;

            cbContentFormat.ItemsSource  = _managerTypes[0].MessageContentTypes;
            cbContentFormat.SelectedItem = _config.CommandContentType;

            cShowOnNewMessages.IsChecked = _config.ShowOnNewMessages;
            cCheckForNewVer.IsChecked    = _config.VersionCheck.Enabled;


            asmPaths.BindItems(_config.CommandsAssemblyPaths);


            BindServers(_config.Servers);

            tbInterval.Init(750, typeof(int), false);

            SelectServer(_config.MonitorServer);


            tbServer.Init(string.Empty, typeof(string), false);
            tbServer.Visibility = System.Windows.Visibility.Hidden;

            tbNamespace.Init(_config.CommandDefinition.NamespaceContains, typeof(string), true);

            tbCmdInherits.Text = _config.CommandDefinition.InheritsType;

            UpdateSendCommandInfo(false);
            UpdateQueueuInfo(false);

            if (showSendCommand)
            {
                scroller.ScrollToBottom();
            }
        }