示例#1
0
        public void NewGraphReadingsPopUp(string methodName)
        {
            var window = new LiveGraphWindow()
            {
                WindowStartupLocation = WindowStartupLocation.CenterOwner,
                BorderThickness       = new Thickness(1),
                GlowBrush             = null
            };

            window.SetResourceReference(MetroWindow.BorderBrushProperty, "AccentColorBrush");

            popOutWindows.AddLast(window);
            window.DataContext = this;
            var model = new LiveGraphWindowViewModel(methodName);

            model.Settings = Settings;
            model.Title    = Title;
            this.engine.RegisterListener(model);
            window.DataContext = model;
            window.Closed     += (sender, args) =>
            {
                this.engine.UnRegisterListener(model);
                window.DataContext = null;
                popOutWindows.Remove(window);
                window = null;
            };
            window.Show();
        }
        public void NewGraphReadingsPopUp(string methodName)
        {
            var window = new LiveGraphWindow()
            {
                WindowStartupLocation = WindowStartupLocation.CenterOwner,
                BorderThickness = new Thickness(1),
                GlowBrush = null
            };
            window.SetResourceReference(MetroWindow.BorderBrushProperty, "AccentColorBrush");

            popOutWindows.AddLast(window);
            window.DataContext = this;
            var model = new LiveGraphWindowViewModel(methodName);
            model.Title = Title;
            this.engine.RegisterListener(model);
            window.DataContext = model;
            window.Closed += (sender, args) =>
            {
                this.engine.UnRegisterListener(model);
                window.DataContext = null;
                popOutWindows.Remove(window);
                window = null;
            };
            window.Show();
        }