private void OpenMainWindow()
        {
            Hide();

            _mainWindow = new MainWindowClient(_user, _market)
            {
                FormBorderStyle = FormBorderStyle.FixedSingle
            };

            ClientNotify r = (ClientNotify)RemotingServices.Connect(typeof(ClientNotify), "tcp://localhost:" + _port.ToString() + "/ClientNotify");    // connect to the registered my remote object here

            r.PutMyForm(_mainWindow);
            _mainWindow.ShowDialog();
            Close();
        }