예제 #1
0
        public override void OnViewCreated(View view, Bundle savedInstanceState)
        {
            try
            {
                base.OnViewCreated(view, savedInstanceState);

                RecourdFilePath = Arguments.GetString("FilePath");

                MainActivityview = ((PageChatWindowActivity)Activity);
                MainActivityview.ChatSendButton.SetImageResource(Resource.Drawable.ic_send_up_arrow);
                MainActivityview.ChatSendButton.Tag = "Audio";

                RecourdPlaybutton  = view.FindViewById <CircleButton>(Resource.Id.playButton);
                Recourdclosebutton = view.FindViewById <CircleButton>(Resource.Id.closeRecourdButton);

                VoiceSeekbar              = view.FindViewById <SeekBar>(Resource.Id.voiceseekbar);
                VoiceSeekbar.Progress     = 0;
                Recourdclosebutton.Click += Recourdclosebutton_Click;
                RecourdPlaybutton.Click  += RecourdPlaybutton_Click;
                RecourdPlaybutton.Tag     = "Stop";

                AudioPlayerClass = new Methods.AudioRecorderAndPlayer(MainActivityview.PageId);
                TimerSound       = new Timer();
            }
            catch (Exception e)
            {
                Methods.DisplayReportResultTrack(e);
            }
        }
예제 #2
0
            public MyStickerActions(Activity activity, string typePage)
            {
                try
                {
                    TypePage = typePage;

                    switch (typePage)
                    {
                    // Create your fragment here
                    case "ChatWindowActivity":
                        ChatWindow = (ChatWindowActivity)activity;
                        break;

                    case "PageChatWindowActivity":
                        PageActivityView = (PageChatWindowActivity)activity;
                        break;

                    case "GroupChatWindowActivity":
                        GroupActivityView = (GroupChatWindowActivity)activity;
                        break;

                    case "StoryReplyActivity":
                        //  StoryReplyActivity = (StoryReplyActivity)activity;
                        break;
                    }
                }
                catch (Exception e)
                {
                    Methods.DisplayReportResultTrack(e);
                }
            }
예제 #3
0
        public StickerItemClickListener(Activity activity, string type, StickerRecylerAdapter.StickerAdapter stickerAdapter)
        {
            try
            {
                Type           = type;
                StickerAdapter = stickerAdapter;

                StickerAdapter.OnItemClick += StickerAdapterOnOnItemClick;

                switch (Type)
                {
                // Create your fragment here
                case "ChatWindowActivity":
                    ChatWindow = (ChatWindowActivity)activity;
                    break;

                case "PageChatWindowActivity":
                    PageActivityView = (PageChatWindowActivity)activity;
                    break;

                case "GroupChatWindowActivity":
                    GroupActivityView = (GroupChatWindowActivity)activity;
                    break;
                }
            }
            catch (Exception e)
            {
                Methods.DisplayReportResultTrack(e);
            }
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            try
            {
                View chatRecourdSoundFragmentView = inflater.Inflate(Resource.Layout.Chat_Recourd_Sound_Fragment, container, false);

                RecourdFilePath = Arguments.GetString("FilePath");

                MainActivityview = ((PageChatWindowActivity)Activity);
                MainActivityview.ChatSendButton.SetImageResource(Resource.Drawable.ic_send_up_arrow);
                MainActivityview.ChatSendButton.Tag = "Audio";

                RecourdPlaybutton  = chatRecourdSoundFragmentView.FindViewById <CircleButton>(Resource.Id.playButton);
                Recourdclosebutton = chatRecourdSoundFragmentView.FindViewById <CircleButton>(Resource.Id.closeRecourdButton);

                VoiceSeekbar = chatRecourdSoundFragmentView.FindViewById <SeekBar>(Resource.Id.voiceseekbar);
                VoiceSeekbar.ProgressChanged += VoiceSeekbar_ProgressChanged;
                VoiceSeekbar.Progress         = 0;
                Recourdclosebutton.Click     += Recourdclosebutton_Click;
                RecourdPlaybutton.Click      += RecourdPlaybutton_Click;
                RecourdPlaybutton.Tag         = "Stop";

                AudioPlayerClass = new Methods.AudioRecorderAndPlayer(MainActivityview.PageId);
                TimerSound       = new Timer();

                return(chatRecourdSoundFragmentView);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                return(null);
            }
        }
