Esempio n. 1
0
        private void addToolStripMenuItem_Click(object sender, EventArgs e)
        {
            MediaWindow mediaWindow = new MediaWindow(ListWindowType.MultiChoose, this.chooseQueryCondition);

            if (mediaWindow.ShowDialog(this) == DialogResult.OK)
            {
                if (mediaWindow.currentEntities != null)
                {
                    foreach (Media m in mediaWindow.currentEntities)
                    {
                        if (!mediaList.Contains(m))
                        {
                            mediaList.Add(m);
                        }
                    }
                }
                if (mediaWindow.currentEntity != null)
                {
                    if (!mediaList.Contains(mediaWindow.currentEntity))
                    {
                        mediaList.Add(mediaWindow.currentEntity);
                    }
                }
            }
            refreshListView();
        }
Esempio n. 2
0
        /// <summary>
        /// Set media window
        /// </summary>
        /// <param name="MediaWindow">Media window</param>
        /// <param name="Width">Floating window width</param>
        /// <param name="Height">Floating window height</param>
        /// <param name="Position">Floating window position</param>
        /// <param name="TitleBar">Floating window title bar</param>
        /// <param name="Resize">Floating window resize</param>
        /// <param name="Title">Floating window title</param>
        /// <remarks>
        /// <para>
        /// All optional arguments are applicable to floating window only.
        /// </para>
        /// </remarks>
        public void SetMediaWindow
        (
            MediaWindow MediaWindow,
            Int32 Width             = 0,
            Int32 Height            = 0,
            WindowPosition Position = WindowPosition.Center,
            WindowTitleBar TitleBar = WindowTitleBar.TitleBarWithCloseButton,
            WindowResize Resize     = WindowResize.KeepAspectRatio,
            String Title            = null
        )
        {
            // set media play window code
            MediaScreenParamBE.AddInteger("/W", (Int32)MediaWindow);

            // all choices but floating window
            if (MediaWindow != MediaWindow.Floating)
            {
                MediaScreenParamBE.Remove("/F");
                return;
            }

            // play rendition in floating window
            // Table 9.19 page 774
            PdfDictionary FloatingWindow = new PdfDictionary(this);

            MediaScreenParamBE.AddDictionary("/F", FloatingWindow);

            // window's dimensions
            if (Width == 0 || Height == 0)
            {
                Width  = 320;
                Height = 180;
            }
            FloatingWindow.AddFormat("/D", "[{0} {1}]", Width, Height);

            FloatingWindow.AddInteger("/P", (Int32)Position);

            FloatingWindow.AddBoolean("/T", TitleBar != WindowTitleBar.NoTitleBar);
            if (TitleBar == WindowTitleBar.NoTitleBar)
            {
                return;
            }

            FloatingWindow.AddInteger("/R", (Int32)Resize);

            if (Title != null)
            {
//			if(Document.Encryption == null)
//				{
//				FloatingWindow.AddFormat("/TT", "[() ({0})]", Title);
//				}
//			else
//				{
                FloatingWindow.AddFormat("/TT", "[{0} {1}]", Document.TextToPdfString(String.Empty, this), Document.TextToPdfString(Title, this));
//				}
            }

            return;
        }
Esempio n. 3
0
        private void MediaButton_Click(object sender, RoutedEventArgs e)
        {
            string      id        = (string)ID_Lbl.Content;
            string      className = this.GetType().ToString();
            MediaWindow mw        = new MediaWindow();

            mw.init(id);
            mw.ShowDialog();
        }
Esempio n. 4
0
        private void CreateMediaWindow()
        {
            _mediaWindow = new MediaWindow(Handle, 0, 0, Width, Height,
                                           WindowsManagement.WS_VISIBLE | WindowsManagement.WS_CHILD | WindowsManagement.WS_CLIPSIBLINGS);
            _mediaWindow.MessageReceived += new EventHandler <MessageReceivedEventArgs>(_mediaWindow_MessageReceived);

            if (_bitmap != null)
            {
                _mediaWindow.SetLogo(_bitmap.GetHbitmap()); // creates new GDI bitmap object that will be destroyed in media window's destructor
            }
            _mediaWindow.ShowLogo(_showLogo);
        }
Esempio n. 5
0
        public static void OutMediaWindow(string title, MediaPlayer media, MediaOption mediaOption = null)
        {
            if (media is null)
            {
                return;
            }
            var window = new MediaWindow();

            window.MediaOption = mediaOption;
            window.Owner       = CommandCanvasList.OwnerWindow;
            window.MediaSource = media;
            window.Caption     = title;
            window.Show();
        }
Esempio n. 6
0
        private void textBox_LogoId_Double_Click(object sender, EventArgs e)
        {
            MediaQueryCondition qc = new MediaQueryCondition();

            qc.project_id = this.entity.id;
            qc.media_type = Media.MEDIA_TYPE_PIC;
            MediaWindow mediaWindow = new MediaWindow(ListWindowType.Choose, qc);

            if (mediaWindow.ShowDialog(this) == DialogResult.OK)
            {
                this.logo = mediaWindow.currentEntity;
                this.renderLogo();
            }
        }
