Ejemplo n.º 1
0
 private void ToolBar_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
 {
     if (e.Button == ToolBarButtonExecutar)
     {
         if (ExecuteQuery != null)
         {
             ExecuteQuery(this);
         }
     }
     else if (e.Button == ToolBarButtonLimpar)
     {
         clearFields();
         if (ClearSearchResults != null)
         {
             ClearSearchResults(this);
         }
     }
     else if (e.Button == ToolBarButtonAjuda)
     {
         FormTextDisplayer          form           = new FormTextDisplayer();
         System.Reflection.Assembly gisaAssembly   = System.Reflection.Assembly.GetAssembly(typeof(MasterPanelPesquisa));
         System.IO.Stream           helpFileStream = null;
         helpFileStream = gisaAssembly.GetManifestResourceStream(gisaAssembly.GetName().Name + ".DocumentosAjuda.AjudaPesquisaUnidadesFisicas.rtf");
         if (helpFileStream != null)
         {
             form.rtbText.LoadFile(helpFileStream, RichTextBoxStreamType.RichText);
             helpFileStream.Close();
         }
         form.ShowDialog();
     }
 }
Ejemplo n.º 2
0
		private void ToolBar_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
		{
			if (e.Button == ToolBarButtonExecutar)
			{
				if (ExecuteQuery != null)
					ExecuteQuery(this);
			}
			else if (e.Button == ToolBarButtonLimpar)
			{
				clearFields();
				if (ClearSearchResults != null)
					ClearSearchResults(this);
			}
			else if (e.Button == ToolBarButtonAjuda)
			{
				FormTextDisplayer form = new FormTextDisplayer();
				System.Reflection.Assembly gisaAssembly = System.Reflection.Assembly.GetAssembly(typeof(MasterPanelPesquisa));
				System.IO.Stream helpFileStream = null;
                helpFileStream = gisaAssembly.GetManifestResourceStream(gisaAssembly.GetName().Name + ".DocumentosAjuda.AjudaPesquisaUnidadesFisicas.rtf");
				if (helpFileStream != null)
				{
					form.rtbText.LoadFile(helpFileStream, RichTextBoxStreamType.RichText);
					helpFileStream.Close();
				}
				form.ShowDialog();
			}
		}