public void EventPlug(PlugEvent e) { if (e != null) { PlugSender = e; PlugSender.evtHandler += new PlugEvent._evtHandler(EventProcess); } }
public AssemblyLoader(Form form, MenuStrip menuStrip, TabControl tabControl, TabControl tabControlLeft, PlugEvent plugEvent) { CurrentCulture = new CultureInfo(Config.GetInnerTextValue(Config.Load(), "/alf-solution/AppConfig/lang")); System.Threading.Thread.CurrentThread.CurrentUICulture = CurrentCulture; this.form = form; this.menuStrip = menuStrip; this.tabControl = tabControl; this.tabControlLeft = tabControlLeft; this.plugEvent = plugEvent; }
private void SessionConnectMenuItem_Click(object sender, EventArgs e) { FormConnection formConnection = new FormConnection(); //formConnection.MdiParent = this.ParentForm; if (formConnection.ShowDialog() == DialogResult.OK) { if (!string.IsNullOrEmpty(formConnection.textBoxOracleUserId.Text) && !string.IsNullOrEmpty(formConnection.textBoxOraclePassword.Text) && !string.IsNullOrEmpty(formConnection.TNSNamesComboBox.Text)) { //DataGridViewRow dgvr = formConnection.dataGridViewConnection.CurrentRow; Config.SaveLastConnectionInfo(formConnection.textBoxOracleUserId.Text, formConnection.textBoxOraclePassword.Text, formConnection.TNSNamesComboBox.Text); MainForm mainForm = new MainForm(); plugSender = mainForm.plugEvent; mainForm.MdiParent = ParentForm; mainForm.ParentForm = ParentForm; mainForm.Show(); SendConnectionInfo(formConnection.textBoxOracleUserId.Text, formConnection.textBoxOraclePassword.Text, formConnection.TNSNamesComboBox.Text); } } }
public void EventPlug(PlugEvent e) { //throw new Exception("The method or operation is not implemented."); }
/// <summary> /// Required implementation of the event interface. /// </summary> public void EventPlug(PlugEvent e) { plugSender = e; plugSender.evtHandler += new PlugEvent._evtHandler(EventProcess); }
public static void SendSelectedObject(DbObjectItem ObjItem, PlugEvent sender) { //Personnes personne = (Personnes)PersonListBox.SelectedItem; XmlDocument doc = new XmlDocument(); XmlNode docNode = doc.CreateXmlDeclaration("1.0", "UTF-8", null); doc.AppendChild(docNode); XmlNode rootNode = doc.CreateElement("ToadDotNet"); doc.AppendChild(rootNode); XmlNode actionNode = doc.CreateElement("action"); //string tagType = treeViewOracleSchema.SelectedNode.Tag.ToString().Replace(" ", ""); string tagType = ObjItem.Type.Replace(" ", ""); actionNode.InnerText = "get" + tagType.ToLower(); rootNode.AppendChild(actionNode); XmlNode DbObjectItemNode = doc.CreateElement(tagType); XmlAttribute DbObjectItemAttribute = doc.CreateAttribute("id"); DbObjectItemAttribute.Value = ObjItem.Name; //switch (tagType) //{ // case "packagebodys": // case "packagespecs": // productAttribute.Value = treeViewOracleSchema.SelectedNode.Parent.Text; // break; // case "packagebody": // case "packagespec": // productAttribute.Value = treeViewOracleSchema.SelectedNode.Parent.Parent.Text; // break; // default: // productAttribute.Value = treeViewOracleSchema.SelectedNode.Text; // break; //} DbObjectItemNode.Attributes.Append(DbObjectItemAttribute); actionNode.AppendChild(DbObjectItemNode); //Console.WriteLine(string.Format("tagtype = {0} - producAttribute = {1}", tagType, productAttribute.Value)); if (sender != null) sender.Send(doc.OuterXml); }
public static void SendConnectionInfo(Connexion.Connexion connexion, PlugEvent sender) { if (connexion.IsOpen && !String.IsNullOrEmpty(connexion.OracleConnexion.UserId) && !String.IsNullOrEmpty(connexion.OracleConnexion.Password) && !String.IsNullOrEmpty(connexion.OracleConnexion.DataSource)) { //Personnes personne = (Personnes)PersonListBox.SelectedItem; XmlDocument doc = new XmlDocument(); XmlNode docNode = doc.CreateXmlDeclaration("1.0", "UTF-8", null); doc.AppendChild(docNode); XmlNode rootNode = doc.CreateElement("ToadDotNet"); doc.AppendChild(rootNode); XmlNode actionNode = doc.CreateElement("action"); actionNode.InnerText = "connect"; //XmlAttribute actionAttr = doc.CreateAttribute("connection") rootNode.AppendChild(actionNode); XmlNode productNode = doc.CreateElement("connection"); XmlAttribute productAttribute = doc.CreateAttribute("userid"); productAttribute.Value = connexion.OracleConnexion.UserId; productNode.Attributes.Append(productAttribute); productAttribute = doc.CreateAttribute("password"); productAttribute.Value = connexion.OracleConnexion.Password; productNode.Attributes.Append(productAttribute); productAttribute = doc.CreateAttribute("datasource"); productAttribute.Value = connexion.OracleConnexion.DataSource; productNode.Attributes.Append(productAttribute); actionNode.AppendChild(productNode); if (sender != null) sender.Send(doc.OuterXml); } }
public void EventPlug(PlugEvent e) { //throw new NotImplementedException(); }
void ITabPageLeftAddOn.EventPlug(PlugEvent e) { plugSender = e; plugSender.evtHandler += new PlugEvent._evtHandler(EventProcess); //throw new Exception("The method or operation is not implemented."); }
void IFormAddOn.EventPlug(PlugEvent e) { //throw new Exception("The method or operation is not implemented."); }