Recent Updates Toggle Comment Threads | Keyboard Shortcuts

  • huseyincakir 7:39 pm on January 6, 2014 Permalink | Reply  

    Sending Mail Async 

    This post is for an answer to “how can I show progress of sending mail” question for my old post:

    Here is my solution;

    using System;
    using System.Net.Mail;
    using System.Collections.Generic;
    using System.Text;
    using Gtk;
    using GtkSharp;
    using GLib;
    using System.Net;
    using System.Security.Cryptography.X509Certificates;
    using System.Net.Security;
    using System.Net.Mime;
    using System.Threading;
    using System.ComponentModel;
    namespace KentSoft
     class printTest : Window
     public printTest()
     : base("calisma")
     MailMessage mail = new MailMessage();
     SmtpClient SmtpServer = new SmtpClient("");
     mail.From = new MailAddress("");
     mail.Subject = "TEST";
     mail.Body = "This is for testing SMTP mail from GMAIL";
     SmtpServer.Port = 587;
     SmtpServer.Credentials = new System.Net.NetworkCredential("", "yourpassword");
     SmtpServer.EnableSsl = true;
     SmtpServer.SendCompleted += new SendCompletedEventHandler(client_SendCompleted);
     string userState = "test message1";
     SmtpServer.SendAsync(mail, userState);
     Console.WriteLine("Sending message... press c to cancel mail. Press any other key to exit.");
     string answer = Console.ReadLine();
     // If the user canceled the send, and mail hasn't been sent yet,
     // then cancel the pending operation.
     if (answer.StartsWith("c") && mailSent == false)
     // Clean up.
     catch(Exception e){
    void client_SendCompleted(object sender, AsyncCompletedEventArgs e)
     // Get the unique identifier for this asynchronous operation.
     String token = (string) e.UserState;
    if (e.Cancelled)
     Console.WriteLine("[{0}] Send canceled.", token);
     if (e.Error != null)
     Console.WriteLine("[{0}] {1}", token, e.Error.ToString());
     } else
     Console.WriteLine("Message sent.");
     mailSent = true;
     static bool mailSent = false;
     public static void Main()
     new printTest();
  • huseyincakir 12:40 pm on December 29, 2013 Permalink | Reply  

    Developing Native Application on Android with HTML Thanks to PhoneGap 

    Hi this is my last post for 2013! so I thank for those coders who managed to sent me lots of spam messages :) but moreover I want to share my site stats with you and than code for fu n again :)

    And here is the stats for :

    So we have 103,034 views which is not bad  :) but falling deep in 2013 like Adele says nevermind I’m still posting :)


    After some boring stats now time for coding again. Our aim is to develop Android application that uses HTML and CSS. I know these staff are wellknown by most developers but I put is here in case some needs help. So let us start some work;

    Required Links:

    [1.] The Best Tutorial on Issue:

    [2.] PhoneGap Libs:

    [3.] Sample Project To Start:

    [4.] See Application on Device Rather than Emulator

    My Screencast:

    Better ways still exists in developing applications on Android for instance Xamarin.Android(CSharp). But using HTML is also good opportunity for those who familiar with HTML/CSS.

    Have a look:

  • huseyincakir 10:41 pm on December 7, 2013 Permalink | Reply  

    GTKRC – An Easy Sample 

    Best defnition for gtkrc I got from;

    Gtk programmers will tell you that writing a gtk theme is easy. If you have a full understanding of how gtk is put together, then that may be so, but if you dont have an intimate knowledge of the gtk api and you want to change the visual appearance of your gtk apps then this document may hopefully save you some swearing while you go through the process of trial and error trying to figure out what works and what doesnt. Its not difficult stuff, but can appear to be somewhat random and non-intuitive due to its close correlation with the underlying widget structure.


    [1.] Before gtkrc;


    [2.] We choose theme from:

    [3.] Copy the gtkrc;


    [4.] Result our new look;


    • bankruptcy attorney in Ft Myers Florida 11:50 pm on December 16, 2013 Permalink | Reply

      I really like what you guys are up too. This kind of clever work and coverage! Keep up the awesome works guys I’ve included you guys to my blogroll.

Compose new post
Next post/Next comment
Previous post/Previous comment
Show/Hide comments
Go to top
Go to login
Show/Hide help
shift + esc

Get every new post delivered to your Inbox.

Join 99 other followers