Esempio n. 1
0
        public NewTask(BoClass b)
        {
            InitializeComponent();
            bolayer                 = b;
            boupoad                 = new BOftp(b.entitylayer);
            fileGrid.Visibility     = Visibility.Hidden;
            membersgrid.Visibility  = Visibility.Hidden;
            memberRemove.Visibility = Visibility.Hidden;
            fileremove.Visibility   = Visibility.Hidden;
            List <string> memberlst = bolayer.getmemberslist();

            sendtocombobox.ItemsSource = memberlst;
        }
        public Task(BoClass b)
        {
            InitializeComponent();
            alltasks = new List <SingleTask>();
            bolayer  = b;
            ftp      = new BOftp(bolayer.entitylayer);

            if (bolayer.isadmin)
            {
                membercombo.Visibility = Visibility.Visible;
                membercombo.Items.Add("All Members");
                List <string> lst = bolayer.getmemberslist();
                for (int i = 0; i < lst.Count; i++)
                {
                    membercombo.Items.Add(lst[i]);
                }
                membercombo.SelectedIndex = 0;

                editdatebutton.Visibility = Visibility.Visible;
                editdesbutton.Visibility  = Visibility.Visible;
            }
            stutuscombo.Items.Add("All Tasks");
            stutuscombo.Items.Add("Pending Tasks");
            stutuscombo.Items.Add("Done Tasks");
            stutuscombo.SelectedIndex = 0;

            alltasks = bolayer.get_all_task_info();
            taskviewgrid.ItemsSource = alltasks;

            if (!bolayer.isadmin)
            {
                deleteButton.Visibility = Visibility.Hidden;
            }

            tasktimer          = new System.Windows.Threading.DispatcherTimer();
            tasktimer.Tick    += new EventHandler(task_timer_loop);
            tasktimer.Interval = new TimeSpan(0, 0, 1);
            tasktimer.Start();
        }