Exemple #1
0
        private void InitializeComponent()
        {
            m_ControlsFont = new Font(FontName, 8);

            this.SuspendLayout();
            //
            // HTMLContentControlCore
            //
            this.ClientSize   = new Size(603, 716);
            this.Name         = "HTMLContentControlCore";
            this.ResizeRedraw = true;
            this.Margin       = new System.Windows.Forms.Padding(0);
            this.Padding      = new System.Windows.Forms.Padding(0);
            this.Font         = m_ControlsFont;

            int bannerHeight = RhinoLicensing.CreateBanner(m_TypeID, this, m_Trans, 0 /*5*/);

            m_HtmlEditControl          = new TDLHtmlEditorControl(m_ControlsFont, m_Trans);
            m_HtmlEditControl.Name     = "m_HtmlEditControl";
            m_HtmlEditControl.Location = new Point(0, bannerHeight);
            m_HtmlEditControl.Size     = new Size(this.ClientSize.Width, this.ClientSize.Height - bannerHeight);

            m_HtmlEditControl.TextChanged     += new System.EventHandler(OnInputTextChanged);
            m_HtmlEditControl.LostFocus       += new System.EventHandler(OnInputTextLostFocus);
            m_HtmlEditControl.HtmlNavigation  += new MSDN.Html.Editor.HtmlNavigationEventHandler(OnNavigateLink);
            m_HtmlEditControl.NeedLinkTooltip += new NeedLinkTooltipEventHandler(OnNeedLinkTooltip);

            this.Controls.Add(this.m_HtmlEditControl);

            this.ResumeLayout(false);
            this.PerformLayout();
        }
        // 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 void SetUITheme(UITheme theme)
        {
            var color = theme.GetAppDrawingColor(UITheme.AppColor.AppLinesDark);

            // Make sure it's dark enough
            color = DrawingColor.SetLuminance(color, 0.6f);

            m_MindMap.ConnectionColor = color;

            RhinoLicensing.SetUITheme(this, theme);
        }
        public void SetUITheme(UITheme theme)
        {
            m_DayView.SetUITheme(theme);
            m_Toolbar.BackColor = theme.GetAppDrawingColor(UITheme.AppColor.AppBackLight);
            m_TBRenderer.SetUITheme(theme);
            m_SelectedTaskDatesLabel.ForeColor = theme.GetAppDrawingColor(UITheme.AppColor.AppText);
            m_WeekLabel.ForeColor = theme.GetAppDrawingColor(UITheme.AppColor.AppText);

            BackColor = theme.GetAppDrawingColor(UITheme.AppColor.AppBackLight);

            RhinoLicensing.SetUITheme(this, theme);
        }
        public void SetUITheme(UITheme theme)
        {
            this.BackColor  = theme.GetAppDrawingColor(UITheme.AppColor.AppBackLight);
            m_SplitterColor = theme.GetAppDrawingColor(UITheme.AppColor.AppBackDark);

            Color labelColor = theme.GetAppDrawingColor(UITheme.AppColor.AppText);

            m_AttributeLabel.ForeColor = labelColor;
            m_ColorsLabel.ForeColor    = labelColor;
            m_StylesLabel.ForeColor    = labelColor;

            RhinoLicensing.SetUITheme(this, theme);
        }
        private void InitializeComponentEx()
        {
            InitializeComponent();

            int bannerHeight = RhinoLicensing.CreateBanner(m_TypeId, this, m_Trans, 0 /*20*/);

            this.Height           = (this.Height + bannerHeight);
            this.Content.Location = new Point(0, bannerHeight);
            this.Content.Height   = (this.Content.Height - bannerHeight);

            var defFontName = m_Prefs.GetProfileString("Preferences", "HTMLFont", "Verdana");
            var defFontSize = m_Prefs.GetProfileInt("Preferences", "HtmlFontSize", 2);

            this.htmlReportHeaderControl.SetFont(defFontName, defFontSize);
            this.htmlReportTitleControl.SetFont(defFontName, defFontSize);
            this.htmlReportTasksControl.SetFont(defFontName, defFontSize);
            this.htmlReportFooterControl.SetFont(defFontName, defFontSize);

            if (!m_Template.Load(m_TemplateFilePath))
            {
#if DEBUG
                this.m_Template.Header.Text      = "Header";
                this.m_Template.Header.BackColor = Color.LightBlue;
                this.m_Template.Title.Text       = "Title";
                this.m_Template.Task.Text        = "$(Title)";
                this.m_Template.Footer.Text      = "Footer";
                this.m_Template.Footer.BackColor = Color.LightPink;
#endif
            }

            this.htmlReportHeaderControl.InnerHtml     = m_Template.Header.Text;
            this.htmlReportHeaderControl.BodyBackColor = m_Template.Header.BackColor;
            this.headerEnabled.Checked = m_Template.Header.Enabled;
            this.headerDivider.Checked = m_Template.Header.WantDivider;

            this.htmlReportTitleControl.InnerHtml = m_Template.Title.Text;
            this.titleEnabled.Checked             = m_Template.Title.Enabled;

            this.htmlReportTasksControl.InnerHtml = m_Template.Task.Text;
            // always enabled

            this.htmlReportFooterControl.InnerHtml     = m_Template.Footer.Text;
            this.htmlReportFooterControl.BodyBackColor = m_Template.Footer.BackColor;
            this.footerEnabled.Checked = m_Template.Footer.Enabled;
            this.footerDivider.Checked = m_Template.Footer.WantDivider;

            //          this.tabControl.SelectTab(headerPage);

            RefreshPreview();
        }
        // PRIVATE ------------------------------------------------------------------------------

        private void InitializeComponent()
        {
            this.BackColor = Color.White;
            m_Items        = new Dictionary <UInt32, CloudTaskItem>();

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

            CreateWordCloud();
            CreateTaskMatchesListView();
            CreateAttributeCombo();
            CreateColorSchemeCombo();
            CreateStyleCombo();

            Invalidate(true);
        }
        private void InitializeComponent()
        {
            m_ControlsFont = new Font(FontName, 8);
            m_PrefsDlg     = new DayViewPreferencesDlg(m_Trans, m_ControlsFont);
            m_WorkWeek     = new WorkingWeek();

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

            CreateMonthYearCombos();
            CreateToolbar();
            CreateWeekLabel();
            CreateSelectedTaskDatesLabel();

            // Day view always comes last
            CreateDayView();
        }
