Пример #1
0
        public static SerialGenerator RunFragment(CSIBaseDialogFragment BaseDialogFragment)
        {
            try
            {
                FragmentTransaction ft = BaseDialogFragment.FragmentManager.BeginTransaction();

                SerialGenerator SerialGeneratorDialog = (SerialGenerator)BaseDialogFragment.FragmentManager.FindFragmentByTag("SerialGenerator");
                if (SerialGeneratorDialog != null)
                {
                    ft.Show(SerialGeneratorDialog);
                    //ft.AddToBackStack(null);
                }
                else
                {
                    // Create and show the dialog.
                    SerialGeneratorDialog = new SerialGenerator(BaseDialogFragment.GetBaseActivity())
                    {
                        ParentFragment = BaseDialogFragment
                    };
                    //Add fragment
                    SerialGeneratorDialog.Show(ft, "SerialGenerator");
                }
                return(SerialGeneratorDialog);
            }
            catch (Exception Ex)
            {
                CSIErrorLog.WriteErrorLog(Ex);
                return(null);
            }
        }
Пример #2
0
 private void SNButton_Click(object sender, EventArgs e)
 {
     SerialGenerator.RunFragment(this);
 }