public QueryProcessor(Tree drvo, Func<List<Person>, Person> QD, Func<string> daj_liniju, TextWriter tw = null) { // dodajmo malo couplinga Drvo = drvo; QueryDisambiguator = QD; if (tw != null) // Da omogucimo ovo http://saezndaree.wordpress.com/2009/03/29/how-to-redirect-the-consoles-output-to-a-textbox-in-c/ System.Console.SetOut(tw); }
public static Tree GetInstance() { if (DrvoSingleton != null) return DrvoSingleton; DrvoSingleton = new Tree(); DrvoSingleton.osobe = new List<Person>(); DrvoSingleton.veze = new List<Connection>(); return DrvoSingleton; }
public QueryProcessor(Tree drvo, Func<List<Person>, Person> QD, Func<string> daj_liniju, TextWriter tw = null) { // dodajmo malo couplinga Drvo = drvo; QueryDisambiguator = QD; GetLine = daj_liniju; // preusmjeri System.Console.Out tamo gdje nam odgovara da mozemo koristiti System.Console.WriteLine if (tw != null) // Da omogucimo ovo http://saezndaree.wordpress.com/2009/03/29/how-to-redirect-the-consoles-output-to-a-textbox-in-c/ System.Console.SetOut(tw); Initialize_Commands(); }
public MainForm() { LoginForm loginForm = new LoginForm(); DialogResult result = loginForm.ShowDialog() ; if (SharedObjects.userManager.GetActiveUser()==null) { loginForm.Dispose(); this.Dispose(); Application.Exit(); Environment.Exit(0); return ; } InitializeComponent(); deselectPerson(); graf = splitC.Panel1; tree = Tree.GetInstance(); }
static void Init() { drvo = new ApplicationLogic.Tree(); qpro = new ApplicationLogic.QueryProcessor(drvo, QueryDisambiguator, GetLine); auth = new ApplicationLogic.Authenticator(); }
public void InitialSetup() { qp = new QueryProcessor(QueryDisambiguator, GetLine); drvo = Tree.GetInstance(); }
private void OpenFromXML(string file) { resetEverything(); tree = Tree.Load(file); RefreshTree(); }
public void InitialSetup() { Drvo = new Tree(); }
public void InitialSetup() { drvo = new Tree(); qp = new QueryProcessor(drvo, QueryDisambiguator, GetLine); }