Пример #1
0
                public BkgTemplatePreviewPanel(BackgroundPropertiesForm form, Point location, Size size)
                {
                    this.m_Form = form;
                    this.SuspendLayout();

                    this.Location = location;
                    this.Size     = size;

                    this.ResumeLayout();
                }
Пример #2
0
 public PropertiesCancelButton(BackgroundPropertiesForm parent, PresenterModel model, BackgroundTemplate template, Point location, int tabIndex)
 {
     this.m_Parent     = parent;
     this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
     this.FlatStyle    = FlatStyle.System;
     this.Font         = ViewerStateModel.StringFont;
     this.Location     = location;
     this.Name         = "propertiesCancelButton";
     this.TabIndex     = tabIndex;
     this.Text         = Strings.Cancel;
 }
Пример #3
0
                public BkgTemplateSelectionComboBox(BackgroundPropertiesForm form, Point location, Size size, int tabIndex)
                {
                    this.m_Form = form;

                    this.SuspendLayout();
                    this.Location  = location;
                    this.Size      = size;
                    this.TabIndex  = tabIndex;
                    this.FlatStyle = FlatStyle.System;

                    this.DropDownStyle = ComboBoxStyle.DropDownList;

                    this.Items.Clear();

                    int initialSelect = -1;

                    //Add the templates from xml file into the list
                    using (BackgroundTemplateXmlService service = new BackgroundTemplateXmlService(this.m_Form.m_Model.ViewerState))
                    {
                        ArrayList templates = new ArrayList();
                        service.GetTemplates(templates);
                        for (int i = 0; i < templates.Count; i++)
                        {
                            this.Items.Add(templates[i]);
                            if (this.m_Form.m_Template != null && this.m_Form.m_Template.Name != null && this.m_Form.m_Template.Name.Equals(((BackgroundTemplate)templates[i]).Name))
                            {
                                initialSelect = i;
                            }
                        }
                    }

                    //if the current deck/slide template is not in the xml file,
                    if (this.m_Form.m_Template != null && initialSelect == -1)
                    {
                        this.Items.Add(m_Form.m_Template.Clone());
                        initialSelect = this.Items.Count - 1;
                    }

                    //Add no background template selection
                    this.Items.Add(Strings.NoBackgroundTemplate);
                    if (this.m_Form.m_Template == null)
                    {
                        initialSelect = this.Items.Count - 1;
                    }

                    this.SelectedIndex = initialSelect;

                    this.ResumeLayout();
                }
Пример #4
0
            /// <summary>
            /// Construction
            /// </summary>
            /// <param name="template">BackgroundTemplate to show up</param>
            /// <param name="location">Location fo the Preview group</param>
            /// <param name="size">Size of the Group</param>
            /// <param name="tabIndex">tab index</param>
            public BkgTemplatePreviewGroup(BackgroundPropertiesForm form, Point location, Size size, int tabIndex)
            {
                this.SuspendLayout();

                this.FlatStyle = FlatStyle.System;
                this.Location  = location;
                this.Size      = size;
                this.TabIndex  = tabIndex;
                this.Name      = "BkgTemplatePreviewGroup";
                this.TabStop   = false;
                this.Text      = Strings.Preview;

                this.m_PreviewPanel = new BkgTemplatePreviewPanel(form, new Point(20, 20), new Size(240, 180));
                this.Controls.Add(this.m_PreviewPanel);

                this.ResumeLayout();
            }
Пример #5
0
            public BkgTemplateSelectionGroup(BackgroundPropertiesForm parent, BackgroundTemplate template, Point location, Size size, int tabIndex)
            {
                this.SuspendLayout();

                this.FlatStyle = FlatStyle.System;
                this.Location  = location;
                this.Size      = size;
                this.TabIndex  = tabIndex;
                this.Name      = "BkgTemplateSelectionGroup";
                this.TabStop   = false;
                this.Text      = Strings.BkgChooseTemplate;

                this.m_BkgTemplateSelectionComboBox = new BkgTemplateSelectionComboBox(parent, new Point(20, 20), new Size(180, 30), 0);
                this.Controls.Add(this.m_BkgTemplateSelectionComboBox);

                this.ResumeLayout();
            }