Exemple #9
0
        // -------------------------------------------------------------

        public WordCloudUIExtensionCore(IntPtr hwndParent, Translator trans)
        {
            m_HwndParent    = hwndParent;
            m_Trans         = trans;
            m_Attrib        = Task.Attribute.Title;
            m_ExcludedWords = new CommonWords(); // English by default

            m_ControlsFont = new Font(FontName, 8, FontStyle.Regular);

            m_Splitting       = false;
            m_InitialSplitPos = -1;
            m_SplitterColor   = Color.Gray;
            m_SplitterWidth   = DPIScaling.Scale(6);

            InitializeComponent();

            RhinoLicensing.LicenseType licType = RhinoLicensing.GetLicense("3BDEF4EA-7B02-41E1-BE65-3E03025E1FFE");
        }
Exemple #10
0
        protected override void OnLoad(EventArgs e)
        {
            int bannerHeight = RhinoLicensing.CreateBanner(m_TypeId, this, m_Trans, 0 /*20*/);

            this.Height           = (this.Height + bannerHeight);
            this.Content.Location = new Point(0, bannerHeight);
            this.Content.Height   = (this.Content.Height - bannerHeight);

            var defFontName = m_Prefs.GetProfileString("Preferences", "HTMLFont", "Verdana");
            var defFontSize = m_Prefs.GetProfileInt("Preferences", "HtmlFontSize", 2);

            this.htmlReportHeaderControl.SetBodyFont(defFontName, defFontSize);
            this.htmlReportTitleControl.SetBodyFont(defFontName, defFontSize);
            this.htmlReportTasksControl.SetBodyFont(defFontName, defFontSize);
            this.htmlReportFooterControl.SetBodyFont(defFontName, defFontSize);

            this.htmlReportHeaderControl.SetTranslator(m_Trans);
            this.htmlReportTitleControl.SetTranslator(m_Trans);
            this.htmlReportTasksControl.SetTranslator(m_Trans);
            this.htmlReportFooterControl.SetTranslator(m_Trans);

            this.tableHeaderRowCombobox.Initialise(m_Trans);

            this.tabControl.SelectedIndex = (int)PageType.Tasks;
            this.htmlReportTasksControl.SetActive();

            this.tabControl.SelectedIndexChanged      += new EventHandler(OnTabPageChange);
            this.browserPreview.DocumentCompleted     += new WebBrowserDocumentCompletedEventHandler(OnPreviewLoaded);
            this.headerEnabledCheckbox.CheckedChanged += new EventHandler(OnHeaderEnableChanged);
            this.titleEnabledCheckbox.CheckedChanged  += new EventHandler(OnTitleEnableChanged);
            this.footerEnabledCheckbox.CheckedChanged += new EventHandler(OnFooterEnableChanged);

            // IE version
            this.labelPreview.Text = String.Format("{0} (Internet Explorer {1})", m_Trans.Translate("Preview"), this.browserPreview.Version.Major);

            m_Trans.Translate(this);

            UpdateCaption();
            UpdateControls();

            InitialiseToolbar();

            m_ChangeTimer.Start();
        }
Exemple #11
0
        private void InitializeComponentEx()
        {
            InitializeComponent();

            int bannerHeight = RhinoLicensing.CreateBanner(m_TypeId, this, m_Trans, 0 /*20*/);

            this.Height           = (this.Height + bannerHeight);
            this.Content.Location = new Point(0, bannerHeight);
            this.Content.Height   = (this.Content.Height - bannerHeight);

            this.tdlHtmlReportHeaderControl.GotFocus     += new EventHandler(OnReportCtrlGotFocus);
            this.tdlHtmlReportTitleControl.GotFocus      += new EventHandler(OnReportCtrlGotFocus);
            this.tdlHtmlReportTaskFormatControl.GotFocus += new EventHandler(OnReportCtrlGotFocus);
            this.tdlHtmlReportFooterControl.GotFocus     += new EventHandler(OnReportCtrlGotFocus);

            this.tdlHtmlReportHeaderControl.ToolbarBackColor     = BackColor;
            this.tdlHtmlReportTitleControl.ToolbarBackColor      = BackColor;
            this.tdlHtmlReportFooterControl.ToolbarBackColor     = BackColor;
            this.tdlHtmlReportTaskFormatControl.ToolbarBackColor = BackColor;

            this.tdlHtmlReportTaskFormatControl.Focus();
        }
Exemple #12
0
        public void SetUITheme(UITheme theme)
        {
            m_HtmlEditControl.SetUITheme(theme);

            RhinoLicensing.SetUITheme(this, theme);
        }