예제 #5
0
        public EmojisViewActions(Activity activity, string typePage, AXEmojiPopup popup, AXEmojiEditText editText, ImageView image)
        {
            try
            {
                ActivityContext = activity;
                TypePage        = typePage;

                switch (typePage)
                {
                // Create your fragment here
                case "ChatWindowActivity":
                    ChatWindow = (ChatWindowActivity)activity;
                    break;

                case "PageChatWindowActivity":
                    PageActivityView = (PageChatWindowActivity)activity;
                    break;

                case "GroupChatWindowActivity":
                    GroupActivityView = (GroupChatWindowActivity)activity;
                    break;

                case "StoryReplyActivity":
                    //StoryReplyActivity = (StoryReplyActivity)activity;
                    break;
                }

                Popup           = popup;
                AXEmojiEditText = editText;
                EmojisViewImage = image;

                EmojisViewImage.SetColorFilter(AppSettings.SetTabDarkTheme ? Color.White : Color.ParseColor("#444444"));

                AXEmojiEditText.SetOnClickListener(this);
                EmojisViewImage.SetOnClickListener(this);
                popup.SetPopupListener(this);
            }
            catch (Exception e)
            {
                Methods.DisplayReportResultTrack(e);
            }
        }
예제 #6
0
        //========================= Functions =========================
        public static async Task SendMessageTask(PageChatWindowActivity windowActivity, string pageId, string id, string messageId, string text = "", string contact = "", string pathFile = "", string imageUrl = "", string stickerId = "", string gifUrl = "", string lat = "", string lng = "")
        {
            try
            {
                MainWindowActivity = windowActivity;
                if (windowActivity.PageData != null)
                {
                    PageData = windowActivity.PageData;
                }
                else if (windowActivity.DataProfilePage != null)
                {
                    DataProfilePage = windowActivity.DataProfilePage;
                }

                GlobalContext = MsgTabbedMainActivity.GetInstance();

                if (Methods.AttachmentFiles.Check_FileExtension(pathFile) == "Video")
                {
                    File destinationPath = new File(Methods.Path.FolderDcimVideo + "/Compressor");

                    if (!Directory.Exists(destinationPath.Path))
                    {
                        Directory.CreateDirectory(destinationPath.Path);
                    }

                    await Task.Factory.StartNew(() => new VideoCompressAsyncTask(windowActivity, pageId, id, messageId, text, pathFile).Execute("false", pathFile, destinationPath.Path));
                }
                else
                {
                    StartApiService(pageId, id, messageId, text, contact, pathFile, imageUrl, stickerId, gifUrl, lat, lng);
                }

                await Task.Delay(0);
            }
            catch (Exception ex)
            {
                Methods.DisplayReportResultTrack(ex);
            }
        }
        //========================= Functions =========================
        public static async Task SendMessageTask(PageChatWindowActivity windowActivity, string pageId, string id, string messageId, string text = "", string contact = "", string pathFile = "", string imageUrl = "", string stickerId = "", string gifUrl = "")
        {
            try
            {
                MainWindowActivity = windowActivity;
                if (windowActivity.PageData != null)
                {
                    PageData = windowActivity.PageData;
                }
                else if (windowActivity.DataProfilePage != null)
                {
                    DataProfilePage = windowActivity.DataProfilePage;
                }

                GlobalContext = TabbedMainActivity.GetInstance();

                StartApiService(pageId, id, messageId, text, contact, pathFile, imageUrl, stickerId, gifUrl);
                await Task.Delay(0);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
        }