예제 #1
0
        public IzmenaSoftvera(RacunarskiCentar racunarskiCentar, ObservableCollection <Softver> softveri, List <int> indeksi,
                              UndoRedoStack stek, OrderedDictionary prethodnaStanja, Notifier notifierMainWindow)
        {
            notifierError = new Notifier(cfg =>
            {
                cfg.PositionProvider = new WindowPositionProvider(
                    parentWindow: this,
                    corner: Corner.TopRight,
                    offsetX: 20,
                    offsetY: 10);

                cfg.LifetimeSupervisor = new TimeAndCountBasedLifetimeSupervisor(
                    notificationLifetime: System.TimeSpan.FromSeconds(5),
                    maximumNotificationCount: MaximumNotificationCount.FromCount(1));

                cfg.Dispatcher = Application.Current.Dispatcher;
            });

            InitializeComponent();
            this.potvrdaIzmena             = false;
            this.stekStanja                = stek;
            this.prethodnaStanjaAplikacije = prethodnaStanja;
            this.racunarskiCentar          = racunarskiCentar;
            this.indeksiZaIzmenu           = indeksi;
            this.notifierMainWindow        = notifierMainWindow;
            tabelaSoftvera = softveri;
            nazivSoftver.Focus();
        }
예제 #2
0
 public StanjeAplikacije(RacunarskiCentar racunarskiCentar, string tipPodatka, string tipPromene, int kolicina, List <string> oznake)
 {
     this.racunarskiCentar = racunarskiCentar;
     this.tipPodatka       = tipPodatka;
     this.tipPromene       = tipPromene;
     this.kolicina         = kolicina;
     this.oznake           = oznake;
 }
예제 #3
0
 public CefCustomObject(ChromiumWebBrowser originalBrowser, MainWindow mainWindow, RacunarskiCentar racunarskiCentar, Notifier not, UndoRedoStack stekStanja, OrderedDictionary prethodnaStanja)
 {
     _instanceBrowser      = originalBrowser;
     _instanceWindow       = mainWindow;
     this.racunarskiCentar = racunarskiCentar;
     this.not        = not;
     this.stekStanja = stekStanja;
     this.prethodnaStanjaAplikacije = prethodnaStanja;
 }
예제 #4
0
        public DodavanjeUcionice(RacunarskiCentar racunarskiCentar, ObservableCollection <Ucionica> ucionice, bool izmena, string oznaka,
                                 Notifier notifierMainWindow, UndoRedoStack stack, OrderedDictionary prethodnaStanja)
        {
            notifierError = new Notifier(cfg =>
            {
                cfg.PositionProvider = new WindowPositionProvider(
                    parentWindow: this,
                    corner: Corner.TopRight,
                    offsetX: 20,
                    offsetY: 10);

                cfg.LifetimeSupervisor = new TimeAndCountBasedLifetimeSupervisor(
                    notificationLifetime: System.TimeSpan.FromSeconds(5),
                    maximumNotificationCount: MaximumNotificationCount.FromCount(1));

                cfg.Dispatcher = Application.Current.Dispatcher;
            });

            this.prethodnaStanjaAplikacije = prethodnaStanja;
            this.staroStanje        = null;
            this.potvrdio           = false;
            this.stekStanja         = stack;
            this.notifierMainWindow = notifierMainWindow;
            this.inicijalizacija    = false;
            InitializeComponent();
            this.inicijalizacija = true;
            this.dodavanjeUcioniceIzborStarogUnosa = false;
            novaUcionica                = new Ucionica();
            this.racunarskiCentar       = racunarskiCentar;
            this.izmena                 = izmena;
            this.unosPrviPut            = true;
            this.oznakaUcioniceZaIzmenu = oznaka;
            List <Softver> softveri = new List <Softver>();

            foreach (Softver s in racunarskiCentar.Softveri.Values)
            {
                if (!s.Obrisan)
                {
                    s.Instaliran = false;
                    softveri.Add(s);
                }
            }
            softverTabela.ItemsSource = softveri;
            softverTabela.IsSynchronizedWithCurrentItem = true;
            tabelaUcionica = ucionice;
            if (!izmena)
            {
                oznakaUcionica.Focus();
            }
            BackStepMenuItem.IsEnabled = false;
        }
예제 #5
0
        public DodavanjeSmera(RacunarskiCentar racunarskiCentar, ObservableCollection <Smer> smerovi, bool izmena, string oznaka,
                              Notifier notifierMainWindow, UndoRedoStack stack, OrderedDictionary prethodnaStanja)
        {
            notifierError = new Notifier(cfg =>
            {
                cfg.PositionProvider = new WindowPositionProvider(
                    parentWindow: this,
                    corner: Corner.TopRight,
                    offsetX: 20,
                    offsetY: 10);

                cfg.LifetimeSupervisor = new TimeAndCountBasedLifetimeSupervisor(
                    notificationLifetime: System.TimeSpan.FromSeconds(5),
                    maximumNotificationCount: MaximumNotificationCount.FromCount(1));

                cfg.Dispatcher = Application.Current.Dispatcher;
            });

            this.prethodnaStanjaAplikacije = prethodnaStanja;
            this.staroStanje        = null;
            this.potvrdio           = false;
            this.stekStanja         = stack;
            this.notifierMainWindow = notifierMainWindow;
            smer = new Smer();
            this.racunarskiCentar               = racunarskiCentar;
            this.izmena                         = izmena;
            this.unosPrviPut                    = true;
            this.oznakaSmeraZaIzmenu            = oznaka;
            this.dodavanjeSmeraIzborStarogUnosa = false;
            tabelaSmerova                       = smerovi;
            InitializeComponent();
            if (!izmena)
            {
                OznakaSmera.Focus();
            }
        }
