Esempio n. 1
0
        public EditBlock(BlockViewMode mode, ScheduleView view, PlanBlock block)
        {
            InitializeComponent();

            Mode = mode;
            View = view;
            Core = view.Core;
            Plans = view.Plans;
            Block = block;

            StartTime.Value = new DateTime(Core.TimeNow.Year, Core.TimeNow.Month, Core.TimeNow.Day);
            EndTime.Value   = StartTime.Value.AddDays(1);

            if (block == null)
                return;

            TitleBox.Text = block.Title;
            StartTime.Value = block.StartTime.ToLocalTime();
            EndTime.Value = block.EndTime.ToLocalTime();
            DescriptionInput.InputBox.Text = block.Description;
            SetScopeLink(block.Scope);

            if (mode != BlockViewMode.Show)
                return;

            TitleBox.ReadOnly = true;
            StartTime.Enabled = false;
            EndTime.Enabled = false;
            DescriptionInput.ReadOnly = true;
            ScopeLink.Enabled = false;
        }
Esempio n. 2
0
        public GoalsView(CoreUI ui, PlanService plans, ulong id, uint project)
        {
            InitializeComponent();

            UI    = ui;
            Core  = ui.Core;
            Plans = plans;
            Trust = Core.Trust;

            UserID    = id;
            ProjectID = project;

            GuiUtils.SetupToolstrip(toolStrip1, new OpusColorTable());

            GuiUtils.FixMonoDropDownOpening(SelectGoalButton, SelectGoal_DropDownOpening);

            splitContainer1.Panel2Collapsed = true;

            SetDetails(null, null);
        }
Esempio n. 3
0
        public void Init(GoalsView view)
        {
            View  = view;
            Core  = View.Core;
            Plans = view.Plans;
            Trust = Core.Trust;

            GoalTree.NodeExpanding += new EventHandler(GoalTree_NodeExpanding);
            GoalTree.NodeCollapsed += new EventHandler(GoalTree_NodeCollapsed);

            GoalTree.ControlPadding = 3;

            GoalTree.SmallImageList = new List <Image>();
            GoalTree.SmallImageList.Add(new Bitmap(16, 16));
            GoalTree.SmallImageList.Add(PlanRes.star);
            GoalTree.SmallImageList.Add(PlanRes.high_goal);
            GoalTree.SmallImageList.Add(PlanRes.low_goal);

            DelegateLink.Hide();
            AddItemLink.Hide();
        }
Esempio n. 4
0
        public ScheduleView(CoreUI ui, PlanService plans, ulong id, uint project)
        {
            InitializeComponent();

            UI = ui;
            Core = ui.Core;
            Plans = plans;
            Trust = Core.Trust;

            UserID = id;
            ProjectID = project;

            StartTime = Core.TimeNow;
            EndTime   = Core.TimeNow.AddMonths(3);

            GuiUtils.SetupToolstrip(TopStrip, new OpusColorTable());

            MainSplit.Panel2Collapsed = true;

            Core.KeepDataGui += new KeepDataHandler(Core_KeepData);

            PlanStructure.NodeExpanding += new EventHandler(PlanStructure_NodeExpanding);
            PlanStructure.NodeCollapsed += new EventHandler(PlanStructure_NodeCollapsed);

            // set last block so that setdetails shows correctly
            LastBlock = new PlanBlock();
            SetDetails(null);
        }
Esempio n. 5
0
        public void Init(GoalsView view)
        {
            View = view;
            Core = View.Core;
            Plans = view.Plans;
            Trust = Core.Trust;

            GoalTree.NodeExpanding += new EventHandler(GoalTree_NodeExpanding);
            GoalTree.NodeCollapsed += new EventHandler(GoalTree_NodeCollapsed);

            GoalTree.ControlPadding = 3;

            GoalTree.SmallImageList = new List<Image>();
            GoalTree.SmallImageList.Add(new Bitmap(16, 16));
            GoalTree.SmallImageList.Add(PlanRes.star);
            GoalTree.SmallImageList.Add(PlanRes.high_goal);
            GoalTree.SmallImageList.Add(PlanRes.low_goal);

            DelegateLink.Hide();
            AddItemLink.Hide();
        }
Esempio n. 6
0
 public PlanUI(CoreUI ui, OpService service)
 {
     UI   = ui;
     Core = ui.Core;
     Plan = service as PlanService;
 }