Exemplo 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;
        }
Exemplo n.º 2
0
        public PlanNode( ScheduleView view, OpLink link, bool local)
        {
            View = view;
            Link = link;

            if (local)
                Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold);

            SubItems.Add(new BlockRow(this));

            UpdateName();
            UpdateBlock();
        }
Exemplo n.º 3
0
        void Goal_Schedule(object sender, EventArgs e)
        {
            GoalMenuItem item = sender as GoalMenuItem;

            if (item == null)
                return;

            if (View.External != null && View.UI.GuiMain.GetType() == typeof(MainForm))
                foreach (ExternalView ext in ((MainForm)View.UI.GuiMain).ExternalViews)
                    if (ext.Shell.GetType() == typeof(ScheduleView))
                        if (((ScheduleView)ext.Shell).UserID == View.UserID && ((ScheduleView)ext.Shell).ProjectID == View.ProjectID)
                        {
                            ext.BringToFront();
                            return;
                        }

            ScheduleView view = new ScheduleView(View.UI, Plans, View.UserID, View.ProjectID);
            view.LoadGoal = item.Goal.Ident;
            view.LoadGoalBranch = item.Goal.BranchUp;

            view.UI.ShowView(view, View.External != null);
        }
Exemplo n.º 4
0
        public BlockRow(PlanNode node)
        {
            InitializeComponent();

            Node = node;
            View = node.View;
            UserID = node.Link.UserID;

            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);

            BlackPen.DashStyle = DashStyle.Dot;
        }
Exemplo n.º 5
0
 public void Init(ScheduleView view)
 {
     Schedule = view;
 }