Ejemplo n.º 1
0
		public LoginDialog (SqlSharpGtk sqlSharpGtk) 
		{ 
			sqlSharp = sqlSharpGtk;
			
			grid = new DataGrid ();
			providerCombo = ComboBox.NewText ();

			PopulateProviders ();
			PopulateAppSettings ();
			
			CreateGui ();
			
			SetStatusBarText ("Ready.");
		}
Ejemplo n.º 2
0
		DataGrid CreateOutputResultsDataGrid () 
		{
			DataGrid grid = new DataGrid ();

			grid.View.ButtonPressEvent +=
				new Gtk.ButtonPressEventHandler (OnDataGridButtonPress);

			grid.View.ButtonReleaseEvent +=
				new Gtk.ButtonReleaseEventHandler (OnDataGridButtonRelease);

			return grid;
		}
Ejemplo n.º 3
0
		void OnDataGridButtonPress (object o, ButtonPressEventArgs args) 
		{
			EventButton but = args.Event;
			
			/* Right Mouse Button is 3 */
			if(but.Button == 3) {
				args.RetVal = true;

				// need to determine which grid was clicked
				if (currentEditorTab.grid != null)
					selectedGrid = currentEditorTab.grid;
				else if (currentEditorTab.gridResults != null) 
					selectedGrid = currentEditorTab.gridResults.FindGrid ((TreeView) o);
			}
		}
Ejemplo n.º 4
0
		void Dialog_Cancel (object o, EventArgs args) 
		{
			grid.Clear ();
			grid.DataSource = null;
			grid.DataMember = "";
			grid = null;

			dialog.Destroy ();
			dialog = null;
		}
Ejemplo n.º 5
0
		void Connect_Action (object o, EventArgs args) 
		{
			try {

				SetStatusBarText ("Connecting...");
				sqlSharp.OpenDataSource (providers[providerSelected], connection_entry.Text, selectedSetting);
				SetStatusBarText ("Connected.");
				
			} catch (Exception e) {
				string emsg = "Error: Unable to connect.  Reason: " + e;
				SetStatusBarText (emsg);
				sqlSharp.AppendText (emsg);
			}

			grid.Clear ();
			grid.DataSource = null;
			grid.DataMember = "";
			grid = null;

			dialog.Destroy ();
			dialog = null;
		}