Ejemplo n.º 1
0
        private void btnHaritadaGoster_Click(object sender, EventArgs e)
        {
            if (seciliFirma == null)
            {
                return;
            }
            string enlem  = seciliFirma.location.lat.ToString().Replace(",", ".");
            string boylam = seciliFirma.location.lng.ToString().Replace(",", ".");
            string url    = $"https://www.google.com/maps/@{enlem},{boylam},20z";

            if (form == null || form.IsDisposed)
            {
                form = new BrowserForm(new Uri(url), seciliFirma.name)
                {
                    StartPosition = FormStartPosition.CenterScreen
                };
                //form.WindowState = FormWindowState.Maximized;
                form.Show();
            }

            //form = form == null ? new BrowserForm(new Uri(url), seciliFirma.name) : form;

            //form = form ?? new BrowserForm(new Uri(url), seciliFirma.name);
            //form.StartPosition = FormStartPosition.CenterScreen;
            ////form.WindowState = FormWindowState.Maximized;
            //form.Show();

            //Process.Start(url);
        }
Ejemplo n.º 2
0
        private void btnHaritadaGoster_Click(object sender, EventArgs e)
        {
            if (seciliFirma == null)
            {
                return;
            }
            string enlem  = seciliFirma.location.lat.ToString().Replace(",", ".");
            string boylam = seciliFirma.location.lng.ToString().Replace(",", ".");
            string url    = $"https://www.google.com.tr/maps/@{enlem},{boylam},19z";

            //    if (form == null || form.IsDisposed)
            //    {
            form               = new BrowserForm(new Uri(url), seciliFirma.name);
            form.Url           = new Uri(url);
            form.Title         = seciliFirma.name; //url olmadan browser açıldığı için browser constructorına parametre koyduk
            form.StartPosition = FormStartPosition.CenterScreen;
            //    //form.WindowState = FormWindowState.Maximized;
            form.ShowDialog(); //ShowDialog birden fazla ekran açılmasını engeller !!
                               //    //Process.Start(url);  yeni sekmede açar
                               //    }
                               //form = form == null ? new BrowserForm(new Uri(url), seciliFirma.name) : form;
                               //    form = form ?? new BrowserForm(new Uri(url), seciliFirma.name);
                               //    form.StartPosition = FormStartPosition.CenterScreen;
                               //    form.Show();
        }