Register Desktop Bridge app and UWP app as Startup program

Future Of DotNet
https://youtube.com/FutureOfDotNet

UWP앱을 시작프로그램으로 등록/삭제하는 방법입니다.

Youtube : https://youtu.be/5cI6oS0HLOQ
Blog : https://kaki104.tistory.com/664
Git : https://github.com/kaki104/StartupSample

Reference

Desktop Bridge vs UWP

  • How
  • Namespace
  • EntryPoint
  • Enabled
  • Multiple startupTask
  • Diabled/Enabled

Constrained in UWP apps

  • The default is Disable
  • Show a user-prompt dialog for UWP apps
  • StartupTask includes a Disable method
  • If the user disables, then the prompt is not shown again
  • If the feature is disabled by local admin or group policy, then the user prompt is not shown, and startup cannot be enabled
  • Platforms other than Desktop that don’t support startup tasks also report DisabledByPolicy

Package.appxmanifest

<Application>
    <Extensions>
        <uap5:Extension Category="windows.startupTask“ Executable="StartupXXX.exe“ EntryPoint="StartupXXX.App">
            <uap5:StartupTask TaskId="StartupXXX“ Enabled="false“ DisplayName="StartupXXX“/>
        </uap5:Extension>
    </Extensions>
</Application>

MainPage.xaml.cs

var startupTask = await StartupTask.GetAsync("StartupXXX");
StartupTaskState newState = await startupTask.RequestEnableAsync();

App.xaml.cs

protected override void OnActivated(IActivatedEventArgs args)

var staea = args as StartupTaskActivatedEventArgs;
rootFrame.Navigate(typeof(MainPage), staea.TaskId);
Window.Current.Activate();

Register startup program.pdf
190.9 kB

블로그 이미지

kaki104

This blog covers the latest technologies in Microsoft .Net. In 2020, I will be talking about Uno Platform frequently. http://youtube.com/FutureOfDotNet https://twitter.com/kaki104

댓글을 달아 주세요

WebView2 Control Preview 버전이 얼마전에 공개되었습니다.

Introduction to Microsoft Edge WebView2 (Preview)

  • https://bit.ly/3alYpOW
  • 응용 프로그램에 웹 기술(HTML, CSS 및 JavaScript)을 포함 할 수 있음
    Microsoft Edge (Chromium)을 렌더링 엔진으로 사용 – 호환성 향상
  • Preview 버전이므로, 프로덕션 앱에 이 버전을 사용 금지

Supported platforms

  • Environments
    • Win32 C/C++
    • .NET Framework 4.6.2 or later
    • .NET Core 3.0 or later
    • WinUI 3.0
  • Windows
    • Windows 10
    • Windows 8.1
    • Windows 8
    • Windows 7
    • Windows Server 2016, 2012, 2012 R2, 2008 R2

Getting started with WebView2 in WPF (Preview)

  • https://bit.ly/31O9wMM
  • Prerequisites
    • Microsoft Edge (Chromium) Canary channel installed on Windows 10, Windows 8.1 or Windows 7
    • Visual Studio 2017 or later
  • 오류 해결

WebView2 nuget package

  • Important
    • Ensure you check Include prerelease, select a prerelease package in Version, and then choose Install.
  • 8/17/2020
    • Microsoft.Web.WebView2 version 0.9.579-prerelease
      • Minimum Microsoft Edge version 86.0.579.0
    • Canary Microsoft Edge version 86.0.608.0
      • How to check the version
        • … → Help and feedback → About Microsoft Edge

Youtube :

Microsoft Edge(Chromium) WebView Control.pdf
0.34MB

블로그 이미지

kaki104

This blog covers the latest technologies in Microsoft .Net. In 2020, I will be talking about Uno Platform frequently. http://youtube.com/FutureOfDotNet https://twitter.com/kaki104

댓글을 달아 주세요

Face Detection API

. Real-time face recognition with Microsoft Cognitive Services
. Google

  • Vision API
    • Facial Detection
      • Free : First 1000 units/month
      • $1.5 for 1000 unit : 1001 – 5,000,000 / month
        . Microsoft Azure
  • Face API
    • Face Detection ~ Face Identification
      • Free : 20 transactions for minute
      • $1.0 for 1000 transactions : 0 – 1M transactions
        . OpenCV
        . Dlib C++ Library

