[APP] Device Reset -[R]- 21 Jan 12 -[U]- 21 Jul 12 -[V]- 3.0.0.0

sh4d0w86

Senior Member
Apr 15, 2010
1,761
795
0
Device Reset
powered by fiinix's DllImport Project


description
--- restart or shutdown device


recognition
--- XDA Portal


pre-installed
--- Rataplan ROM


release log
--- Device Reset v3.0.0.0
------ see Post #31 or click here
--- Device Reset v2.0.1.0
------ see Post #25 or click here
--- Device Reset v2.0.0.0
------ see Post #16 or click here
--- Device Reset v1.2.0.0
------ see Post #15 or click here
--- Device Reset v1.1.0.0
------ see Post #14 or click here
 
Last edited:

Ttblondey

Senior Member
Jan 1, 2008
1,690
103
0
soft reset restarts back your phone.
power will shutdown your phone thoroughly(no need to press the power switch button);)
 

NebZoNe

Senior Member
Mar 21, 2011
379
67
0
Paris (suburbs)
soundcloud.com
Thanks sh4d0w86!!
congratulations for first wp7 development!!
will keep my power button intact much longer! :) that was needed

I'm sure hard-reset is a good idea, but if a bad manip occurs it can be upsetting...or with a flashy red background color for warning purpose...

would it be possible to have all restart options? i mean one which start with the tricolors screen, another for usb update (the one used to load goldcarded .nbh)...?
 

poloche

Senior Member
Jul 17, 2009
367
182
0
I'm sure hard-reset is a good idea, but if a bad manip occurs it can be upsetting...or with a flashy red background color for warning purpose...
+1 !!!
Just a small notification to confirm Hard-Reset please ...

Thankx for developpement ;)
 

sh4d0w86

Senior Member
Apr 15, 2010
1,761
795
0
does soft reset wipe the device?
soft reset = restart, reboot
hard reset = [factory] restore
soft reset restarts back your phone.
power will shutdown your phone thoroughly(no need to press the power switch button);)
exactly. :)
Thanks sh4d0w86!!
congratulations for first wp7 development!!
will keep my power button intact much longer! :) that was needed

I'm sure hard-reset is a good idea, but if a bad manip occurs it can be upsetting...or with a flashy red background color for warning purpose...

would it be possible to have all restart options? i mean one which start with the tricolors screen, another for usb update (the one used to load goldcarded .nbh)...?
thanks, NebZoNe.
those were my thoughts exactly when wanting to build this app.

i will, of course, have notification pop up to execute a hard reset.
actually, that is the main reason it isn't implemented in first release...
unsure how to exactly do that, yet.

that is an awesome idea. will look into it.
+1 !!!
Just a small notification to confirm Hard-Reset please ...

Thankx for developpement ;)
already on my to-do list. :)
glad you like the app.
will it be possible to have a sleep button as a tile?

if possible pinnable tiles on the homescreen...
already on my to-do list.
unsure how to do, though, yet, which is why it wasn't already included.
 
  • Like
Reactions: kirk999 and NebZoNe

ne0cr0n

Senior Member
Nov 13, 2009
130
106
0
already on my to-do list.
unsure how to do, though, yet, which is why it wasn't already included.

put this in your MainPage.xaml.cs
could work

Code:
private string tag;

//If the app navigates to the MainPage.Xaml this function tries to read a a tag-property from the Uri.
//You use the Uri to navigate between pages by calling the NavigationServices.Navigate(new Uri("/MainPage.xaml",UriKind.Relative)).
//To push a parameter to the site you can add them to the uri as following:
//"/MainPage.xaml?tag=tagnvalue&otherproperty=othervalue"
//If you launch the app these settings are empty
//If you launch it with the pinned tile you can set this Uri to submit the parameters

protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{          
    //get the value.
    NavigationContext.QueryString.TryGetValue("tag", out tag);
	//restart, shutdown... depending on the tagvalue. if tag is empty nothing happens (you can add a case default: "your code" break; to perform a default action)
        switch(tag)
	{
		case "soft":
			softreset(); //your void to perform the softreset
                        break;
		case "hard":
			hardreset();
                        break;
                case "shotdown"
			shotdown();
                        break;
	}
}

//the functions performing the different restart modes
private void softreset()
{

}

private void hardreset()
{

}

private void shutdown()
{

}

//this action creates a softreset tile by calling PinToStart("soft");
private void PinToStart(string tag)
{
	string title = "";
        //set the title of the tile
	switch (tag)
        {
            case "soft":
	           title = "soft reset";
                   break;
            case "hard":
                   title = "hard reset";
                   break;
            case "shotdown"
		   title = "shutdown";  
                   break;    
	}
	
        //search the tile with the title given by the tag in the step before
	ShellTile TileToFind = ShellTile.ActiveTiles.FirstOrDefault(x => x.NavigationUri.ToString().Contains("DefaultTitle=" + tag));

    //if it's not existing this creates a new one
    if (TileToFind == null)
    {
                //the data for the tile
		StandardTileData NewTileData = new StandardTileData
		{
			//you can create different images for the tiles called "softTile.jpg", "hardTile.jpg", etc. in you "Images" folder
                        BackgroundImage = new Uri("Images/" + tag + "Tile.jpg", UriKind.Relative),
			Title = title,
			//Count = 12,
			//BackTitle = "",
			//BackContent = "",
			//BackBackgroundImage = new Uri("Blue.jpg", UriKind.Relative)
		};
    //create a new tile with the tiledata
    ShellTile.Create(new Uri("/MainPage.xaml?tag=" + tag, UriKind.Relative), NewTileData); 
}
 
Last edited:

Ttblondey

Senior Member
Jan 1, 2008
1,690
103
0
Does anyone notice/try change background to white while accent color to blueberry and when you open the Device Reset you can't see anything. Is it a bug? :confused:
 
  • Like
Reactions: sh4d0w86

sh4d0w86

Senior Member
Apr 15, 2010
1,761
795
0
put this in your MainPage.xaml.cs
could work
thanks for that bit of code. unfortunately... i have no idea what it does exactly. :/
Does anyone notice/try change background to white while accent color to blueberry and when you open the Device Reset you can't see anything. Is it a bug? :confused:
not a bug, an overlook on my part. everything still there and works, it is just white font on white background. fixed for next release. good catch. next release, app will match Theme & Accent choice.
 

Ttblondey

Senior Member
Jan 1, 2008
1,690
103
0
thanks for that bit of code. unfortunately... i have no idea what it does exactly. :/

not a bug, an overlook on my part. everything still there and works, it is just white font on white background. fixed for next release. good catch. next release, app will match Theme & Accent choice.
Just an 'accidentally' catch. Well, will wait for the next release.;)
 

sh4d0w86

Senior Member
Apr 15, 2010
1,761
795
0
Device Reset v1.1.0.0 released
--- Added/Updated
------ Accent & Theme support
------ Message Boxes
--------- Hard Reset
--------- Shutdown
--- Fixed
------ White Theme bug
--- Issue(s)
------ Hard Reset
--------- still not working
 
Last edited:
  • Like
Reactions: kirk999

sh4d0w86

Senior Member
Apr 15, 2010
1,761
795
0
Device Reset v2.0.0.0 released
--- Added/Updated
------ Double Tap to execute actions
------ Pinnable Soft Reset/Shutdown Tile(s)
--------- Hold button
--------- pinned actions execute from Tile
 
Last edited:
  • Like
Reactions: NebZoNe and kirk999

kushal3110

Member
Feb 2, 2010
15
0
0
auto on/off airplane mode

Hi,
Can you add a feature in your app to auto on/off airplane mode at scheduled time??? It could be a great battery saver...