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);
        }
Example #2
0
        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();
        }
Example #4
0
        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();
        }
Example #5
0
 static void Init()
 {
     drvo = new ApplicationLogic.Tree();
     qpro = new ApplicationLogic.QueryProcessor(drvo, QueryDisambiguator, GetLine);
     auth = new ApplicationLogic.Authenticator();
 }
Example #6
0
 public void InitialSetup()
 {
     qp = new QueryProcessor(QueryDisambiguator, GetLine);
     drvo = Tree.GetInstance();
 }
Example #7
0
        private void OpenFromXML(string file)
        {
            resetEverything();
            tree = Tree.Load(file);

            RefreshTree();
        }
Example #8
0
 public void InitialSetup()
 {
     Drvo = new Tree();
 }
 public void InitialSetup()
 {
     drvo = new Tree();
     qp = new QueryProcessor(drvo, QueryDisambiguator, GetLine);
 }