示例#1
0
        private void add_proj_Click(object sender, RoutedEventArgs e)
        {
            //AddProj addProjWindow = new AddProj(filePath);
            //addProjWindow.Mas2 = Mas;

            //for (int i = 0; i < prjList.Count; i++)
            //    addProjWindow.prjSelect2.Items.Add(prjList[i]);

            //addProjWindow.prjSelect2.SelectedIndex = 0;
            //addProjWindow.filePath = filePath;
            //addProjWindow.Show();

            AddProj2 addPr = new AddProj2(filePath, Convert.ToString(prjSelect2.SelectedValue), prjHour.Text);
            addPr.SaveProj();

            prjHour.Text = "";

            WrapPanel WP = new WrapPanel();
            ProjInfo prInf = new ProjInfo(filePath);
            WP = prInf.prjInfo();
            grWP.Children.Add(WP);
        }
示例#2
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            //Создаем таймер для обновления времени и даты
            DispatcherTimer t = new DispatcherTimer();
            t.Tick += new EventHandler(timerTick);
            t.Interval = TimeSpan.FromMilliseconds(500);
            t.Start();

            getData = rwList.readData();

            iter = getData.prj.Count();

            for (int i = 0; i < 10; i++)
            {
                notes.Add(new Note()
                {
                    dateT = getData.dateT[i],
                    project = getData.prj[i],
                    description = getData.descr[i],
                    taskTime = getData.taskTime[i]
                });

            }

            DG1.ItemsSource = notes;

            DGPrj.ItemsSource = readPrList();

            dateSelect.SelectedDate = DateTime.Today;

            prjComboBox();

            WrapPanel WP = new WrapPanel();
            ProjInfo prInf = new ProjInfo(filePath);
            WP = prInf.prjInfo();
            grWP.Children.Add(WP);
            grWP.Height = WP.Height;
        }