private void Demo_Begin(object sender, RoutedEventArgs e) { demoMode = true; VrsteDodaj dodajVrstu = null; Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); Point p = Vrsta1.PointToScreen(new Point(0d, 0d)); p.X += 20; p.Y += 10; LinearSmoothMove(p, 100); }); Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); Vrsta1.IsSubmenuOpen = true; }); Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(300); Point p = Dodaj_vrstu.PointToScreen(new Point(0d, 0d)); p.X += 20; p.Y += 10; LinearSmoothMove(p, 40); }); Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(300); dodajVrstu = new VrsteDodaj(); Vrsta1.IsSubmenuOpen = false; Point p = dodajVrstu.textBox_ID.PointToScreen(new Point(0d, 0d)); p.X += 20; p.Y += 10; LinearSmoothMove(p, 100); System.Threading.Thread.Sleep(300); dodajVrstu.textBox_ID.Focus(); p.X -= 30; LinearSmoothMove(p, 30); }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.textBox_ID.Text = "I"; }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.textBox_ID.Text = "Id"; }); Console.WriteLine("Demo mod: " + demoMode.ToString()); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.textBox_ID.Text = "Id "; }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.textBox_ID.Text = "Id v"; }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.textBox_ID.Text = "Id vr"; }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.textBox_ID.Text = "Id vrs"; }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.textBox_ID.Text = "Id vrst"; }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.textBox_ID.Text = "Id vrste"; }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(200); Point p = dodajVrstu.textBox_IME.PointToScreen(new Point(0d, 0d)); p.X += 20; p.Y += 10; LinearSmoothMove(p, 40); dodajVrstu.textBox_IME.Focus(); System.Threading.Thread.Sleep(100); p.X -= 30; LinearSmoothMove(p, 30); }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.textBox_IME.Text = "I"; }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.textBox_IME.Text = "Im"; }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.textBox_IME.Text = "Ime"; }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.textBox_IME.Text = "Ime "; }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.textBox_IME.Text = "Ime v"; }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.textBox_IME.Text = "Ime vr"; }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.textBox_IME.Text = "Ime vrs"; }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.textBox_IME.Text = "Ime vrst"; }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.textBox_IME.Text = "Ime vrste"; }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(300); Point p = dodajVrstu.textBox_OPIS.PointToScreen(new Point(0d, 0d)); p.X += 20; p.Y += 10; LinearSmoothMove(p, 40); dodajVrstu.textBox_OPIS.Focus(); System.Threading.Thread.Sleep(100); p.X -= 30; LinearSmoothMove(p, 30); }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.textBox_OPIS.Text = "O"; }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.textBox_OPIS.Text = "Op"; }); if (!demoMode) { return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.textBox_OPIS.Text = "Opi"; }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.textBox_OPIS.Text = "Opis"; }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.textBox_OPIS.Text = "Opis "; }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.textBox_OPIS.Text = "Opis v"; }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.textBox_OPIS.Text = "Opis vr"; }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.textBox_OPIS.Text = "Opis vrs"; }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.textBox_OPIS.Text = "Opis vrst"; }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.textBox_OPIS.Text = "Opis vrste"; }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(300); Point p = dodajVrstu.textBox_PRIHOD.PointToScreen(new Point(0d, 0d)); p.X += 20; p.Y += 10; LinearSmoothMove(p, 80); dodajVrstu.textBox_PRIHOD.Focus(); System.Threading.Thread.Sleep(100); p.X -= 30; LinearSmoothMove(p, 30); }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.textBox_PRIHOD.Text = "6"; }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.textBox_PRIHOD.Text = "66"; }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.textBox_PRIHOD.Text = "666"; }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(300); Point p = dodajVrstu.checkBox_IUCN.PointToScreen(new Point(0d, 0d)); p.X += 5; p.Y += 5; LinearSmoothMove(p, 40); }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.checkBox_IUCN.IsChecked = true; }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(300); Point p = dodajVrstu.checkBox_NASELJEN.PointToScreen(new Point(0d, 0d)); p.X += 5; p.Y += 5; LinearSmoothMove(p, 40); }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.checkBox_NASELJEN.IsChecked = true; }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(300); Point p = dodajVrstu.listaEtiketaXAML.PointToScreen(new Point(0d, 0d)); p.X += 5; p.Y += 5; LinearSmoothMove(p, 40); }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(100); dodajVrstu.listaEtiketaXAML.SelectedItems.Add(dodajVrstu.listaEtiketaXAML.Items[0]); }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(300); Point p = dodajVrstu.button2.PointToScreen(new Point(0d, 0d)); p.X += 20; p.Y += 10; LinearSmoothMove(p, 40); }); if (!demoMode) { dodajVrstu.Close(); return; } Dispatcher.Invoke(DispatcherPriority.Background, (Action) delegate { System.Threading.Thread.Sleep(3000); dodajVrstu.Close(); }); }
private void MenuItem_Click(object sender, RoutedEventArgs e) { VrsteDodaj dodajVrstu = new VrsteDodaj(); }