สวัสดีครับ ผมอยากทราบว่า ถ้าผมต้องการสร้างหน้าต้อนรับ ประมาณว่าหน้านี้จะแสดงครั้งแรกที่เปิดแอพเท่านั้น ผมต้องทำไงครับ แล้วแบบที่ผมกล่าวมาเขาเรียกว่าอะไรครับ คือผมไม่รู้จะหาตัวอย่าง หรือวิธีทำยังไงดี
ดูตัวที่ผมเคยเขียน(หน้า Login)
Hiring! บริษัทที่น่าสนใจ
Carmen Software
Hotel Financial Solutions
Next Innovation (Thailand) Co., Ltd.
We are web design with consulting & engineering services driven the future stronger and flexibility.
KKP Dime
KKP Dime บริษัทในเครือเกียรตินาคินภัทร
Kiatnakin Phatra Financial Group
Financial Service
Fastwork Technologies
Fastwork.co เว็บไซต์ที่รวบรวม ฟรีแลนซ์ มืออาชีพจากหลากหลายสายงานไว้ในที่เดียวกัน
Thoughtworks Thailand
Thoughtworks เป็นบริษัทที่ปรึกษาด้านเทคโนโยลีระดับโลกที่คว้า Great Place to Work 3 ปีซ้อน
Iron Software
Iron Software is an American company providing a suite of .NET libraries by engineer for engineers.
CLEVERSE
Cleverse is a Venture Builder. Our team builds several tech companies.
Nipa Cloud
#1 OpenStack cloud provider in Thailand with our own data center and software platform.
Bangmod Enterprise
The leader in Cloud Server and Hosting in Thailand.
CIMB THAI Bank
MOVING FORWARD WITH YOU - CIMB is the leading ASEAN Bank
Bangkok Bank
Bangkok Bank is one of Southeast Asia's largest regional banks, a market leader in business banking
MuvMi (Urban Mobility Tech Co.,Ltd.)
Shape the future of urban mobility towards affordable, clean, and safe solutions
T.N. Digital Solution Co., Ltd.
TNDS has been involving in every first move of banking’s major digital transformation.
KBTG - KASIKORN Business-Technology Group
KBTG - "The Technology Company for Digital Business Innovation"
Siam Commercial Bank Public Company Limited
"Let's start a brighter career future together"
Icon Framework co.,Ltd.
Global Standard Platform for Real Estate แพลตฟอร์มสำหรับธุรกิจอสังหาริมทรัพย์ครบวงจร มาตรฐานระดับโลก
REFINITIV
The Financial and Risk business of Thomson Reuters is now Refinitiv
H LAB
Re-engineering healthcare systems through intelligent platforms and system design.
The Gang Technology Co., Ltd.
We're a Digital Agency that helps our customers transform their business into digital with ease.
LTMH
LTMH มุ่งเน้นการพัฒนาผลิตภัณฑ์ที่สามารถช่วยพันธมิตรของเราให้บรรลุเป้าหมาย
Seven Peaks
We Drive Digital Transformation
Wisesight (Thailand) Co., Ltd.
The Best Choice For Handling Social Media · High Expertise in Social Data · Most Advanced and Secure
MOLOG Tech
We are Modern Logistic Platform, Specialize in WMS, OMS and TMS.
Data Wow Co.,Ltd
We enable our clients to realize increased productivity by solving their most complex issues by Data
LINE Company Thailand
LINE, the world's hottest mobile messaging platform, offers free text and voice messaging + Call
LINE MAN Wongnai
Join our journey to becoming No.1 food platform in Thailand
Splash Screen?
itpcc Tue, 04/08/2015 - 07:29
Splash Screen?
ถ้าแสดงทุกครั้งที่ปิดเปิดแอพใ
varavut Tue, 04/08/2015 - 08:32
ถ้าแสดงทุกครั้งที่ปิดเปิดแอพใหม่ก็ SplashScreen ครับ อันนั้นมันมีให้อยู้แล้วก็เอาภาพไปทับได้เลย
แต่ถ้าแสดงครั้งเดียวตอนเปิดแอพครั้งแรกแบบพวก tutorial ต้องเขียนโค้ดดักเอาครับ เช่น พอเข้าครั้งแรกปุ๊บก็แสดง แล้วก็เขียนอะไรบางอย่างลงไปในไฟล์หรือ database หรือ preference แล้วทุกครั้งที่เปิดก็เช็คไฟล์นี้ ถ้าไม่มีอะไรก็เข้าหน้านี้ ถ้าถูกเขียนไปแล้วก็ข้ามไปหน้าล็อคอิน
เข้าใจว่าบนวินโดวส์เอาไปเขียนไว้ที่ App.xaml.cs ได้เลย
จะได้ประมาณนี้ครับ (สมมติว่า IsFirstTime เป็น property ที่ดึงค่าจากไฟล์ และใช้เขียนลงไฟล์ได้)
ใช่แล้วครับ ประมาณนี้เลย
TheYoonuchs Tue, 04/08/2015 - 13:19
In reply to ถ้าแสดงทุกครั้งที่ปิดเปิดแอพใ by varavut
ใช่แล้วครับ ประมาณนี้เลย ขอบคุณมากเลยครับ
ดูให้หน่อยนะครับ ผมพลาดตรงไหน
TheYoonuchs Tue, 04/08/2015 - 15:57
In reply to ถ้าแสดงทุกครั้งที่ปิดเปิดแอพใ by varavut
ดูให้หน่อยนะครับ ผมพลาดตรงไหน เพราะดูเหมือนว่า มันจะไม่ลบค่าใน IsFirstLaunch
if (rootFrame.Content == null){
var localSettings = Windows.Storage.ApplicationData.Current.LocalSettings;
อ่านแล้วงงๆ ครับ
hisoft Tue, 04/08/2015 - 16:08
In reply to ดูให้หน่อยนะครับ ผมพลาดตรงไหน by TheYoonuchs
อ่านแล้วงงๆ ครับ ตกลงตั้งใจจะเก็บค่าที่บอกว่าแอพนี้เคยเปิดขึ้นมาแล้วเอาไว้ที่ไหนครับ?
คือผมดูตัวอย่างจากที่นี่อ่ะคร
TheYoonuchs Tue, 04/08/2015 - 16:30
In reply to อ่านแล้วงงๆ ครับ by hisoft
คือผมดูตัวอย่างจากที่นี่อ่ะครับ ถูกรึป่าว
https://msdn.microsoft.com/en-us/library/windows/apps/xaml/windows.storage.applicationdata.localsettings?cs-save-lang=1&cs-lang=csharp#code-snippet-2
ถ้าผมอ่านโค้ดแล้วเข้าใจไม่ผิด
hisoft Tue, 04/08/2015 - 18:27
In reply to คือผมดูตัวอย่างจากที่นี่อ่ะคร by TheYoonuchs
ถ้าผมอ่านโค้ดแล้วเข้าใจไม่ผิดนะครับ
สร้าง IsFirstLaunch เป็น true ไว้ใน app data local setting ทุกครั้งที่เปิดแอพ
อ่านค่าจาก IsFirstLaunch มาไว้ใน value ดังนั้นตอนนี้ใน value ก็จะมีค่าเป็น true ที่เราเพิ่งสร้างไปหมาดๆ แล้วไปเข้า else เพราะมันไม่ null แน่ๆ
ลบ IsFirstLaunch ทุกครั้ง ซึ่งก็ไม่ได้มีผลอะไรเพราะทุกครั้งที่เปิดแอพขึ้นมาใหม่ด้านบนก็มีการสร้างขึ้นมาใหม่อยู่แล้ว
ผมยังไม่เห็นมีส่วนไหนที่มันจะเก็บข้อมูลเอาไว้ หรือเรียกข้อมูลขึ้นมาเช็คได้เลยครับ
มันคิดได้หลายมุมครับ ง่ายๆ ก็น่าจะมีสองแบบ คือเช็คว่าแอพนี้เปิดเป็นครั้งแรกใช่มั้ย กับแอพนี้เคยเปิดมาแล้วใช่มั้ย (เขียนออกมามันก็เหมือนๆ กันนั่นแหละครับ ดีไม่ดีโค้ดเดียวกันด้วย ต่างกันตอนคิด)
ขอบคุณครับ ช่วยได้เยอะเลย
TheYoonuchs Tue, 04/08/2015 - 20:33
In reply to ถ้าผมอ่านโค้ดแล้วเข้าใจไม่ผิด by hisoft
ขอบคุณครับ ช่วยได้เยอะเลย เดี๋ยวจะลองปรับเปลี่ยนดูครับ