以下のAPIが使用される。
- 改修工廠画面を開く
/kcsapi/api_req_kousyou/remodel_slotlist
- 改修装備を選択
/kcsapi/api_req_kousyou/remodel_slotlist_detail
- 改修開始
/kcsapi/api_req_kousyou/remodel_slot
以下のAPIが使用される。
/kcsapi/api_req_kousyou/remodel_slotlist
/kcsapi/api_req_kousyou/remodel_slotlist_detail
/kcsapi/api_req_kousyou/remodel_slot
時系列順に説明。
※画像クリックすると Windows ストア に飛びます
Windows ストア アプリでカラーマネジメントに対応した画像ビューアーを作ってみました。
主に技術実証とMSCCを目的としたアプリなため、低機能&低品質で申し訳なく。
フォルダ内にファイル増やしても検知してくれなかったりとかそういう…
何か表示がおかしいなとかあった場合は、アプリを再起動すれば大体直ると思いますので。。
Release 1 では、スリープからの復帰時に画像が復元されないバグがある気がしていますが、直す気力があまり無いです……
Windows Runtime におけるカラーマネジメントの実装方法については、そのうち記事を書きますのでそちらで。。
簡単にいえば、 C++/CX で WIC と Direct2D を使って頑張る感じです。つらい。。。
NuGet で更新する度にコピーし直さないといけないけど……
Issue 8
Symptom
ClickOnce applications targeting .NET Framework 4.0 that reference the Microsoft.Net.Http package may experience a TypeLoadException or other errors after being installed.
Resolution
This occurs because ClickOnce fails to deploy certain required assemblies. As a workaround, do the following:
Right-click on the project and choose Add Existing Item
Browse to the HttpClient net40 package folder
In the File name text box enter *.*
Holding CTRL, select System.Net.Http.dll and System.Net.Http.Primitives.dll
Click the down-arrow next to the Add button and choose Add as Link
In Solution Explorer, holding CTRL select System.Net.Http.dll and System.Net.Http.WebRequest.dll
Right-click the selection, choose Properties and change Copy to Output Directory to Copy always
Republish
引用元:http://blogs.msdn.com/b/bclteam/p/httpclient.aspx
System.Net.Http.Primitives.dll とか System.Net.Http.WebRequest.dll のことも書いてあるけど、 System.Net.Http.dll だけでOKだった。
むしろ System.Net.Http.Primitives.dll をコピーしてると、起動時に「もうあるよ!」的なエラーで死んだ。
そもそも手順的に Primitives をコピーしてるのになぜ WebRequest が出てくるのか……怪しげな説明。。
Issue 9
Symptom
ClickOnce applications targeting .NET Framework 4.0 that reference the Microsoft.Bcl or Microsoft.Bcl.Async packages may experience a TypeLoadException or other errors after being installed.
Resolution
This occurs because ClickOnce fails to deploy certain required assemblies. As a workaround, do the following:
Right-click on the project and choose Add Existing Item
Browse to the Microsoft.Bcl net40 package folder
In the File name text box enter *.*
Holding CTRL, select System.Runtime.dll and System.Threading.Tasks.dll
Click the down-arrow next to the Add button and choose Add as Link
In Solution Explorer, holding CTRL select System.Runtime.dll and System.Threading.Taks.dll
Right-click the selection, choose Properties and change Copy to Output Directory to Copy always
Republish
引用元:http://blogs.msdn.com/b/bclteam/p/asynctargetingpackkb.aspx
知らなかったので少しだけ試したメモ。
flash.display.Loader
とかにも機能が見当たらないけど、使うリソースを全部sRGBにしておけってことなんですかねIf you import an image with an embedded profile into Flash Professional, the color profile is removed and the image on the Stage appears without its embedded color profile.
Currently, SWF file color correction is not supported on Linux/Unix systems or systems with less than 32-bit color resolution.
wmode="window"
でないと動作しないっぽいwindow
以外だと常に unsupported
になってる気がするopaque
なんで、弄ってやらないと上手く動かないdefaultOff
gfx.color_management.display_profile
に設定されたやつdefaultOff
unsupported
powercfg -setdcvalueindex 381b4222-f694-41f0-9685-ff5bb260df2e 19cbb8fa-5279-450e-9fac-8a3d5fedd0c1 12bbebe6-58d6-4636-95bb-3217ef867c1a 0
パラメータ | 説明 |
---|---|
-setdcvalueindex | バッテリ駆動 時の設定 |
381b4222-f694-41f0-9685-ff5bb260df2e | バランス プラン |
19cbb8fa-5279-450e-9fac-8a3d5fedd0c1 | ワイヤレス アダプターの設定 |
12bbebe6-58d6-4636-95bb-3217ef867c1a | 省電力モード |
0 | 最大パフォーマンス(1~3は省電力 (低/中/高)) |
そのままだとdot by dotに表示されず、モヤッとすることがある。
ルート要素の UseLayoutRounding
を true に設定すればOK。
参考:
Microsoft.AspNet.Identity.EntityFramework
とかはEFのCodeFirstでテーブル初期化とかDB読み書きとかやってくれるやつだけど、CodeFirstが嫌でIUserStore自作するなら不要な感じ。CreatePerOwinContext()
にて初期化用Funcを設定する。public class ApplicationUserManager : UserManager
{
public ApplicationUserManager(IUserStore
public static ApplicationUserManager Create(IdentityFactoryOptions
{
var manager = new ApplicationUserManager(new UserStore(context.Get
manager.PasswordHasher = new HogePasswordHasher();
return manager;
}
}
public class HogePasswordHasher : IPasswordHasher
{
public string HashPassword(string password)
{
// 塩を振ったりストレッチングしたりしよう
throw new NotImplementedException();
}
public PasswordVerificationResult VerifyHashedPassword(string hashedPassword, string providedPassword)
{
if (hashedPassword == HashPassword(providedPassword))
return PasswordVerificationResult.Success;
else
return PasswordVerificationResult.Failed;
}
}
[/csharp]
ちなみに、ASP.NET vNext のデフォルトっぽいPasswordHasherは以下の様な実装。
検証時は
2.0.0のMicrosoft.AspNet.Identity.PasswordHasher.VerifyHashedPassword()
も、vNextのコードで生成したハッシュを使って検証したら成功したので、多分同じロジック。
参考:Identity/src/Microsoft.AspNet.Identity/Crypto.cs
[csharp]
if(this.User.IsInRole(“Admin”))
{
}
[/csharp]
とか
[csharp]
[Authorize(Roles=”Admin”)]
public ActionResult Index()
{
return View();
}
[/csharp]
とか。
[csharp]
@if (this.User.IsInRole(“Admin”))
{
}
[/csharp]
とか。
そのうちまとめるつもり。
System.Windows.Media
, System.Windows.Media.Imaging
の中にちょっとだけある。ほぼWPF専用なのではないかという予感…クラス / 構造体 | 概要 |
---|---|
ColorConvertedBitmap | WICで一度だけ色変換できるBitmapSource。微妙MarkupExtensionもあるよ。 |
ColorContext | ICCプロファイル的なやつ。 |
Color | sRGB/scRGBカラーを扱う。挙動が微妙なこともあり、カラマネ的には役に立たない可能性が。 |
BitmapFrameと各種Encoder/Decoder | 画像ファイルを取り扱うクラス群。画像プロファイルも読み書きしてくれるっぽい。中身はWICの模様。 |
System.Windows.Media
がICMに対応して、System.Windows.Media.Imaging
がWICに対応するイメージなのかな?ColorContext
と、変換したいBitmapSource
を指定して色変換できる。BitmapSource
を継承してるので、Image.Source
とかに指定できる。IWICColorTransform
を使ってる。ColorContextHelper
を通してICMのOpenColorProfile()
とGetColorProfileHeader()
を利用している。PixelFormat
を指定して初期化することでsRGBとかscRGBのColorContext
を取得できることになっているが、実際に取得されるのは コントロールパネル>色の管理>詳細設定>デバイスプロファイル に設定されているプロファイルだったり。
GetStandardColorSpaceProfile()
を利用しているからで、sRGBのプロファイルIDを指定しているにもかかわらず上記のような結果になるという謎挙動が原因である。FromValues()
およびFromAValues()
にてColorContext
を指定できるが、これは非常にややこしいことに「指定されたColorContext」→「既定のデバイスプロファイル(大抵はsRGB)」という変換となる。
ColorContext
のRGB」を表す型なのかと思ってたら全然違った。ComputeScRgbValues()
というprivate methodの中で、PixelFormats.Bgra32
を用いて変換先ColorContext
を初期化しており、このソースを見る限りは本当はsRGBを変換先とするつもりっぽいのだけど、上記ColorContext
の謎挙動により既定のデバイスプロファイルが変換先となってしまっている。ColorTransform
というinternal classを使っている。それ使わせてくれよ…
ColorTransform
は、ColorTransformHelper
を経由してICMのCreateMultiProfileTransform()
とTranslateColors()
をやってくれるクラス。System.Windows.Media.Imaging
は大体WICと同じ雰囲気っぽい?IWICColorTransform
とかは使わせてくれない微妙な感じ…BitmapFrame.Create
時などにBitmapCreateOptions.IgnoreColorProfile
を指定していないと、埋め込まれた画像プロファイルからsRGB (これも同様にデバイスプロファイルかも知れない) へ変換される
ColorContexts[0]
はsRGBに置き換えられず、そのままであるColorConvertedBitmap
に食わせると、二重に変換されたりして悲しい思いをするBitmapCreateOptions.IgnoreColorProfile
を指定した場合、元のカラースペースを保持した状態で読み込まれるBitmapFrame.Create
する際にBitmapCreateOptions.PreservePixelFormat
を指定していない場合も、RGB PixelFormatへ自動変換される
ColorContexts[0]
はCMYKプロファイルのままであるBitmapCacheOption.None
以外で読み込んだ場合、その時に指定されたBitmapCreateOptions
で画像がキャッシュされ、再読込時のBitmapCreateOptions
は無視される
BitmapCacheOption.OnLoad
が必要な点に注意EnumDisplayMonitors()
とGetMonitorInfo()
でMONITORINFOEX
取得CreateDC()
でデバイスコンテキスト取得GetICMProfile()
でプロファイルパス取得ODAC 12c Release 3 からNuGetで公式から配布されるようになった