コード例 #1
0
 public static IImageViewer OpenFiles(string[] localFileList, WindowBehaviour windowBehaviour)
 {
     return(new OpenFilesHelper(localFileList)
     {
         WindowBehaviour = windowBehaviour
     }.OpenFiles());
 }
コード例 #2
0
        private static IDesktopWindow GetLaunchWindow(WindowBehaviour windowBehaviour)
        {
            if (windowBehaviour == WindowBehaviour.Auto)
            {
                return(Application.ActiveDesktopWindow);
            }
            else if (windowBehaviour == WindowBehaviour.Single)
            {
                return(Application.ActiveDesktopWindow);
            }

            IDesktopWindow window;
            string         imageViewerWindow = "ImageViewer";

            // If an image viewer desktop window already exists, use it
            if (Application.DesktopWindows.Contains(imageViewerWindow))
            {
                window = Application.DesktopWindows[imageViewerWindow];
            }
            // If not, create one
            else
            {
                DesktopWindowCreationArgs args = new DesktopWindowCreationArgs("", imageViewerWindow);
                window = Application.DesktopWindows.AddNew(args);
            }

            return(window);
        }
コード例 #3
0
 private void Initialize(Animator animator)
 {
     if (m_window)
     {
         return;
     }
     m_window = animator.GetComponent <WindowBehaviour>();
     m_window?.SetAnimatorCallback(this);
 }
コード例 #4
0
		/// <summary>
		/// Constructs a new <see cref="OpenStudyArgs"/> using the specified parameters.
		/// </summary>
		/// <param name="studyInstanceUids">The Study Instance UIDs of the studies to be opened.</param>
		/// <param name="server">The server from which the study should be loaded.</param>
		/// <param name="windowBehaviour">The window launch options.</param>
		public OpenStudyArgs(string[] studyInstanceUids, IDicomServiceNode server, WindowBehaviour windowBehaviour)
		{
			Platform.CheckForNullReference(studyInstanceUids, "studyInstanceUids");
            Platform.CheckForNullReference(server, "server");

			if (studyInstanceUids.Length == 0)
				throw new ArgumentException("studyInstanceUids array cannot be empty.");

			_studyInstanceUids = studyInstanceUids;
			_server = server;
			_windowBehaviour = windowBehaviour;
		}
コード例 #5
0
    private Window DetectLinkedWindow()
    {
        var             p  = transform;
        WindowBehaviour wb = null;

        while (p && !(wb = p.GetComponent <WindowBehaviour>()) && (p = p.parent))
        {
            ;
        }

        return(wb?.window ?? null);
    }
コード例 #6
0
        /// <summary>
        /// Constructs a new <see cref="OpenStudyArgs"/> using the specified parameters.
        /// </summary>
        /// <param name="studyInstanceUids">The Study Instance UIDs of the studies to be opened.</param>
        /// <param name="server">The server from which the study should be loaded.</param>
        /// <param name="windowBehaviour">The window launch options.</param>
        public OpenStudyArgs(string[] studyInstanceUids, IDicomServiceNode server, WindowBehaviour windowBehaviour)
        {
            Platform.CheckForNullReference(studyInstanceUids, "studyInstanceUids");
            Platform.CheckForNullReference(server, "server");

            if (studyInstanceUids.Length == 0)
            {
                throw new ArgumentException("studyInstanceUids array cannot be empty.");
            }

            _studyInstanceUids = studyInstanceUids;
            _server            = server;
            _windowBehaviour   = windowBehaviour;
        }
コード例 #7
0
    // Use this for initialization
    void Start()
    {
        GameObject camera = GameObject.Find(m_cameraName);
        this.m_inputManagement = camera.GetComponent<WindowInputsManagement>();

        this.m_list = this.transform.FindChild("ListContentElts");

        this.m_subList = GameObject.Find(m_subListName).transform;

        this.m_behaviour = GameObject.Find(m_subWindowName).GetComponent<WindowBehaviour>();
        this.m_behaviour.ForceReduce(); // on ferme par défaut la fenetre

        this.m_subWindowInterface = this.m_behaviour.transform.FindChild("Interface");

        this.m_basePosition = this.transform.position;
    }
コード例 #8
0
 public override void Start()
 {
     _windowBehaviour = (WindowBehaviour)MonitorConfigurationSettings.Default.WindowBehaviour;
     base.Start();
 }
コード例 #9
0
 /// <summary>
 /// Mandatory constructor.
 /// </summary>
 public LaunchImageViewerArgs(WindowBehaviour windowBehaviour)
 {
     this.WindowBehaviour = windowBehaviour;
 }
コード例 #10
0
 private void OnDestroy()
 {
     m_window      = null;
     onStateChange = null;
 }
コード例 #11
0
ファイル: OpenStudyHelper.cs プロジェクト: tcchau/ClearCanvas
		public static IImageViewer OpenFiles(string[] localFileList, WindowBehaviour windowBehaviour)
		{
			return new OpenFilesHelper(localFileList) {WindowBehaviour = windowBehaviour}.OpenFiles();
		}
コード例 #12
0
		/// <summary>
		/// Mandatory constructor.
		/// </summary>
		public LaunchImageViewerArgs(WindowBehaviour windowBehaviour)
		{
			WindowBehaviour = windowBehaviour;
		}