|
Benjie Fallar III wrote: I have NO problem accessing the media port via LAN/WLAN.
I cannot access my DVR's web port and see real-time using IE.
Benjie Fallar III wrote: where can I start developing a C# programming that capture the live streaming of
my DVR cameras Do you know the format of the stream? Any other application that accepts the address/port and can display the stream?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
the streaming format is H.264
is there any online documentation or reference on how to start programming live streaming from DVR using C#.NET?
In some Adroid app, like ViewCam, they can connect to remote DVR. I wanted to develop the same application for Windows Phone. So I'm looking for some references to starts with
|
|
|
|
|
Benjie Fallar III wrote: is there any online documentation or reference on how to start programming live
streaming from DVR using C#.NET? You'd need some library to decode the stream and a control to display it. Decoding is usually not done in C#, but using an external library. VLC should be able to do it.
http://libvlcnet.codeplex.com/[^]
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I would like to make an application to register queries in SQL files or XML file .
Is what you have ideas?
Thank you
|
|
|
|
|
Ibrahim.elh wrote: I would like to make an application to register queries in SQL files or XML file . Do you want to detect "SQL code" in those files, or do you want to log stuff that is executed?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I try to make an application that recovers the script of the table and put them in a database
|
|
|
|
|
You'll have to explain more; what script do you want to recover?
You can generate a SQL Script to (re)create the table.
What does putting a script in a database mean here? Executing the script on a database, or actually saving it as data?
I suppose you stopped trying virtualizing the gridview?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
yes I stop trying viruel mode I found another solution , I wish to make an application that connects to a database on a server and saves in csv or sql script to either import it on a mysql database
|
|
|
|
|
Ibrahim.elh wrote: wish to make an application that connects to a database on a server and saves in
csv or sql script to either import it on a mysql database Most databases can export to CSV, and shouldn't be too hard since Informix allows access over ODBC.
That would only export the data, not the structure, the relations or any server-side logic.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
|
i have a informix database
|
|
|
|
|
That little gem of information may have been useful in your original post!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi ALL,
My requirement is very simple.
I have one string in "HH:MM" format.
Want to store same in DateTime format but same in HH:MM format
example :-
string str1 = "21:56";
DateTime Date = Convert.ToDateTime(str1);
Now we have to store this value in XML and which takes input as DateTime object.. and in xml it should display pnly in HH::MM format
<filetime>21:56
I am unable to find solution for it
Tried couple of options but its not working
please help me
|
|
|
|
|
not quite sure what you're asking for
if you have this (as per your example)
DateTime Date = Convert.ToDateTime(str1);
then you can do this
String dateAsString = Date.ToString("hh:mm");
(12hr format, or use "HH:MM" for 24hr format)
is that what you mean ?
|
|
|
|
|
Hi Garth,
Let me explain u in deeply.
I have one XSD, I have converted it to .cs format.
Now I have to generate XML by using this.
In XML I have one field as given below.
private System.DateTime transactionTimeField;
Now in this field I have to store Time value that also as given below
<transactiontime>02:12:00
I am trying but unable
Please let me know if you can help me here.
|
|
|
|
|
You can do that by using TimeSpan object. This will have only time in it.
For e.g :
TimeSpan ts = TimeSpan.Parse("12:15:06");
|
|
|
|
|
Thanks Praneet but TimeSpan I cant store in DateTime.
Please correct me If I am wrong.
I want to store HH::MM in DateTime object
|
|
|
|
|
so, what is wrong with
DateTime myTime = new DateTime(0,0,0,HH,MM,0);
or
dateString = "08:30";
format = "hh:mm";
try {
result = DateTime.ParseExact(dateString, format, provider);
Console.WriteLine("{0} converts to {1}.", dateString, result.ToString());
}
catch (FormatException) {
Console.WriteLine("{0} is not in the correct format.", dateString);
}
(I cribbed that one from MS and hacked up the dateString and format)
|
|
|
|
|
Garth J Lancaster wrote: so, what is wrong with
DateTime myTime = new DateTime(0,0,0,HH,MM,0);
What, apart from "it won't work?"
You will get a System.ArgumentOutOfRangeException "Year, Month, and Day parameters describe an un-representable DateTime."
Your second example works - to an extent - but doesn't quite do what he wants as the Year, Month and Day parts of the DateTime will be set to DateTime.Now.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
hmph !!!
thanks OG - I thought you could just set the time component
|
|
|
|
|
You're welcome!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
No. You can't store "just the hours and minutes" in a DateTime: it requires a Year, Month and Day value which cannot be zeroed. So the best you can do is store the Hours and Minutes together with a sepecific date (And probably DateTime.MinValue would be best as DateTime.Now values are used if not specified).
Personally, I'd use a Timespan, or an integer value representing the seconds since midnight instead.
Using a DateTime implies a number of things which aren't necessarily true.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
If you feel that DateTime is not working for you, nothing prevents you from writing a class that holds, validates and converts "time". Make sure it is as compliant as possible with the DateTime object.
|
|
|
|
|
bhausahebshedbale wrote: I have one string in "HH:MM" format.
Want to store same in DateTime format but same in HH:MM format
No. Don't do that.
A timestamp is a value that ALWAYS has a timezone either implicitly or explicitly.
If you have only a time then it is not a timestamp. Just that simple. Thus attempting to coerce it into a timestamp is at best difficult and worse will end up causing more problems than you think it will fix.
Create your own class and create the XML supporting classes/methods to support it as such.
|
|
|
|
|
Hello!
I have a PropertyGrid in an application displaying some properties in a class. One property has it's own TypeConverter to display an array of strings.
Issue
I would like to change the TypeConverter of the property in runtime.
Example
I have included a simple example code. You should be able to just paste the code in a Windows Forms Application, compile and run. Remember to create a PropertyGrid (propertyGrid1) and a button (button1) in the Form and add the button's click event.
Notice the two static string arrays in the Form1 class. These arrays are used with the TypeConverters NameList and SentenceList.
When the application start you will see the PropertyGrid displaying the name list in the property called Item. When you click the button I want the list of names to change to the list of sentences instead. I imagined the SwopList() method in the Props class should handle this. I call the SwopList() method with the button's click event.
In the SwopList() method I fetch the PropertyDescriptor object of the Item property. Then I can see what TypeConvert is used with the property PropertyDescriptor.Converter. From that point I just want to swop the TypeConverter (like the code I have commented out). But this don't work as PropertyDescriptor.Converter is read only
Any solution?
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public static string[] Names = new string[] {"Jon Smith", "Fred Perry", "Foo Bar" };
public static string[] Sentences = new string[] { "Hi hello!", "Bye", "Peace and long life", "Live long and prosper" };
Props properties = new Props();
public Form1()
{
InitializeComponent();
propertyGrid1.SelectedObject = properties;
}
private void button1_Click(object sender, EventArgs e)
{
properties.SwopList();
propertyGrid1.Refresh();
}
}
public class Props
{
string name = Form1.Names[0];
string sentence = Form1.Sentences[0];
string item;
public Props()
{
item = name;
}
public void SwopList()
{
PropertyDescriptorCollection pdc = System.ComponentModel.TypeDescriptor.GetProperties(this);
PropertyDescriptor pd = pdc["Item"];
if (pd.Converter is NameList)
{
item = sentence;
}
else if (pd.Converter is SentenceList)
{
item = name;
}
}
[TypeConverter(typeof(NameList))]
public string Item
{
get { return item; }
set { item = value; }
}
}
public class NameList : TypeConverter
{
public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
{
return true;
}
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
{
return new StandardValuesCollection(Form1.Names);
}
}
public class SentenceList : TypeConverter
{
public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
{
return true;
}
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
{
return new StandardValuesCollection(Form1.Sentences);
}
}
}
Best regards,
/Steffe
|
|
|
|