|
Hi,
Thanks.
|
|
|
|
|
If it's valid XHTML, then it's already XML. If you mean translate it to a particular schema, you can do that with XSLT.
If it's typical Internet HTML, then it isn't valid XML, and you will have to construct some sort of state-based reader that makes reasonable guesses about what non-XML markup actually means (i.e. unclosed <li>s and <p>s, unmatched chevrons, tags with naked attributes, etc).
|
|
|
|
|
Any one can help me,and tell that how i create a windows login application,and run this login application when computer start like windows logon screen,,and i want to replace this windows logon application with my own,,plz help
Vipul
|
|
|
|
|
Sure, join Microsoft and join the Windows team. Maybe then.
You can't replace the Windows Login screen - it would represent a huge security hole if you could replace it with a fake login. Just think about it for a moment and you'll see why it's not possible.
|
|
|
|
|
|
I am working on windows mobile application in which i need to store a captured image from the camera in isolated storage without saving it in the camera roll.
I am able to store the captured image in the isolated storage but a copy of the captured image in also stored in the camera roll that i don't want ...please help
|
|
|
|
|
Hi guys.,
I had an grid view where i had placed an link button to print an report.In this button click event i need to call the SSRS report and need to get the output as pdf file.
I had used this below code,the code is running fine,but i'm unable to see the prompt to open/save pdf file.Plz reply ASAP.
protected void btnAuthenticateAndPrint_Click(object sender, EventArgs args)
{
try
{
LinkButton lb = (LinkButton)sender;
GridViewRow row = (GridViewRow)lb.NamingContainer;
Label lbOrderID = row.FindControl("lbOrderID") as Label;
int OrderId = Convert.ToInt32(lbOrderID.Text);
da = new SqlDataAdapter("Get_PODetails", con);
da.SelectCommand.CommandType = CommandType.StoredProcedure;
da.SelectCommand.Parameters.AddWithValue("@MPDI_ID", OrderId);
ds = new DataSet();
da.Fill(ds, "PO");
if (ds.Tables["PO"].Rows.Count > 0)
{
lblPOId.Text=ds.Tables["PO"].Rows[0]["MPDI_ID"].ToString();
lblVendid.Text = ds.Tables["PO"].Rows[0]["MVDI_ID"].ToString();
lblBranch.Text = ds.Tables["PO"].Rows[0]["MBRI_ID"].ToString();
lblDate.Text = Convert.ToDateTime(ds.Tables["PO"].Rows[0]["MPDI_Date"]).ToString("dd-MM-yyyy");
}
rs = new RSWebService.ReportingService2005();
rsExec = new REWebService.ReportExecutionService();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
rsExec.Credentials = System.Net.CredentialCache.DefaultCredentials;
rs.Url = "http://localhost/ReportServer/ReportService2005.asmx";
rsExec.Url = "http://localhost/ReportServer/ReportExecution2005.asmx";
byte[] Sendresults = null;
byte[] bytes = null;
string historyID = null;
string deviceInfo = @"<DeviceInfo><Toolbar>False</Toolbar></DeviceInfo>";
string format = "PDF";
string encoding = null;
string mimeType = null;
string extension = null;
REWebService.Warning[] warnings = null;
string[] streamIDs = null;
string _reportName = @"/FIMO GOF Assets Reports/PURCHASE ORDER";
REWebService.ExecutionInfo ei = rsExec.LoadReport(_reportName, historyID);
REWebService.ParameterValue[] parameters = new REWebService.ParameterValue[4];
parameters[0] = new REWebService.ParameterValue();
parameters[0].Name = "MVDI_ID";
parameters[0].Value = lblVendid.Text;
parameters[1] = new REWebService.ParameterValue();
parameters[1].Name = "MBRI_ID";
parameters[1].Value = lblBranch.Text;
parameters[2] = new REWebService.ParameterValue();
parameters[2].Name = "MPDI_Date";
parameters[2].Value = lblDate.Text;
parameters[3] = new REWebService.ParameterValue();
parameters[3].Name = "ReportParameter1";
parameters[3].Value = lblPOId.Text;
rsExec.SetExecutionParameters(parameters, "en-us");
Sendresults = rsExec.Render(format, deviceInfo, out extension, out encoding, out mimeType, out warnings, out streamIDs);
MemoryStream ms = new MemoryStream(Sendresults);
if (format == "PDF")
{
Response.ContentType = "application/pdf";
Response.AddHeader("Content-disposition", "inline;filename=output.pdf");
Response.AddHeader("Content-Length", Sendresults.Length.ToString());
}
Response.OutputStream.Write(Sendresults, 0, Sendresults.Length);
Response.OutputStream.Flush();
Response.OutputStream.Close();
}
catch(Exception Ex)
{
throw Ex;
}
}
|
|
|
|
|
|
I want to add labels to an image at different zoom levels like the one on google maps please give me some ideas.
|
|
|
|
|
WinForms? ASP.NET? WPF/Silverlight?
|
|
|
|
|
right now I am using winForms. but i can switch if u suggest any other.....
|
|
|
|
|
When the image zooms, simply use DrawText to paint the text directly onto the image (do this as part of the OnPaint cycle so that it refreshes when a repaint is requested). If you need a rectangle to surround it, measure the text first, then draw the rectangle slightly inflated, and finally draw the text in that rectangle.
|
|
|
|
|
thanks for the suggestion i will try it...
|
|
|
|
|
i like you articale the one about compression the video in c# , and i have final project about this title but in monitoring system video so could you help to choose the best technique in my project please bkz i'm really confused and i've no idea how use those techniques in c# MPEG H.264
thanx a lot
|
|
|
|
|
If you want a response from the author of the article you read, you should pose this question at the bottom of that article. That way the author will be notified of your question. Here, you will simply have to be lucky enough to have them stop by. Good luck on your project.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
ok thank you and sorry for bothring you
|
|
|
|
|
how can i send a message to that guy i don't know how ?!!
"http://www.codeproject.com/Tips/486464/Compressing-my-videos"
thank you
|
|
|
|
|
If you leave a message at the bottom of the tip you linked to, then he will get an email. He is an active member so you are likely to get a response that way.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
I haven't written an article on Video Compression in C# or any language. Are you sure you have the right person?
|
|
|
|
|
sorry
|
|
|
|
|
|
Collin Jasnoch wrote: If we can figure out the secret to doing it just think of the productivity
increase world wide we will see!
Hmmm, I'm not sure I want the future of IT to rely on whether or not I had cheese late at night.
|
|
|
|
|
Really simplified, I have this object:
enum ObjectType
{
Type1,
Type2
}
class SomeClass
{
string someProp;
ObjectType type;
}
Specs call for the right pane to be a flat list in a list control of ALL SomeClass objects. Left pane will be a treeview grouped by ObjectType. I.e.
ObjectType1
SomeObject1
SomeObject2
SomeObject3
ObjectType2
SomeObject4
SomeObject5
Obviously, if the user changes the type of SomeObject5 from ObjectType2 to ObjectType1, the tree on the left should re-arrange itself appropriately.
This app is WPF / MVVM, so keep that in mind.
I know I can do some ghetto hack where the VM for the right pane just grabs its own copy of the hierachial list and flattens it and displays that while the left pane just displays the hierachial list. Or vice versa. List is stored as a flat list and the left pane builds a hierachial collection.
Not liking either of those ideas because in the WPF world, you really need to be operating on the same exact instance of an object so change notification works.
I guess what I'm thinking is some kind of hierachial structure that also has a "FlatView" and operating on the hierachial methods will auto sync the flat view and vice versa. Basically, I'd like the left pane and the right pane to operate on the same exact collection and the same exact objects, but just display them differently.
|
|
|
|
|
Conceptually:
1) Create an Observable.Collection that contains the "original" objects
2) Load the "Tree View" with "references" to objects in (1)
3) Load the "List View" with "references" to objects in (1)
4) Subscribe to the OnCollectionChanged event of (1) so that when an object is added, removed, etc to/from (1), the event handler "syncs" the Tree and List views by adding, removing, etc. items from those views.
5) Wire up the UI so that an "Add", etc. to the Tree or List View actually operates on (1) using an item object reference from (2) or (3).
|
|
|
|
|
I was trying to avoid having 2 collections and "sync'ing" them up. I'm probably not going to have that many items, but purposely storing multiple copies of the same object is not something I want to do. In regards to step #2 and #3, I'm going to be using data binding, so it all really needs to be the same instance of all the objects. I came up with something that sort of works, but I'm not happy with it:
public class HybridCollection : ObservableDictionary<ObjType, ObservableCollection<Obj>>
{
public HybridCollection()
: base()
{
}
public void Add(Obj o)
{
ObservableCollection<Obj> lst = null;
if (!this.TryGetValue(o.Type, out lst))
{
lst = new ObservableCollection<Obj>();
this[o.Type] = lst;
}
lst.Add(o);
cv.Refresh();
}
public IEnumerable<Obj> FlatView
{
get
{
foreach (ObservableCollection<Obj> lst in Values)
{
foreach (Obj obj in lst)
yield return obj;
}
}
}
private CollectionView cv = null;
public CollectionView FlatView2
{
get
{
if (cv == null)
cv = new CollectionView(FlatView);
return cv;
}
}
}
So what happens is, the data is stored hierachially so the treeview can bind to it with the HierachialDataTemplates. FlatView2 just returns an IEnumerable where it enums through all the branches and yields the original objects back.
Unfortunately, in the Add() method (and of course the delete, etc methods), there is a cv.Refresh() call to refresh the flat view since the IEnumerable isn't going to be able to propogate change notifications. So the treeview is going to use optimized data binding where it adds / removes only the affected items, but the listview will be reloading the entire list. Ugh.
I guess I will have to return an ObservableCollection instead of the IEnumerable... was kind of hoping to prevent that.
|
|
|
|