Ejemplo n.º 1
0
        private void ConfigureMainMenu()
        {
            var insertIndex = 0;
            var visible     = true;

            var configuration = BusinessObjects.Instance.RibbonTabPageManager.RibbonTabPageSettings.FirstOrDefault(item => item.Id == ContentIdentifiers.MainMenu);

            if (configuration != null)
            {
                MenuButtonMain.Text = configuration.Name;
                insertIndex         = configuration.Order;
                visible             = configuration.Visible;
            }
            if (visible)
            {
                Ribbon.Items.Insert(insertIndex, MenuButtonMain);
            }

            MenuSaveButton.Click           += ContentController.OnSaveSchedule;
            MenuSaveAsButton.Click         += ContentController.OnSaveAsSchedule;
            MenuOutputPdfButton.Click      += ContentController.OnOutputPdf;
            MenuEmailButton.Click          += ContentController.OnEmail;
            MenuSlideSettingsButton.Visible =
                MasterWizardManager.Instance.MasterWizards.Count > 1 ||
                (MasterWizardManager.Instance.MasterWizards.Count == 1 && SlideSettings.GetAvailableConfigurations().Count(MasterWizardManager.Instance.MasterWizards.First().Value.HasSlideConfiguration) > 1);
            MenuSlideSettingsButton.Click += OnSlideSettingsClick;
            MenuHelpButton.Click          += ContentController.OnGetHelp;
        }
Ejemplo n.º 2
0
        public void Init()
        {
            FormStateHelper.Init(this, Common.Core.Configuration.ResourceManager.Instance.AppSettingsFolder, "6ms", false).LoadState();

            Text = AppManager.Instance.FormCaption;

            var userName = Environment.UserName;

            ribbonBarHomeOverview.Text   = userName;
            buttonItemHomeOverview.Image = Resources.RibbonLogo;
            ribbonBarHomeOverview.RecalcLayout();
            ribbonPanelHome.PerformLayout();

            ribbonTabItemSlides.Text   = ribbonTabItemSlides.Text;
            buttonItemSlidesLogo.Image = Resources.RibbonLogo;
            ribbonBarSlidesLogo.RecalcLayout();
            ribbonPanelSlides.PerformLayout();

            buttonItemSlidesPowerPoint.Click += TabSlidesMainPage.Instance.buttonItemSlidesPowerPoint_Click;

            ribbonControl.SelectedRibbonTabItem = ribbonTabItemHome;
            ribbonControl_SelectedRibbonTabChanged(ribbonControl, EventArgs.Empty);
            ribbonControl.SelectedRibbonTabChanged += ribbonControl_SelectedRibbonTabChanged;

            buttonItemSlideSettings.Visible =
                MasterWizardManager.Instance.MasterWizards.Count > 1 ||
                (MasterWizardManager.Instance.MasterWizards.Count == 1 && SlideSettings.GetAvailableConfigurations().Count(MasterWizardManager.Instance.MasterWizards.First().Value.HasSlideConfiguration) > 1);
        }
Ejemplo n.º 3
0
        public void Init()
        {
            FormStateHelper.Init(this, ResourceManager.Instance.AppSettingsFolder, "add slides", false).LoadState();

            Text = AppManager.Instance.FormCaption;
            Icon = AppManager.Instance.ImageResourcesManager.MainAppIcon ?? Icon;

            ribbonTabItemSlides.Text  = AppManager.Instance.TextResourcesManager.RibbonTabTitle ?? ribbonTabItemSlides.Text;
            ribbonBarSlidesLogo.Text  = Environment.UserName;
            labelItemSlidesLogo.Image = AppManager.Instance.ImageResourcesManager.MainAppRibbonLogo ?? Resources.AddSlidesLogo;
            labelItemAppTitle.Text    = AppManager.Instance.TextResourcesManager.RibbonTabTitle ?? labelItemAppTitle.Text;
            itemContainerStatusBarMainInfo.RecalcSize();
            barBottom.RecalcLayout();

            buttonItemSlidesPowerPoint.Image =
                AppManager.Instance.ImageResourcesManager.RibbonOutputImage ?? buttonItemSlidesPowerPoint.Image;
            buttonItemSlidesPowerPoint.Click += TabSlidesMainPage.Instance.buttonItemSlidesPowerPoint_Click;

            buttonItemApplicationMenuSlideSettings.Image = AppManager.Instance.ImageResourcesManager.MainMenuSlideSettingsImage ??
                                                           buttonItemApplicationMenuSlideSettings.Image;
            buttonItemApplicationMenuHelp.Image = AppManager.Instance.ImageResourcesManager.MainMenuHelpImage ??
                                                  buttonItemApplicationMenuHelp.Image;
            buttonItemApplicationMenuExit.Image = AppManager.Instance.ImageResourcesManager.MainMenuExitImage ??
                                                  buttonItemApplicationMenuExit.Image;


            buttonItemQatFloater.Image = AppManager.Instance.ImageResourcesManager.QatFloaterImage ??
                                         buttonItemQatFloater.Image;
            buttonItemQatHelp.Image = AppManager.Instance.ImageResourcesManager.QatHelpImage ??
                                      buttonItemQatHelp.Image;

            buttonItemApplicationMenuSlideSettings.Visible =
                MasterWizardManager.Instance.MasterWizards.Count > 1 ||
                (MasterWizardManager.Instance.MasterWizards.Count == 1 && SlideSettings.GetAvailableConfigurations().Count(MasterWizardManager.Instance.MasterWizards.First().Value.HasSlideConfiguration) > 1);

            if (AppManager.Instance.FormStyleManager.Style.AccentColor.HasValue)
            {
                styleManager.MetroColorParameters = new MetroColorGeneratorParameters(
                    styleManager.MetroColorParameters.CanvasColor,
                    AppManager.Instance.FormStyleManager.Style.AccentColor.Value);
            }

            if (AppManager.Instance.FormStyleManager.Style.StatusBarTextColor.HasValue)
            {
                labelItemAppTitle.ForeColor  = AppManager.Instance.FormStyleManager.Style.StatusBarTextColor.Value;
                labelItemSlideSize.ForeColor = AppManager.Instance.FormStyleManager.Style.StatusBarTextColor.Value;
            }

            SlideSettingsManager.Instance.SettingsChanged += OnSlideSettingsChanged;
            OnSlideSettingsChanged(null, EventArgs.Empty);
        }
        private void FormEditSlideSettings_Load(object sender, System.EventArgs e)
        {
            buttonXSize43.Tag  = SlideSettings.ReadFromString("4x3");
            buttonXSize169.Tag = SlideSettings.ReadFromString("16x9");
            buttonXSize34.Tag  = SlideSettings.ReadFromString("3x4");

            var availableWizards = MasterWizardManager.Instance.MasterWizards.Values.Where(w => SlideSettings.GetAvailableConfigurations().Any(w.HasSlideConfiguration)).ToList();

            comboBoxEditSlideFormat.Properties.Items.AddRange(availableWizards);
            comboBoxEditSlideFormat.EditValue = availableWizards.FirstOrDefault(w => w.Name == SettingsManager.Instance.SelectedWizard);

            var buttons = GetSizeButtons().ToList();

            buttons.ForEach(b => b.Checked = false);
            buttons.First(b => ((SlideSettings)b.Tag).IsEqual(SlideSettingsManager.Instance.SlideSettings)).Checked = true;
        }