static void Main(String[] args)
        {
            //Application.EnableVisualStyles();
            //Application.SetCompatibleTextRenderingDefault(false);
            //Application.Run(new LoginWindow());
            Application.Init();

            LoginWindow loginWindow = LoginWindow.GetInstance();

            //RCWindow rc = new RCWindow();
            //rc.ShowAll();
            loginWindow.ShowAll();
            // Creation of the Icon
            trayIcon = new StatusIcon(global::Gdk.Pixbuf.LoadFromResource("OpenGraal.GraalIM.Resources.rcicon.ico"));
            //trayIcon.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("OpenGraal.GraalIM.Resources.rcicon.ico");
            trayIcon.Visible = true;

            // Show/Hide the window (even from the Panel/Taskbar) when the TrayIcon has been clicked.
            trayIcon.Activate += delegate
            {
                //loginWindow.Visible = !loginWindow.Visible;
                //rc.Visible = !rc.Visible;
            };

            // Show a pop up menu when the icon has been right clicked.
            trayIcon.PopupMenu += OnTrayIconPopup;

            // A Tooltip for the Icon
            trayIcon.Tooltip = "GraalIM";

            Application.Run();
        }
 /// <summary>
 /// Constructor
 /// </summary>
 public ListServerConnection(Gtk.ListStore listStore)
 {
     this.serverWindow = ServerWindow.GetInstance();
     this.listStore    = listStore;
     this.serverList   = new TServerList();
     this.errorWindow  = ErrorWindow.GetInstance();
     this.loginWindow  = LoginWindow.GetInstance();
     //this.errorWindow.ShowAll();
     //this.errorWindow.Hide();
     //this.ReceiveData();
 }
 public void Activate()
 {
     this.lw   = LoginWindow.GetInstance();
     this.isRC = this.lw.checkBox2.Active;
     Console.WriteLine("Is this rc? " + this.isRC.ToString() + "::" + this.lw.checkBox2.Active.ToString());
     if (this.isRC)
     {
         this.rc = RCWindow.GetInstance();
         this.rc.RunServer();
         this.rcpl = RCPlayerList.GetInstance();
         this.rcpl.Init();
     }
     else
     {
         this.mw = MainWindow.GetInstance();
         this.mw.RunServer();
     }
 }
        public void Build()
        {
            this.loginWindow = LoginWindow.GetInstance();
            this.InitializeComponent();
            this.serverList = new TServerList();
            //this.errorWindow = new ErrorWindow();
            this.ShowAll();

            //this.Error("hello");
            this.LSConn = new ListServerConnection(this.musicListStore);
            if (this.loginWindow.nickname_ent != null && this.loginWindow.nickname_ent.Text != "")
            {
                this.nickname = this.loginWindow.nickname_ent.Text;
            }

            if (this.loginWindow.username_ent != null && this.loginWindow.username_ent.Text != "")
            {
                this.username = this.loginWindow.username_ent.Text;
            }

            if (this.loginWindow.password_ent != null && this.loginWindow.password_ent.Text != "")
            {
                this.password = this.loginWindow.password_ent.Text;
            }

            if (this.loginWindow.server != null && this.loginWindow.server.Text != "")
            {
                this.server = this.loginWindow.server.Text;
            }

            if (this.loginWindow.port != null && this.loginWindow.port.Text != "")
            {
                int.TryParse(this.loginWindow.port.Text, out this.port);
            }

            this.refreshButton_Click(this, new EventArgs());
            //this.loginButton_Click(this, new EventArgs());
        }