示例#1
0
        public void OpenTab(Func <Screen> content)
        {
            var s    = content.Invoke();
            var view = _viewManager.CreateViewForModel(s);

            _viewManager.BindViewToModel(view, s);
            TabContents.Add(new TabContent(s.DisplayName, view));
        }
示例#2
0
        public void ShowTab(string aKey, object aPassingObject = null)
        {
            var lContent = CreateContent(aKey, aPassingObject);

            if (lContent == null)
            {
                return;
            }

            TabContents.Add(lContent);
            SelectedTab = lContent;
        }
        private void ConnectSession(Models.RemoteDesktop.RemoteDesktopSessionInfo sessionInfo, string Header = null)
        {
            // Add global settings...
            sessionInfo.DesktopWidth       = SettingsManager.Current.RemoteDesktop_DesktopWidth;
            sessionInfo.DesktopHeight      = SettingsManager.Current.RemoteDesktop_DesktopHeight;
            sessionInfo.ColorDepth         = SettingsManager.Current.RemoteDesktop_ColorDepth;
            sessionInfo.RedirectClipboard  = SettingsManager.Current.RemoteDesktop_RedirectClipboard;
            sessionInfo.RedirectDevices    = SettingsManager.Current.RemoteDesktop_RedirectDevices;
            sessionInfo.RedirectDrives     = SettingsManager.Current.RemoteDesktop_RedirectDrives;
            sessionInfo.RedirectPorts      = SettingsManager.Current.RemoteDesktop_RedirectPorts;
            sessionInfo.RedirectSmartCards = SettingsManager.Current.RemoteDesktop_RedirectSmartCards;

            TabContents.Add(new DragablzTabContent(Header ?? sessionInfo.Hostname, new RemoteDesktopControl(sessionInfo)));
            SelectedTabIndex = TabContents.Count - 1;
        }