Exemplo n.º 1
0
        public HelpViewer(string key, Raspored.DDrop.PravljenjeRasporeda originator)
        {
            InitializeComponent();
            string curDir = Directory.GetCurrentDirectory();

            curDir = curDir.Remove(curDir.Count() - 10);
            string path = String.Format("{0}/Help/{1}.htm", curDir, key);

            if (!File.Exists(path))
            {
                key = "error";
            }
            Uri u = new Uri(String.Format("file:///{0}/Help/{1}.htm", curDir, key));

            ch = new JavaScriptControlHelper(originator);
            wbHelp.ObjectForScripting = ch;
            wbHelp.Navigate(u);
        }
Exemplo n.º 2
0
        public static void ShowHelp(string key, Raspored.DDrop.PravljenjeRasporeda originator)
        {
            HelpViewer hh = new HelpViewer(key, originator);

            hh.Show();
        }
Exemplo n.º 3
0
        private void Novi_Raspored_Click(object sender, RoutedEventArgs e)
        {
            var r = new Raspored.DDrop.PravljenjeRasporeda(raspored, citanje_pisanje);

            r.ShowDialog();
            raspored = r.rasp;
            r.sacuvajRaspored();
            for (int i = 1; i < 61; i++)
            {
                for (int j = 1; j < 7; j++)
                {
                    if (Termini[i][j].Count != 0)
                    {
                        Termini[i][j].RemoveAt(0);
                        ListView lv;
                        //MessageBox.Show("lw0" + (c1 + i) + r1);
                        if (i < 10)
                        {
                            lv = (ListView)this.FindName("lw0" + (i) + j);
                        }
                        else
                        {
                            lv = (ListView)this.FindName("lw" + i + j);
                        }
                        if (lv != null)
                        {
                            lv.Background = Brushes.White;
                        }
                    }
                }
            }


            foreach (UcionicaRaspored ur in raspored.Rasporedi)
            {
                if (ur.Ucionica.Oznaka == SelectedUcionica.Oznaka)
                {
                    for (int i = 0; i < 61; i++)
                    {
                        for (int j = 0; j < 7; j++)
                        {
                            if (ur.Rasporedi[i][j].Oznaka != "")
                            {
                                Termini[i][j].Add(ur.Rasporedi[i][j]);
                                if (Termini[i][j][0].Oznaka == "Pauza")
                                {
                                    ListView lv;
                                    //MessageBox.Show("lw0" + (c1 + i) + r1);
                                    if (i < 10)
                                    {
                                        lv = (ListView)this.FindName("lw0" + (i) + j);
                                    }
                                    else
                                    {
                                        lv = (ListView)this.FindName("lw" + i + j);
                                    }
                                    if (lv != null)
                                    {
                                        lv.Background = Brushes.PaleVioletRed;
                                    }
                                }
                                else
                                {
                                    ListView lv;
                                    //MessageBox.Show("lw0" + (c1 + i) + r1);
                                    if (i < 10)
                                    {
                                        lv = (ListView)this.FindName("lw0" + (i) + j);
                                    }
                                    else
                                    {
                                        lv = (ListView)this.FindName("lw" + i + j);
                                    }
                                    if (lv != null)
                                    {
                                        lv.Background = Brushes.Beige;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }