public LoginForm(IRapidPassiveEngine engine, ICustomizeHandler handler) { this.rapidPassiveEngine = engine; this.customizeHandler = handler; int registerPort = int.Parse(ConfigurationManager.AppSettings["RemotingPort"]); this.remotingService = (IRemotingService)Activator.GetObject(typeof(IRemotingService), string.Format("tcp://{0}:{1}/RemotingService", ConfigurationManager.AppSettings["ServerIP"], registerPort));; InitializeComponent(); Dictionary <UserStatus, Image> statusImageDictionary = new Dictionary <UserStatus, Image>(); statusImageDictionary.Add(UserStatus.Online, this.imageList_state.Images[0]); statusImageDictionary.Add(UserStatus.Away, this.imageList_state.Images[1]); statusImageDictionary.Add(UserStatus.Busy, this.imageList_state.Images[2]); statusImageDictionary.Add(UserStatus.DontDisturb, this.imageList_state.Images[3]); statusImageDictionary.Add(UserStatus.Hide, this.imageList_state.Images[4]); statusImageDictionary.Add(UserStatus.OffLine, this.imageList_state.Images[5]); GlobalResourceManager.SetStatusImage(statusImageDictionary); this.skinLabel_SoftName.Text = GlobalResourceManager.SoftwareName; this.checkBoxRememberPwd.Checked = SystemSettings.Singleton.RememberPwd; this.checkBoxAutoLogin.Checked = SystemSettings.Singleton.AutoLogin; this.textBoxId.SkinTxt.Text = SystemSettings.Singleton.LastLoginUserID; if (SystemSettings.Singleton.RememberPwd) { this.textBoxPwd.SkinTxt.Text = "11111111"; this.pwdMD5 = SystemSettings.Singleton.LastLoginPwdMD5; this.pwdIsMD5 = true; } }
public UpdateUserInfoForm(IRapidPassiveEngine engine, GlobalUserCache globalUserCache, GGUser user) { InitializeComponent(); this.rapidPassiveEngine = engine; this.currentUser = user; int registerPort = int.Parse(ConfigurationManager.AppSettings["RemotingPort"]); this.ggService = (IRemotingService)Activator.GetObject(typeof(IRemotingService), string.Format("tcp://{0}:{1}/RemotingService", ConfigurationManager.AppSettings["ServerIP"], registerPort));; this.skinLabel_ID.Text = user.UserID; this.skinTextBox_nickName.SkinTxt.Text = user.Name; this.skinTextBox_signature.SkinTxt.Text = user.Signature; if (user.HeadImageIndex >= 0) { this.headImageIndex = user.HeadImageIndex; this.pnlImgTx.BackgroundImage = GlobalResourceManager.GetHeadImage(user); //根据ID获取头像 } else { this.pnlImgTx.BackgroundImage = user.HeadImage; this.selfPhoto = true; } }
public ServerRemoting(int?port = 8080) { _service = new RemotingService(); _channel = new TcpChannel(port.Value); this.Init(); }
public static IRemotingService GetRemotingProxy(string ip, int port) { TcpChannel tcpChannel = new TcpChannel(); ChannelServices.RegisterChannel(tcpChannel, false); Type requiredType = typeof(IRemotingService); IRemotingService remoteObject = (IRemotingService)Activator.GetObject(requiredType, string.Format("tcp://{0}:{1}/ActivityRegisterService", ip, port)); return(remoteObject); }
public RegisterForm() { InitializeComponent(); int registerPort = int.Parse(ConfigurationManager.AppSettings["RemotingPort"]); this.ggService = (IRemotingService)Activator.GetObject(typeof(IRemotingService), string.Format("tcp://{0}:{1}/RemotingService", ConfigurationManager.AppSettings["ServerIP"], registerPort));; Random ran = new Random(); this.headImageIndex = ran.Next(0, GlobalResourceManager.HeadImages.Length); this.pnlImgTx.BackgroundImage = GlobalResourceManager.HeadImages[this.headImageIndex];//根据ID获取头像 }
//Aca iniciamos todo lo qe corre por atras en el cliente. Ejemplo: Remoting public void StartProcess() { try { _remotingService = RemotingProtocol.GetRemotingProxy(ClientData.Instance.RemotingServerIP, ClientData.Instance.RemotingServerPort); CurrentStatus = "Exito: Servicio de remoting conectado"; } catch (Exception ex) { CurrentStatus = "Error: Servicio remoting"; } }
public UpdateGroupInfoForm(IRapidPassiveEngine engine, GlobalUserCache cache, GGGroup group) { InitializeComponent(); this.rapidPassiveEngine = engine; this.currentGroup = group; int registerPort = int.Parse(ConfigurationManager.AppSettings["RemotingPort"]); this.ggService = (IRemotingService)Activator.GetObject(typeof(IRemotingService), string.Format("tcp://{0}:{1}/RemotingService", ConfigurationManager.AppSettings["ServerIP"], registerPort));; this.skinLabel_ID.Text = group.ID; this.skinTextBox_nickName.SkinTxt.Text = group.Name; this.skinTextBox_signature.SkinTxt.Text = group.Announce; globalUserCache = cache; }
public void Start() { //Start every process Console.WriteLine("Starting server."); //Inicializo el remoting _remotingService = RemotingProtocol.GetRemotingProxy(ServerData.Instance.RemotingServerIP, ServerData.Instance.RemotingServerPort); ListenProcess = new TCPClientListener(_remotingService); ClientListenerArray = new TcpListener[ServerData.Instance.MaxConnections]; IPEndPoint endpoint = new IPEndPoint(IPAddress.Any, ServerData.Instance.TCPPortForClients); var tcpListener = new TcpListener(endpoint); for (int i = 0; i < ServerData.Instance.MaxConnections; i++) { ClientListenerArray[i] = tcpListener; ThreadPool.QueueUserWorkItem(new WaitCallback(DoWork), i); } SyncFilesProccess = new SyncFiles(); IPEndPoint endpointForSync = new IPEndPoint(IPAddress.Any, ServerData.Instance.TCPPortForServers); var tcpListenerForServers = new TcpListener(endpointForSync); ThreadStart serverSyncRecieveThread = delegate { SyncFilesProccess.SyncRecieve(tcpListenerForServers); }; syncServerThread = new Thread(serverSyncRecieveThread); syncServerThread.IsBackground = true; syncServerThread.Start(); }
public UpdateUserInfoForm(IRapidPassiveEngine engine,GlobalUserCache globalUserCache, GGUser user) { InitializeComponent(); this.rapidPassiveEngine = engine; this.currentUser = user ; int registerPort = int.Parse(ConfigurationManager.AppSettings["RemotingPort"]); this.ggService = (IRemotingService)Activator.GetObject(typeof(IRemotingService), string.Format("tcp://{0}:{1}/RemotingService", ConfigurationManager.AppSettings["ServerIP"], registerPort)); ; this.skinLabel_ID.Text = user.UserID; this.skinTextBox_nickName.SkinTxt.Text = user.Name; this.skinTextBox_signature.SkinTxt.Text = user.Signature; if (user.HeadImageIndex >= 0) { this.headImageIndex = user.HeadImageIndex; this.pnlImgTx.BackgroundImage = GlobalResourceManager.GetHeadImage(user); //根据ID获取头像 } else { this.pnlImgTx.BackgroundImage = user.HeadImage; this.selfPhoto = true; } }
public ForceBuildPublisher(IRemotingService remotingService) { this.remotingService = remotingService; }
/// <summary> /// Initializes a new instance of the <see cref="RemoteProjectLabeller" /> class. /// </summary> /// <param name="service">The service.</param> /// <remarks></remarks> public RemoteProjectLabeller(IRemotingService service) { remotingService = service; this.ServerUri = RemoteCruiseServer.DefaultManagerUri; }
public static void PreInitialize() { try { #region Log string logFilePath = SystemSettings.SystemSettingsDir + "AppLog.txt"; GlobalResourceManager.logger = new FileAgileLogger(logFilePath); #endregion GlobalResourceManager.softwareName = ConfigurationManager.AppSettings["softwareName"]; string resourceDir = AppDomain.CurrentDomain.BaseDirectory + "Resource\\"; GlobalResourceManager.noneIcon64 = global::GGTalk.Properties.Resources.None64; GlobalResourceManager.groupIcon = ImageHelper.ConvertToIcon(global::GGTalk.Properties.Resources.normal_group_40, 64); #region HeadImage List<string> list = ESBasic.Helpers.FileHelper.GetOffspringFiles(AppDomain.CurrentDomain.BaseDirectory + "Head\\"); List<string> picList = new List<string>(); foreach (string file in list) { string name = file.ToLower(); if (name.EndsWith(".bmp") || name.EndsWith(".jpg") || name.EndsWith(".jpeg") || name.EndsWith(".png")) { picList.Add(name); } } picList.Sort(); GlobalResourceManager.headImages = new Image[picList.Count]; for (int i = 0; i < picList.Count; i++) { GlobalResourceManager.headImages[i] = Image.FromFile(AppDomain.CurrentDomain.BaseDirectory + "head\\" + list[i]); } GlobalResourceManager.headImagesGrey = new Image[picList.Count]; for (int i = 0; i < GlobalResourceManager.headImagesGrey.Length; i++) { GlobalResourceManager.headImagesGrey[i] = ESBasic.Helpers.ImageHelper.ConvertToGrey(GlobalResourceManager.headImages[i]); } #endregion #region Emotion List<string> tempList = ESBasic.Helpers.FileHelper.GetOffspringFiles(AppDomain.CurrentDomain.BaseDirectory + "Emotion\\"); List<string> emotionFileList = new List<string>(); foreach (string file in tempList) { string name = file.ToLower(); if (name.EndsWith(".bmp") || name.EndsWith(".jpg") || name.EndsWith(".jpeg") || name.EndsWith(".png") || name.EndsWith(".gif")) { emotionFileList.Add(name); } } emotionFileList.Sort(new Comparison<string>(CompareEmotionName)); List<Image> emotionList = new List<Image>(); for (int i = 0; i < emotionFileList.Count; i++) { emotionList.Add(Image.FromFile(AppDomain.CurrentDomain.BaseDirectory + "Emotion\\" + emotionFileList[i])); } #endregion GlobalResourceManager.audioFilePath = resourceDir + "ring.wav"; int registerPort = int.Parse(ConfigurationManager.AppSettings["RemotingPort"]); GlobalResourceManager.remotingService = (IRemotingService)Activator.GetObject(typeof(IRemotingService), string.Format("tcp://{0}:{1}/RemotingService", ConfigurationManager.AppSettings["ServerIP"], registerPort)); GlobalResourceManager.png64 = Image.FromFile(resourceDir + "64.png"); GlobalResourceManager.icon64 = ImageHelper.ConvertToIcon(GlobalResourceManager.png64, 64); GlobalResourceManager.icon64Grey = ImageHelper.ConvertToIcon(ImageHelper.ConvertToGrey(GlobalResourceManager.png64), 64); GlobalResourceManager.mainBackImage = Image.FromFile(resourceDir + "BackImage.png"); GlobalResourceManager.emotionList = emotionList; GlobalResourceManager.loginBackImage = GlobalResourceManager.MainBackImage; } catch (Exception ee) { MessageBox.Show("加载系统资源时,出现错误。" + ee.Message); } }
public ForceBuildPublisher(IRemotingService remotingService) { this.remotingService = remotingService; }
public TCPClientListener(IRemotingService remotingService) { _remotingService = remotingService; }
/// <summary> /// Initializes a new instance of the <see cref="RemoteProjectLabeller" /> class. /// </summary> /// <param name="service">The service.</param> /// <remarks></remarks> public RemoteProjectLabeller(IRemotingService service) { remotingService = service; this.ServerUri = RemoteCruiseServer.DefaultManagerUri; }
public RemoteProjectLabeller(IRemotingService service) { remotingService = service; }
public ProjectTrigger(IRemotingService remoteService) { this.remoteService = remoteService; }
public RemoteProjectLabeller(IRemotingService service) { remotingService = service; }
public ProjectTrigger(IRemotingService remoteService) { this.remoteService = remoteService; }