• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

艦娘をちゅーちゅーします


Commit MetaInfo

Revision847e0dd99b3af0f1edc50bd9d1d97fecd05982c0 (tree)
Time2017-08-08 22:09:50
Authormasakih <masakih@user...>
Commitermasakih

Log Message

ソースコードを整理

Change Summary

Incremental Difference

--- a/ExtractKanMusu/ProgressPanelController.swift
+++ b/ExtractKanMusu/ProgressPanelController.swift
@@ -10,6 +10,17 @@ import Cocoa
1010
1111 class ProgressPanelController: NSWindowController, MessageObserver {
1212
13+ override var windowNibName: String? {
14+
15+ return "ProgressPanelController"
16+ }
17+
18+ override func windowDidLoad() {
19+
20+ super.windowDidLoad()
21+
22+ }
23+
1324 private dynamic var rawCount: Int = 0 {
1425
1526 didSet {
@@ -31,7 +42,7 @@ class ProgressPanelController: NSWindowController, MessageObserver {
3142 }
3243 }
3344
34- private dynamic var finished: Int = 0 {
45+ private dynamic var completed: Int = 0 {
3546
3647 didSet {
3748
@@ -41,24 +52,7 @@ class ProgressPanelController: NSWindowController, MessageObserver {
4152 }
4253 }
4354
44- private dynamic var progresString: String {
45-
46- get {
47-
48- if count == 0 {
49- return ""
50- }
51-
52- let parcent = Int( Double(finished) / Double(rawCount) * 100 )
53-
54- return "\(finished)/\(rawCount) (\(parcent)%)"
55-
56- }
57- }
58-
5955 private dynamic var rawMessage: String = ""
60-
61-
6256 var message: String = "" {
6357
6458 didSet {
@@ -71,30 +65,33 @@ class ProgressPanelController: NSWindowController, MessageObserver {
7165 }
7266 }
7367
74- dynamic var font: NSFont {
68+ private dynamic var progresString: String {
7569
76- let size = NSFont.systemFontSize()
77- return NSFont.monospacedDigitSystemFont(ofSize: size, weight: NSFontWeightRegular)
70+ get {
71+
72+ if count == 0 {
73+ return ""
74+ }
75+
76+ let parcent = Int( Double(completed) / Double(rawCount) * 100 )
77+
78+ return "\(completed)/\(rawCount) (\(parcent)%)"
79+
80+ }
7881 }
7982
80-
81- override var windowNibName: String? {
83+ private dynamic var font: NSFont {
8284
83- return "ProgressPanelController"
85+ let size = NSFont.systemFontSize()
86+ return NSFont.monospacedDigitSystemFont(ofSize: size, weight: NSFontWeightRegular)
8487 }
8588
8689 func increse() {
8790
8891 DispatchQueue.main.async {
8992
90- self.finished += 1
93+ self.completed += 1
9194 }
9295 }
9396
94- override func windowDidLoad() {
95-
96- super.windowDidLoad()
97-
98- }
99-
10097 }