When creating a dynamic window, the default size is half the monitor (or SC window) and the position is centered.
I want to resize the window to 90% of the monitor’s size and still center it, but whatever values I use in the MultiwinCommand, the result isn’t what I want.
This is wat I want to set
and these are the results
Many Thanks,
Frediano
I did a test and I used the SCInsertCamera because I feel a bit at home with that sample. I hope my example will be useful to see how you can use this.
// Following is modified from the sample SCInsertCamera
// SCInsertCameraSidePanelWpfUserControl.xaml.cs, line 177
var messageReturn = EnvironmentManager.Instance.SendMessage(new VideoOS.Platform.Messaging.Message(MessageId.SmartClient.MultiWindowCommand,
new MultiWindowCommandData()
{
MultiWindowCommand = MultiWindowCommand.OpenFloatingWindow,
View = viewAndLayoutItem.FQID,
Window = mainWindowFQID,
Height = 600,
Width = 800
}));
MessageBox.Show("test");
if (messageReturn is Collection<object> messageCollection && messageCollection.Count > 0)
{
if (messageCollection.First() is FQID messageFQID)
{
EnvironmentManager.Instance.SendMessage(new VideoOS.Platform.Messaging.Message(MessageId.SmartClient.MultiWindowCommand, // messageFQID,
new MultiWindowCommandData()
{
MultiWindowCommand = MultiWindowCommand.SetWindowSize,
View = viewAndLayoutItem.FQID,
Window = messageFQID,
Height = 600,
Width = 2800
}));
}
}
Bo
The size and position of a Floating Windows work fine, but the playback positioning command always takes it to the end, regardless of the value. Before I used FW, so I switched for this reason.
I had already reported this issue.
Frediano
If not a floating window, what is the window you are trying to resize?
It is a floating window but with a different opening method.
If I use this code to create window:
MultiWindowCommandData showData = new MultiWindowCommandData();
{
Cameras = camerasToShow,
Mode = Mode.ClientPlayback,
BrowseTime = newAlarm.StartTime.AddSeconds(-5).ToUniversalTime()
};
EnvironmentManager.Instance.PostMessage(new Message(MessageId.SmartClient.MultiWindowCommand, showData), null, null);
It is possible to position and resize window, but playback always start to the end of recording.
While with this code:
ShowCamerasInFloatingWindowData showData = new ShowCamerasInFloatingWindowData()
{
Cameras = camerasToShow,
Mode = Mode.ClientPlayback,
BrowseTime = newAlarm.StartTime.AddSeconds(-5).ToUniversalTime()
};
EnvironmentManager.Instance.PostMessage(new Message(MessageId.SmartClient.ShowCamerasInFloatingWindowCommand, showData), null, null);
It is NOT possible to position and resize window (only to massimize), but playback always start to the right point.
Frediano