Click here to Skip to main content
15,905,877 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to restrict a method call only once Pin
Simon_Whale9-Oct-13 23:37
Simon_Whale9-Oct-13 23:37 
Questiondata grid view Pin
Kawshik_itbd9-Oct-13 19:13
Kawshik_itbd9-Oct-13 19:13 
AnswerRe: data grid view Pin
vonb9-Oct-13 20:00
vonb9-Oct-13 20:00 
GeneralRe: data grid view Pin
Kawshik_itbd9-Oct-13 20:10
Kawshik_itbd9-Oct-13 20:10 
GeneralRe: data grid view Pin
vonb9-Oct-13 20:18
vonb9-Oct-13 20:18 
GeneralRe: data grid view Pin
Kawshik_itbd9-Oct-13 20:51
Kawshik_itbd9-Oct-13 20:51 
GeneralRe: data grid view Pin
Freak309-Oct-13 20:56
Freak309-Oct-13 20:56 
GeneralRe: data grid view Pin
Kawshik_itbd9-Oct-13 21:14
Kawshik_itbd9-Oct-13 21:14 
GeneralRe: data grid view Pin
sanket16410-Oct-13 0:45
sanket16410-Oct-13 0:45 
GeneralRe: data grid view Pin
Kawshik_itbd19-Oct-13 19:13
Kawshik_itbd19-Oct-13 19:13 
AnswerRe: data grid view Pin
Richard MacCutchan9-Oct-13 21:23
mveRichard MacCutchan9-Oct-13 21:23 
GeneralRe: data grid view Pin
Kawshik_itbd9-Oct-13 21:55
Kawshik_itbd9-Oct-13 21:55 
GeneralRe: data grid view Pin
Richard MacCutchan9-Oct-13 22:50
mveRichard MacCutchan9-Oct-13 22:50 
GeneralRe: data grid view Pin
Kawshik_itbd9-Oct-13 23:18
Kawshik_itbd9-Oct-13 23:18 
GeneralRe: data grid view Pin
Richard MacCutchan9-Oct-13 23:21
mveRichard MacCutchan9-Oct-13 23:21 
GeneralRe: data grid view Pin
Kawshik_itbd9-Oct-13 23:24
Kawshik_itbd9-Oct-13 23:24 
GeneralRe: data grid view Pin
Richard MacCutchan9-Oct-13 23:27
mveRichard MacCutchan9-Oct-13 23:27 
GeneralRe: data grid view Pin
Kawshik_itbd10-Oct-13 0:27
Kawshik_itbd10-Oct-13 0:27 
GeneralRe: data grid view Pin
Freak309-Oct-13 22:50
Freak309-Oct-13 22:50 
GeneralRe: data grid view Pin
Kawshik_itbd9-Oct-13 23:20
Kawshik_itbd9-Oct-13 23:20 
AnswerRe: data grid view Pin
sanket16410-Oct-13 0:49
sanket16410-Oct-13 0:49 
QuestionErro: No overload for method 'GetRegisteredActivatedServiceTypes' takes '3' arguments Pin
piano_Korg9-Oct-13 17:27
professionalpiano_Korg9-Oct-13 17:27 
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;

using System.Runtime.Remoting.Channels.Tcp;
using Project1;


namespace Server
{
public partial class Form1 : Form
{
private TcpChannel tcpchannel = null;
private int port = 8998;
private Type type;
private WellKnownObjectMode wellknownobj;
private string objURL;



public Form1()
{
InitializeComponent();
}


private void Form1_Load(object sender, EventArgs e)
{

}

private void btnKhoi_Click(object sender, EventArgs e)
{

try {
btnTat.PerformClick();
port = Int32.Parse(txtPort.Text);
tcpchannel = new TcpChannel(port);
ChannelServices.RegisterChannel(tcpchannel,false);
type = typeof(Proxy);
objURL ="Prime_URL";
if(rdb_sTon.Checked==true)
wellknownobj = WellKnownObjectMode.Singleton;



else
wellknownobj = WellKnownObjectMode.SingleCall;
RemotingConfiguration.GetRegisteredActivatedServiceTypes(type,objURL,wellknownobj);//Error this line

txtTrThai.Text="Khoi dong server tai Port"+port.ToString()+"luc"+ DateTime.Now.ToString();
}catch(Exception ex){
MessageBox.Show("Loi", ex.Message);
}

}

private void btnTat_Click(object sender, EventArgs e)
{

if (ChannelServices.GetChannel("tcp") != null) {

ChannelServices.UnregisterChannel(tcpchannel);
txtTrThai.Text = "tat server tai port" + port.ToString() + "luc" + DateTime.Now.ToString();

}


}
}
}
AnswerRe: Erro: No overload for method 'GetRegisteredActivatedServiceTypes' takes '3' arguments Pin
Pete O'Hanlon9-Oct-13 20:05
mvePete O'Hanlon9-Oct-13 20:05 
QuestionNeed to make a GUI for reading from serial Port. And using Multiple forms Pin
alfie.max159-Oct-13 17:00
alfie.max159-Oct-13 17:00 
AnswerRe: Need to make a GUI for reading from serial Port. And using Multiple forms Pin
Mycroft Holmes9-Oct-13 17:07
professionalMycroft Holmes9-Oct-13 17:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.