Esempio n. 1
0
        private void DodajButton_Click(object sender, RoutedEventArgs e)
        {
            var dodaj = new DodajTip();

            dodaj.Show();
            Close();
        }
Esempio n. 2
0
        private void AddType_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            Boolean upaljen      = false;
            Boolean isWindowOpen = false;

            foreach (Window w in Application.Current.Windows)
            {
                if (w is Tip.DodajTip)
                {
                    w.Activate();
                    isWindowOpen = true;
                    if (w.WindowState == WindowState.Minimized)
                    {
                        w.WindowState = WindowState.Normal;
                    }
                }
            }
            foreach (Window w in Application.Current.Windows)
            {
                if (w is Tutorial.Tutor)
                {
                    w.Activate();
                    upaljen = true;
                }
            }
            if (!isWindowOpen && !upaljen)
            {
                var tip = new Tip.DodajTip();
                tip.Show();
            }
            if (upaljen)
            {
                MessageBox.Show("Morate zavrsiti ili ugasiti tutorijal za dodavanje spomenika");
            }
        }