예제 #6
0
        public Tutorijal(RacunarskiCentar racunarskiCentar, ObservableCollection <Softver> softveri, bool izmena, string oznaka,
                         Notifier notifierMainWindow, UndoRedoStack stack, OrderedDictionary prethodnaStanja)
        {
            notifierError = new Notifier(cfg =>
            {
                cfg.PositionProvider = new WindowPositionProvider(
                    parentWindow: this,
                    corner: Corner.TopRight,
                    offsetX: 20,
                    offsetY: 10);

                cfg.LifetimeSupervisor = new TimeAndCountBasedLifetimeSupervisor(
                    notificationLifetime: System.TimeSpan.FromSeconds(5),
                    maximumNotificationCount: MaximumNotificationCount.FromCount(1));

                cfg.Dispatcher = Application.Current.Dispatcher;
            });
            this.potvrdio           = false;
            this.stekStanja         = stack;
            this.notifierMainWindow = notifierMainWindow;
            InitializeComponent();
            this.racunarskiCentar                  = racunarskiCentar;
            this.izmena                            = izmena;
            this.unosPrviPut                       = true;
            this.oznakaSoftveraZaIzmenu            = oznaka;
            this.dodavanjeSoftveraIzborStarogUnosa = false;
            tabelaSoftvera                         = softveri;
            noviSoftver                            = new Softver();
            if (!izmena)
            {
                oznakaSoftver.Focus();
            }
            BackStepMenuItem.IsEnabled     = false;
            this.prethodnaStanjaAplikacije = prethodnaStanja;
            this.staroStanje = null;

            //ukljuci prvi pop-up
            popupOznaka.IsOpen = true;
            pop = popupOznaka;
            Window w = this;

            if (null != w)
            {
                w.LocationChanged += delegate(object sender, EventArgs e)
                {
                    var offset = popupOznaka.HorizontalOffset;
                    popupOznaka.HorizontalOffset = offset + 1;
                    popupOznaka.HorizontalOffset = offset;

                    offset = popupNaziv.HorizontalOffset;
                    popupNaziv.HorizontalOffset = offset + 1;
                    popupNaziv.HorizontalOffset = offset;

                    offset = popupOS.HorizontalOffset;
                    popupOS.HorizontalOffset = offset + 1;
                    popupOS.HorizontalOffset = offset;

                    offset = popupProizvodjac.HorizontalOffset;
                    popupProizvodjac.HorizontalOffset = offset + 1;
                    popupProizvodjac.HorizontalOffset = offset;

                    offset = popupNastavi.HorizontalOffset;
                    popupNastavi.HorizontalOffset = offset + 1;
                    popupNastavi.HorizontalOffset = offset;

                    offset = popupSajt.HorizontalOffset;
                    popupSajt.HorizontalOffset = offset + 1;
                    popupSajt.HorizontalOffset = offset;

                    offset = popupGodina.HorizontalOffset;
                    popupGodina.HorizontalOffset = offset + 1;
                    popupGodina.HorizontalOffset = offset;

                    offset = popupCena.HorizontalOffset;
                    popupCena.HorizontalOffset = offset + 1;
                    popupCena.HorizontalOffset = offset;

                    offset = popupOpis.HorizontalOffset;
                    popupOpis.HorizontalOffset = offset + 1;
                    popupOpis.HorizontalOffset = offset;

                    offset = popupZavrsi.HorizontalOffset;
                    popupZavrsi.HorizontalOffset = offset + 1;
                    popupZavrsi.HorizontalOffset = offset;
                };

                w.SizeChanged += delegate(object sender, SizeChangedEventArgs e)
                {
                    var offset = popupOznaka.HorizontalOffset;
                    popupOznaka.HorizontalOffset = offset + 1;
                    popupOznaka.HorizontalOffset = offset;

                    offset = popupNaziv.HorizontalOffset;
                    popupNaziv.HorizontalOffset = offset + 1;
                    popupNaziv.HorizontalOffset = offset;

                    offset = popupOS.HorizontalOffset;
                    popupOS.HorizontalOffset = offset + 1;
                    popupOS.HorizontalOffset = offset;

                    offset = popupProizvodjac.HorizontalOffset;
                    popupProizvodjac.HorizontalOffset = offset + 1;
                    popupProizvodjac.HorizontalOffset = offset;

                    offset = popupNastavi.HorizontalOffset;
                    popupNastavi.HorizontalOffset = offset + 1;
                    popupNastavi.HorizontalOffset = offset;

                    offset = popupSajt.HorizontalOffset;
                    popupSajt.HorizontalOffset = offset + 1;
                    popupSajt.HorizontalOffset = offset;

                    offset = popupGodina.HorizontalOffset;
                    popupGodina.HorizontalOffset = offset + 1;
                    popupGodina.HorizontalOffset = offset;

                    offset = popupCena.HorizontalOffset;
                    popupCena.HorizontalOffset = offset + 1;
                    popupCena.HorizontalOffset = offset;

                    offset = popupOpis.HorizontalOffset;
                    popupOpis.HorizontalOffset = offset + 1;
                    popupOpis.HorizontalOffset = offset;

                    offset = popupZavrsi.HorizontalOffset;
                    popupZavrsi.HorizontalOffset = offset + 1;
                    popupZavrsi.HorizontalOffset = offset;
                };
            }
        }