Exemple #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MainWindow" /> class
        /// </summary>
        public MainWindow()
        {
            FileTraceWriter.LogMessage("App Started");

            InitializeComponent();
            ServicePointManager.DefaultConnectionLimit = 1000;

            // You can use the next line to insert your own subscription key, instead of using UI to set license key.
            this.ViewModel = new MainViewModel()
            {
                FaceIdentificationDescription = "Tell whom an input face belongs to given a tagged person database. Here we only handle tagged person database in following format: 1). One root folder. 2). Sub-folders are named as person's name. 3). Each person's images are put into their own sub-folder. Pick the root folder, then choose an image to identify, all faces will be shown on the image with the identified person's name.",
                SortMyPhotosDescription       = "Process your photo stores into a people searchable database.",
            };
            this.DataContext = this.ViewModel;
            this._scenariosControl.SampleScenarioList = new Scenario[]
            {
                new Scenario()
                {
                    PageClass = typeof(FaceIdentificationPage),
                    Title     = "Face Identification",
                },
                new Scenario()
                {
                    PageClass = typeof(SortMyPhotosPage),
                    Title     = "Sort My Photos",
                },
            };

            // Set the default endpoint when main windows is initiated.
            var mainWindow = GetWindow(this) as MainWindow;

            mainWindow?._scenariosControl.SetSubscriptionPageEndpoint(DefaultEndpoint);

            FileTraceWriter.LogMessage("Main Window constructed");
        }