Showing posts with label C#. Show all posts
Showing posts with label C#. Show all posts
Screens RSS Dashboard
Wednesday, December 16, 2009
Labels: C#
FINALLY!!!!!!! I've finished it!
Make sure your speakers are on!
Capabilities
Weather Icon Set - thanks to http://joshj132.deviantart.com/art/Touchflo-weather-HD-133213861
Music in the YouTube video - 'Aire Tam Break' : thanks to http://ocremix.org/artist/4754/fishy
Module Logos, found in various places online.
All other graphics were created by me!
I'm thinking about releasing this as a free download. Would anybody be interested?
--------------------------------------
OLD POST:
I've been working on this project for about a month now. It's a Mac-like dashboard but for Windows. The idea is that instead of lame widgets that I'll never use, I've combined every main site that I frequent along with several main social networks via their api's and browser impersonating web requests to create one centralized location where all my interested live data is found. (All I have to do is hit F10 to toggle it!, or whatever key you decide to bind it to).
It's a C# win form, that goes fullscreen and hides the taskbar. It embeds flash through an Active-X control that has all the "widgets" for you to interact with. It's transparent too so you can see straight through to your desktop background.
So far I've developed modules for
I'll post more soon when I get it finished!
Make sure your speakers are on!
Capabilities
- Takes advantage of muli-threading
- Can post status updates to Twitter and Facebook
- Displays local weather and traffic
- OCRemix latest remixes mp3 player
- Shows new comments on my Flickr photos
- Sends and receives Gmail
- Fully functional YouTube player (can even search for new videos)
- Each module updates automatically after 1 hour but user can update at will by clicking the modules logo.
- Toggles fullscreen, on and off with F10, similar to a mac dashboard, but better:)
Weather Icon Set - thanks to http://joshj132.deviantart.com/art/Touchflo-weather-HD-133213861
Music in the YouTube video - 'Aire Tam Break' : thanks to http://ocremix.org/artist/4754/fishy
Module Logos, found in various places online.
All other graphics were created by me!
I'm thinking about releasing this as a free download. Would anybody be interested?
--------------------------------------
OLD POST:
I've been working on this project for about a month now. It's a Mac-like dashboard but for Windows. The idea is that instead of lame widgets that I'll never use, I've combined every main site that I frequent along with several main social networks via their api's and browser impersonating web requests to create one centralized location where all my interested live data is found. (All I have to do is hit F10 to toggle it!, or whatever key you decide to bind it to).
It's a C# win form, that goes fullscreen and hides the taskbar. It embeds flash through an Active-X control that has all the "widgets" for you to interact with. It's transparent too so you can see straight through to your desktop background.
So far I've developed modules for
- Facebook (can post status update)
- Gmail (can preview, and send emails)
- Twitter (can post status update)
- Flickr (can see any new photo comments on my photostream)
- OCRemix.org (plays any selected new remix locally in the flash file)
- local weather
- local traffic (gives me live traffic updates...I live in the city so that helps)
I'll post more soon when I get it finished!
Journey Church
Monday, September 14, 2009
Labels: C#
This flash site is entirely driven off of C#/ASP.NET CMS. It uses LINQ to SQL to store data into the SQL database. It communicates with the flash via a web service that returns xml to the flash site, giving it it's dynamic content.The CMS uses a lite implementation of the FCKEditor, as well as some custom pages that allow images to be uploaded to the home page rotator and can determine which section of the site each rotator image links to.
This site was a lot of fun because I learned a lot more about the greensock tween class, which I've been using for about 6 months now.
Visual Studio + Firefox
Tuesday, June 30, 2009
Labels: C#
Firefox has known performance issues when debugging locally with visual studios.
The fix? Right here http://damianm.com/tech/tip-speed-up-firefox-for-asp-net-development/
in the firefox address bar:
navigate to about:config
find the entry: network.dns.ipv4OnlyDomains
double click on it and change it to localhost.
The fix? Right here http://damianm.com/tech/tip-speed-up-firefox-for-asp-net-development/
in the firefox address bar:
navigate to about:config
find the entry: network.dns.ipv4OnlyDomains
double click on it and change it to localhost.
Default ASPNet sql db
Friday, February 20, 2009
Labels: C#
I keep wasting time re-searching for this every time that I need it. I'm posting it here so I'll never lose it again!
The default aspnet sql database provides you with generic user and role functionality, among a lot of other things.
To set it up:
The default aspnet sql database provides you with generic user and role functionality, among a lot of other things.
To set it up:
- start up visual studio 200X command prompt. It's usually located in start menu/all programs/visual studio 200X/visual studio tools/visual studio 200X command prompt
- Type in aspnet_regsql.exe and hit enter
- It launches the app that sets up the default aspnet sql database
- Enter your server name, login info, and database name (usually found in your connection string)
- aspnet_regsql.exe can create or modify an existing database.
- It creates a bunch of tables and stored procedures necessary for the user and role functionality.
Send a text msg from C#
Saturday, February 14, 2009
Labels: C#
I've finally found out how to send any instant updates that I want, to my cell phone.
It's a pretty simple concept although the toughest part has always been finding a free or available smtp server to use. Look no further, Google lets you use their smtp server free of charge! You only need to sign up for a free gmail account. The only draw back is that you can't change the sender name, it must always be the email address @gmail.
Thus far I've been able to email all sorts of attachments out!
The concept within a web application:
for example 1112223333@vtext.com (verizon subscriber).
Update: It's very easy to do if you use RC's GmailHelper.dll
Now for the code! (Old way of doing it, I recommend RC's GmailHelper.dll)
System.Web.Mail.MailMessage myMail = new System.Web.Mail.MailMessage();
myMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserver", "smtp.gmail.com");
myMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", "465");
myMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusing", "2");
myMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1");
//Use 0 for anonymous
myMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "myEmailAddress@gmail.com");
//this is the gmail account that allows us to use the google smtp server
myMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "emailPassword");
myMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpusessl", "true");
myMail.From = "myEmailAddress@gmail.com"; //this is the gmail account that allows us to use the google smtp server
myMail.To = "recipientEmailAddress";
myMail.Subject = "emailSubject";
myMail.BodyFormat = System.Web.Mail.MailFormat.Text;
myMail.Body = "email body text goes here";
//if (pAttachmentPath.Trim() != "")
//{
//System.Web.Mail.MailAttachment MyAttachment = new System.Web.Mail.MailAttachment(Server.MapPath("pathToAttachmentFile goes here"));
//may be able to send images in text messages, not sure, haven't tried yet.
//myMail.Attachments.Add(MyAttachment);
//myMail.Priority = System.Web.Mail.MailPriority.High;
System.Web.Mail.SmtpMail.SmtpServer = "smtp.gmail.com:465";
System.Web.Mail.SmtpMail.Send(myMail);
It's a pretty simple concept although the toughest part has always been finding a free or available smtp server to use. Look no further, Google lets you use their smtp server free of charge! You only need to sign up for a free gmail account. The only draw back is that you can't change the sender name, it must always be the email address @gmail.
Thus far I've been able to email all sorts of attachments out!
The concept within a web application:
- Gather the data you want to send
- Send it to a C# web service
- Receive the data in C#, create a new mail object.
- enter the 10 digit phone number and the cell suffix into the email sender property
- send the text message!
for example 1112223333@vtext.com (verizon subscriber).
Update: It's very easy to do if you use RC's GmailHelper.dll
Now for the code! (Old way of doing it, I recommend RC's GmailHelper.dll)
System.Web.Mail.MailMessage myMail = new System.Web.Mail.MailMessage();
myMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserver", "smtp.gmail.com");
myMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", "465");
myMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusing", "2");
myMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1");
//Use 0 for anonymous
myMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "myEmailAddress@gmail.com");
//this is the gmail account that allows us to use the google smtp server
myMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "emailPassword");
myMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpusessl", "true");
myMail.From = "myEmailAddress@gmail.com"; //this is the gmail account that allows us to use the google smtp server
myMail.To = "recipientEmailAddress";
myMail.Subject = "emailSubject";
myMail.BodyFormat = System.Web.Mail.MailFormat.Text;
myMail.Body = "email body text goes here";
//if (pAttachmentPath.Trim() != "")
//{
//System.Web.Mail.MailAttachment MyAttachment = new System.Web.Mail.MailAttachment(Server.MapPath("pathToAttachmentFile goes here"));
//may be able to send images in text messages, not sure, haven't tried yet.
//myMail.Attachments.Add(MyAttachment);
//myMail.Priority = System.Web.Mail.MailPriority.High;
System.Web.Mail.SmtpMail.SmtpServer = "smtp.gmail.com:465";
System.Web.Mail.SmtpMail.Send(myMail);
C# Data Sync
Saturday, January 24, 2009
Labels: C#
You'll notice the flash menu on the right hand side of this blog column. I wanted a menu that could sort my posts into categories. I could not find one that blogger offered so I decided to do what any self respecting coder does...I made my own!
Blogger offers an RSS feed of my blog, so I read that into flash and did some fancy formatting with xml so that it would sort all my posts into two categories:
I thought, well I'll just write a C# console app that reads my blogs rss feed, saves it as an xml file, then calls another function that logs into my ftp server, posts the newly updated xml file and then closes its streams. It took maybe a few hours to figure out the code and piece it together, but it works great!
Now any time I make a new blog post, I just run the .exe on my computer and it updates the xml file that my flash menu (over on the right) points to, and that new blog post is instantly catagorized and loaded into the menu! FREAKIN SWEET!
and the function that does it, thanks to google and some of my own modification:
Blogger offers an RSS feed of my blog, so I read that into flash and did some fancy formatting with xml so that it would sort all my posts into two categories:
- Flash
- C#
I thought, well I'll just write a C# console app that reads my blogs rss feed, saves it as an xml file, then calls another function that logs into my ftp server, posts the newly updated xml file and then closes its streams. It took maybe a few hours to figure out the code and piece it together, but it works great!
Now any time I make a new blog post, I just run the .exe on my computer and it updates the xml file that my flash menu (over on the right) points to, and that new blog post is instantly catagorized and loaded into the menu! FREAKIN SWEET!
and the function that does it, thanks to google and some of my own modification:
static void UploadToFTP()
{
Console.WriteLine("Uploading to FTP");
string filename = "data.xml";
FileInfo fileInf = new FileInfo(filename);
FtpWebRequest request = (FtpWebRequest)FtpWebRequest.Create(new Uri("ftp://domain_name_or_ip/folder_name/" + filename));
request.Method = WebRequestMethods.Ftp.UploadFile;
request.Credentials = new NetworkCredential("username", "password");
request.UseBinary = true;
request.KeepAlive = false;
request.ContentLength = fileInf.Length;
int buffLength = 2048;
byte[] buff = new byte[buffLength];
int contentLen;
// Opens a file stream (System.IO.FileStream) to read the file to be uploaded
FileStream fs = fileInf.OpenRead();
try
{
// Stream to which the file to be upload is written
Stream strm = request.GetRequestStream();
// Read from the file stream 2kb at a time
contentLen = fs.Read(buff, 0, buffLength);
// Till Stream content ends
while (contentLen != 0)
{
// Write Content from the file stream to the FTP Upload Stream
strm.Write(buff, 0, contentLen);
contentLen = fs.Read(buff, 0, buffLength);
}
// Close the file stream and the Request Stream
strm.Close();
fs.Close();
Console.WriteLine("File Uploaded Successfully!");
Console.WriteLine("Closing streams...");
}
catch (Exception ex)
{
Console.WriteLine(ex.Message + ": Upload Error");
System.Threading.Thread.Sleep(3000);
}
}
{
Console.WriteLine("Uploading to FTP");
string filename = "data.xml";
FileInfo fileInf = new FileInfo(filename);
FtpWebRequest request = (FtpWebRequest)FtpWebRequest.Create(new Uri("ftp://domain_name_or_ip/folder_name/" + filename));
request.Method = WebRequestMethods.Ftp.UploadFile;
request.Credentials = new NetworkCredential("username", "password");
request.UseBinary = true;
request.KeepAlive = false;
request.ContentLength = fileInf.Length;
int buffLength = 2048;
byte[] buff = new byte[buffLength];
int contentLen;
// Opens a file stream (System.IO.FileStream) to read the file to be uploaded
FileStream fs = fileInf.OpenRead();
try
{
// Stream to which the file to be upload is written
Stream strm = request.GetRequestStream();
// Read from the file stream 2kb at a time
contentLen = fs.Read(buff, 0, buffLength);
// Till Stream content ends
while (contentLen != 0)
{
// Write Content from the file stream to the FTP Upload Stream
strm.Write(buff, 0, contentLen);
contentLen = fs.Read(buff, 0, buffLength);
}
// Close the file stream and the Request Stream
strm.Close();
fs.Close();
Console.WriteLine("File Uploaded Successfully!");
Console.WriteLine("Closing streams...");
}
catch (Exception ex)
{
Console.WriteLine(ex.Message + ": Upload Error");
System.Threading.Thread.Sleep(3000);
}
}
Larry the Cable Guy
Friday, January 23, 2009
Labels: C#
This was an awesome experience to be able to work on. I built the database, cms, and administrative back-end, as well as a smaller part of the flash front end. My very very talented co-worker did most of the flash front end. All and all a very cool and successful project.
Subscribe to:
Posts (Atom)