示例#1
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="GotoReferenceDialog"/> class.
		/// </summary>
		/// <param name="reference">The initial reference to populate the control.</param>
		/// <param name="scr">The Scripture object.</param>
		/// <param name="helpProvider">The help provider.</param>
		/// ------------------------------------------------------------------------------------
		public GotoReferenceDialog(ScrReference reference, IScripture scr, IHelpTopicProvider helpProvider)
		{
			Logger.WriteEvent("Opening 'Goto Reference' dialog");

			m_scripture = scr;
			m_helpProvider = helpProvider;
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();
			scrPassageControl = new DbScrPassageControl(reference, m_scripture);
			scrPassageControl.Location = new System.Drawing.Point(16, 16);
			scrPassageControl.Name = "scrPassageControl";
			scrPassageControl.Size = new System.Drawing.Size(Width - 36, 24);
			Controls.Add(scrPassageControl);

			scrPassageControl.TabIndex = 0;
			btn_OK.TabIndex = 1;
			btn_cancel.TabIndex = 2;
			btn_help.TabIndex = 3;
		}
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Create a new <see cref="ScrPassageDropDown"/> object
		/// </summary>
		/// <param name="owner">The owner</param>
		/// <returns>A new object</returns>
		/// <remarks>Added this method to allow test class create it's own derived control
		/// </remarks>
		/// ------------------------------------------------------------------------------------
		protected override ScrPassageDropDown CreateScrPassageDropDown(ScrPassageControl owner)
		{
            return new DummyScrPassageDropDown(owner, m_versification);
		}
			/// --------------------------------------------------------------------------------
			/// <summary>
			/// Initializes a new object
			/// </summary>
			/// <param name="owner">The owner.</param>
			/// <param name="versification">The current versification to use when creating
			/// instances of BCVRef</param>
			/// --------------------------------------------------------------------------------
			public DummyScrPassageDropDown(ScrPassageControl owner, IScrVers versification) :
                base(owner, false, versification)
			{
			}