This repository has been archived by the owner on Apr 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated to storyboards for GitHub defect #1013.
- Loading branch information
1 parent
1da8dc3
commit 5af39f3
Showing
65 changed files
with
2,619 additions
and
8,620 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 2012 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MacControls", "MacControls\MacControls.csproj", "{87F4FA0E-0256-4260-9DB6-58A8A41BE8C1}" | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MacControls", "MacControls\MacControls.csproj", "{18BFA1E8-DC95-43FA-B736-3E4B822527F0}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{87F4FA0E-0256-4260-9DB6-58A8A41BE8C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{87F4FA0E-0256-4260-9DB6-58A8A41BE8C1}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{87F4FA0E-0256-4260-9DB6-58A8A41BE8C1}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{87F4FA0E-0256-4260-9DB6-58A8A41BE8C1}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{18BFA1E8-DC95-43FA-B736-3E4B822527F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{18BFA1E8-DC95-43FA-B736-3E4B822527F0}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{18BFA1E8-DC95-43FA-B736-3E4B822527F0}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{18BFA1E8-DC95-43FA-B736-3E4B822527F0}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,47 @@ | ||
using System; | ||
|
||
using AppKit; | ||
using Foundation; | ||
using AppKit; | ||
|
||
namespace MacControls | ||
{ | ||
public partial class AppDelegate : NSApplicationDelegate | ||
[Register ("AppDelegate")] | ||
public class AppDelegate : NSApplicationDelegate | ||
{ | ||
MainWindowController mainWindowController; | ||
#region Computed Properties | ||
public int UntitledWindowCount { get; set;} =1; | ||
#endregion | ||
|
||
#region Constructors | ||
public AppDelegate () | ||
{ | ||
} | ||
#endregion | ||
|
||
#region Override Methods | ||
public override void DidFinishLaunching (NSNotification notification) | ||
{ | ||
mainWindowController = new MainWindowController (); | ||
mainWindowController.Window.MakeKeyAndOrderFront (this); | ||
// Insert code here to initialize your application | ||
} | ||
|
||
public override void WillTerminate (NSNotification notification) | ||
{ | ||
// Insert code here to tear down your application | ||
} | ||
#endregion | ||
|
||
#region Custom Actions | ||
[Export ("newDocument:")] | ||
void NewDocument (NSObject sender) { | ||
// Get new window | ||
var storyboard = NSStoryboard.FromName ("Main", null); | ||
var controller = storyboard.InstantiateControllerWithIdentifier ("MainWindow") as NSWindowController; | ||
|
||
// Display | ||
controller.ShowWindow(this); | ||
|
||
// Set the title | ||
controller.Window.Title = (++UntitledWindowCount == 1) ? "untitled" : string.Format ("untitled {0}", UntitledWindowCount); | ||
} | ||
#endregion | ||
} | ||
} | ||
|
This file was deleted.
Oops, something went wrong.
31 changes: 8 additions & 23 deletions
31
MacControls/MacControls/SubviewButtons.cs → ...rols/MacControls/ButtonsViewController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 18 additions & 10 deletions
28
...ls/MacControls/SubviewButtons.designer.cs → ...ontrols/ButtonsViewController.designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 14 additions & 30 deletions
44
...acControls/SubviewChecksRadio.designer.cs → ...ntrols/CheckboxViewController.designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
using System; | ||
using AppKit; | ||
using Foundation; | ||
using CoreGraphics; | ||
|
||
namespace AppKit | ||
{ | ||
[Register("ReplaceViewSeque")] | ||
public class ReplaceViewSeque : NSStoryboardSegue | ||
{ | ||
#region Constructors | ||
public ReplaceViewSeque() { | ||
|
||
} | ||
|
||
public ReplaceViewSeque (string identifier, NSObject sourceController, NSObject destinationController) : base(identifier,sourceController,destinationController) { | ||
|
||
} | ||
|
||
public ReplaceViewSeque (IntPtr handle) : base(handle) { | ||
} | ||
|
||
public ReplaceViewSeque (NSObjectFlag x) : base(x) { | ||
} | ||
#endregion | ||
|
||
#region Override Methods | ||
public override void Perform () | ||
{ | ||
// Cast the source and destination controllers | ||
var source = SourceController as NSViewController; | ||
var destination = DestinationController as NSViewController; | ||
|
||
// Remove any existing view | ||
if (source.View.Subviews.Length > 0) { | ||
source.View.Subviews [0].RemoveFromSuperview (); | ||
} | ||
|
||
// Adjust sizing and add new view | ||
destination.View.Frame = new CGRect(0 ,0 ,source.View.Frame.Width, source.View.Frame.Height); | ||
destination.View.AutoresizingMask = NSViewResizingMask.HeightSizable | NSViewResizingMask.WidthSizable; | ||
source.View.AddSubview(destination.View); | ||
|
||
} | ||
#endregion | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.