//此類唯一安全接口 public CallBack(Player player, byte[] head, byte[] body, ClientCallBack serverCallBack) { Player = player; Head = head; Body = body; ClientCallBack = serverCallBack; }
public Client(MultiplayerGame game) { GameContext = game; callBack = new ClientCallBack(game); context = new InstanceContext(callBack); client = new GameServiceClient(context); client.Open(); }
public static void Register(BombplaneProto.Type type, ClientCallBack method) { if (!_callBacks.ContainsKey(type)) { _callBacks.Add(type, method); } else { Console.WriteLine("注册了相同的回调事件"); } }
/// <summary> /// 回調註冊方法 /// </summary> /// <param name="packageType">封包型態</param> /// <param name="CallBackMethod">回調方法</param> public static void Register(PackageType packageType, ClientCallBack CallBackMethod) { if (!CallBacksDictionary.ContainsKey(packageType)) { CallBacksDictionary.Add(packageType, CallBackMethod); } else { Debug.Log("註冊了相同的回調事件"); } }
public async Task <ActionResult> Edit([Bind(Include = "Id,DateTime,Thema,IsThemaClosed,SatisfactionScore,ClientId")] ClientCallBack clientCallBack) { if (ModelState.IsValid) { clientCallBack.IsThemaClosed = true; db.Entry(clientCallBack).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Details", routeValues: new { id = clientCallBack.Id })); } return(View(clientCallBack)); }
public async Task <ActionResult> Create([Bind(Include = "Id,DateTime,Thema,IsThemaClosed,SatisfactionScore,ClientId")] ClientCallBack clientCallBack) { if (ModelState.IsValid) { db.ClientCallBacks.Add(clientCallBack); await db.SaveChangesAsync(); return(RedirectToAction("Create", routeValues: new { controller = "CallBackMessages", clientCallBackId = clientCallBack.Id })); } return(View(clientCallBack)); }
// GET: CustomerArea/ClientCallBacks/Edit/5 public async Task <ActionResult> Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ClientCallBack clientCallBack = await db.ClientCallBacks.FindAsync(id); if (clientCallBack == null) { return(HttpNotFound()); } return(View(clientCallBack)); }
// GET: CustomerArea/ClientCallBacks/Details/5 public async Task <ActionResult> Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ClientCallBack clientCallBack = await db.ClientCallBacks.FindAsync(id); if (clientCallBack == null) { return(HttpNotFound()); } clientCallBack.CallBackMessages = await db.CallBackMessages.Include(u => u.User).Where(u => u.ClientCallBackId == id).ToListAsync(); return(View(clientCallBack)); }
public ClientCallBackTest() { sut = new ClientCallBack(); }
public CallBack(Message message, ClientCallBack clientCallBack) { this.message = message; this.ClientCallBack = clientCallBack; }
public ClientForm() { RegistryKey key = Registry.LocalMachine.OpenSubKey(mCultureInfoRegistryKey); if (key!=null) { try { String value = key.GetValue("CultureInfo", "").ToString(); if (value.Length == 5) { CultureInfo currentCulture = new CultureInfo(value); Thread.CurrentThread.CurrentUICulture = currentCulture; } } catch (Exception) { } key.Close(); } //INITIALIZE STORAGE VERISIONING List<StorageDDL> storageDDL = new List<StorageDDL>(); storageDDL.Add(new StorageDDL("1.0.0", Properties.Resources.fbDDL_1_0_0)); storageDDL.Add(new StorageDDL("1.0.1", Properties.Resources.fbDDL_1_0_1)); storageDDL.Add(new StorageDDL("1.0.2", Properties.Resources.fbDDL_1_0_2)); storageDDL.Add(new StorageDDL("1.0.3", Properties.Resources.fbDDL_1_0_3)); myStorage = new Storage(storageDDL, "1.0.3"); InitializeComponent(); LocalizeComponent(); PRESENCES = new String[] { Properties.Localization.txtStatusOffline, Properties.Localization.txtStatusOnline, Properties.Localization.txtStatusAway, Properties.Localization.txtStatusExtendedAway, Properties.Localization.txtStatusDND }; // Add the handlers to the NetworkChange events. NetworkChange.NetworkAvailabilityChanged += NetworkAvailabilityChanged; NetworkChange.NetworkAddressChanged += NetworkAddressChanged; // initialize phone lines states mySIPPhoneLines = new PhoneLineState[4]; mySIPPhoneLines[0] = new PhoneLineState(); mySIPPhoneLines[1] = new PhoneLineState(); mySIPPhoneLines[2] = new PhoneLineState(); mySIPPhoneLines[3] = new PhoneLineState(); //initialize client events EventNotification eventNotificationIncomingInstantMessage = new EventNotification(); eventNotificationIncomingInstantMessage.Event = ClientEvent.IncomingInstantMessage; eventNotificationIncomingInstantMessage.NotificationData = Directory.GetCurrentDirectory() + @"\Sounds\im.mp3"; eventNotificationIncomingInstantMessage.NotificationType = EventNotificationType.Sound; myClientEvents.AddEventNotification(eventNotificationIncomingInstantMessage); EventNotification eventNotificationIncomingNudge = new EventNotification(); eventNotificationIncomingNudge.Event = ClientEvent.IncomingNudge; eventNotificationIncomingNudge.NotificationData = Directory.GetCurrentDirectory() + @"\Sounds\nudge.mp3"; eventNotificationIncomingNudge.NotificationType = EventNotificationType.Sound; myClientEvents.AddEventNotification(eventNotificationIncomingNudge); //Make Sure that AppDataDir directory exists // try { if (!Directory.Exists(AppDataDir)) Directory.CreateDirectory(AppDataDir); } catch (Exception ex) { #if (TRACE) Console.WriteLine("ClientForm AppDataDir : " + ex.Message); #endif } //set border and background colors //open login panel and process login myMainWindowSplitContainer.Panel1Collapsed = false; myMainWindowSplitContainer.Panel2Collapsed = true; //Media Engine Callback myMediaEngineCallback = new ClientCallBack(this.Callback); //link Presence Images myRosterListTreeView.ImageList = this.myPresenceImagesList; //select Default Phone Line Tab myPhoneLinesTabControl.SelectedTab = myPhoneLine0Tab; myDialPadTabControl.SelectedTab = myTabItemDialPad; //preset size this.ClientSize = myClientSize; this.MinimumSize = this.Size; this.MaximumSize = this.Size; this.MaximizeBox = false; bool result = RegisterHotKey(this.Handle, this.GetType().GetHashCode(), 1, 0); myVideoPlugin.VideoPluginExit += new EventHandler(myVideoPlugin_VideoPluginExit); initializeDialPadMenuItems(); //Initialize mXMPPIQ mXMPPIQ = new XMPPIQ(ConfigIM.IMServer); mXMPPIQ.SendIQMessage += new EventHandler(mXMPPIQ_SendIQMessage); }
public ClientForm() { // Add the handlers to the NetworkChange events. NetworkChange.NetworkAvailabilityChanged += NetworkAvailabilityChanged; NetworkChange.NetworkAddressChanged += NetworkAddressChanged; // initialize phone lines states mySIPPhoneLines = new LINE_STATE[4]; mySIPPhoneLines[0] = new LINE_STATE(); mySIPPhoneLines[1] = new LINE_STATE(); mySIPPhoneLines[2] = new LINE_STATE(); mySIPPhoneLines[3] = new LINE_STATE(); InitializeComponent(); //preset size this.ClientSize = new Size(300, 466); this.MaximizeBox = false; this.MaximumSize = this.Size; this.MinimumSize = this.Size; //open login panel and process login myMainWindowSplitContainer.Panel1Collapsed = false; myMainWindowSplitContainer.Panel2Collapsed = true; //Media Engine Callback oCallback = new ClientCallBack(this.Callback); //Initialize ChatWindow myChatWindow = new Remwave.Client.ChatWindow(this); //link Presence Images myRosterListTreeView.ImageList = myChatWindow.myPresenceImagesList; //select Default Phone Line Tab myPhoneLinesTabControl.SelectedTab = myPhoneLine0Tab; myDialPadTabControl.SelectedTab = tabItem1; RegisterHotKey(this.Handle, this.GetType().GetHashCode(), 1, 0); }