Exemplo n.º 1
0
 public static void ManipClientObject(ThisDevice thisObject)
 {
     if (thisObject.data == "REMOVE_THIS_DEVICE")
     {
         UpdateFlag = 1;
         ListClient.Remove(thisObject);
     }
     else
     {
         foreach (var item in ListClient)
         {
             if (item.address.Equals(thisObject.address))
             {
                 if (!item.data.Equals(thisObject.data))
                 {
                     item.data = thisObject.data;
                 }
             }
         }
         if (thisObject.flag == 1)
         {
             UpdateFlag = 1;
             ListClient.Add(thisObject);
             Cnt++;
             thisObject.flag = 1;
         }
     }
 }
Exemplo n.º 2
0
        private void listToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ListClient listClient = new ListClient();

            listClient.MdiParent = this;
            listClient.Show();
        }
Exemplo n.º 3
0
        // Disconnect 동작의 Default 대리자 Method
        private void Default_Disconnect_Work(String key, Object obj)
        {
            Socket sock = ListClient[key] as Socket;

            Console.WriteLine("Disconnected : {0}", sock.RemoteEndPoint.ToString());
            ListClient.Remove(key);
        }
Exemplo n.º 4
0
        private async void button1_Click(object sender, EventArgs e)
        {
            listBox1.Items.Clear();
            client = new ListClient();

            await client.FetchDataAsync(ModelType.Mondai);

            await client.FetchDataAsync(ModelType.Comment);

            await client.FetchDataAsync(ModelType.Star);

            await client.FetchDataAsync(ModelType.User);

            var list = client.Objects.OfType <Mondai>().OrderByDescending(x => x.GiverExperience);

            BeginInvoke(new Action(() =>
            {
                foreach (var item in list)
                {
                    listBox1.Items.Add(item.ToString());
                }
                foreach (var item in client.Objects.OfType <Comment>())
                {
                    listBox1.Items.Add(item.ToString());
                }
                foreach (var item in client.Objects.OfType <Star>())
                {
                    listBox1.Items.Add(item.ToString());
                }
                foreach (var item in client.Objects.OfType <User>())
                {
                    listBox1.Items.Add(item.ToString());
                }
            }));
        }
Exemplo n.º 5
0
 private void WrapPanel_MouseDown(object sender, MouseButtonEventArgs e)
 {
     ListClient.UnselectAll();
     if (MenuClientModal.Visibility == Visibility.Visible)
     {
         MenuClientModal.Visibility = Visibility.Collapsed;
     }
 }
Exemplo n.º 6
0
 private void WrapPanel_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
 {
     ListClient.UnselectAll();
     if (MenuClientModal.Visibility == Visibility.Visible)
     {
         MenuClientModal.Visibility = Visibility.Collapsed;
     }
 }
Exemplo n.º 7
0
 public ClientRegistr(ListClient list, Form menu /*, Form check */)
 {
     InitializeComponent();
     CreationDateTimePicker.Value  = DateTime.Today;
     DriverLicDateTimePicker.Value = DateTime.Today;
     clientList = list;
     startmenu  = menu;
     //checkClient = check;
 }
Exemplo n.º 8
0
        public void GetLists(long CurrentUserId, long ListOwnerId)
        {
            FriendsClient friends = new FriendsClient(CurrentUserId);
            WebClientResult<FriendsList> friendsList = friends.FriendIds(ListOwnerId.ToString(), null, null);

            ListClient list = new ListClient(CurrentUserId);

            WebClientResult<Lists> lists = list.Lists(ListOwnerId.ToString(), null);
        }
Exemplo n.º 9
0
 public CheckClient(ListClient list, StartMenu menu)
 {
     clientList = list;
     startMenu  = menu;
     InitializeComponent();
     NameToolTip.SetToolTip(NameTextBox, "Поле может содержать только буквы, первая буква должна быть заглавной.");
     SurnameToolTip.SetToolTip(SurnameTextBox, "Поле может содержать только буквы, первая буква должна быть заглавной.");
     FathernameToolTip.SetToolTip(FathernameTextBox, "Поле может содержать только буквы, первая буква должна быть заглавной.");
 }
