Search Results

Search found 5 results on 1 pages for 'scrat789'.

Page 1/1 | 1 

  • How cancel shutdown from a windows service C#

    - by scrat789
    Hello everybody I have a windows service started (written in C# .net2.0). I want to detect when the computer shutdown/reboot and cancel it. After the cancel I want do some actions and restart windows. I have tried it, but it not working using Microsoft.Win32; partial class MyService: ServiceBase { protected override void OnStart(string[] args) { SystemEvents.SessionEnding += new SessionEndingEventHandler(OnSessionEnding); } private void OnSessionEnding(object sender, SessionEndingEventArgs e) { e.Cancel = true; //Do some work... } } Another test: partial class MyService: ServiceBase { protected override void OnShutdown() { //Do some work... //base.OnShutdown(); } }

    Read the article

  • switch linq syntax

    - by scrat789
    var folders = from r in this.bdd.Rights join f in this.bdd.Folders on r.RightFolderId equals f.FolderId join rs in this.bdd.RightSpecs on r.RightSpecId equals rs.SpecIdRight where r.RightUserId == userId where rs.SpecRead == true where rs.SpecWrite == true select f; How transform this linq query in the other syntax? var folders = this.bdd.Rights.Where(r => r.....

    Read the article

  • linq get all object in one-dimensional collection

    - by scrat789
    public class Class1 : List<Class2> { } public class Class2 : List<Class3> { } public class Class3 { string str; int i; } public class Program { Class1 c = new Class1(); //insert values.... List<Class3> all = ??; } How can i get a one-dimensional collection in my var "all" ? please note I can not modify Class1, class2 and class3...

    Read the article

  • [silverlight] Windows manager like mesh.com

    - by scrat789
    Hello, I would like du create a basic webdesktop in silverlight 4. How can I do a windows manager ? I want to move, resize, minimized, maximized each windows like http://mesh.com... Does it exist something to create easily a windows manager ? Do I have to create everything from scratch ? How ?

    Read the article

  • FolderBrowseDialog Silverlight

    - by scrat789
    I have an silverlight 4 application, and I want to upload recursively a local folder on the server. For upload files separatly, there is OpenFileDialog method, But I can not select a folder path. Does exist an equivalent of the WPF "FolderBrowseDialog" method in silverlight ?

    Read the article

1