コード例 #1
0
 private void ClearWizardPageCollection(WizardPageCollection wizardPageCollection)
 {
     for (int i = wizardPageCollection.Count - 1; i >= 0; i--)
     {
         wizardPageCollection[i].Dispose();
     }
 }
コード例 #2
0
        public PointPositionVizardForm()
        {
            InitializeComponent();
            FinalStepText         = "执行";
            SelectFilePageControl = new Winform.SelectRinexFileWizardPage();

            SiteInfoSetingPage = new Winform.SiteInfoSetingPage();

            SelectPointPositionTypePage = new EnumRadioWizardPage();
            SelectPointPositionTypePage.Init <SingleSiteGnssSolverType>("选择定位模型");
            SelectPointPositionTypePage.SetCurrent <SingleSiteGnssSolverType>(SingleSiteGnssSolverType.无电离层组合PPP, (VersionType.Public != Setting.VersionType));

            SelectAdjustmentPage = new EnumRadioWizardPage();
            SelectAdjustmentPage.Init <AdjustmentType>("选择平差器");
            SelectAdjustmentPage.SetCurrent <AdjustmentType>(AdjustmentType.卡尔曼滤波);

            ProgressBarWizardPage = new Geo.Winform.Wizards.ProgressBarWizardPage();
            //ProgressBarWizardPage.InitDetect("执行进度", 1);

            var WizardPages = new WizardPageCollection();

            WizardPages.Add(1, SelectFilePageControl);
            WizardPages.Add(2, SiteInfoSetingPage);
            WizardPages.Add(3, SelectPointPositionTypePage);
            WizardPages.Add(4, SelectAdjustmentPage);
            WizardPages.Add(5, ProgressBarWizardPage);


            this.Init(WizardPages);
        }
コード例 #3
0
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            IWindowsFormsEditorService service = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));

            if (service == null)
            {
                return(value);
            }

            WizardPageCollection pages = (WizardPageCollection)value;
            ListBox box = new ListBox();

            box.Tag  = new object[] { context, provider, value };
            box.Dock = DockStyle.Fill;
            box.HorizontalScrollbar   = true;
            box.SelectedIndexChanged += new EventHandler(this.Box_SelectedIndexChanged);

            foreach (WizardPage page in pages)
            {
                box.Items.Add(page);
            }

            service.DropDownControl(box);
            return(value);
        }
コード例 #4
0
		/// <summary>
		/// Initializes a new instance of the <see cref="WizardControl"/> class.
		/// </summary>
		public WizardControl()
		{
			pageHistory = new Stack<WizardPage>();

			Pages = new WizardPageCollection(this);
			Pages.ItemAdded += Pages_AddItem;
			Pages.ItemDeleted += Pages_RemoveItem;
			Pages.Reset += Pages_Reset;

			InitializeComponent();
			backButton.CompatibleImageStrip = Properties.Resources.BackBtnStrip;

			if (!Application.RenderWithVisualStyles)
				titleBar.BackColor = System.Drawing.SystemColors.Control;
			titleBar.SetTheme(VisualStyleElementEx.AeroWizard.TitleBar.Active);
			header.SetTheme(VisualStyleElementEx.AeroWizard.HeaderArea.Normal);
			contentArea.SetTheme(VisualStyleElementEx.AeroWizard.ContentArea.Normal);
			commandArea.SetTheme(VisualStyleElementEx.AeroWizard.CommandArea.Normal);

			// Get localized defaults for button text
			ResetBackButtonToolTipText();
			ResetCancelButtonText();
			ResetFinishButtonText();
			ResetNextButtonText();
			ResetTitle();
			ResetTitleIcon();
		}
コード例 #5
0
        public MultiTableTextOpenVizardForm()
        {
            InitializeComponent();
            FinalStepText           = "执行";
            HeaderMarkersWizardPage = new StringWizardPage();
            HeaderMarkersWizardPage.Init("头部标记符号", "#", "按行输入分隔符,一行一个", true);


            StringWizardPage = new StringWizardPage();
            StringWizardPage.Init("分隔符号", ",\r\n\t\r\n;", "按行输入分隔符,一行一个", true);

            FileOpenWizardPage = new FileOpenWizardPage();
            FileOpenWizardPage.Init("打开文件", Setting.TextTableFileFilter);

            CheckboxWizardPage = new Geo.Winform.Wizards.CheckboxWizardPage();
            CheckboxWizardPage.Init <AioFileOpenType>("文件打开动作");

            //ProgressBarWizardPage.Init("执行进度", 1);
            int index       = 1;
            var WizardPages = new WizardPageCollection();

            WizardPages.Add(index++, HeaderMarkersWizardPage);
            WizardPages.Add(index++, StringWizardPage);
            WizardPages.Add(index++, FileOpenWizardPage);
            WizardPages.Add(index++, CheckboxWizardPage);


            this.Init(WizardPages);
        }