Exemplo n.º 10
0
        private void RadioButton_Checked_2(object sender, RoutedEventArgs e)
        {
            loaded();

            dt.DefaultView.RowFilter = "Active = '" + false + "'";

            ListClient.UnselectAll();
            if (MenuClientModal.Visibility == Visibility.Visible)
            {
                MenuClientModal.Visibility = Visibility.Collapsed;
            }
        }
Exemplo n.º 11
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");

            IDBContext    dBContext    = new DBContext();
            IRepoClient   repoClient   = new RepoClient(dBContext);
            IListClient   listClient   = new ListClient();
            ILireFichiers lireFichiers = new LireFichiers();

            EtapeFichier etapeFichier1 = new EtapeFichier(repoClient, listClient, lireFichiers);

            etapeFichier1.ExecuterEtape();
        }
Exemplo n.º 12
0
        private void DeleteClientButton_Click(object sender, RoutedEventArgs e)
        {
            ListClient selected = ClientsLw.SelectedItem as ListClient;

            if (selected != null)
            {
                library.RemoveClient(selected.ID);
                ClientsLw.ItemsSource = LoadClients(library);
            }
            else
            {
                MessageBox.Show("Client is not choosen");
            }
        }
Exemplo n.º 13
0
        private void BorrowBookButton_Click(object sender, RoutedEventArgs e)
        {
            ListClient selected = ClientsLw.SelectedItem as ListClient;

            if (selected != null)
            {
                CliensAvailableBookPanel.Visibility = Visible;
                BorrowBook_ConfirmButton.Visibility = Visible;
                List <Book> clientBooks = library.GetBooksByState(true);
                CliensAvailableBookLw.ItemsSource = LoadBooksFromList(clientBooks);
            }
            else
            {
                MessageBox.Show("Client is not choosen");
            }
        }
Exemplo n.º 14
0
        private CommerceService()
        {
            this._listClient      = ClientContext.Clients.CreateListClient();
            this._browseClient    = ClientContext.Clients.CreateBrowseClient();
            this._storeClient     = ClientContext.Clients.CreateStoreClient();
            this._cartClient      = ClientContext.Clients.CreateCartClient();
            this._orderClient     = ClientContext.Clients.CreateOrderClient();
            this._priceClient     = ClientContext.Clients.CreatePriceClient();
            this._marketingClient = ClientContext.Clients.CreateMarketingClient();
            this._themeClient     = ClientContext.Clients.CreateThemeClient();
            this._reviewsClient   = ClientContext.Clients.CreateReviewsClient();

            _themesCacheStoragePath = ConfigurationManager.AppSettings["ThemeCacheFolder"];
            this._viewLocator       = new FileThemeViewLocator(_themesCacheStoragePath);
            this._cartHelper        = new CartHelper(this);
        }
Exemplo n.º 15
0
        private void BorrowBook_ConfirmButton_Click(object sender, RoutedEventArgs e)
        {
            ListBook   selectedBook   = CliensAvailableBookLw.SelectedItem as ListBook;
            ListClient selectedClient = ClientsLw.SelectedItem as ListClient;

            if (selectedClient != null && selectedBook != null)
            {
                library.BorrowBook(selectedClient.ID, selectedBook.ID);
                CliensAvailableBookPanel.Visibility = Collapsed;
                BorrowBook_ConfirmButton.Visibility = Collapsed;
                ClientsLw.ItemsSource = LoadClients(library);
            }
            else if (selectedBook == null)
            {
                MessageBox.Show("Book is not choosen");
            }
            else if (selectedClient == null)
            {
                MessageBox.Show("Client is not choosen");
            }
        }
