@KyleTrauberman i mean both are useful tools so i cant hate that much i guess. but im getting this stupid xmlpeek error which doesnt have any kind of tag as to where it is being caused, and i know for a fact if i were to build a new projct from scratch and paste the contents of this one which has the error into it the problem woudlnt occur
@Scott hmm funny thing is that I am getting a bunch of errors. On different locations. Does this code that your wrote actually waits for DbUpdate() to finish?
@denonth I think this will occur because the code is in a separate thread from the window, and your code want to use the window. Let me think about a solution.
@Scott I have this error : Error 2 'System.IO.Ports.SerialDataReceivedEventArgs' does not contain a definition for 'Argument' and no extension method 'Argument' accepting a first argument of type 'System.IO.Ports.SerialDataReceivedEventArgs' could be found (are you missing a using directive or an assembly reference?)
@denonth Actually, I have an idea. Just need some answers from you.
@denonth If the process doesn't take long, then we don't have to move the processing to another thread. If we keep it on the main thread, then we still have access to the window and don't have to mess with the current method.
@denonth So essentially. Forget about the backgroundWorker and instead, call the DBUpdate() Method normally. After-all the code has cancelled the close event. I will revise my code on the question and we can try that. 2 secs.
In SharePoint, I placed header and footer in the master page. Then I created the layout page for welcome page and another for sub-sites. Now, the footer in main page has an extra row (a div nested inside the footer div) for searchbar, but the sub-sites won't have the search field there (it will appear after the header).
Having said that, what would be the best way to handle it. Should I create a separate master-page for sub-sites? OR should I put the first opening tag and the search-row in the layout of welcome page and just the opening tag in the sub-site's layout ? OR should I put the condition in master page (which is not recommended by SP as SP AllowServerSideScript is false by default)?
On second thought, is there anything like SSI or render-partial in SharePoint?
@denonth, I realise where I have gone wrong. 1 more sec
@denonth OK I have updated the code again. This time I trigger the DbUpdate method from a timer. This means the FormClosing Method has time to go in, cancel the call and start the process.
Quick one for the room: I'm considering a filesystem hierarchy as follows, but I'm wondering if I can use Site/ as the web root, while the top-level master page resides outside of it.
@denonth Unfortunately with so little to go on about what your source code is actually doing, I feel I could be fighting a never ending battle here. I think I may need to accept defeat here.
@Scott you were right there.. Maybe I can dismiss a event handler on the : comport.DataReceived += port_DataReceived; in the moment when I am actually closing the form
@Scott Ahh man I am so frustrated :( It's not working. I am getting a new error such as shutdown.exe : The application failed to initialize properly (0xc0000142). Please help
@Scott well after some time trying I can live with that shutdown error :) I don't know if everything is done correctly and saved but program is shutting down :) Is there anything that can remove that shutdown.exe window?
I'm using AvalonDock, but whenever I set the project from Debug to Release, AvalonDock's thing isn't found.. The tag 'DockingManager' does not exist in XML namespace 'clr-namespace:AvalonDock;assembly=AvalonDock'.
Is is wrong to have a return statement in a catch block?
What are the alternatives?
i.e:
public bool SomeFunction()
{
try
{
//somecode
return true;
}
catch(Exception ex)
{
MessageBox.Show(ex.message);
return false;
}
}
I don't know if you know much about webforms , but I do Repsonse.Redirect() , which automatically throws a thread error , I don't care about the thread error
My bad, return is only bad in a finally block. And I suggest you figure out why you are a thread error is occurring. Swallowing exceptions is not good (so I've been told).
because there are so many bad outcomes that could come from this redirect , it is to paypal using a dynamically created token , so the possibilities are endless at what could happen
languages like Ada where exceptions should never be a part of the normal routine, and where you shall do as little as possible inside an exception routine
handling data that might lead to new exceptions and eventually stack overflows and such
Since I have this window open and you guys/girls probably know.. are there any easy way to get memory info about stack size for example inside a C# program?