Exemplo n.º 1
0
    private void PopOut()
    {
        if (LogsWindow == null)
        {
            return;
        }

        LogsControl.Orphan();
        LogsWindow.Dispose();
        LogsWindow = null;

        var monitor = _clyde.EnumerateMonitors().First();

        ClydeWindow = _clyde.CreateWindow(new WindowCreateParameters
        {
            Maximized = false,
            Title     = "Admin Logs",
            Monitor   = monitor,
            Width     = 1000,
            Height    = 400
        });

        ClydeWindow.RequestClosed += OnRequestClosed;
        ClydeWindow.DisposeOnClose = true;

        Root = _uiManager.CreateWindowRoot(ClydeWindow);
        Root.AddChild(LogsControl);

        LogsControl.PopOutButton.Disabled = true;
        LogsControl.PopOutButton.Visible  = false;
    }
Exemplo n.º 2
0
        private Window GetView(string pageKey)
        {
            var viewType = (ViewType)Enum.Parse(typeof(ViewType), pageKey);

            CurrentPageKey = pageKey;

            Window window = null;

            switch (viewType)
            {
            case ViewType.Login:
                window = new LoginWindow(); break;

            case ViewType.Settings:
                window = new SettingsWindow(); break;

            case ViewType.Jobs:
                window = new JobsWindow(); break;

            case ViewType.Logs:
                window = new LogsWindow(); break;

            case ViewType.About:
                window = new AboutWindow(); break;

            default: throw new NotImplementedException();
            }
            window.DataContext = WpfApp.Instance.GetDataContext(viewType);

            ((BaseViewModel)window.DataContext).NavigatedTo();
            return(window);
        }
Exemplo n.º 3
0
 public void OpenLogsWindow(int processId)
 {
     if (windows[processId] != null)
     {
         windows[processId].Activate();
     }
     else
     {
         windows[processId]            = new LogsWindow();
         windows[processId]._processId = processId;
         windows[processId].Show();
     }
 }
Exemplo n.º 4
0
    public override void Closed()
    {
        base.Closed();

        if (ClydeWindow != null)
        {
            ClydeWindow.RequestClosed -= OnRequestClosed;
        }

        LogsControl.Dispose();
        LogsWindow?.Dispose();
        Root?.Dispose();
        ClydeWindow?.Dispose();
    }
Exemplo n.º 5
0
    public override void Opened()
    {
        base.Opened();

        LogsWindow?.OpenCentered();
    }