Exemplo n.º 16
0
        public CommerceService()
        {
            this._listClient      = ClientContext.Clients.CreateListClient();
            this._browseClient    = ClientContext.Clients.CreateBrowseClient();
            this._storeClient     = ClientContext.Clients.CreateStoreClient();
            this._cartClient      = ClientContext.Clients.CreateCartClient();
            this._orderClient     = ClientContext.Clients.CreateOrderClient();
            this._securityClient  = ClientContext.Clients.CreateSecurityClient();
            this._priceClient     = ClientContext.Clients.CreatePriceClient();
            this._marketingClient = ClientContext.Clients.CreateMarketingClient();
            this._inventoryClient = ClientContext.Clients.CreateInventoryClient();
            this._themeClient     = ClientContext.Clients.CreateThemeClient();
            this._pageClient      = ClientContext.Clients.CreatePageClient();
            this._reviewsClient   = ClientContext.Clients.CreateReviewsClient();

            _themesCacheStoragePath = ConfigurationManager.AppSettings["ThemeCacheFolder"];
            _pagesCacheStoragePath  = ConfigurationManager.AppSettings["PageCacheFolder"];

            this._viewLocator = new FileThemeViewLocator(HostingEnvironment.MapPath(_themesCacheStoragePath));

            this._cartHelper = new CartHelper(this);
        }
Exemplo n.º 17
0
        public async Task Connect(ConnectionSettings settings)
        {
            if (_session != null)
            {
                throw new InvalidOperationException("Cannot connect because the client is already connected");
            }

            _commonClient       = new CommonClient();
            _hashClient         = new HashClient();
            _listClient         = new ListClient();
            _scriptClient       = new ScriptClient();
            _stringClient       = new StringClient();
            _transactionClient  = new TransactionClient();
            _setClient          = new SetClient();
            _subscriptionClient = new SubscriptionClient();
            _session            = await _commonClient.Connect(settings).ConfigureAwait(false);

            if (!_session.IsOpen)
            {
                throw new IOException("Session could not be opened");
            }

            OnConnected?.Invoke(this);
        }
Exemplo n.º 18
0
        public static ListClient CreateListClient(this CommerceClients source, string serviceUrl)
        {
            var client = new ListClient(new Uri(serviceUrl), source.CreateMessageProcessingHandler());

            return(client);
        }
 public static ListClient CreateListClient(this CommerceClients source, string serviceUrl)
 {
     var client = new ListClient(new Uri(serviceUrl), source.CreateMessageProcessingHandler());
     return client;
 }
Exemplo n.º 20
0
 // Accept 동작의 Default 대리자 Method
 private void Default_Accept_Work(Socket sock, Object obj)
 {
     ListClient.Add(sock.RemoteEndPoint.ToString(), sock);
     Console.WriteLine("Connected : {0}", sock.RemoteEndPoint.ToString());
 }
