Ejemplo n.º 1
0
        // PRIVATE ------------------------------------------------------------------------------

        private void InitializeComponent()
        {
            m_TaskIcons    = new UIExtension.TaskIcon(m_HwndParent);
            m_ControlsFont = new Font(FontName, 8, FontStyle.Regular);

            m_MindMap        = new TdlMindMapControl(m_Trans, m_TaskIcons);
            m_MindMap.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom;
            m_MindMap.Font   = m_ControlsFont;

            if (VisualStyleRenderer.IsSupported)
            {
                m_MindMap.BorderStyle = BorderStyle.FixedSingle;
            }
            else
            {
                m_MindMap.BorderStyle = BorderStyle.Fixed3D;
            }

            m_MindMap.SelectionChange += new SelectionChangeEventHandler(OnMindMapSelectionChange);
            m_MindMap.DragDropChange  += new DragDropChangeEventHandler(OnMindMapDragDrop);
            m_MindMap.EditTaskLabel   += new EditTaskLabelEventHandler(OnMindMapEditTaskLabel);
            m_MindMap.EditTaskIcon    += new EditTaskIconEventHandler(OnMindMapEditTaskIcon);
            m_MindMap.EditTaskDone    += new EditTaskCompletionEventHandler(OnMindMapEditTaskCompletion);

            this.Controls.Add(m_MindMap);
        }
Ejemplo n.º 2
0
        // ------------------------------------------------------------------------

        public TDLRenderer(IntPtr hWnd, UIExtension.TaskIcon taskIcons)
        {
            // One time initialisation
            if (m_SelectionRect == null)
            {
                m_SelectionRect = new UIExtension.SelectionRect();

                if (VisualStyleRenderer.IsSupported)
                {
                    if (VisualStyleRenderer.IsElementDefined(VisualStyleElement.Header.Item.Normal))
                    {
                        m_HeaderNormal = new VisualStyleRenderer(VisualStyleElement.Header.Item.Normal);
                    }

                    if (VisualStyleRenderer.IsElementDefined(VisualStyleElement.Header.Item.Hot))
                    {
                        m_HeaderHot = new VisualStyleRenderer(VisualStyleElement.Header.Item.Hot);
                    }
                }
            }

            m_TaskIcons           = taskIcons;
            m_hWnd                = hWnd;
            m_ShowParentsAsFolder = false;
        }
        // PRIVATE ------------------------------------------------------------------------------

        private void InitializeComponent()
        {
            m_TaskIcons    = new UIExtension.TaskIcon(m_HwndParent);
            m_ControlsFont = new Font(FontName, 8, FontStyle.Regular);

            m_MindMap = new TdlMindMapControl(m_Trans, m_TaskIcons);

            int bannerHeight = RhinoLicensing.CreateBanner(m_TypeId, m_UiName, this, m_Trans, -1);

            m_MindMap.Location = new Point(0, bannerHeight);
            m_MindMap.Size     = new Size(this.ClientSize.Width, this.ClientSize.Height - bannerHeight);

            m_MindMap.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom;
            m_MindMap.Font   = m_ControlsFont;

            if (VisualStyleRenderer.IsSupported)
            {
                m_MindMap.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            }
            else
            {
                m_MindMap.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            }

            m_MindMap.SelectionChange += new SelectionChangeEventHandler(OnMindMapSelectionChange);
            m_MindMap.DragDropChange  += new DragDropChangeEventHandler(OnMindMapDragDrop);
            m_MindMap.EditTaskLabel   += new EditTaskLabelEventHandler(OnMindMapEditTaskLabel);
            m_MindMap.EditTaskIcon    += new EditTaskIconEventHandler(OnMindMapEditTaskIcon);
            m_MindMap.EditTaskDone    += new EditTaskCompletionEventHandler(OnMindMapEditTaskCompletion);

            this.Controls.Add(m_MindMap);
        }
        public TaskMatchesListView(IntPtr hwndParent)
        {
            m_SelectionRect = new UIExtension.SelectionRect();
            m_TaskIcons     = new UIExtension.TaskIcon(hwndParent);

            m_ilItemHeight           = new ImageList();
            m_ilItemHeight.ImageSize = new Size(1, DPIScaling.Scale(17)); // minimum height
        }
Ejemplo n.º 5
0
        public TaskMatchesListView(IntPtr hwndParent)
        {
            m_TaskIcons = new UIExtension.TaskIcon(hwndParent);

            m_ilItemHeight           = new ImageList();
            m_ilItemHeight.ImageSize = new Size(1, DPIScaling.Scale(17));             // minimum height

            m_LabelTip = new LabelTip(this);
        }
