示例#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;
        }
示例#2
0
文件: GoalsView.cs 项目: nandub/DeOps
        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);
        }
示例#3
0
文件: GoalPanel.cs 项目: nandub/DeOps
        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();
        }
示例#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);
        }
示例#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();
        }
示例#6
0
文件: PlanUI.cs 项目: nandub/DeOps
 public PlanUI(CoreUI ui, OpService service)
 {
     UI   = ui;
     Core = ui.Core;
     Plan = service as PlanService;
 }