Example #1
0
        private void Switch()
        {
            panel1.Controls.Clear();

            if (_handlerGO != null)
            {
                customButtonGo.Click -= _handlerGO;
            }
            if (_handerReset != null)
            {
                customButtonReset.Click -= _handerReset;
            }

            if (_mode == CONVERTER_MODE.LATLONG_TO_XY)
            {
                _mode = CONVERTER_MODE.XY_TO_LATLONG;
                CreateUI_LATLONG();
                customFlatButtonSwitch.Text = "To X,Y";
            }
            else
            {
                _mode = CONVERTER_MODE.LATLONG_TO_XY;
                CreateUI_XY();
                customFlatButtonSwitch.Text = "To Lat/Long";
            }
        }
Example #2
0
        public CoordsConverterF()
        {
            InitializeComponent();
            MaximizeBox = false;
            MaximumSize = MinimumSize = Size;
            Icon        = Icon.ExtractAssociatedIcon(Application.ExecutablePath);


            _mode = CONVERTER_MODE.LATLONG_TO_XY;
            CreateUI_XY();

            customFlatButtonSwitch.Click += (sender, e) => { Switch(); };
        }