Esempio n. 7
0
        private void textBox_SalePictureId_Double_Click(object sender, EventArgs e)
        {
            MediaQueryCondition qc = new MediaQueryCondition();

            qc.project_id   = this.entity.project_id;
            qc.media_type   = Media.MEDIA_TYPE_PIC;
            qc.content_type = Media.CONTENT_TYPE_FLOORPLAN;
            MediaWindow mediaWindow = new MediaWindow(ListWindowType.Choose, qc);

            if (mediaWindow.ShowDialog(this) == DialogResult.OK)
            {
                this.salePicture = mediaWindow.currentEntity;
                this.renderSalePicture();
            }
        }
Esempio n. 8
0
    // Update is called once per frame
    void Update()
    {
        //Sets input values based on trackpad inputs
        TrackpadValueRight    = trackpadAction.GetAxis(SteamVR_Input_Sources.RightHand);
        TrackpadValueLeft     = trackpadAction.GetAxis(SteamVR_Input_Sources.LeftHand);
        trackpadLastValueLeft = trackpadAction.GetLastAxis(SteamVR_Input_Sources.LeftHand);
        TrackpackLeftChange   = trackpadAction.GetAxisDelta(SteamVR_Input_Sources.LeftHand);

        if (TrackpadValueLeft == Vector2.zero && trackpadLastValueLeft != Vector2.zero)
        {
            TrackpackLeftChange = Vector2.zero;
        }

        //Trigger pulled
        //TODO verify binding
        if (SteamVR_Input._default.inActions.GrabPinch.GetStateDown(SteamVR_Input_Sources.Any))
        {
            if (CollidedButton)
            {
                CollidedButton.onClick.Invoke();
            }


            if (CollidedObject)
            {
                //Move window
                connectedMediaWindow = CollidedObject.gameObject.GetComponent <MediaWindow>();
                connectedMediaWindow.WindowPickup();
            }
        }

        if (SteamVR_Input._default.inActions.GrabPinch.GetStateUp(SteamVR_Input_Sources.Any))
        {
            if (connectedMediaWindow)
            {
                Debug.Log("release");
                //Move window
                connectedMediaWindow.WindowRelease();
            }
        }
    }
 private void MediaButton_Click(object sender, RoutedEventArgs e)
 {
     string id = (string)ID_Lbl.Content;
     string className = this.GetType().ToString();
     MediaWindow mw = new MediaWindow();
     mw.init(id);
     mw.ShowDialog();
 }
        /// <summary>
        /// Set media window
        /// </summary>
        /// <param name="MediaWindow">Media window</param>
        /// <param name="Width">Floating window width</param>
        /// <param name="Height">Floating window height</param>
        /// <param name="Position">Floating window position</param>
        /// <param name="TitleBar">Floating window title bar</param>
        /// <param name="Resize">Floating window resize</param>
        /// <param name="Title">Floating window title</param>
        /// <remarks>
        /// <para>
        /// All optional arguments are applicable to floating window only.
        /// </para>
        /// </remarks>
        public void SetMediaWindow(
			MediaWindow			MediaWindow,
			Int32				Width = 0,
			Int32				Height = 0,
			WindowPosition		Position = WindowPosition.Center,
			WindowTitleBar		TitleBar = WindowTitleBar.TitleBarWithCloseButton,
			WindowResize		Resize = WindowResize.KeepAspectRatio,
			String				Title = null
			)
        {
            // set media play window code
            MediaScreenParamBE.AddInteger("/W", (Int32) MediaWindow);

            // all choices but floating window
            if(MediaWindow != MediaWindow.Floating)
            {
            MediaScreenParamBE.Remove("/F");
            return;
            }

            // play rendition in floating window
            // Table 9.19 page 774
            PdfDictionary FloatingWindow = new PdfDictionary(this);
            MediaScreenParamBE.AddDictionary("/F", FloatingWindow);

            // window's dimensions
            if(Width == 0 || Height == 0)
            {
            Width = 320;
            Height = 180;
            }
            FloatingWindow.AddFormat("/D", "[{0} {1}]", Width, Height);

            FloatingWindow.AddInteger("/P", (Int32) Position);

            FloatingWindow.AddBoolean("/T", TitleBar != WindowTitleBar.NoTitleBar);
            if(TitleBar == WindowTitleBar.NoTitleBar) return;

            FloatingWindow.AddInteger("/R", (Int32) Resize);

            if(Title != null)
            {
            //			if(Document.Encryption == null)
            //				{
            //				FloatingWindow.AddFormat("/TT", "[() ({0})]", Title);
            //				}
            //			else
            //				{
            FloatingWindow.AddFormat("/TT", "[{0} {1}]", Document.TextToPdfString(String.Empty, this), Document.TextToPdfString(Title, this));
            //				}
            }

            return;
        }