Ejemplo n.º 1
0
        void Write()
        {
            if (!Writing)
            {
                throw new Exception();
            }

            if (drawnas_1.Checked)
            {
                binding.DrawnAs = Data.DrawnAs.MaxAndMin;
            }
            if (drawnas_2.Checked)
            {
                binding.DrawnAs = Data.DrawnAs.CenterAndAmplitude;
            }
            if (colorSpace_1.Checked)
            {
                if (binding.ColorSpace != Data.ColorSpace.RGBA)
                {
                    binding.ChangeColorSpace(Data.ColorSpace.RGBA, true);
                }
            }
            if (colorSpace_2.Checked)
            {
                if (binding.ColorSpace != Data.ColorSpace.HSVA)
                {
                    binding.ChangeColorSpace(Data.ColorSpace.HSVA, true);
                }
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Show popup
        /// </summary>
        void Popup()
        {
            if (isPopupShown)
            {
                return;
            }

            if (Manager.NativeManager.BeginPopupContextItem(id_c))
            {
                var txt_r_r1 = "RGBA";
                var txt_r_r2 = "HSVA";

                if (Manager.NativeManager.RadioButton(txt_r_r1 + id_r1, binding.ColorSpace == Data.ColorSpace.RGBA))
                {
                    binding.ChangeColorSpace(Data.ColorSpace.RGBA, true);
                }

                Manager.NativeManager.SameLine();

                if (Manager.NativeManager.RadioButton(txt_r_r2 + id_r2, binding.ColorSpace == Data.ColorSpace.HSVA))
                {
                    binding.ChangeColorSpace(Data.ColorSpace.HSVA, true);
                }

                Manager.NativeManager.EndPopup();
                isPopupShown = true;
            }
        }