Giter Club home page Giter Club logo

mojp's People

Contributors

fog-bank avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mojp's Issues

意図しない空表示になる

「基本土地5種のカードテキストを表示する」をOFFにしている場合に、基本土地を含む形でカードを順にマウスオーバーしていると、前のカードの表示が残るはずが、空表示になってしまうことがある。

アモンケット対応作業

  • 余波カード
    • 分割カードのように wiki リンクを手動で追加
    • 墓地にあるときは余波側を手前に表示したいが、Preview Pane 次第か
  • Amonkhet Invocations
    • MO で実装された場合、Automation UI でテキストを取得できるのか?

「カードをWiki で調べる」を使用時に動作が停止することがある

Application: mojp.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
at Mojp.MainWindow.OnGoToWiki(System.Object, System.Windows.RoutedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
at System.Windows.Controls.MenuItem.InvokeClickAfterRender(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
at System.Windows.Application.RunDispatcher(System.Object)
at System.Windows.Application.RunInternal(System.Windows.Window)
at Mojp.App.Main()

CardPrice.GetOrOpenPDLegalFile で IOException

Application: mojp.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.IOException
at System.IO.__Error.WinIOError(Int32, System.String)
at System.IO.FileStream.Init(System.String, System.IO.FileMode, System.IO.FileAccess, Int32, Boolean, System.IO.FileShare, Int32, System.IO.FileOptions, SECURITY_ATTRIBUTES, System.String, Boolean, Boolean, Boolean)
at System.IO.FileStream..ctor(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare, Int32)
at System.IO.File.Create(System.String)
at Mojp.CardPrice+<GetOrOpenPDLegalFile>d__21.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Mojp.MainWindow+<OnInitialized>d__5.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
at System.Windows.Application.RunDispatcher(System.Object)
at System.Windows.Application.RunInternal(System.Windows.Window)
at Mojp.App.Main()

表示レイアウトの改善

  • 長いカードテキストをスクロールできるようにする
  • 右上ツールバーとカード名部分が重ならないようにする
  • 両面カードなどの複数の特性を持つカードの場合に、タブを増やす

ウィルス誤検出

roma氏による報告

ウィルスバスターでMOJPがHEU_AEGISCS230というウィルスが検出されるため開けなるみたいです

機体のP/T

WHISPER の結果には機体のP/Tが出力されていないので、本ソフトもP/Tを表示していない

二重起動しているとフリーズすることがある

mojp を二重起動していると、応答なしになってしまうことがある。

  • 高頻度ながら正確な再現条件は不明。
  • Automation 関連でデッドロックが発生している?タイムアウトが設定されているらしく、しばらくすると復帰する?
  • デバッグありとデバッグなしの二重起動ではフリーズは発生しない?

データバインディングのエラー

実行には問題はないがパフォーマンスに影響があるかもしれない

System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.TabControl', AncestorLevel='1''. BindingExpression:Path=TabStripPlacement; DataItem=null; target element is 'TabItem' (Name=''); target property is 'NoTarget' (type 'Object')

次元カードのテキスト

次元カード、現象カードのテキストが最新ではない可能性がある。

  • WHISPERとWikiでテキストが異なる
  • 各種書式の更新が反映されていない可能性
    • 破壊されない → 破壊不能
    • トークンを戦場に出す → 生成する
    • その他、細かい言い回し

半透明化

設定でウィンドウフレームを無くし、半透明にできるようにする

紋章の日本語化

統治者マーカー以外は未対応。
とりあえず紋章画像とテキストデータを集めてみる。

カードの色

カードの色をカードタイプの所に色指標みたいに表示する

untitled

Automation 関連の内部例外

  1. 'System.ArgumentException' (UIAutomationClientsideProviders.dll の中)
  2. 'System.ComponentModel.Win32Exception' (UIAutomationClient.dll の中)
  3. 'System.Windows.Automation.ElementNotAvailableException' (UIAutomationClient.dll の中)

が多数発生する。すべてキャッチされて表には出てこない

カード価格の表示機能

scryfall.com の REST-like API を使って、カードの価格を表示する

untitled

要件 https://scryfall.com/docs/api

  • 次のリクエストまで 100ms 空ける
  • 価格はデイリー。データはキャッシュするようにする

課題

  • 収録カードセットを適切に設定しないと、価格を取得できない or 最安値を得られない
    → GET /cards/search を使えば OK (order=tix でなぜか一番安いものが返って来る)
     Exact サーチではないので、場合によってはちゃんと絞り込む必要あり
     分割カード系は値段が表示できない模様
  • TextBlock の表示更新がうまく行かない
    → ProperyChangedCallback 内で await した後の UI 変更はうまくいかないらしい。結局 Card オブジェクトのプロパティ変更通知を経由することにした
  • 排他処理をどう扱うか
    → ConcurrentDictionary と static volatile bool の二重 if と Task.Delay(1000) でごまかし
  • キャッシュデータの保存場所 & フォーマット (IsolatedStorage? plain text?)
    → お行儀の悪さはあるが、トラブルシューティングのやりやすさを考えて、作業ディレクトリに plain text で保存しちゃうことにした
  • Penny Dreadful でリーガルかどうかを表示する
    → PD 公式サイトからリーガルリストを別途ダウンロードするように

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.