Exemplo n.º 21
0
        public ClientCard(ListClient list, Form menu, bool flag)
        {
            InitializeComponent();
            startMenu  = menu;
            clientList = list;

            flagwho = flag;
            AutoAddButton.Enabled = flag;
            int j = 1;

            foreach (Client i in clientList.Clients)
            {
                if (j == 1)
                {
                    NSFTextBox.Text = i.Name + " " + i.Surname + " " + i.SecondName;
                    AgeTextBox.Text = i.Birthday.Date.ToShortDateString();

                    if (i.Sex)
                    {
                        SexTextBox.Text = "Мужской";
                    }
                    else
                    {
                        SexTextBox.Text = "Женский";
                    }
                    LicenseCheckBox.Checked  = i.DriverLicense;
                    CreationDateTextBox.Text = i.RegistrationDate.Date.ToShortDateString();
                    IDTextBox.Text           = i.ID;
                    DebtCheckBox.Checked     = i.Debt;
                    j++;
                    continue;
                }

                clientListTable.RowCount = ++clientListTable.RowCount;
                clientListTable.Size     = new System.Drawing.Size(clientListTable.Width, this.clientListTable.Size.Height + 120);
                clientListTable.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 120));

                TextBox NSFTextBoxNew = new TextBox();
                NSFTextBoxNew.Anchor    = NSFTextBox.Anchor;
                NSFTextBoxNew.Font      = NSFTextBox.Font;
                NSFTextBoxNew.Multiline = NSFTextBox.Multiline;
                NSFTextBoxNew.Size      = NSFTextBox.Size;
                NSFTextBoxNew.Enabled   = NSFTextBox.Enabled;

                Label AgeLabelNew = new Label();
                AgeLabelNew.Anchor   = AgeLabel.Anchor;
                AgeLabelNew.Text     = AgeLabel.Text;
                AgeLabelNew.Font     = AgeLabel.Font;
                AgeLabelNew.Margin   = AgeLabel.Margin;
                AgeLabelNew.AutoSize = AgeLabel.AutoSize;

                TextBox AgeTextBoxNew = new TextBox();
                AgeTextBoxNew.Anchor  = AgeTextBox.Anchor;
                AgeTextBoxNew.Font    = AgeTextBox.Font;
                AgeTextBoxNew.Size    = AgeTextBox.Size;
                AgeTextBoxNew.Enabled = AgeTextBox.Enabled;

                Label SexLabelNew = new Label();
                SexLabelNew.Anchor   = SexLabel.Anchor;
                SexLabelNew.Text     = SexLabel.Text;
                SexLabelNew.Font     = SexLabel.Font;
                SexLabelNew.AutoSize = SexLabel.AutoSize;

                TextBox SexTextBoxNew = new TextBox();
                SexTextBoxNew.Anchor  = SexTextBox.Anchor;
                SexTextBoxNew.Font    = SexTextBox.Font;
                SexTextBoxNew.Size    = SexTextBox.Size;
                SexTextBoxNew.Enabled = SexTextBox.Enabled;

                Label LicenseLabelNew = new Label();
                LicenseLabelNew.Anchor   = LicenseLabel.Anchor;
                LicenseLabelNew.Text     = LicenseLabel.Text;
                LicenseLabelNew.Font     = LicenseLabel.Font;
                LicenseLabelNew.AutoSize = LicenseLabel.AutoSize;

                CheckBox LicenseCheckBoxNew = new CheckBox();
                LicenseCheckBoxNew.Anchor  = LicenseCheckBox.Anchor;
                LicenseCheckBoxNew.Text    = LicenseCheckBox.Text;
                LicenseCheckBoxNew.Enabled = LicenseCheckBox.Enabled;

                Label CreationDateLabelNew = new Label();
                CreationDateLabelNew.Anchor   = CreationDateLabel.Anchor;
                CreationDateLabelNew.Text     = CreationDateLabel.Text;
                CreationDateLabelNew.Font     = CreationDateLabel.Font;
                CreationDateLabelNew.AutoSize = CreationDateLabel.AutoSize;

                TextBox CreationDateTextBoxNew = new TextBox();
                CreationDateTextBoxNew.Anchor  = CreationDateTextBox.Anchor;
                CreationDateTextBoxNew.Font    = CreationDateTextBox.Font;
                CreationDateTextBoxNew.Size    = CreationDateTextBox.Size;
                CreationDateTextBoxNew.Enabled = CreationDateTextBox.Enabled;

                Label IDLabelNew = new Label();
                IDLabelNew.Anchor   = IDLabel.Anchor;
                IDLabelNew.Text     = IDLabel.Text;
                IDLabelNew.Font     = IDLabel.Font;
                IDLabelNew.AutoSize = IDLabel.AutoSize;

                TextBox IDTextBoxNew = new TextBox();
                IDTextBoxNew.Anchor  = IDTextBox.Anchor;
                IDTextBoxNew.Font    = IDTextBox.Font;
                IDTextBoxNew.Size    = IDTextBox.Size;
                IDTextBoxNew.Enabled = IDTextBox.Enabled;

                Label DebtLabelNew = new Label();
                DebtLabelNew.Anchor   = DebtLabel.Anchor;
                DebtLabelNew.Text     = DebtLabel.Text;
                DebtLabelNew.Font     = DebtLabel.Font;
                DebtLabelNew.AutoSize = DebtLabel.AutoSize;

                CheckBox DebtCheckBoxNew = new CheckBox();
                DebtCheckBoxNew.Anchor  = DebtCheckBox.Anchor;
                DebtCheckBoxNew.Text    = DebtCheckBox.Text;
                DebtCheckBoxNew.Enabled = DebtCheckBox.Enabled;

                Button OpenButtonNew = new Button();
                OpenButtonNew.FlatStyle = OpenButton.FlatStyle;
                OpenButtonNew.Font      = OpenButton.Font;
                OpenButtonNew.Text      = OpenButton.Text;
                OpenButtonNew.Enabled   = OpenButton.Enabled;
                OpenButtonNew.Anchor    = OpenButton.Anchor;
                OpenButtonNew.Size      = OpenButton.Size;
                OpenButtonNew.BackColor = OpenButton.BackColor;
                OpenButtonNew.FlatAppearance.BorderColor = OpenButton.FlatAppearance.BorderColor;
                OpenButtonNew.FlatAppearance.BorderSize  = OpenButton.FlatAppearance.BorderSize;
                OpenButtonNew.Click += OpenButton_Click;


                Button AutoAddButtonNew = new Button();
                AutoAddButtonNew.FlatStyle = AutoAddButton.FlatStyle;
                AutoAddButtonNew.Font      = AutoAddButton.Font;
                AutoAddButtonNew.Text      = AutoAddButton.Text;
                AutoAddButtonNew.Enabled   = flagwho;
                AutoAddButtonNew.Anchor    = AutoAddButton.Anchor;
                AutoAddButtonNew.Size      = AutoAddButton.Size;
                AutoAddButtonNew.BackColor = AutoAddButton.BackColor;
                AutoAddButtonNew.FlatAppearance.BorderColor = AutoAddButton.FlatAppearance.BorderColor;
                AutoAddButtonNew.FlatAppearance.BorderSize  = AutoAddButton.FlatAppearance.BorderSize;
                AutoAddButtonNew.Click += AutoAddButton_Click;



                TableLayoutPanel InfoTableNew = new TableLayoutPanel();
                InfoTableNew.Size        = InfoTable.Size;
                InfoTableNew.Anchor      = InfoTable.Anchor;
                InfoTableNew.RowCount    = InfoTable.RowCount;
                InfoTableNew.ColumnCount = InfoTable.ColumnCount;
                InfoTableNew.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
                InfoTableNew.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 34F));
                InfoTableNew.Controls.Add(AgeLabelNew, 0, 0);
                InfoTableNew.Controls.Add(SexLabelNew, 0, 1);
                InfoTableNew.Controls.Add(LicenseLabelNew, 0, 2);
                InfoTableNew.Controls.Add(AgeTextBoxNew, 1, 0);
                InfoTableNew.Controls.Add(SexTextBoxNew, 1, 1);
                InfoTableNew.Controls.Add(LicenseCheckBoxNew, 1, 2);
                InfoTableNew.Controls.Add(CreationDateLabelNew, 2, 0);
                InfoTableNew.Controls.Add(IDLabelNew, 2, 1);
                InfoTableNew.Controls.Add(DebtLabelNew, 2, 2);
                InfoTableNew.Controls.Add(CreationDateTextBoxNew, 3, 0);
                InfoTableNew.Controls.Add(IDTextBoxNew, 3, 1);
                InfoTableNew.Controls.Add(DebtCheckBoxNew, 3, 2);

                TableLayoutPanel ButtonsTableNew = new TableLayoutPanel();
                ButtonsTableNew.Anchor      = ButtonsTable.Anchor;
                ButtonsTableNew.Size        = ButtonsTable.Size;
                ButtonsTableNew.RowCount    = ButtonsTable.RowCount;
                ButtonsTableNew.ColumnCount = ButtonsTable.ColumnCount;
                ButtonsTableNew.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
                ButtonsTableNew.Controls.Add(OpenButtonNew, 0, 0);
                ButtonsTableNew.Controls.Add(AutoAddButtonNew, 0, 1);


                NSFTextBoxNew.Text = i.Name + " " + i.Surname + " " + i.SecondName;
                AgeTextBoxNew.Text = i.Birthday.Date.ToShortDateString();

                if (i.Sex)
                {
                    SexTextBoxNew.Text = "Мужской";
                }
                else
                {
                    SexTextBoxNew.Text = "Женский";
                }

                LicenseCheckBoxNew.Checked  = i.DriverLicense;
                CreationDateTextBoxNew.Text = i.RegistrationDate.Date.ToShortDateString();
                IDTextBoxNew.Text           = i.ID;
                DebtCheckBoxNew.Checked     = i.Debt;

                clientListTable.Controls.Add(NSFTextBoxNew, 0, j - 1);
                clientListTable.Controls.Add(InfoTableNew, 1, j - 1);
                clientListTable.Controls.Add(ButtonsTableNew, 2, j - 1);
                j++;
            }
        }
