Exemple #1
0
        private void OnFireCommand(object sender, EventArgs e)
        {
            TaggedItem screenItem = (TaggedItem)comboBoxScreens.SelectedItem;
            TaggedItem windowItem = (TaggedItem)comboBoxWindows.SelectedItem;
            //if (screenItem == null || windowItem == null || _selectedView == null || listBox1.SelectedItem==null)
            //{
            //	MessageBox.Show("Please select Screen/Window in above dropdown boxes", "Error");
            //} else
            {
                MultiWindowCommandData data = new MultiWindowCommandData();
                data.Screen             = screenItem != null? screenItem.Item.FQID : null;
                data.Window             = windowItem != null? windowItem.Item.FQID : null;
                data.View               = _selectedView != null? _selectedView.FQID : null;
                data.X                  = 200;
                data.Y                  = 200;
                data.Height             = 400;
                data.Width              = 400;
                data.MultiWindowCommand = (string)listBox1.SelectedItem;
                data.PlaybackSupportedInFloatingWindow = checkBoxPlayback.Checked;

                if (data.MultiWindowCommand == MultiWindowCommand.SetNextViewInWindow ||
                    data.MultiWindowCommand == MultiWindowCommand.SetPreviousViewInWindow)
                {
                    data.MultiWindowCommand = MultiWindowCommand.SelectWindow;
                    EnvironmentManager.Instance.SendMessage(
                        new VideoOS.Platform.Messaging.Message(MessageId.SmartClient.MultiWindowCommand, data));
                    data.MultiWindowCommand = (string)listBox1.SelectedItem;
                }
                EnvironmentManager.Instance.SendMessage(
                    new VideoOS.Platform.Messaging.Message(MessageId.SmartClient.MultiWindowCommand, data),
                    null,
                    null);
            }
        }
        private FQID GetWindow()
        {
            TaggedItem windowItem = (TaggedItem)comboBoxWindows.SelectedItem;

            if (windowItem != null)
            {
                return(windowItem.Item.FQID);
            }
            return(null);
        }