Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
Enums for ImageKit
Browse files Browse the repository at this point in the history
  • Loading branch information
rsarwas authored and migueldeicaza committed Feb 2, 2011
1 parent 6d84888 commit 6c51dfb
Show file tree
Hide file tree
Showing 5 changed files with 1,047 additions and 42 deletions.
4 changes: 0 additions & 4 deletions samples/DockAppIcon/AppDelegate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ public partial class AppDelegate : NSApplicationDelegate
{
MainWindowController mainWindowController;

public AppDelegate ()
{
}

public override void FinishedLaunching (NSObject notification)
{
mainWindowController = new MainWindowController ();
Expand Down
4 changes: 0 additions & 4 deletions samples/DockAppIcon/Main.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Drawing;
using MonoMac.Foundation;
using MonoMac.AppKit;
using MonoMac.ObjCRuntime;

namespace DockAppIcon
{
Expand Down
17 changes: 0 additions & 17 deletions samples/DockAppIcon/MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,10 @@ namespace DockAppIcon
{
public partial class MainWindow : MonoMac.AppKit.NSWindow
{
#region Constructors

// Called when created from unmanaged code
public MainWindow (IntPtr handle) : base(handle)
{
Initialize ();
}

// Called when created directly from a XIB file
[Export("initWithCoder:")]
public MainWindow (NSCoder coder) : base(coder)
{
Initialize ();
}

// Shared initialization code
void Initialize ()
{
}

#endregion
}
}

23 changes: 6 additions & 17 deletions samples/DockAppIcon/MainWindowController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,6 @@ public partial class MainWindowController : MonoMac.AppKit.NSWindowController
// Call to load from the XIB/NIB file
public MainWindowController () : base("MainWindow")
{
Initialize ();
}

// Shared initialization code
void Initialize ()
{
}

//strongly typed window accessor
public new MainWindow Window {
get { return (MainWindow)base.Window; }
}

public override void AwakeFromNib ()
Expand All @@ -42,15 +31,15 @@ public override void AwakeFromNib ()

void HandleCustomFormatEditingEnded (object sender, EventArgs e)
{
updateBadge ();
UpdateBadge ();
}

void HandleBadgeNumberEditingEnded (object sender, EventArgs e)
{
updateBadge ();
UpdateBadge ();
}

private void updateBadge ()
private void UpdateBadge ()
{
if (isShowBadge) {
if (useCustomFormat) {
Expand All @@ -66,19 +55,19 @@ private void updateBadge ()
partial void stepperAction (NSStepper sender)
{
badgeNumber.StringValue = sender.StringValue;
updateBadge ();
UpdateBadge ();
}

partial void badgeCheckAction (NSButton sender)
{
isShowBadge = (badgeCheck.State == NSCellStateValue.On) ? true : false;
updateBadge ();
UpdateBadge ();
}

partial void customFormatAction (NSButton sender)
{
useCustomFormat = (formatCheck.State == NSCellStateValue.On) ? true : false;
updateBadge ();
UpdateBadge ();
}

partial void showAppBadgeAction (NSButton sender)
Expand Down
Loading

0 comments on commit 6c51dfb

Please sign in to comment.