private void Disconnected(IAsyncResult async) { try { if (async != null) { Async.WaitFor(async); } //Properties["connected"] = ""; DispatchChangedProperties(); RealNode.CollapseNode(); if (async != null) { m_conn.EndClose(async); } } catch (Exception e) { Errors.Report(e); } m_connecting = false; OnDisconnect(); CallRefresh(); //ProcessRegister.RemoveBackgroundTask("s_disconnect"); }
protected override void OnConnect() { RealNode.ExpandNode(); if (m_conn.Settings.Tree().AutoExpandTables) { MainWindow.Instance.RunInMainWindow(RealNode.ChildByName("tables").ExpandNode); } }
//public override void DoRenameFile(string newfile) //{ // CloseConnection(); // base.DoRenameFile(newfile); //} //public override void DoDeleteFile() //{ // CloseConnection(); // base.DoDeleteFile(); //} private void CloseConnection() { if (!HConnection.CallRemoveByKey(m_conn.Connection.GetConnKey())) { throw new InternalError("DAE-00192 " + Texts.Get("s_connection_cannot_be_closed")); } Async.SafeClose(m_conn.Connection); RealNode.CollapseNode(); RealNode.ClearChilds(); }
//public override void GetScriptingNS(IDictionary<string, object> names, IPhysicalConnection dstConnection) //{ // names["db"] = new DatAdmin.Scripting.Database(m_conn); //} //public override void GetPopupMenu(MenuBuilder menu) //{ // base.GetPopupMenu(menu); // m_commands.GetPopupMenu(menu); //} public override void NotifyExpanded() { if (m_conn.Settings.Tree().AutoExpandTables) { try { MainWindow.Instance.RunInMainWindow(RealNode.ChildByName("tables").ExpandNode); } catch (Exception) { } } }
public override void NotifyExpanded() { if (m_conn.Settings != null && m_conn.Settings.Tree().AutoExpandTables) { IRealTreeNode child = RealNode.ChildByName("tables"); if (child != null) { MainWindow.Instance.RunInMainWindow(child.ExpandNode); } } }
protected override void OnConnect() { RealNode.ExpandNode(); bool expand; try { expand = m_conn.Connection.FindSettings(null).Tree().AutoExpandDatabases; } catch { expand = false; } if (expand) { MainWindow.Instance.RunInMainWindow(RealNode.ChildByName("databases").ExpandNode); } }
public void EditConnection() { if (m_stored != null) { var stored2 = m_stored.CloneUsingXml(); if (stored2.Edit()) { stored2.Save(); RealNode.KillNode(); TreeNodeExtension.CompleteRefresh(Parent); //m_conn = m_stored.Connect(m_filepath); //m_conn.HasOwner = true; } } }
public void GetMembers(DatabaseStructureMembers dbmem) { if (RealNode.NodeChecked) { dbmem.TableList = true; dbmem.TableMembers = TableStructureMembers.AllNoRefs; if (!RealNode.CheckedAllChildren()) { dbmem.TableFilter = new List <NameWithSchema>(); foreach (var child in RealNode.RealChildren) { if (child.NodeChecked) { dbmem.TableFilter.Add(((DbDefChooseTableTreeNode)child.LogicalNode).m_table.FullName); } } } } }
public void GetMembers(DatabaseStructureMembers dbmem) { if (RealNode.NodeChecked) { var mem = new SpecificObjectMembers(); dbmem.SpecificObjectOverride[m_repr.ObjectType] = mem; mem.ObjectDetail = true; mem.ObjectList = true; if (!RealNode.CheckedAllChildren()) { mem.ObjectFilter = new List <NameWithSchema>(); foreach (var child in RealNode.RealChildren) { if (child.NodeChecked) { mem.ObjectFilter.Add(((DbDefChooseSpecObjectTreeNode)child.LogicalNode).m_obj.ObjectName); } } } } }
void ReplaceNode(ITree parent, int index, object val, SimpleTypeEnum type) { CommonTree node = null; var token = new CommonToken(-1, val.ToString()); switch (type) { case SimpleTypeEnum.Bool: node = new BoolNode(token); break; case SimpleTypeEnum.Byte: node = new ByteNode(token); break; case SimpleTypeEnum.Char: node = new CharNode(token); break; case SimpleTypeEnum.Int: node = new IntegerNode(token); break; case SimpleTypeEnum.Float: node = new FloatNode(token); break; case SimpleTypeEnum.Double: node = new RealNode(token); break; default: throw new ArgumentOutOfRangeException("type", type, null); } parent.ReplaceChildren(index, index, node); }
private TypeInfo Visit(RealNode node, MethodBuilder builder, CodegenContext context) { builder.LoadDouble(node.Value); return(SimpleType.Double); }
public override object VisitReal(RealNode num) { return(num.Value); }
string VisitNum(RealNode num) { return(num.Value.ToString()); }
public string VisitReal(RealNode real) { throw new NotImplementedException(); }
public AddressNode VisitReal(RealNode real) { throw new System.NotImplementedException(); }
private TypeDescriptor Visit(RealNode node, Context context) { return(TypeDescriptor.Double); }
public void CmdRename() { RealNode.ShowRenameEditor(); }
public override string ToString() { return(IsRealized ? "!" + RealNode.ToString() : "Hop<" + _leftPipe.Source + "-" + _rightPipe.Sink + "@" + PredDelay + ">"); }
public override bool AllowExpand() { Async.SafeOpen(m_conn.Connection); RealNode.RefreshChilds(false); return(true); }
private ValInfo Visit(RealNode node) { return(new ValInfo(node.Value, SimpleTypeEnum.Double, true)); }
public virtual T VisitReal(RealNode real) { throw new NotImplementedException(); }
public DiffNode CompareWith(RealNode node) { return new DiffNode(node.DefaultAction, node.Raw); }
private byte GetByteValue(RealNode node) { var doubleValue = node.Value * Byte.MaxValue; return(Convert.ToByte(doubleValue)); }
public float GetChanceForNode(RealNode node) { return(chanceValues[this.childrenNodes.IndexOf(node)]); }