Exemple #1
0
 public FormLocationWithFilmInfo(FormLocationInfo location, String filmName, String filmCountry, String filmYear)
 {
     Location    = location;
     FilmName    = filmName;
     FilmCountry = filmCountry;
     FilmYear    = filmYear;
 }
Exemple #2
0
        private void OnFilmsViewInformerSearchRequested(object sender, FormLocationInfo info)
        {
            SearchForm form = new SearchForm();

            if (ShowForm(form, info))
            {
                searchView = form;
                searchView.SearchStarted += OnSearchViewSearchStarted;
            }
        }
Exemple #3
0
        private bool ShowForm(Form formToShow, FormLocationInfo info)
        {
            foreach (Form form in Application.OpenForms)
            {
                if (form.GetType() == formToShow.GetType())
                {
                    form.Activate();
                    return(false);
                }
            }

            formToShow.StartPosition = FormStartPosition.Manual;
            formToShow.Location      = new Point(info.Location.X + (info.Width - formToShow.Width) / 2, info.Location.Y + (info.Height - formToShow.Height) / 2);
            formToShow.Show();

            return(true);
        }