OpenCV

. 오픈 소스 컴퓨터 비전 라이브러리 중 하나로 크로스플랫폼과 실시간 이미지 프로세싱에 중점을 둔 라이브러리.
. Windows, Linux, OS X(macOS), iOS, Android 등 다양한 플랫폼을 지원
. OpenCvSharp

  • C# : OpenCvSharp4 nuget package
  • UWP : OpenCvSharp4.runtime.uwp nuget package
  • haarcascade_frontalface_alt.xml

OpenCVSharp

. Mat class

  • Matrix의 약자로 행렬을 표현하기 위한 데이터 형식
    . Haar Cascade
  • 이미지 또는 비디오에서 객체를 식별하는데 사용되는 기계 학습 객체 감지 알고리즘
  • haarcascade_frontalface_alt.xml : 얼굴 전면 식별
  • DetectMultiScale
    • 입력된 이미지에서 크기가 다른 물체를 감지합니다. 감지 된 객체는 사각형 목록으로 반환

Dlib C++ Library

  • 기계 학습 알고리즘 및 도구를 포함하는 C++ 툴킷으로 로봇 공학, 임베디드 장치, 휴대 전화 및 대형 컴퓨팅 환경을 포함한 광범위한 산업 영역 및 학계에서 사용

  • DlibDotNet

    • DlibDotNet for UWP nuget package
  • Dlib Models

    • shape_predictor_5_face_landmarks.dat
      • 눈의 모서리와 코의 바닥을 식별하는 5포인트 랜드 마크 모델
    • shape_predictor_68_face_landmarks.dat
      • 얼굴 전체를 감싸는 68개의 포인트 랜드 마크 모델
      • 상업적 사용을 위해서는 담당자와 별도의 협의를 진행해야 함

Part1

https://youtu.be/wxIFGmG6JCo

Part2

https://youtu.be/QQimCeWIdps

PDF

Face detecting in UWP app.pdf
226.6 kB

Github

https://github.com/kaki104/FaceDetectionSample

블로그 이미지

kaki104

This blog covers the latest technologies in Microsoft .Net. In 2020, I will be talking about Uno Platform frequently. http://youtube.com/FutureOfDotNet https://twitter.com/kaki104

댓글을 달아 주세요

  • UWP이 로컬 파일 시스템을 직접 접근해서 파일이나 폴더의 정보를 가지고 오는 방법에 대한 설명입니다.

  • This is how UWP directly accesses the local file system and fetches information from files or folders.

  • BroadFileSystemAccess

    • All Files that the user has access to
    • Settings } Privacy | File system | Allow access UWP app
    • Version 1803 - default is On
    • Version 1809 - default is Off
    • This capability is not supported on Xbox
  • Key Point

    • Package.appxmanifest } Mouse Right Click } Open With… } XML (Text) Editor
    • Add rescap namespace
    • Add rescap:Capability to th Capabilities section
      • {rescap:Capability Name="broadFileSystemAccess" /}
    • Code
      • var folder = await StorageFolder.GetFolderFromPathAsync(path);
      • try-catch(UnauthorizedAccessException)
  • Completed sample app

  - youtu.be/TJ5wDDgty6A

 

'Windows App(Universal App) > Beginner' 카테고리의 다른 글

Microsoft Edge(Chromium) WebView2 Control  (0) 2020.08.17
Face detecting in UWP app  (0) 2020.08.06
Create a UWP app with File System Access  (0) 2020.07.24
Install and update UWP apps from the Web  (0) 2020.04.25
LINQ - Join Operations - part5/5  (0) 2020.04.15
LINQ part 4  (0) 2020.02.11
블로그 이미지

kaki104

This blog covers the latest technologies in Microsoft .Net. In 2020, I will be talking about Uno Platform frequently. http://youtube.com/FutureOfDotNet https://twitter.com/kaki104

댓글을 달아 주세요

How to deploy UWP apps
- Microsoft Store
- App Installer
  . After Windows 10 version 1803
  . Can be installed Local, Shared Folder, or on the Web

For developers
- Settings -> Update & Security -> For developers -> Sideload apps
- Sideload apps must be selected in order to install apps outside of the Microsoft Store.

