Пример #1
0
 /// <summary>
 /// This method will be called once the window is initialising (after it has been added).
 /// Do not store a reference of the window unless you properly dispose it (remove reference once not required).
 /// </summary>
 /// <param name="window">The wpf window this panel will be added to.</param>
 protected override void OnInitialise(WPFWindow window)
 {
     // the presentationsource can only be received once loaded
     if (PresentationSource.FromVisual(window) == null)
     {
         window.Loaded += OnWindowLoaded;
         _window        = window;
     }
     else
     {
         InitialiseBitmap(_width, _height);
     }
 }
Пример #2
0
        /// <summary>
        /// This method invokes the initialisation of the panel (after it has been addded).
        /// </summary>
        public void Initialise(WPFWindow window)
        {
            if (UseLoadingIndicator)
            {
                _loadingIndicator = LoadingIndicatorFactory.CreateElement(window.App, window, this);
                ShowLoadingIndicator();
            }
            LoadingIndicatorFactory = null;

            if (window is SigmaWindow)
            {
                OnInitialise((SigmaWindow)window);
            }

            OnInitialise(window);
        }
Пример #3
0
        public Application()
        {
            Log.RegisterLogWriter(new DebuggerLogWriter());
            Log.RegisterLogWriter(new ConsoleLogWriter());

            // Log test.
            using (new ScopedLogGroup("TestGroup"))
            {
                Log.Error("testerror", 0);
                using (new ScopedLogGroup("TestGroupNested"))
                {
                    Log.Debug("testdebug {0}", 0);
                }
            }

            window = new ClearSight.Core.Window.WPFWindow(1024, 786);
        }
Пример #4
0
 /// <summary>
 /// This method will be called once the window is initialising (after it has been added).
 /// Do not store a reference of the window unless you properly dispose it (remove reference once not required).
 /// </summary>
 /// <param name="window">The wpf window this panel will be added to.</param>
 protected virtual void OnInitialise(WPFWindow window)
 {
 }
Пример #5
0
        private void OpenWindow(object sender, RoutedEventArgs e)
        {
            var window = new WPFWindow();

            window.Show();
        }