예제 #1
0
        /// <summary>
        /// The main.
        /// </summary>
        /// <param name="args">
        /// The args.
        /// </param>
        private static void Main(string[] args)
        {
            /*   IHubProxy hub;
             * string hubConnectionUrl = @"http://*****:*****@"http://localhost:8080/";

            frontServiceClient.Connect(hubConnectionUrl);
            var xml = frontServiceClient.GetReport(reportName, startDate, endDate, departmentIdCollection);

            Console.WriteLine(xml);
            Console.ReadKey();
        }
예제 #2
0
        private void AppStartUp(object sender, StartupEventArgs args)
        {
            var mainWindow           = new MainWindow();
            var controlManager       = new ControlManager();
            var mainWindowController = new MainWindowController(mainWindow, controlManager, this);

            // var frontServiceClient = new FrontServiceClientStub();
            var remoteNotesClient  = new RemoteNotesClient(ConfigurationManager.AppSettings["uri"]);
            var frontServiceClient = new FrontServiceClient(remoteNotesClient);

            var viewModelFactory = new ViewModelFactory(mainWindowController, frontServiceClient);
            var controlFactory   = new ControlFactory(viewModelFactory);

            mainWindowController.RegisterControls(controlFactory);
            mainWindowController.LoadLogin();
        }
예제 #3
0
 private void AppStartUp(object sender, StartupEventArgs args)
 {
     try
     {
         IMainWindowController  mainWindowController  = new MainWindowController(this);
         IFrontServiceClient    frontServiceClient    = new FrontServiceClient();
         IValidationRuleFactory validationRuleFactory = new ValidationRuleFactory();
         IViewModelFactory      viewModelFactory      = new ViewModelFactory(validationRuleFactory, mainWindowController, frontServiceClient);
         IViewFactory           viewFactory           = new ViewFactory(viewModelFactory);
         mainWindowController.SetView(viewFactory);
         mainWindowController.LoadLogin();
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
예제 #4
0
        private string LoginUser(string username, string password)
        {
            FrontServiceClient service = new FrontServiceClient();

            Message message = service.ProcessMessage(new Message {
                operationName = "Login", tokenApp = this.tokenApp, username = username, password = password
            });

            if (message.tokenUser != "invalid")
            {
                return(message.tokenUser);
            }
            else
            {
                return("invalid");
            }
        }
예제 #5
0
        private void Start_Decipher_Button_Click(object sender, RoutedEventArgs e)
        {
            byte[][] arrayData = new byte[2][];

            //convertis les objets list en tableau de tableaux byte[] #Scotch
            arrayData[0] = ByteSerializer(fileNames);
            arrayData[1] = ByteSerializer(fileData);


            if (!processIsRunning)
            {
                FrontServiceClient service = new FrontServiceClient();
                Message            message = service.ProcessMessage(new Message {
                    operationName = "Decipher", tokenUser = this.token, tokenApp = this.tokenApp, data = arrayData
                });                                                                                                                                                      //, data = arrayData
                processIsRunning = true;
            }
            else
            {
                MessageBox.Show("Le processus est déjà en cours !", "Error", MessageBoxButton.OK, MessageBoxImage.Warning);
            }
        }