Exemplo n.º 1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            if (typers == null) //first load
            {
                typers = new FileLibrary <Typer>("typers");
                typers.LoadLibrary();
                foreach (Typer typer in typers)
                {
                    lbTypers.Items.Add(typer);
                }

                hotKeyManager = new HotKeyManager(this, new WindowInteropHelper(this).Handle);

                foreach (Typer typer in lbTypers.Items)
                {
                    if (typer.IsActive)
                    {
                        typer.hotKeyId = hotKeyManager.RegisterFKey(typer.FKey);
                    }
                }

                if (ApplicationDeployment.IsNetworkDeployed)
                {
                    this.Title = this.Title + " " + ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString(4);
                }
            }
        }