コード例 #6
0
        public BaselineSolverVizardForm()
        {
            InitializeComponent();
            FinalStepText = "执行";

            SiteInfoSetingPage       = new Winform.SiteInfoSetingPage();
            GroupRinexFileWizardPage = new Winform.GroupRinexFileWizardPage();

            SelectPointPositionTypePage = new EnumRadioWizardPage();
            SelectPointPositionTypePage.Init <TwoSiteSolverType>("选择定位模型");
            SelectPointPositionTypePage.SetCurrent <TwoSiteSolverType>(TwoSiteSolverType.单历元单频双差, (VersionType.Public != Setting.VersionType));

            SelectAdjustmentPage = new EnumRadioWizardPage();
            SelectAdjustmentPage.Init <AdjustmentType>("选择平差器");
            SelectAdjustmentPage.SetCurrent <AdjustmentType>(AdjustmentType.卡尔曼滤波);

            ProgressBarWizardPage = new Geo.Winform.Wizards.ProgressBarWizardPage();
            //ProgressBarWizardPage.InitDetect("执行进度", 1);

            var WizardPages = new WizardPageCollection();
            int i           = 1;

            WizardPages.Add(i++, GroupRinexFileWizardPage);
            WizardPages.Add(i++, SiteInfoSetingPage);
            WizardPages.Add(i++, SelectPointPositionTypePage);
            WizardPages.Add(i++, SelectAdjustmentPage);
            WizardPages.Add(i++, ProgressBarWizardPage);


            this.Init(WizardPages);
        }
コード例 #7
0
        protected internal override void OnAfterAdd(WizardPageCollection collection)
        {
            base.OnAfterAdd(collection);

            Wizard.PageChanged  += new EventHandler(WizardDialog_PageChangeEvent);
            Wizard.PageChanging += new EventHandler <WizardPageChangingEventArgs>(WizardDialog_PageChangingEvent);
        }
コード例 #8
0
ファイル: BaseWizardPage.cs プロジェクト: necora/ank_git
        protected internal override void OnAfterAdd(WizardPageCollection collection)
        {
            base.OnAfterAdd(collection);

            Wizard.PageChanged += new EventHandler(WizardDialog_PageChangeEvent);
            Wizard.PageChanging += new EventHandler<WizardPageChangingEventArgs>(WizardDialog_PageChangingEvent);
        }
コード例 #9
0
ファイル: Wizard.cs プロジェクト: NightmareX1337/lfs
        /// <summary>
        /// Creates a new instance.
        /// </summary>
        public Wizard()
        {
            pages = new WizardPageCollection(this);
            pages.CollectionChanged += HandlePagesCollectionChanged;

            Loaded += OnLoaded;

            UpdateEffectiveWizardStyle(WizardStyle.Auto);
        }
コード例 #10
0
        private void Box_SelectedIndexChanged(object sender, EventArgs e)
        {
            ListBox                    box      = (ListBox)sender;
            IServiceProvider           provider = (IServiceProvider)((object[])box.Tag)[1];
            WizardPageCollection       pages    = (WizardPageCollection)((object[])box.Tag)[2];
            IWindowsFormsEditorService service  = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));

            if (service == null)
            {
                return;
            }

            pages.Owner.CurrentPageIndex = box.SelectedIndex;
            service.CloseDropDown();
            box.Dispose();
        }
        /// <summary>Initializes a new instance of the <see cref="Control"/> class.</summary>
        public WizardPageContainer()
        {
            pageHistory = new Stack <WizardPage>();

            Pages              = new WizardPageCollection(this);
            Pages.ItemAdded   += Pages_AddItem;
            Pages.ItemDeleted += Pages_RemoveItem;
            Pages.Reset       += Pages_Reset;

            OnRightToLeftChanged(EventArgs.Empty);

            // Get localized defaults for button text
            ResetBackButtonText();
            ResetCancelButtonText();
            ResetFinishButtonText();
            ResetNextButtonText();
        }
コード例 #12
0
        public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
        {
            WizardPageCollection pages = (WizardPageCollection)value;

            if (pages.Count != 0)
            {
                if (pages.Count != 1)
                {
                    return(pages.Count + " pages");
                }
                else
                {
                    return("1 page");
                }
            }
            else
            {
                return("Empty");
            }
        }
