예제 #1
0
        private void AuthModeStart(LoginData p_login_data)
        {
            AutheMode_Panel.Visible = true;

            own_user_name             = p_login_data.Get_user_name;
            friends_and_status        = p_login_data.Get_friends_list_and_status;
            public_chat_ids           = p_login_data.Get_public_chat_ids;
            all_agreement_invitations = p_login_data.Get_agreement_invitations;
            received_offline_messages = p_login_data.Get_offline_messages;

            OwnUserName_Label.Text = "LoggedAs: " + own_user_name;

            select_public_chat_is_open = false;

            menuStrip1.Visible = true;

            all_show_agreement_invitations_forms = new List <AgreementInvitation_Form>();
            all_show_formal_message_forms        = new List <ShowFormalMessage_Form>();

            ShowFriends();
            foreach (AgreementInvitationInfo t_agreement_invitation_info in all_agreement_invitations)
            {
                AgreementInvitation_Form t_new_agreement_invitation_show_form = new AgreementInvitation_Form(t_agreement_invitation_info
                                                                                                             , new RemoveShowAgreementInvitationForm(RemoveShowAgreementInvitationForm), new CreateGetAgreementAnswerDialog(Mo_CreateGetAgreementAnswerDialog));
                if (!all_show_agreement_invitations_forms.Contains(t_new_agreement_invitation_show_form))
                {
                    all_show_agreement_invitations_forms.Add(t_new_agreement_invitation_show_form);
                    t_new_agreement_invitation_show_form.StartForm();
                }
                else
                {
                    t_new_agreement_invitation_show_form.DontStartForm();
                }
            }
            if (received_offline_messages.Count > 0)
            {
                ShowFormalMessage_Form show_offline_messages_form = new ShowFormalMessage_Form(received_offline_messages, new OfflienMesssageRead(Mo_ServerOfflineMessagesReadInform)
                                                                                               , new RemoveShowOfflineMessagesForm(RemoveShowOfflineMessagesFormFromList));
                if (!all_show_formal_message_forms.Contains(show_offline_messages_form))
                {
                    all_show_formal_message_forms.Add(show_offline_messages_form);
                    show_offline_messages_form.StartForm();
                }
                else
                {
                    show_offline_messages_form.DontStartForm();
                }
            }

            Cl_ClientDelegatesForDialogs all_dialogs_delegates = new Cl_ClientDelegatesForDialogs(new SendDialogMessage(Mo_SendDialogMessage), new MessageShow(Mo_MessageShow)
                                                                                                  , new SomeoneLeftChat(Mo_SomeoneLeftChat), new InformEjectFromChat(Mo_InformEjectFromChat), new CreateEmptyPrivateChat(Mo_CreateEmptyPrivateChat)
                                                                                                  , new InformJoinToPublicChat(Mo_InformJoinToPublicChat), new SomeoneJoinedChat(Mo_SomeoneJoinedChat), new InformFriendChangedStatus(Mo_InformFriendChangedStatus)
                                                                                                  , new ShowFormalMessage(Mo_ShowFormalMessage), new InformFriendListChanhged(Mo_InformFriendListChanhged), new InformCreatedPrivateChat(Mo_InformCreatedPrivateChat)
                                                                                                  , new ShowAnAgreementInvitation(Mo_ShowAnAgreementInvitation));

            all_dialogs = new AllDiaogs(all_dialogs_delegates);

            all_chats = new AllChats(new SendChatMessage(Mo_SendChatMessage), new StartLeaveChatRequest(mo_StartLeaveChatRequest));
        }
예제 #2
0
        public void Mo_ShowAnAgreementInvitation(AgreementInvitationInfo p_agreement_invitation_info)
        {
            AgreementInvitation_Form t_new_agreement_invitation_show_form = new AgreementInvitation_Form(p_agreement_invitation_info
                                                                                                         , new RemoveShowAgreementInvitationForm(RemoveShowAgreementInvitationForm), new CreateGetAgreementAnswerDialog(Mo_CreateGetAgreementAnswerDialog));

            if (!all_show_agreement_invitations_forms.Contains(t_new_agreement_invitation_show_form))
            {
                all_show_agreement_invitations_forms.Add(t_new_agreement_invitation_show_form);
                t_new_agreement_invitation_show_form.StartForm();
            }
            else
            {
                t_new_agreement_invitation_show_form.DontStartForm();
            }
        }
예제 #3
0
 public void RemoveShowAgreementInvitationForm(AgreementInvitation_Form p_form_to_remove)
 {
     all_show_agreement_invitations_forms.Remove(p_form_to_remove);
 }