We want to have feature within smart client where we can generate a report of up and down cameras or current status of camera to be generated in pdf or can be viewed directly on Smart Client.
Kindly revert us.
We want to have feature within smart client where we can generate a report of up and down cameras or current status of camera to be generated in pdf or can be viewed directly on Smart Client.
Kindly revert us.
I think the best way is to use the methods shown in the StatusViewer sample. Please explore the sample.
Hi Anderson,
Thanks for your reply. I have gone through the status viewer and found somewhat useful, however we want the count of down cameras to be displayed at the bottom of the form. And i tried to modify the coding but not able to succeed.
Can you help us out.??Pls
Hi.
In the sample, you can see down camera’s name in grey-color and active camera’s in black-color. You need to tap into the status viewer sample and you will be able to count your down cameras.
Hi,
Agreed on your point which I have already shown to my client but as usual Client wants everything in a easy way. Client says that “instead of going through the grey colour or black colour I want simply put the count of down cameras at the bottom of the app.”
Can you suggest me a workaround where to modify the code where I can have the count. Actually I tried to write some coding for the same but was not successful.
I added a label1 and made the following changes to StatusViewer sample..
private Dictionary<Guid, bool> _respondingCache = new Dictionary<Guid, bool>();
..
if (child.FQID.Kind != Kind.Folder && child.FQID.ObjectId!=child.FQID.Kind)
{
if (_treeNodeCache.ContainsKey(id) == false)
_treeNodeCache.Add(id, tn);
if(child.FQID.Kind==Kind.Camera && _respondingCache.ContainsKey(id) == false) _respondingCache.Add(id, false); // line added
}
..
listBoxChanges.Items.Insert(0, DateTime.Now.ToLongTimeString() + ": " + tn.Text + " - " + state);
}
if (id != Guid.Empty && _respondingCache.ContainsKey(id)) // whole if{} is added
{
if (state == "Enabled" || state == "Responding" || state == "Server Responding")
{
_respondingCache[id] = true;
}
else if (state == "Disabled" || state == "Not Responding" || state == "Server Not Responding")
{
_respondingCache[id] = false;
}
label1.Text = "responding cameras " + _respondingCache.Values.Where(x => x == true).Count().ToString() + " total cameras " + _respondingCache.Values.Count().ToString();
}
Thanks for your input, will try and revert.