Exemplo n.º 1
0
 public RestService(string RestServiceEndpointUrl, Common.Callbacker Callbacker, Person User)
 {
     // TODO: Complete member initialization
     this.RestServiceEndpointUrl = RestServiceEndpointUrl;
     this.Callbacker = Callbacker;
     this.User = User;
     rRestClient = new RestClient(RestServiceEndpointUrl);
 }
Exemplo n.º 2
0
 public WebsocketService(string WebSocketServiceEndpointUrl, Callbacker Callbacker)
 {
     // TODO: Complete member initialization
     this.WebSocketServiceEndpointUrl = WebSocketServiceEndpointUrl;
     this.Callbacker = Callbacker;
 }
Exemplo n.º 3
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            dGridTasks.AutoGenerateColumns = false;
            dGridTasks.ItemsSource = TaskList;
            callbacker = new Callbacker(CallBack);
            Session = new Session(@"data source=Grind.db", "http://*****:*****@"ws://localhost:8080/", callbacker);
            ttfrmControl.SetSession(Session);
            userMaintenanceControl1.SetSession(Session);
            ChatsControl.SetSession(Session);

            //Controllers("http://*****:*****@"data source=J:\Root\Grind\GrindClient\Grind.Common\Grind.db");
            //Person x1 = new Person { created_at = DateTime.Now, updated_at = DateTime.Now, id = 3 };
            //Cache.AddObject<Person>(x1);
            //Person x2 = Cache.GetObject<Person>(3);
            Session.ReadPeople();
            if (Globals.People.Count == 0)
            {
                Globals.People.Add(new Person { id = 0, name = "DummyUser", level = eLevel.Master, trigram = "DummyUser" });
            }
            Session.Controllers.ReadTasks(ref TaskList);
            Session.User = new Person { active = false, id = -1, name = "OfflineUser", trigram = "0x0" };
            //cobExecutor.Items.AddRange(Globals.People.Select(x => x.name).ToArray());
            //cobReviewer.Items.AddRange(Globals.People.Select(x => x.name).ToArray());
            ttfrmControl.FillPeopleDropDown(Globals.People);
            dGridTasks.ItemsSource = TaskList;
            SetMode(ViewMode.Normal);
        }
Exemplo n.º 4
0
 public RestService(string RestServiceEndpointUrl, Callbacker Callbacker)
 {
     // TODO: Complete member initialization
     rRestClient = new RestClient(RestServiceEndpointUrl);
     this.Callbacker = Callbacker;
 }
Exemplo n.º 5
0
 public Session(string SqlConnectionString, string RestServiceEndpointUrl, string WebSocketServiceEndpointUrl, Callbacker Callbacker)
 {
     this.Callbacker = Callbacker;
     if (!Validate(SqlConnectionString, RestServiceEndpointUrl, WebSocketServiceEndpointUrl, Callbacker)) Environment.Exit(-1);
     Cache = new Cache(SqlConnectionString, Callbacker);
     RestService = new RestService(RestServiceEndpointUrl, Callbacker, User);
     WebsocketService = new WebsocketService(WebSocketServiceEndpointUrl, Callbacker);
     Controllers = new Controllers(Cache, RestService, WebsocketService, Callbacker);
 }