Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Auctions
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Wilcox Technologies
Auctions
Commits
783cbcb3
Commit
783cbcb3
authored
Jun 25, 2012
by
A. Wilcox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XUI: Update Dashboard view to make it show stuff.
parent
8093f31a
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
694 additions
and
79 deletions
+694
-79
Frontends/AuctionsX/AuctionsX.xcodeproj/project.xcworkspace/xcuserdata/awilcox.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/awilcox.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
Frontends/AuctionsX/AuctionsX/Views/AuXDashboardView.h
Frontends/AuctionsX/AuctionsX/Views/AuXDashboardView.h
+20
-1
Frontends/AuctionsX/AuctionsX/Views/AuXDashboardView.mm
Frontends/AuctionsX/AuctionsX/Views/AuXDashboardView.mm
+62
-0
Frontends/AuctionsX/AuctionsX/en.lproj/MainMenu.xib
Frontends/AuctionsX/AuctionsX/en.lproj/MainMenu.xib
+612
-78
No files found.
Frontends/AuctionsX/AuctionsX.xcodeproj/project.xcworkspace/xcuserdata/awilcox.xcuserdatad/UserInterfaceState.xcuserstate
View file @
783cbcb3
No preview for this file type
Frontends/AuctionsX/AuctionsX/Views/AuXDashboardView.h
View file @
783cbcb3
...
...
@@ -8,15 +8,34 @@
#import <Cocoa/Cocoa.h>
#import <Managers/AuAccountManager.h>
#import "AuXBridge.h"
@interface
AuXDashboardView
:
NSView
{
@interface
AuXDashboardView
:
NSView
<
AuXBridgeDelegate
>
{
AuAccount
account
;
NSTextField
*
accountTitle
;
NSButton
*
reload
;
NSTextField
*
listedCount
,
*
sellingCount
,
*
soldCount
;
NSTextField
*
sellingAmt
,
*
soldAmt
;
NSOperationQueue
*
queue
;
NSProgressIndicator
*
spinny
;
NSNumberFormatter
*
currencyFormatter
;
}
-
(
IBAction
)
reloadData
:(
id
)
sender
;
-
(
IBAction
)
stopLoading
:(
id
)
sender
;
@property
(
atomic
,
assign
)
AuAccount
account
;
@property
IBOutlet
NSTextField
*
accountTitle
;
@property
IBOutlet
NSButton
*
reload
;
@property
IBOutlet
NSTextField
*
listedCount
,
*
sellingCount
,
*
soldCount
;
@property
IBOutlet
NSTextField
*
sellingAmt
,
*
soldAmt
;
@property
IBOutlet
NSProgressIndicator
*
spinny
;
@property
IBOutlet
NSNumberFormatter
*
currencyFormatter
;
@end
Frontends/AuctionsX/AuctionsX/Views/AuXDashboardView.mm
View file @
783cbcb3
...
...
@@ -10,17 +10,29 @@
@implementation
AuXDashboardView
@synthesize
accountTitle
,
reload
;
@synthesize
listedCount
,
sellingCount
,
soldCount
,
sellingAmt
,
soldAmt
;
@synthesize
spinny
;
-
(
id
)
initWithFrame
:(
NSRect
)
frame
{
self
=
[
super
initWithFrame
:
frame
];
if
(
self
)
{
// Initialization code here.
queue
=
[[
NSOperationQueue
alloc
]
init
];
}
return
self
;
}
-
(
void
)
dealloc
{
[
queue
cancelAllOperations
];
[
queue
release
];
[
super
dealloc
];
}
-
(
AuAccount
)
account
{
return
account
;
...
...
@@ -31,6 +43,56 @@
account
=
_account
;
[
accountTitle
setStringValue
:[
NSString
stringWithUTF8String
:
account
.
friendly
]];
[
currencyFormatter
setCurrencySymbol
:[
NSString
stringWithUTF8String
:
currency_symbol_for_code
(
account
.
site
->
getCurrency
())]];
[
self
stopLoading
:
self
];
[
self
reloadData
:
self
];
}
-
(
IBAction
)
reloadData
:(
id
)
sender
{
AuXBridge
*
bridge
=
[[
AuXBridge
alloc
]
initCall
:
AuGetSellingSummary
withData:
[
NSDictionary
dictionaryWithObjectsAndKeys
:[
NSValue
valueWithPointer
:
account
.
site
],
@"site"
,
nil
]
delegate:
self
];
[
queue
addOperation
:
bridge
];
[
bridge
release
];
listedCount
.
stringValue
=
sellingCount
.
stringValue
=
soldCount
.
stringValue
=
@""
;
sellingAmt
.
stringValue
=
soldAmt
.
stringValue
=
@""
;
[
spinny
startAnimation
:
nil
];
}
-
(
IBAction
)
stopLoading
:(
id
)
sender
{
[
spinny
stopAnimation
:
nil
];
[
queue
cancelAllOperations
];
}
-
(
void
)
auctionCallDidFailWithError
:(
NSDictionary
*
)
errorDetails
{
}
-
(
void
)
auctionCallFinished
:(
NSNumber
*
)
call
{
// NOTREACHED
}
-
(
void
)
auctionCallReturnedData
:(
NSDictionary
*
)
data
{
AuSellingSummary
*
summary
=
(
AuSellingSummary
*
)[[
data
objectForKey
:
@"summary"
]
pointerValue
];
[
listedCount
setIntegerValue
:
summary
->
auctions_listed
];
[
sellingCount
setIntegerValue
:
summary
->
auctions_selling
];
[
soldCount
setIntegerValue
:
summary
->
auctions_sold
];
[
sellingAmt
setFloatValue
:
summary
->
selling_amt
];
[
soldAmt
setFloatValue
:
summary
->
sold_amt
];
delete
summary
;
[
spinny
stopAnimation
:
nil
];
}
@end
Frontends/AuctionsX/AuctionsX/en.lproj/MainMenu.xib
View file @
783cbcb3
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment