示例#1
0
 //Change Text
 public void OnEditTextChangeListener(View rootView, string text, int colorCode)
 {
     try
     {
         RootView = rootView;
         var textEditorDialogFragment = new TextEditorFragment(this);
         textEditorDialogFragment.Show(this, this, text, colorCode, ViewTextType.Change);
         textEditorDialogFragment.SetOnTextEditorListener(this);
     }
     catch (Exception e)
     {
         Methods.DisplayReportResultTrack(e);
     }
 }
 //Change Text
 public void OnEditTextChangeListener(View rootView, string text, int colorCode)
 {
     try
     {
         RootView = rootView;
         var textEditorDialogFragment = new TextEditorFragment(this);
         textEditorDialogFragment.Show(this, this, text, colorCode, ViewTextType.Change);
         textEditorDialogFragment.SetOnTextEditorListener(this);
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
     }
 }
示例#3
0
 public void OnToolSelected(ToolType toolType)
 {
     try
     {
         MToolType = toolType;
         if (toolType == ToolType.Brush)
         {
             MNiceArtEditor.SetBrushDrawingMode(true);
             MPropertiesFragment.Show(SupportFragmentManager, MPropertiesFragment.Tag);
         }
         else if (toolType == ToolType.Text)
         {
             TextEditorFragment textEditorDialogFragment = new TextEditorFragment(this, null);
             textEditorDialogFragment.Show(this, this, null, "", Resource.Color.white, ViewTextType.Add);
             textEditorDialogFragment.SetOnTextEditorListener(this);
         }
         else if (toolType == ToolType.Eraser)
         {
             MNiceArtEditor.BrushEraser();
         }
         else if (toolType == ToolType.Filter)
         {
             MRvTools.Visibility      = ViewStates.Gone;
             MRvFilters.Visibility    = ViewStates.Visible;
             SeekBarRotate.Visibility = ViewStates.Invisible;
             MRvColor.Visibility      = ViewStates.Gone;
             ShowFilter(true);
         }
         else if (toolType == ToolType.Emojis)
         {
             MEmojisFragment.Show(SupportFragmentManager, MEmojisFragment.Tag);
         }
         else if (toolType == ToolType.Sticker)
         {
             MStickerFragment.Show(SupportFragmentManager, MStickerFragment.Tag);
         }
         else if (toolType == ToolType.Image)
         {
             ImgGalleryOnClick();
         }
         else if (toolType == ToolType.Color)
         {
             MRvTools.Visibility      = ViewStates.Gone;
             MRvFilters.Visibility    = ViewStates.Gone;
             SeekBarRotate.Visibility = ViewStates.Gone;
             MRvColor.Visibility      = ViewStates.Visible;
             ShowFilter(true);
         }
         else if (toolType == ToolType.FilterColor)
         {
             MRvTools.Visibility      = ViewStates.Gone;
             MRvFilters.Visibility    = ViewStates.Gone;
             SeekBarRotate.Visibility = ViewStates.Gone;
             MRvColor.Visibility      = ViewStates.Visible;
             ShowFilter(true);
         }
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
     }
 }