Install Windows 10 apps with App Installer

Create an App Installer file with Visual Studio
- Doc
  . Windows 10 version 1803 or higher
  . Visual Studio 2017 version 15.7 or higher
  . Create sideload apps that can be automatically updated using .appinstaller files
  . UWP TargetPlatformMinVersion version 1803 or higher
- Work
  . Windows 10 version 1909
  . Visual Studio 2019 version 16.5.4

Demo
- Create UWP app

Package
- UWP app project -> Right-click -> Publish -> Create App Packages…
- Click the Create button to create a test certificate
- Enter additional simple information
- Enter additional simple information

Select and configure packages
- Choose the platform you want to support
- For release of the full version, please select a Release

Configure update settings
- Installer location
  . Enter the location to copy the installation files
  . You can enter the web path, shared folder path, and local folder path.
  . Copy the completed distribution package to the folder you just entered.
  Ex) Web https://hellobotstorage.z12.web.core.windows.net/apps
  Ex) Local c:\install
  Ex) Shared Folder \\kakiserver\home\apps

Finished creating package
- Output location
  . This is where the package was created.
  . Click the link to open the folder with File Explorer.
  . Copy files to the installer location

Install apps from web
- I use Static Web in Azure
https://hellobotstorage.z12.web.core.windows.net/apps

Installation failed
- Either you need a new certificate installed for this app package…
- If you buy a signed certificate and use it, this is not necessary.
- Certificate Sales Site I Know

Install Certificate
- Additional Links -> Publisher Certificate
- Install Certificate… -> Local Machine -> Place all certificates in the following store -> Trusted Root Certification Authorities -> OK
- Next -> Finish

Update app on the web
- Create an updated version and copy it to the installation location
- Run the installed apps (check for update version existence)
- App exit
- Re-run the app(update progress)

 

https://youtu.be/uedWhxNSs3Y

 

'Windows App(Universal App) > Beginner' 카테고리의 다른 글

Face detecting in UWP app  (0) 2020.08.06
Create a UWP app with File System Access  (0) 2020.07.24
Install and update UWP apps from the Web  (0) 2020.04.25
LINQ - Join Operations - part5/5  (0) 2020.04.15
LINQ part 4  (0) 2020.02.11
LINQ part 3  (0) 2020.02.04
블로그 이미지

kaki104

This blog covers the latest technologies in Microsoft .Net. In 2020, I will be talking about Uno Platform frequently. http://youtube.com/FutureOfDotNet https://twitter.com/kaki104

댓글을 달아 주세요

https://youtu.be/bA3oTTVseiE

LINQ 마지막 강의 입니다.

고생하셨습니다~

 

1. Conversion operators
- LINQ Result =} IEnumerable{T}
- ToArray()
  var doublesArray = sortedDoubles.ToArray();
- * ToList()
  var wordList = sortedWords.ToList();
- ToDictionary()
   var scoreRecordsDict = scoreRecords.ToDictionary(sr =} sr.Name);
- * OfType{T}()
  var doubles = numbers.OfType{double}();


2. Element operators
- First()
  (from p in products where p.ProductID == 12 select p) .First();
  .Single() ?
- * FirstOrDefault()
  int firstNumOrDefault = numbers.FirstOrDefault();
  .SingleOrDefault() ?
- Last()
- LastOrDefault()
- ElementAt()
  (from n in numbers where n } 5 select n).ElementAt(1);


3. Generators operators
- Range()
  From n in Enumerable.Range(100, 50) select (Number: n, OddEven: n % 2 == 1 ? "odd" : "even");
- Repeat()
  var numbers = Enumerable.Repeat(7, 10);


4. Quantifiers
- * Any()
  bool iAfterE = words.Any(w =} w.Contains("ei"));
- All()
  bool onlyOdd = numbers.All(n =} n % 2 == 1);


5. Aggregate Operators
- * Count()
  int uniqueFactors = factorsOf300.Distinct().Count();
- Sum()
  double numSum = numbers.Sum();
- Min()
  int minNum = numbers.Min();
- Max()
  int maxNum = numbers.Max();
- Average()
  double averageNum = numbers.Average();
