コード例 #1
0
ファイル: Deco.cs プロジェクト: tandj1116/pandorasbox3
        /// <summary>
        /// Search!
        /// </summary>
        private void lnkFind_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
        {
            TheBox.Forms.SearchForm form = new TheBox.Forms.SearchForm(TheBox.Forms.SearchForm.SearchType.Deco);

            if (form.ShowDialog() == DialogResult.OK)
            {
                if (form.SearchForIDs && form.SearchID != -1)
                {
                    // Search for ID, this can have only one result
                    FindID(form.SearchID);
                }
                else
                {
                    if (form.SearchString != null)
                    {
                        SearchFor(form.SearchString);
                    }
                }
            }
        }
コード例 #2
0
ファイル: Items.cs プロジェクト: tandj1116/pandorasbox3
        /// <summary>
        /// Search for an item
        /// </summary>
        private void lnkFind_LinkClicked(object sender, EventArgs e)
        {
            TheBox.Forms.SearchForm form = new TheBox.Forms.SearchForm(TheBox.Forms.SearchForm.SearchType.Item);

            if (form.ShowDialog() == DialogResult.OK)
            {
                string text = form.SearchString.Replace(" ", "");

                m_Results = TheBox.Data.TreeSearch.Find(tCat, text);

                if (m_Results.Count == 0)
                {
                    MessageBox.Show(Pandora.Localization.TextProvider["Misc.NoResults"]);
                    m_Results = null;
                }
                else
                {
                    NextSearchResult();
                }
            }
        }
コード例 #3
0
ファイル: Deco.cs プロジェクト: aj9251/pandorasbox3
		/// <summary>
		/// Search!
		/// </summary>
		private void lnkFind_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
		{
			TheBox.Forms.SearchForm form = new TheBox.Forms.SearchForm( TheBox.Forms.SearchForm.SearchType.Deco );

			if ( form.ShowDialog() == DialogResult.OK )
			{
				if ( form.SearchForIDs && form.SearchID != -1 )
				{
					// Search for ID, this can have only one result
					FindID( form.SearchID );
				}
				else
				{
					if ( form.SearchString != null )
					{
						SearchFor( form.SearchString );
					}
				}
			}
		}
コード例 #4
0
ファイル: Items.cs プロジェクト: aj9251/pandorasbox3
		/// <summary>
		/// Search for an item
		/// </summary>
		private void lnkFind_LinkClicked(object sender, EventArgs e)
		{
			TheBox.Forms.SearchForm form = new TheBox.Forms.SearchForm( TheBox.Forms.SearchForm.SearchType.Item );

			if ( form.ShowDialog() == DialogResult.OK )
			{
				string text = form.SearchString.Replace( " ", "" );

				m_Results = TheBox.Data.TreeSearch.Find( tCat, text );

				if ( m_Results.Count == 0 )
				{
					MessageBox.Show( Pandora.Localization.TextProvider[ "Misc.NoResults" ] );
					m_Results = null;
				}
				else
				{
					NextSearchResult();
				}
			}
		}
コード例 #5
0
ファイル: Mobiles.cs プロジェクト: aj9251/pandorasbox3
		/// <summary>
		/// Search for mobile
		/// </summary>
		private void linkLabel1_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
		{
			TheBox.Forms.SearchForm sf = new TheBox.Forms.SearchForm( TheBox.Forms.SearchForm.SearchType.Mobile );

			if ( sf.ShowDialog() == DialogResult.OK )
			{
				string text = sf.SearchString.Replace( " ", "" );

				m_Results = TreeSearch.Find( tCat, sf.SearchString );

				if ( m_Results.Count == 0 )
				{
					MessageBox.Show( Pandora.Localization.TextProvider[ "Misc.NoResults" ] );
					m_Results = null;
				}
				else
				{
					NextSearchResult();
				}
			}		
		}