コード例 #13
0
        /// <summary>
        /// 构造函数
        /// </summary>
        public TableTextOpenVizardForm()
        {
            InitializeComponent();
            FinalStepText    = "执行";
            StringWizardPage = new StringWizardPage();
            StringWizardPage.Init("分隔符号", ",\r\n\t\r\n;", "按行输入分隔符,一行一个", true);

            FileOpenWizardPage = new FileOpenWizardPage();
            FileOpenWizardPage.Init("打开文件", Setting.TextTableFileFilter);

            //ProgressBarWizardPage.Init("执行进度", 1);

            var WizardPages = new WizardPageCollection();

            WizardPages.Add(1, StringWizardPage);
            WizardPages.Add(2, FileOpenWizardPage);


            this.Init(WizardPages);
        }
コード例 #14
0
ファイル: WizardPage.cs プロジェクト: necora/ank_git
 protected internal virtual void OnBeforeRemove(WizardPageCollection collection)
 {
     _removing = true;
 }
コード例 #15
0
ファイル: WizardPage.cs プロジェクト: necora/ank_git
 protected internal virtual void OnBeforeAdd(WizardPageCollection collection)
 {
     if (!_removing && _collection != null)
         throw new InvalidOperationException("Can be part of only one wizard at once");
 }
コード例 #16
0
ファイル: WizardPage.cs プロジェクト: necora/ank_git
 protected internal virtual void OnAfterAdd(WizardPageCollection collection)
 {
     _collection = collection;
 }
コード例 #17
0
 /// <Summary>Constructs a custom WizardEventArgs object</Summary>
 /// <Param name="pageNo">The Page No where the Event happened</Param>
 /// <Param name="pages">The WizardPageCollection</Param>
 public WizardCancelEventArgs( int pageNo, WizardPageCollection pages ) : base( pageNo, pages )
 {
     this.m_Cancel = false;
     this.Cancel = false;
 }
コード例 #18
0
ファイル: WizardDesigner.cs プロジェクト: huamanhtuyen/VNACCS
        internal static void GotoPage(Wizard w, IComponentChangeService cc, ISelectionService ss)
        {
            if (w == null)
                return;

            WizardPageOrderDialog d = new WizardPageOrderDialog();
            d.SetWizard(w);
            d.StartPosition = FormStartPosition.CenterScreen;
            if (d.ShowDialog() == DialogResult.OK)
            {
                string pageName = d.SelectedPageName;
                
                if (d.OrderChanged)
                {
                    if (cc != null)
                        cc.OnComponentChanging(w, TypeDescriptor.GetProperties(w)["WizardPages"]);

                    string[] newOrder = d.OrderedPageNames;
                    w.WizardPages.IgnoreEvents = true;
                    try
                    {
                        WizardPageCollection col = new WizardPageCollection();
                        w.WizardPages.CopyTo(col);
                        w.WizardPages.Clear();
                        foreach (string pn in newOrder)
                            w.WizardPages.Add(col[pn]);
                    }
                    finally
                    {
                        w.WizardPages.IgnoreEvents = false;
                    }

                    if (cc != null)
                        cc.OnComponentChanged(w, TypeDescriptor.GetProperties(w)["WizardPages"], null, null);
                }

                if (pageName != "")
                    w.SelectedPage = w.WizardPages[pageName];
                else if (d.OrderChanged)
                    w.SelectedPageIndex = 0;

                if (ss != null && (pageName!="" || d.OrderChanged))
                    ss.SetSelectedComponents(new WizardPage[] { w.SelectedPage }, SelectionTypes.Replace);
            }
            d.Dispose();
        }
コード例 #19
0
        public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
        {
            WizardPageCollection pages = (WizardPageCollection)value;

            return(pages[pages.Owner.CurrentPageIndex].Name);
        }
コード例 #20
0
ファイル: WizardPage.cs プロジェクト: necora/ank_git
 protected internal virtual void OnAfterRemove(WizardPageCollection wizardPageCollection)
 {
     _removing = false;
     _collection = null;
 }
コード例 #21
0
 /// <Summary>Constructs a custom WizardEventArgs object</Summary>
 /// <Param name="pageNo">The Page No where the Event happened</Param>
 /// <Param name="pages">The WizardPageCollection</Param>
 public WizardCancelEventArgs(int pageNo, WizardPageCollection pages) : base(pageNo, pages)
 {
     this.m_Cancel = false;
     this.Cancel   = false;
 }