Exemplo n.º 22
0
        private void syncServerCtl1_DataReceivedHandler(int ClientID, object Data)
        {
            #region PopupMessageSend
            if (Data is DtPopUpMessageSend)
            {
                DtPopUpMessageSend pms = (DtPopUpMessageSend)Data;

                if (pms.MessageType == enMessageType.InternalMessage &&
                    pms.Caption == "_Warning_")
                {
                    string strQuery = CreateSqlWarning(pms.MessageData.ToString());
                    //using (StreamWriter sw = new StreamWriter("DataLog.txt", false))
                    //{
                    //    sw.WriteLine("Events utk Tabel: " + pms.MessageData.ToString() +
                    //        ", NoDok: " + pms.Message);
                    //    sw.WriteLine(strQuery);
                    //}
                    IList <clsWarningSend> ListWarningSend = BaseFramework.DefaultDp
                                                             .ListFastLoadEntitiesUsingSqlSelect <clsWarningSend>(null,
                                                                                                                  strQuery, string.Empty, new FieldParam("NoDok", pms.Message));
                    DtPopUpMessageReceive pmr = new DtPopUpMessageReceive(
                        FindSender(ClientID), pms.Caption, pms.Message,
                        null, enMessageType.Information);
                    foreach (clsWarningSend ws in ListWarningSend)
                    {
                        //using (StreamWriter sw = new StreamWriter("DataLog.txt", true))
                        //{
                        //    sw.WriteLine(ws.NoDokumen + ":" + ws.NamaPeringatan);
                        //    sw.WriteLine("Penanggung Jawab: " + ws.PenanggungJawab);
                        //    sw.WriteLine("DictUserClient.Count=" + DictUserClient.Count);
                        //    foreach (string nm in DictUserClient.Keys)
                        //        sw.WriteLine(nm);
                        //}
                        pmr.Caption = ws.NamaPeringatan;
                        pmr.Message = string.Concat("NoDok: ", ws.NoDokumen,
                                                    "; Pembuat: ", ws.Pembuat, '\n', ws.Keterangan);
                        pmr.MessageType = ws.JenisWarning ?
                                          enMessageType.Warning : enMessageType.Information;

                        List <int> ListClient;
                        if (DictUserClient.TryGetValue(
                                ws.PenanggungJawab.ToLower(), out ListClient))
                        {
                            foreach (int Id in ListClient)
                            {
                                syncServerCtl1.Send(Id, pmr);
                            }
                        }
                    }
                }
                else
                {
                    DtPopUpMessageReceive pmr = new DtPopUpMessageReceive(
                        FindSender(ClientID), pms.Caption, pms.Message,
                        pms.MessageData, pms.MessageType);

                    foreach (string UserName in pms.UserName)
                    {
                        List <int> ListClient;
                        if (DictUserClient.TryGetValue(UserName.Trim().ToLower(), out ListClient))
                        {
                            foreach (int Id in ListClient)
                            {
                                syncServerCtl1.Send(Id, pmr);
                            }
                        }
                    }
                }
                return;
            }
            #endregion

            #region RaiseEventData
            if (Data is DtRaiseEventData)
            {
                DtRaiseEventData red = (DtRaiseEventData)Data;

                int Id;
                if (DictActionListener.TryGetValue(red.EventName, out Id))
                {
                    syncServerCtl1.Send(Id, red);
                }

                List <int> ListClient;
                if (DictUserListener.TryGetValue(red.EventName, out ListClient))
                {
                    foreach (int ClId in ListClient)
                    {
                        syncServerCtl1.Send(ClId, red);
                    }
                }
                return;
            }
            #endregion

            #region RegisterActionListener
            if (Data is DtRegisterActionListener)
            {
                DtRegisterActionListener ral = (DtRegisterActionListener)Data;
                foreach (string EventName in ral.EventName)
                {
                    if (!DictActionListener.ContainsKey(EventName))
                    {
                        DictActionListener.Add(EventName, ClientID);
                    }
                    else
                    {
                        syncServerCtl1.Send(ClientID, new DtPopUpMessageReceive("BxEventServer",
                                                                                "Error Registrasi Action Listener", string.Concat(
                                                                                    "Event ", EventName, " sudah dihandle Action Listener lain !"),
                                                                                null, enMessageType.Error));
                    }
                }
                return;
            }
            #endregion

            #region RegisterUserListener
            if (Data is DtRegisterUserListener)
            {
                DtRegisterUserListener rul = (DtRegisterUserListener)Data;

                foreach (string EventName in rul.EventName)
                {
                    List <int> ListClient;
                    if (!DictUserListener.TryGetValue(EventName, out ListClient))
                    {
                        ListClient = new List <int>();
                        DictUserListener.Add(EventName, ListClient);
                    }
                    else
                    {
                        bool ClientExist = false;
                        foreach (int cl in ListClient)
                        {
                            if (cl == ClientID)
                            {
                                ClientExist = true;
                                break;
                            }
                        }
                        if (ClientExist)
                        {
                            continue;
                        }
                    }
                    ListClient.Add(ClientID);
                }
                return;
            }
            #endregion

            #region DtLogin
            if (Data is DtLogin)
            {
                DtLogin lg = (DtLogin)Data;

                List <int> ListClient;

                if (!DictUserClient.TryGetValue(lg.UserName.ToLower(), out ListClient))
                {
                    ListClient = new List <int>();
                    DictUserClient.Add(lg.UserName.ToLower(), ListClient);
                }
                ListClient.Add(ClientID);
                syncServerCtl1.Send(ClientID, true);

                //using (StreamWriter sw = new StreamWriter("DataLog.txt", false))
                //{
                //    sw.WriteLine(lg.UserName + " Logged; ClientId=" + ClientID);
                //}

                //string Message = BuildWelcomeMessage();

                //if (Message.Length > 0)
                //{
                //    DateTime dt = DateTime.Now;
                //    string Caption;
                //    if (dt.Hour <= 10)
                //        Caption = "Selamat Pagi !";
                //    else if (dt.Hour <= 15)
                //        Caption = "Selamat Siang !";
                //    else if (dt.Hour <= 19)
                //        Caption = "Selamat Sore !";
                //    else
                //        Caption = "Selamat Malam !";
                //    syncServerCtl1.Send(ClientID, new DtPopUpMessageReceive(
                //        string.Empty, Caption,
                //        Message, null, enMessageType.Information));
                //}
            }
            #endregion
        }