Hello,
I am trying to modify url property of an html view item using ViewItemPlugin for Playback Tab. However I noticed that there is no way I could use the following way.
ViewAndLayoutItem.InsertBuiltinViewItem(5, ViewAndLayoutItem.HTMLBuiltinId, properties)
This code I have used in WorkSpacePlugin code and it works.
Please let me know how I can modify item property in ViewItemPlugin.
Thanks
Giridhar
I am not sure I have understood the situation, and I suspect I might have a wrong answer in an older thread, let me know if this fits.. (If it fits I will revisit my earlier answer.)
I modified the SCInsertCamera plugin sample, I added a button and this code-
private void buttonChangeURL_Click(object sender, EventArgs e)
{
Dictionary<String, String> properties = new Dictionary<string, string>();
properties.Add("URL", "www.milestonesys.com"); // Next 4 for a HTML item
properties.Add("HideNavigationbar", "true");
properties.Add("Scaling", "3"); // fit in 800x600
_currentView.InsertBuiltinViewItem(0, ViewAndLayoutItem.HTMLBuiltinId, properties);
_currentView.Save();
}
This works fine. (The view created by the plugin has to be the currently selected view when using this code snippet.)
If I have not misunderstood you will be able to develop a function that reads the option menu (see Property sample) and updates the view using a method like this.
Please note that this method saves the view in the XProtect server. If other Smart Client users use the same view they will all have the view updated. Also, there is an impact on the server, but I am guessing it does not happens so frequent that it should be cause for alarm, please consider if this might be a concern.
If this should happen only locally on the Smart Client and not be saved to server you should create your own ViewItemPlugin and use System.Windows.Forms.WebBrowser (this is general .NET -not MIP SDK functionality).