Ejemplo n.º 6
0
        // ------------------------------------------------------------------------

        public TDLRenderer(IntPtr hWnd, UIExtension.TaskIcon taskIcons)
        {
            m_TaskIcons = taskIcons;
            m_hWnd      = hWnd;

            ShowParentsAsFolder   = false;
            TaskColorIsBackground = false;
            StrikeThruDoneTasks   = true;
            GridlineColor         = Color.Gray;
        }
Ejemplo n.º 7
0
        // ----------------------------------------------------------------------------

        public MindMapUIExtensionCore(IntPtr hwndParent, Translator trans)
        {
            m_hwndParent = hwndParent;
            m_Trans      = trans;

            m_TaskIcons    = new UIExtension.TaskIcon(hwndParent);
            m_ControlsFont = new Font(FontName, 8, FontStyle.Regular);

            InitializeComponent();
        }
Ejemplo n.º 8
0
        // --------------------------------------------------------------------------------------

        public DayViewUIExtensionCore(IntPtr hwndParent, Translator trans, String helpID)
        {
            m_HwndParent = hwndParent;
            m_Trans      = trans;
            m_HelpID     = helpID;

            m_TaskIcons    = new UIExtension.TaskIcon(hwndParent);
            m_ControlsFont = new Font(FontName, 8);
            m_PrefsDlg     = new DayViewPreferencesDlg(trans, m_ControlsFont);

            InitializeComponent();
        }
Ejemplo n.º 9
0
        private void InitializeComponent()
        {
            m_TaskIcons    = new UIExtension.TaskIcon(m_HwndParent);
            m_ControlsFont = new Font(FontName, 8);
            m_PrefsDlg     = new DayViewPreferencesDlg(m_Trans, m_ControlsFont);

            // Day view always comes last
            CreateToolbar();
            CreateWeekLabel();
            CreateMonthYearCombos();
            CreateDayView();
        }
Ejemplo n.º 10
0
        // PRIVATE ------------------------------------------------------------------------------

        private void InitializeComponent()
        {
            m_TaskIcons    = new UIExtension.TaskIcon(m_HwndParent);
            m_ControlsFont = new Font(FontName, 8, FontStyle.Regular);

            m_MindMap        = new TdlMindMapControl(m_Trans, m_TaskIcons);
            m_MindMap.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom;
            m_MindMap.Font   = m_ControlsFont;

            if (VisualStyleRenderer.IsSupported)
            {
                m_MindMap.BorderStyle = BorderStyle.FixedSingle;
            }
            else
            {
                m_MindMap.BorderStyle = BorderStyle.Fixed3D;
            }

            m_MindMap.SelectionChange += new SelectionChangeEventHandler(OnMindMapSelectionChange);
            m_MindMap.DragDropChange  += new DragDropChangeEventHandler(OnMindMapDragDrop);
            m_MindMap.EditTaskLabel   += new EditTaskLabelEventHandler(OnMindMapEditTaskLabel);
            m_MindMap.EditTaskIcon    += new EditTaskIconEventHandler(OnMindMapEditTaskIcon);
            m_MindMap.EditTaskDone    += new EditTaskCompletionEventHandler(OnMindMapEditTaskCompletion);

            this.Controls.Add(m_MindMap);

            var comboLabel = new Label();

            comboLabel.Font     = m_ControlsFont;
            comboLabel.Text     = m_Trans.Translate("Alignment");
            comboLabel.AutoSize = true;
            comboLabel.Location = new Point(-2, 8);

            this.Controls.Add(comboLabel);

            m_AlignmentCombo               = new ComboBox();
            m_AlignmentCombo.Font          = m_ControlsFont;
            m_AlignmentCombo.Width         = 120;
            m_AlignmentCombo.Height        = 200;
            m_AlignmentCombo.Location      = new Point(comboLabel.Right + 10, 4);
            m_AlignmentCombo.DropDownStyle = ComboBoxStyle.DropDownList;

            m_AlignmentCombo.Items.Add(m_Trans.Translate("Centre"));
            m_AlignmentCombo.Items.Add(m_Trans.Translate("Left"));
            m_AlignmentCombo.Items.Add(m_Trans.Translate("Right"));

            m_AlignmentCombo.SelectedIndexChanged += new EventHandler(OnMindMapStyleChanged);

            this.Controls.Add(m_AlignmentCombo);
        }
