Esempio n. 1
0
        public CommandForm()
        {
            InitializeComponent();
            originalWindowSize = this.Size;
            originalPanelSize  = panelCalendar.Size;

            painter = new SelectorCalendarPainter();
            painter.PainterNeeded += new CalendarPainterNeededHandler(painter_PainterNeeded);

            systemCallback = this;

            systemCommandHandler     = new SystemCommandHandler(systemCallback);
            timerCommandHandler      = new TimerCommandHandler(systemCallback);
            scriptingCommandHandler  = new ScriptingCommandHandler(systemCallback);
            shellCommandHandler      = new ShellCommandHandler();
            expressionCommandHandler = new ExpressionCommandHandler(systemCallback);

            timerCommandHandler.TimersChanged += new EventHandler(timerCommandHandler_TimersChanged);

            commandHandlerManager = new CommandHandlerManager(systemCallback);
            commandHandlerManager.AddCommandHandler(systemCommandHandler);
            commandHandlerManager.AddCommandHandler(timerCommandHandler);
            commandHandlerManager.AddCommandHandler(scriptingCommandHandler);
            commandHandlerManager.AddCommandHandler(shellCommandHandler);
            commandHandlerManager.AddCommandHandler(expressionCommandHandler);

            settingPath = Application.ExecutablePath + ".Settings.xml";
            systemCallback.LoadSettings();

            foreach (ICommandHandler handler in commandHandlerManager.Handlers)
            {
                handler.SuggestedCommandsChanged += new EventHandler(handler_SuggestedCommandsChanged);
            }
            handler_SuggestedCommandsChanged(null, new EventArgs());
        }
Esempio n. 2
0
        public DurationWindow()
        {
            InitializeComponent();
            SystemCommandHandler.Bind(this);
            this.txtDrillDown.Text = @"
// You can hit F5 in these query windows to execute your queries after you make any changes. 
// You should dump a duration item at the end of your query since the drill down query depends on this.";

            DataGridUtilities.SetDynamicItemSource(this.gridDetails,
                                                   "Drill down activities will be displayed here.");
        }
Esempio n. 3
0
 public EventDetails()
 {
     InitializeComponent();
     SystemCommandHandler.Bind(this);
     this.KeyDown += (s, e) =>
     {
         if (e.Key == Key.Escape)
         {
             this.Hide();
         }
     };
 }
Esempio n. 4
0
        public MainWindow()
        {
            Application.Current.DispatcherUnhandledException += new DispatcherUnhandledExceptionEventHandler(ExceptionHelper.HanldeUnhandledException);
            this.Model                 = new MainModel(App.CommandLineArgs, SynchronizationContext.Current);
            this.logwindow             = new LogViewer();
            this.logwindow.DataContext = this.Model;
            ExceptionHelper.logviewer  = this.logwindow;
            this.EventsModel           = new EventsModel();
            this.FilterModel           = new FilterModel();
            this.TimelineModel         = new TimelineModel(this.Model);
            this.EventStatsModel       = new EventStatsModel();
            Instance = this;

            InitializeComponent();
            SystemCommandHandler.Bind(this);
            this.DataContext = this.Model;
            this.Loaded     += MainWindow_Loaded;
        }
Esempio n. 5
0
        public LogViewer()
        {
            InitializeComponent();
            SystemCommandHandler.Bind(this);

            entries = new LogEntries();
            this.logList.ItemsSource = entries;
            this.GetDiagnostics();
            this.DataContextChanged   += LogViewer_DataContextChanged;
            CanSendReport              = true;
            Logger.CollectionChanged  += this.OnLog;
            ShowLog.CanExecuteTargets += () => true;
            ShowLog.ExecuteTargets    += (e) =>
            {
                this.Show();
                this.Activate();
            };
        }
Esempio n. 6
0
 public WebBrowserWindow()
 {
     InitializeComponent();
     SystemCommandHandler.Bind(this);
 }
Esempio n. 7
0
 public QueryWindow()
 {
     InitializeComponent();
     this.context = SynchronizationContext.Current;
     SystemCommandHandler.Bind(this);
 }
Esempio n. 8
0
 public static void ApplyWindowStyles(Window window)
 {
     window.Style = Application.Current.Resources["MetroWindow"] as Style;
     SystemCommandHandler.Bind(window);
 }
Esempio n. 9
0
 public EventStatsWindow()
 {
     InitializeComponent();
     SystemCommandHandler.Bind(this);
 }