- Aggregate()
  double endBalance = attemptedWithdrawals.Aggregate(startBalance, (balance, nextWithdrawal) =} ((nextWithdrawal {= balance) ? (balance - nextWithdrawal) : balance));


6. Sequence Operations
- Concat – 지연 실행 
  Var allNumbers = numbersA.Concat(numbersB);
  Union과 비슷하나 중복 제거를 안함
- Zip – 지연 실행
  Int dotProduct = vectorA.Zip(vectorB, (a, b) =} a * b).Sum();
  각 시퀀스에 인덱스를 이용해서 병합
- SequenceEqual
  bool match = wordsA.SequenceEqual(wordsB);


7. Query Execution
- Deferred Execution 지연 실행
  var q = from n in numbers select ++i;
  Foreach (var v in q) { Console.WriteLine($”v={v}, i={i}”); }
- Forcing Immediate Execution 바로 실행
  var q = (from n in numbers select ++i).ToList();
  Foreach (var v in q) { Console.WriteLine($”v={v}, i={i}”); }
- Reuse Query
  var lowNumbers = from n in numbers where n {= 3 select n;


8. Join Operations
- Cross Join
  from c in categories join p in products on c equals p.Category select (Category: c, p.ProductName);
- Group Join
  from c in categories join p in products on c equals p.Category into ps select (Category: c, Products: ps);
- Cross Group Join
  from c in categories join p in products on c equals p.Category into ps from p in ps select (Category: c, p.ProductName);
- Left Outer Join
  from c in categories join p in products on c equals p.Category into ps from p in ps.DefaultIfEmpty() select (Category: c, ProductName: p == null ? "(No products)" : p.ProductName);
- Right Outer Join? 다중키인 경우?
- 메뉴 항목 추가/삭제 화면에 등록 메뉴와 미등록 메뉴를 분리해서 보여주는 경우 사용

 

            var allMenus = CMenus.CMenuList;
            var regMenus = new List 
                {
                    new CMenu{ MenuId = 1, ParentId = 0, DisplayName = "Menu1"},
                    new CMenu{ MenuId = 3, ParentId = 0, DisplayName = "Menu3"},
                    new CMenu{ MenuId = 5, ParentId = 0, DisplayName = "Menu5"},
                    new CMenu{ MenuId = 12, ParentId = 1, DisplayName = "Menu12"},
                    new CMenu{ MenuId = 14, ParentId = 1, DisplayName = "Menu14"},
                };
            var unregMenus = from aMenu in allMenus
                             join rMenu in regMenus
                             on aMenu.MenuId equals rMenu.MenuId into joiner
                             from j in joiner.DefaultIfEmpty()
                             where j == null
                             select aMenu;

            foreach (var menu in unregMenus)
            {
                Console.WriteLine($"{menu.MenuId}, {menu.ParentId}, {menu.DisplayName}");
            }

 

 

'Windows App(Universal App) > Beginner' 카테고리의 다른 글

Create a UWP app with File System Access  (0) 2020.07.24
Install and update UWP apps from the Web  (0) 2020.04.25
LINQ - Join Operations - part5/5  (0) 2020.04.15
LINQ part 4  (0) 2020.02.11
LINQ part 3  (0) 2020.02.04
LINQ part2  (0) 2020.01.31
블로그 이미지

kaki104

This blog covers the latest technologies in Microsoft .Net. In 2020, I will be talking about Uno Platform frequently. http://youtube.com/FutureOfDotNet https://twitter.com/kaki104

Tag join, LINQ, linq101

댓글을 달아 주세요

* Groupings
- group
  - group n by n % 5 into g

* Set operation
- Distinct 중복제거
  - var uniqueFactors = factorsOf300.Distinct();
- Union 중복제거 결합
  - var uniqueNumbers = numbersA.Union(numbersB);
- Intersect 교집합
  - var commonNumbers = numbersA.Intersect(numbersB);
- Except 제외
  - IEnumerable aOnlyNumbers = numbersA.Except(numbersB);     

 

https://youtu.be/WR8p4bKuqyI

 

- 메뉴 모델과 데이터

CMenu.cs
0.00MB
LINQ part4.pdf
0.27MB

'Windows App(Universal App) > Beginner' 카테고리의 다른 글

Install and update UWP apps from the Web  (0) 2020.04.25
LINQ - Join Operations - part5/5  (0) 2020.04.15
LINQ part 4  (0) 2020.02.11
LINQ part 3  (0) 2020.02.04
LINQ part2  (0) 2020.01.31
LINQ part1  (0) 2020.01.29
블로그 이미지

kaki104

This blog covers the latest technologies in Microsoft .Net. In 2020, I will be talking about Uno Platform frequently. http://youtube.com/FutureOfDotNet https://twitter.com/kaki104

댓글을 달아 주세요

Partitions
- Take
    numbers.Take(3)
- Skip
    numbers.Skip(4)
- TakeWhile
    numbers.TakeWhile(n => n < 6)
- SkipWhile
    numbers.SkipWhile(n => n % 3 != 0)


Orderings
- OrderBy
    orderby word
- Custom Comparer
    words.OrderBy(a => a, new CaseInsensitiveComparer())
- OrderBy ~ Descending
    orderby d descending
- ThenBy
    orderby degit.Length, digit
    words.OrderBy(a => a.Length).ThenBy(a => a, new CaseInsensitiveComparer())
- Reverse
    .Reverse()

https://youtu.be/K8V7_UDWfQs

LINQ part3.pdf
0.18MB

'Windows App(Universal App) > Beginner' 카테고리의 다른 글

LINQ - Join Operations - part5/5  (0) 2020.04.15
LINQ part 4  (0) 2020.02.11
LINQ part 3  (0) 2020.02.04
LINQ part2  (0) 2020.01.31
LINQ part1  (0) 2020.01.29
UnityContainer Detail & Examples - Prism으로 시작하는 UWP app part15  (0) 2020.01.12
블로그 이미지

kaki104

This blog covers the latest technologies in Microsoft .Net. In 2020, I will be talking about Uno Platform frequently. http://youtube.com/FutureOfDotNet https://twitter.com/kaki104

댓글을 달아 주세요

Projections 
- select
- anonymous type
- tuple type
- where & select
- Multiple Sequences
- Child Sequence, Select Many
- Multiple where
- Indexed Select Many
- Practice
https://youtu.be/5Rq-ZvUvfOc

LINQ part2.pdf
0.19MB

'Windows App(Universal App) > Beginner' 카테고리의 다른 글

LINQ part 4  (0) 2020.02.11
LINQ part 3  (0) 2020.02.04
LINQ part2  (0) 2020.01.31
LINQ part1  (0) 2020.01.29
UnityContainer Detail & Examples - Prism으로 시작하는 UWP app part15  (0) 2020.01.12
UnityContainer - Prism으로 시작하는 UWP app part 14  (0) 2020.01.06
블로그 이미지

kaki104

This blog covers the latest technologies in Microsoft .Net. In 2020, I will be talking about Uno Platform frequently. http://youtube.com/FutureOfDotNet https://twitter.com/kaki104

댓글을 달아 주세요

What is LINQ
- Language Integrated Query
- 다른 소스 및 Type에서 데이터를 검색하고 활용하기 위한 표현식
- 컬렉션, Ado.NET, DataSet, XML Docs, 웹 서비스 및 MS SQL Server 및 기타 데이터베이스등 다양한 데이터 소스에서 검색 및 활용이 가능
- 101 LINQ samples

LINQ Basic


LINQ Basic Keywords
- from : 쿼리 표현식은 from으로 시작해야함
- in : 4가지 경우에 사용되며 일반적으로 from과 함께 사용
- let : 쿼리식에서 하위절의 결과를 저장하여 후속절에서 사용하는 것이 유용한 경우에 let 키워드를 사용하여 새로운 로컬 변수를 만들어서 다양하게 활용이 가능
- into : group, join or select 절의 결과를 저장하는 임시 식별자를 만들수 있음
- on : join 절에서 결합 조건을 지정하는데 사용
- equals : join 절에서 두 시쿼스의 요소를 비교하는데 사용

Restrictions 제한
- Where


https://youtu.be/ci2U1cG6TvI

 

LINQ part1.pdf
0.22MB

블로그 이미지

kaki104

This blog covers the latest technologies in Microsoft .Net. In 2020, I will be talking about Uno Platform frequently. http://youtube.com/FutureOfDotNet https://twitter.com/kaki104

댓글을 달아 주세요