Ejemplo n.º 11
0
        // PRIVATE ------------------------------------------------------------------------------

        private void InitializeComponent()
        {
            m_TaskIcons    = new UIExtension.TaskIcon(m_HwndParent);
            m_ControlsFont = new Font(FontName, 8, FontStyle.Regular);

            m_MindMap        = new TdlMindMapControl(m_Trans, m_TaskIcons);
            m_MindMap.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom;
            m_MindMap.Font   = m_ControlsFont;

            if (VisualStyleRenderer.IsSupported)
            {
                m_MindMap.BorderStyle = BorderStyle.FixedSingle;
            }
            else
            {
                m_MindMap.BorderStyle = BorderStyle.Fixed3D;
            }

            m_MindMap.SelectionChange += new SelectionChangeEventHandler(OnMindMapSelectionChange);
            m_MindMap.DragDropChange  += new DragDropChangeEventHandler(OnMindMapDragDrop);
            m_MindMap.EditTaskLabel   += new EditTaskLabelEventHandler(OnMindMapEditTaskLabel);
            m_MindMap.EditTaskIcon    += new EditTaskIconEventHandler(OnMindMapEditTaskIcon);
            m_MindMap.EditTaskDone    += new EditTaskCompletionEventHandler(OnMindMapEditTaskCompletion);

            this.Controls.Add(m_MindMap);

            // Alignment combo and label
            var alignLabel = CreateLabel("Alignment", null);

            this.Controls.Add(alignLabel);

            m_AlignmentCombo = new MindMapAlignmentComboBox(m_Trans);
            m_AlignmentCombo.DropDownClosed += new EventHandler(OnAlignmentComboClosed);

            InitialiseCombo(m_AlignmentCombo, alignLabel, 100);
            this.Controls.Add(m_AlignmentCombo);

            // Options combo and label
            var optionsLabel = CreateLabel("Options", m_AlignmentCombo);

            this.Controls.Add(optionsLabel);

            m_OptionsCombo = new MindMapOptionsComboBox(m_Trans);
            m_OptionsCombo.DropDownClosed += new EventHandler(OnOptionsComboClosed);
            m_OptionsCombo.DrawMode        = DrawMode.OwnerDrawFixed;

            InitialiseCombo(m_OptionsCombo as ComboBox, optionsLabel, 150);
            this.Controls.Add(m_OptionsCombo);
        }
Ejemplo n.º 12
0
        public Boolean FixupParentalStatus(int nodeCount, UIExtension.TaskIcon taskIcons)
        {
            bool wasParent = m_IsParent;

            if (nodeCount == 0)
            {
                m_IsParent = (!m_HasIcon && taskIcons.Get(m_TaskID));
            }
            else
            {
                m_IsParent = true;
            }

            return(m_IsParent != wasParent);
        }
Ejemplo n.º 13
0
        public TDLDayView(UIExtension.TaskIcon taskIcons, int minSlotHeight)
        {
            minHourLabelWidth      = DPIScaling.Scale(minHourLabelWidth);
            hourLabelIndent        = DPIScaling.Scale(hourLabelIndent);
            dayHeadersHeight       = DPIScaling.Scale(dayHeadersHeight);
            longAppointmentSpacing = DPIScaling.Scale(longAppointmentSpacing);
            dayGripWidth           = 1;   // to match app styling

            m_Renderer          = new TDLRenderer(Handle, taskIcons);
            m_Items             = new System.Collections.Generic.Dictionary <UInt32, CalendarItem>();
            m_UserMinSlotHeight = minSlotHeight;
            m_LabelTip          = new LabelTip(this);

            InitializeComponent();
        }
Ejemplo n.º 14
0
        public TDLDayView(UIExtension.TaskIcon taskIcons, int minSlotHeight)
        {
            hourLabelWidth         = DPIScaling.Scale(hourLabelWidth);
            hourLabelIndent        = DPIScaling.Scale(hourLabelIndent);
            dayHeadersHeight       = DPIScaling.Scale(dayHeadersHeight);
            appointmentGripWidth   = DPIScaling.Scale(appointmentGripWidth);
            headerBorder           = DPIScaling.Scale(headerBorder);
            longAppointmentSpacing = DPIScaling.Scale(longAppointmentSpacing);

            m_Renderer          = new TDLRenderer(Handle, taskIcons);
            m_Items             = new System.Collections.Generic.Dictionary <UInt32, CalendarItem>();
            m_UserMinSlotHeight = minSlotHeight;

            InitializeComponent();
            RefreshHScrollSize();
        }
Ejemplo n.º 15
0
        // -------------------------------------------------------------------------

        public TdlMindMapControl(Translator trans, UIExtension.TaskIcon icons)
        {
            m_Trans     = trans;
            m_TaskIcons = icons;

            m_Items = new Dictionary <UInt32, MindMapTaskItem>();

            m_TaskColorIsBkgnd         = false;
            m_IgnoreMouseClick         = false;
            m_ShowParentAsFolder       = false;
            m_ShowCompletionCheckboxes = true;
            m_StrikeThruDone           = true;

            m_EditTimer          = new Timer();
            m_EditTimer.Interval = 500;
            m_EditTimer.Tick    += new EventHandler(OnEditLabelTimer);

            using (Graphics graphics = Graphics.FromHwnd(Handle))
                m_CheckboxSize = CheckBoxRenderer.GetGlyphSize(graphics, CheckBoxState.UncheckedNormal);
        }