Hi everyone,
Today i come here with ideas.....
which is
HTC RUU in .NET Flavour
you can browse for nbh file, not locked at current folder with this tool
the project has its site located at: http://htcruunet.codeplex.com
i hope anyone want to collaborate in this project, because, my c# skill is SEVERLY WEAK.
Dev. Status:
-Prototype (UI Design)
aramadsanar said:
....Today i come here with ideas.....
Click to expand...
Click to collapse
Something like that:
Whitestone Advanced ROM Update Utility
Kovsky Advanced ROM Update Utility
Topaz Advanced ROM Update Utility
Blackstone Advanced ROM Update Utility
Mozart Advanced ROM Update Utility
LEO Advanced ROM Update Utility
by Barin????....
The main benefit is .Net 4 (Barin used 3.5) and possibility not to put nbh to one folder with the flasher?
Or again - adding "eye candy" features? Maybe pink dots on main window?
Funny
AndrewSh said:
Something like that:
Whitestone Advanced ROM Update Utility
Kovsky Advanced ROM Update Utility
Topaz Advanced ROM Update Utility
Blackstone Advanced ROM Update Utility
Mozart Advanced ROM Update Utility
LEO Advanced ROM Update Utility
by Barin????....
The main benefit is .Net 4 (Barin used 3.5) and possibility not to put nbh to one folder with the flasher?
Or again - adding "eye candy" features? Maybe pink dots on main window?
Funny
Click to expand...
Click to collapse
don't talk sinister here
---------------------------------------------------------------------------
ok, the differences is, i aimed to make it open source, but, barin's closed
so, the benefit is, people can learn how RUU works, not just a frickin' eye candy.
that's it
---------------------------------------------------------------------------
come on, grow up, we're here to learn, develop, share, not to talk sinister
This "program" does NOTHING. STOP SPAMMING FORUM WITH YOUR USELESS PROGRAMS.
Entire source code:
Code:
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;
using Microsoft.Win32;
namespace RUUNET
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
button2.Enabled = false;
}
private void ignoreRUURequirementsToolStripMenuItem_Click(object sender, EventArgs e)
{
checkBox2.Enabled = false;
}
private void button2_Click(object sender, EventArgs e)
{
}
public void UpdateDevice()
{
if (checkBox2.Enabled == false)
{
FlashNbh();
}
else
{
GetDeviceModel();
GetDeviceCID();
GetBattery();
VerifyRomWithDeviceModel();
FlashNbh();
}
}
public void GetDeviceCID()
{
}
public void GetBattery()
{
}
public void GetDeviceModel()
{
}
public void VerifyRomWithDeviceModel()
{
}
public void FlashNbh()
{
}
private void button1_Click(object sender, EventArgs e)
{
openFileDialog1.FileName = " ";
openFileDialog1.Title = "Choose ROM Image to Flash";
openFileDialog1.ShowDialog();
}
private void openFileDialog1_FileOk(object sender, CancelEventArgs e)
{
if (openFileDialog1.FileName.Contains(".nbh"))
{
button2.Enabled = true;
textBox1.Text = openFileDialog1.FileName.ToString();
}
else
{
NBHError();
}
}
private void enableRUURequirementsToolStripMenuItem_Click(object sender, EventArgs e)
{
checkBox2.Enabled = true;
}
public void NBHError()
{
MessageBox.Show("The file you selected is not NBH File", "Not NBH File", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
}
}
Useless guy, but actually the idea is cool - kinda: "guys, I will start VS project and make interface. The rest is almost nothing - code and full functionality - should be done by you guys - and you will be co-authors... Maybe....". Nice!
Useless guy said:
This "program" does NOTHING. STOP SPAMMING FORUM WITH YOUR USELESS PROGRAMS.
Entire source code:
Code:
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;
using Microsoft.Win32;
namespace RUUNET
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
button2.Enabled = false;
}
private void ignoreRUURequirementsToolStripMenuItem_Click(object sender, EventArgs e)
{
checkBox2.Enabled = false;
}
private void button2_Click(object sender, EventArgs e)
{
}
public void UpdateDevice()
{
if (checkBox2.Enabled == false)
{
FlashNbh();
}
else
{
GetDeviceModel();
GetDeviceCID();
GetBattery();
VerifyRomWithDeviceModel();
FlashNbh();
}
}
public void GetDeviceCID()
{
}
public void GetBattery()
{
}
public void GetDeviceModel()
{
}
public void VerifyRomWithDeviceModel()
{
}
public void FlashNbh()
{
}
private void button1_Click(object sender, EventArgs e)
{
openFileDialog1.FileName = " ";
openFileDialog1.Title = "Choose ROM Image to Flash";
openFileDialog1.ShowDialog();
}
private void openFileDialog1_FileOk(object sender, CancelEventArgs e)
{
if (openFileDialog1.FileName.Contains(".nbh"))
{
button2.Enabled = true;
textBox1.Text = openFileDialog1.FileName.ToString();
}
else
{
NBHError();
}
}
private void enableRUURequirementsToolStripMenuItem_Click(object sender, EventArgs e)
{
checkBox2.Enabled = true;
}
public void NBHError()
{
MessageBox.Show("The file you selected is not NBH File", "Not NBH File", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
}
}
Click to expand...
Click to collapse
well, i'm not spamming, i have a working program (WPE4), but, in this case, i only can design the program, but, i got stuck when thinking about SPL commands, so, this is why i made it in codeplex, to make it open source, and collaborate, if you like to collaborate in this project, you're welcome
and, if you think that my project(s) is totally USELESS, then, do not use it, easy, right
Guys, break up!
Quote from his profile
I'm 14 yrs old, and, i'm coordinator & initiator of Advanced WPE. I'm also a ROM Cooker for HTC HD7.
You can contact me by:
Email: [email protected]
Twitter: @aramadsanar
Phone: +628989739611
Click to expand...
Click to collapse
Wow, there is email and even phone, so if you, guys, wanna to help "coordinator & initiator of Advanced WPE & a ROM Cooker for HTC HD7", contact him. Unfortunately, as you see, I'm from russia and the international calls are very expensive for me.
Useless guy said:
Wow, there is email and even phone, so if you, guys, wanna to help "coordinator & initiator of Advanced WPE & a ROM Cooker for HTC HD7", contact him. Unfortunately, as you see, I'm from russia and the international calls are very expensive for me.
Click to expand...
Click to collapse
Unfortunately for me too
@aramadsanar
If you want an advice:
1. Do not import all available assemblies into your project, just use only neccesery.
2. Use "Public" definition only if you want to provide access to your functions or variables from external programs.
3. Avoid default naming of controls - after a few weeks you will forget what is your button for (for example), especially if you plan to change some of its properties programmatically later.
4. If you want to write RUU try to use stock RUU as external executable in your program at first
Good luck!
Useless guy said:
Guys, break up!
Quote from his profile
Wow, there is email and even phone, so if you, guys, wanna to help "coordinator & initiator of Advanced WPE & a ROM Cooker for HTC HD7", contact him. Unfortunately, as you see, I'm from russia and the international calls are very expensive for me.
Click to expand...
Click to collapse
wait, you can mention me, or email me LOL
Related
How can i get a PICTURE from a contact with just a phone number?...
Im using C# NET2.0
well its a bit tricky.
step one:
Hey dude stand still
step two
click
step three
save picture to contact.
other than that id say try search.
Not sure how you miss understood that but ..
First thing
the contact has a picture
second thing
it has to be done from code C#
third thing
I need to GET the picture from my contact if any... and then load it into a picture box
Another way i can ask is..
How can i loop through all my contacts...
one done and i find the contact how can i pull out the picture if any and load into a picturebox?
The following code shows how to loop through the contacts:
Code:
using Microsoft.WindowsMobile.PocketOutlook; // add a reference to this dll
...
public void LoadPictures()
{
OutlookSession outlookSession = new OutlookSession();
ContactCollection contactsCollection = outlookSession.Contacts.Items;
foreach (Contact contact in contactsCollection)
{
if (contact.Picture != null) // do additional checks like checking the phone number
{
}
}
}
Already got it heh...
Code:
private void LoadContactPicture(string PhoneNum)
{
Image NoImg = new Bitmap("\\Storage Card\\Debug\\avatar.png");
try
{
OutlookSession oSession = new OutlookSession();
int iCounter = 0;
int ContactIndex = 9999;
if (oSession.Contacts.Items.Count > 0)
{
while (iCounter < oSession.Contacts.Items.Count)
{
if (oSession.Contacts.Items[iCounter].MobileTelephoneNumber == PhoneNum)
{
ContactIndex = iCounter;
iCounter = oSession.Contacts.Items.Count + 1;
break;
}
iCounter++;
}
}
if (ContactIndex != 9999)
{
SetTextLbl(oSession.Contacts.Items[ContactIndex].FirstName + "... Just sent you a text message.");
if(oSession.Contacts.Items[ContactIndex].Picture != null ){
SetPictureMy(oSession.Contacts.Items[ContactIndex].Picture);
}
else
{
SetPictureMy(NoImg);
}
}
else
{
//Image NoImg = new Bitmap("\\My Documents\\My Pictures\\Flower.jpg");
SetTextLbl("Unknown Text Sender... " + PhoneNum);
SetPictureMy(NoImg);
}
}
catch
{
throw;
}
}
Hey guys
I'm developing a little webserver for WM with the .net cf. it's easy and works fine as long as I don't try to access it from the same device it's running on. Nothing works: localhost,127.0.0.1 or even if I'm connected to a wifi network and I use this IP. Has anyone the solution for this issue?
ta you
a yeah I use the TcpListener-Class and I implemted some simple HTTP.
chabun
Code
Hey guys
Noone has an idea??
Here is the code which I use to setup the HttpListener and answer connections.
Code:
using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.Net.Sockets;
using StedySoft.SenseSDK;
using System.Threading;
using System.IO;
namespace WebServer
{
public partial class ServerForm : Form
{
IPEndPoint local;
TcpListener listener;
private volatile bool stop;
private volatile bool handled;
SensePanelItem state;
SensePanelTextboxItem response;
Thread serverThread;
public ServerForm(IPEndPoint local)
{
InitializeComponent();
this.local = local;
SetupList();
}
private void SetupList()
{
SensePanelDividerItem infos = new SensePanelDividerItem("infd", "Infos");
mainList.AddItem(infos);
mainList.AddItem(new SensePanelItem("Local-Endpoint") { PrimaryText = "Local-Endpoint", SecondaryText = local.ToString() });
mainList.AddItem(state = new SensePanelItem("Status") { PrimaryText = "Status", SecondaryText = "Wird gestartet..." });
mainList.AddItem(new SensePanelDividerItem("Response", "Response"));
mainList.AddItem(response = new SensePanelTextboxItem("body") { LabelText = "HTML-Body, welcher auf Requests gesendet wird.", Text = "<span style =\"color:red;font-size:30pt\">It works!!</span>" });
mainList.AddItem(new SensePanelDividerItem("Requests", "Requests"));
}
private void StartServer()
{
if (listener != null)
{
StopServer(true);
}
listener = new TcpListener(local.Port);
listener.Start();
serverThread = new Thread(listen);
serverThread.IsBackground = true;
stop = false;
serverThread.Start();
state.SecondaryText = "Gestartet...";
}
private void listen()
{
while (!stop)
{
while (listener.Pending())
{
handled = false;
Thread handlingThread = new Thread(handler);
handlingThread.Start();
while (!handled)
Thread.Sleep(50);
}
Thread.Sleep(200);
}
}
private void handler()
{
// Get the current connection
TcpClient client = (TcpClient)this.Invoke(new Func<TcpClient>(listener.AcceptTcpClient));
IPEndPoint remote = (IPEndPoint)client.Client.RemoteEndPoint;
handled = true;
NetworkStream stream = client.GetStream();
StreamReader reader = new StreamReader(stream);
ReadHttpRequest(reader);
StreamWriter writer = new StreamWriter(stream);
StringBuilder response = new StringBuilder(); ;
StartHTML(response);
response.AppendLine((string)this.Invoke(new Func<IPEndPoint, string>(GetResponse), remote));
EndHTML(response);
WriteHTTPResponse(writer, response.Length);
writer.WriteLine(response.ToString());
writer.Flush();
stream.Close();
client.Close();
}
private void WriteHTTPResponse(StreamWriter writer, int length)
{
writer.WriteLine("HTTP/1.1 200 OK");
writer.WriteLine("Date: " + DateTime.Now.ToString());
writer.WriteLine("Content-Length: "+ length.ToString());
writer.WriteLine("Connection: close");
writer.WriteLine("Content-Type: text/html; charset=utf-8");
writer.WriteLine();
}
private void ReadHttpRequest(StreamReader reader)
{
string buffer = null;
while (buffer != "")
buffer = reader.ReadLine();
}
int counter = 0;
private string GetResponse(IPEndPoint remote)
{
counter++;
mainList.AddItem(new SensePanelItem(counter.ToString()) { PrimaryText = remote.ToString(), SecondaryText = "Response:" + counter.ToString() });
return response.Text;
}
private void EndHTML(StringBuilder writer)
{
writer.AppendLine("</body>");
writer.AppendLine("</html>");
}
private void StartHTML(StringBuilder writer)
{
writer.AppendLine("<?xml version=\"1.0\"?>");
writer.AppendLine("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">");
writer.AppendLine("<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"de\" lang=\"de\">");
writer.AppendLine("<head>");
writer.AppendLine("<title>SmartWebServer</title>");
writer.AppendLine("<meta name=\"author\" content=\"Alexander Kayed\">");
writer.AppendLine("</head>");
writer.AppendLine("<body>");
}
private void StopServer(bool restart)
{
stop = true;
serverThread.Join();
if (restart)
StartServer();
}
private void ServerForm_Load(object sender, EventArgs e)
{
StartServer();
}
private void ServerForm_Closed(object sender, EventArgs e)
{
StopServer(false);
}
private void menuItem1_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
The user can choose the IPEndPoint(constructor), which the server will be bound to, in a prevouis form:
Code:
foreach (IPAddress ip in Dns.GetHostEntry(Dns.GetHostName()).AddressList)
{
item = new SensePanelRadioItem(ip.ToString());
item.PrimaryText = ip.ToString();
item.SecondaryText = ip.AddressFamily.ToString();
item.Tag = ChoosedIp = ip;
item.OnStatusChanged += new SensePanelRadioItem.StatusEventHandler(item_OnStatusChanged);
IPList.AddItem(item);
}
So the user can choose between IPs I got from the DNS (e.g. 127.0.0.1, 192.168.0.1) and type a free (valid) port number (eg. 80, 8080, 8888)
Thanks for Your help!!
Still no answer...
I will post my experiences with this issue as long as I solved it - like small blog. Maybe some of you have the same problem...
I found another strange thing:
I'm able to connect to my Server from a TcpClient from another self-written App (own exectuable, different AppDomain):
Code:
void test()
{
Action<string> setText = new Action<string>(setTestText);
try
{
this.Invoke(setText, "Connect...");
TcpClient client = new TcpClient();
client.Connect(local);
this.Invoke(setText, "Connected...");
NetworkStream stream = client.GetStream();
StreamWriter writer = new StreamWriter(stream);
StreamReader reader = new StreamReader(stream);
writer.WriteLine();
writer.Flush();
this.Invoke(setText, "Read answer");
string buffer = reader.ReadToEnd();
this.Invoke(setText, "Test succeeded");
testing = false;
}
catch
{
this.Invoke(setText, "Test failed");
}
}
And I got a the right answer as well. It's strange, really strange that the browsers (IE,Opera etc.) can't loopback to it?
I was wondering, if someone can guide to create a simple app which simplly displays some text on the middle of the screen and 2 buttons (Left and right arrow) to switch to the next or previous text.
I think someone just helped another user who was looking for help for something similar like me but I cannot find it.
Thanks
You can try out this sample code, starting from an empty silverlight project:
In the MainPage.xaml, add the following snippet inside the Grid element named "ContentPanel".
<TextBlock Name="tblkDisplay" Width="360" Height="100" VerticalAlignment="Top" Margin="0,200,0,0" TextAlignment="Center"></TextBlock>
<Button Name="btnBack" Width="160" Height="80" VerticalAlignment="Top" Margin="-200,308,0,0" Click="btnBack_Click">Back</Button>
<Button Name="btnForward" Width="160" Height="80" VerticalAlignment="Top" Margin="200,308,0,0" Click="btnForward_Click">Forward</Button>
This markup adds a TextBlock, and Forward and Back buttons to the page.
In the in the code-behind (MainPage.xaml.cs), use the following code:
Code:
private int _displayIndex; //position in list of text items to display
private List<string> _textItems; //List of text items to display
// Constructor
public MainPage()
{
InitializeComponent();
}
//Code that get called when the page is navigated to
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
base.OnNavigatedTo(e);
_textItems = new List<string>();
//Add ten items to text list to display
for (int i = 0; i < 10; i++)
{
_textItems.Add("Item" + i.ToString());
}
//For the default, set to first position and display it
_displayIndex = 0;
tblkDisplay.Text = _textItems[_displayIndex];
}
//If not at the first position of the list decrement by one, otherwise move to end of the list
private void Back()
{
if (_displayIndex > 0)
{
_displayIndex--;
}
else
{
_displayIndex = _textItems.Count - 1;
}
}
//If not at the last position of the list increment by one, otherwise move to start of the list
private void Forward()
{
if (_displayIndex < _textItems.Count - 1)
{
_displayIndex++;
}
else
{
_displayIndex = 0;
}
}
private void ShowText()
{
if ((_textItems.Count > 0) //Make sure there are items in the collection to display
&& (_displayIndex < _textItems.Count) // Make sure the index is not higher than how many items in the collection
&& (_displayIndex >= 0)) //Make sure the index is zero or greater
{
tblkDisplay.Text = _textItems[_displayIndex];
}
else
{
tblkDisplay.Text = "No Items.";
}
}
private void btnBack_Click(object sender, RoutedEventArgs e)
{
Back();
ShowText();
}
private void btnForward_Click(object sender, RoutedEventArgs e)
{
Forward();
ShowText();
}
At first sorry for my English.
I am making an application on the basis of an RSS reader.
I wanted to add to the code so that the read xml file in addition to the title, content, date and time of the author.
Please help and thank you.
Code:
using System;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using Microsoft.Phone.Controls;
using System.IO;
using System.ServiceModel.Syndication;
using System.Xml;
using Microsoft.Phone.Tasks;
using System.Windows.Data;
namespace WindowsMania.pl
{
public partial class posty : PhoneApplicationPage
{
public posty()
{
InitializeComponent();
}
private void loadFeedButton_Click(object sender, System.Windows.RoutedEventArgs e)
{
WebClient webClient = new WebClient();
webClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(webClient_DownloadStringCompleted);
webClient.DownloadStringAsync(new System.Uri(" link to xml "));
}
private void webClient_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
{
if (e.Error != null)
{
Deployment.Current.Dispatcher.BeginInvoke(() =>
{
MessageBox.Show("Próba wczytania danych zakończona niepowodzeniem, sprawdź połączenie z siecią.");
});
}
else
{
this.State["feed"] = e.Result;
UpdateFeedList(e.Result);
}
}
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
if (this.State.ContainsKey("feed"))
{
if (feedListBox.Items.Count == 0)
{
UpdateFeedList(State["feed"] as string);
}
}
}
private void UpdateFeedList(string feedXML)
{
StringReader stringReader = new StringReader(feedXML);
XmlReader xmlReader = XmlReader.Create(stringReader);
SyndicationFeed feed = SyndicationFeed.Load(xmlReader);
Deployment.Current.Dispatcher.BeginInvoke(() =>
{
feedListBox.ItemsSource = feed.Items;
loadFeedButton.Content = "Odśwież";
});
}
private void feedListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
ListBox listBox = sender as ListBox;
if (listBox != null && listBox.SelectedItem != null)
{
SyndicationItem sItem = (SyndicationItem)listBox.SelectedItem;
if (sItem.Links.Count > 0)
{
Uri uri = sItem.Links.FirstOrDefault().Uri;
WebBrowserTask webBrowserTask = new WebBrowserTask();
webBrowserTask.Uri = uri;
webBrowserTask.Show();
}
}
}
}
}
Robert Hägee K. said:
At first sorry for my English.
I am making an application on the basis of an RSS reader.
I wanted to add to the code so that the read xml file in addition to the title, content, date and time of the author.
Please help and thank you.
Click to expand...
Click to collapse
Why don't you try it with the state manager in the expression blend ?
What I need to do is create an instance of this interface:
Code:
public interface ResultCallback<T> {
void onFailure(Exception exception);
void onSuccess(T t);
}
In the application I'm trying to hook it's done like this:
Code:
new ResultCallback<Offer>() {
public void onSuccess(Offer offer) {
}
public void onFailure(Exception e) {
}
}
How can I recreate that in Xposed?