Пример #6
0
 protected override void OnClick(EventArgs e)
 {
     base.OnClick(e);
     BackgroundPropertiesForm bkgForm = new BackgroundPropertiesForm(this.m_Model);
     bkgForm.ApplyToCurrentSlideOnly = true;
     bkgForm.ShowDialog();
 }
            public PropertiesOKButton(BackgroundPropertiesForm parent, PresenterModel model, Point location, int tabIndex)
            {
                this.m_Model = model;
                this.m_Parent = parent;

                this.DialogResult = System.Windows.Forms.DialogResult.OK;
                this.FlatStyle = FlatStyle.System;
                this.Font = ViewerStateModel.StringFont;
                this.Location = location;
                this.Name = "propertiesOKButton";
                this.TabIndex = tabIndex;
                this.Text = Strings.OK;
            }
                public BkgTemplateSelectionComboBox(BackgroundPropertiesForm form, Point location, Size size, int tabIndex)
                {
                    this.m_Form = form;

                    this.SuspendLayout();
                    this.Location = location;
                    this.Size = size;
                    this.TabIndex = tabIndex;
                    this.FlatStyle = FlatStyle.System;

                    this.DropDownStyle = ComboBoxStyle.DropDownList;

                    this.Items.Clear();

                    int initialSelect=-1;

                    //Add the templates from xml file into the list
                    using (BackgroundTemplateXmlService service = new BackgroundTemplateXmlService(this.m_Form.m_Model.ViewerState))
                    {
                        ArrayList templates=new ArrayList ();
                        service.GetTemplates(templates);
                        for (int i = 0; i < templates.Count; i++)
                        {
                            this.Items.Add(templates[i]);
                            if (this.m_Form.m_Template != null && this.m_Form.m_Template.Name != null && this.m_Form.m_Template.Name.Equals(((BackgroundTemplate)templates[i]).Name))
                                initialSelect = i;
                        }
                    }

                    //if the current deck/slide template is not in the xml file,
                    if (this.m_Form.m_Template != null && initialSelect == -1)
                    {
                        this.Items.Add(m_Form.m_Template.Clone());
                        initialSelect = this.Items.Count - 1;
                    }

                    //Add no background template selection
                    this.Items.Add(Strings.NoBackgroundTemplate);
                    if (this.m_Form.m_Template == null)
                        initialSelect = this.Items.Count - 1;

                    this.SelectedIndex = initialSelect;

                    this.ResumeLayout();
                }
            public BkgTemplateSelectionGroup(BackgroundPropertiesForm parent, BackgroundTemplate template, Point location, Size size, int tabIndex)
            {
                this.SuspendLayout();

                this.FlatStyle = FlatStyle.System;
                this.Location = location;
                this.Size = size;
                this.TabIndex = tabIndex;
                this.Name = "BkgTemplateSelectionGroup";
                this.TabStop = false;
                this.Text = Strings.BkgChooseTemplate;

                this.m_BkgTemplateSelectionComboBox = new BkgTemplateSelectionComboBox(parent, new Point(20, 20), new Size(180, 30), 0);
                this.Controls.Add(this.m_BkgTemplateSelectionComboBox);

                this.ResumeLayout();
            }
                public BkgTemplatePreviewPanel(BackgroundPropertiesForm form, Point location, Size size)
                {
                    this.m_Form = form;
                    this.SuspendLayout();

                    this.Location = location;
                    this.Size = size;

                    this.ResumeLayout();
                }
            /// <summary>
            /// Construction
            /// </summary>
            /// <param name="template">BackgroundTemplate to show up</param>
            /// <param name="location">Location fo the Preview group</param>
            /// <param name="size">Size of the Group</param>
            /// <param name="tabIndex">tab index</param>
            public BkgTemplatePreviewGroup(BackgroundPropertiesForm form, Point location, Size size, int tabIndex)
            {
                this.SuspendLayout();

                this.FlatStyle = FlatStyle.System;
                this.Location = location;
                this.Size = size;
                this.TabIndex = tabIndex;
                this.Name = "BkgTemplatePreviewGroup";
                this.TabStop = false;
                this.Text = Strings.Preview;

                this.m_PreviewPanel = new BkgTemplatePreviewPanel(form, new Point(20, 20), new Size(240, 180));
                this.Controls.Add(this.m_PreviewPanel);

                this.ResumeLayout();
            }