This commit is contained in:
Miguel de Icaza 2009-11-30 18:06:36 -05:00
Родитель 46bd1b0c4d
Коммит c2f3b38293
5 изменённых файлов: 26 добавлений и 16 удалений

Просмотреть файл

@ -12,6 +12,7 @@
<AssemblyName>avTouch</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<RootNamespace>avTouch</RootNamespace>
<MtouchSdkVersion>3.0</MtouchSdkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
<DebugSymbols>true</DebugSymbols>
@ -22,6 +23,8 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ExtraMtouchArgs>-debug</ExtraMtouchArgs>
<MtouchLink>None</MtouchLink>
<MtouchDebug>True</MtouchDebug>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>none</DebugType>
@ -29,6 +32,7 @@
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchDebug>False</MtouchDebug>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
<DebugSymbols>true</DebugSymbols>
@ -39,6 +43,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchDebug>True</MtouchDebug>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>none</DebugType>
@ -47,6 +52,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchDebug>False</MtouchDebug>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
@ -81,7 +87,6 @@
<ItemGroup>
<Content Include="Default.png" />
<Content Include="icon.png" />
<Content Include="forward.png" />
<Content Include="images\pause.png" />
<Content Include="images\play.png" />
<Content Include="images\play_hi.png" />
@ -91,6 +96,7 @@
<Content Include="images\volume_down.png" />
<Content Include="images\volume_up.png" />
<Content Include="sample.m4a" />
<Content Include="images\forward.png" />
</ItemGroup>
<ItemGroup>
<Folder Include="images\" />

Просмотреть файл

@ -36,8 +36,8 @@ namespace avTouch
public override void AwakeFromNib ()
{
playBtnBg = UIImage.FromFile ("play.png").StretchableImage (12, 0);
pauseBtnBg = UIImage.FromFile ("pause.png").StretchableImage (12, 0);
playBtnBg = UIImage.FromFile ("images/play.png").StretchableImage (12, 0);
pauseBtnBg = UIImage.FromFile ("images/pause.png").StretchableImage (12, 0);
_playButton.SetImage (playBtnBg, UIControlState.Normal);
_duration.AdjustsFontSizeToFitWidth = true;
@ -46,6 +46,7 @@ namespace avTouch
var fileUrl = NSBundle.MainBundle.PathForResource ("sample", "m4a");
player = AVAudioPlayer.FromUrl (new NSUrl (fileUrl, false));
player.FinishedPlaying += delegate(object sender, AVStatusEventArgs e) {
if (!e.Status)
Console.WriteLine ("Did not complete successfully");
@ -65,8 +66,6 @@ namespace avTouch
_fileName.Text = String.Format ("Mono {0} ({1} ch)", Path.GetFileName (player.Url.RelativePath), player.NumberOfChannels);
UpdateViewForPlayerInfo ();
UpdateViewForPlayerState ();
}
public void UpdateCurrentTime ()

Просмотреть файл

@ -3,9 +3,9 @@
<data>
<int key="IBDocument.SystemTarget">528</int>
<string key="IBDocument.SystemVersion">10B504</string>
<string key="IBDocument.InterfaceBuilderVersion">732</string>
<string key="IBDocument.AppKitVersion">1038.2</string>
<string key="IBDocument.HIToolboxVersion">437.00</string>
<string key="IBDocument.InterfaceBuilderVersion">740</string>
<string key="IBDocument.AppKitVersion">1038.22</string>
<string key="IBDocument.HIToolboxVersion">457.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">62</string>
@ -63,7 +63,7 @@
<bool key="IBUIUserInteractionEnabled">NO</bool>
<object class="NSCustomResource" key="IBUIImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">sound_meter_background.png</string>
<string key="NSResourceName">images/sound_meter_background.png</string>
</object>
</object>
<object class="IBUIView" id="544780062">
@ -157,14 +157,14 @@
<object class="IBUIImageView" id="202417773">
<reference key="NSNextResponder" ref="774585933"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{16, 355}, {9, 15}}</string>
<string key="NSFrame">{{20, 355}, {5, 15}}</string>
<reference key="NSSuperview" ref="774585933"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<object class="NSCustomResource" key="IBUIImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">volume_down.png</string>
<string key="NSResourceName">images/volume_down.png</string>
</object>
</object>
<object class="IBUIImageView" id="596049103">
@ -177,7 +177,7 @@
<bool key="IBUIUserInteractionEnabled">NO</bool>
<object class="NSCustomResource" key="IBUIImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">volume_up.png</string>
<string key="NSResourceName">images/volume_up.png</string>
</object>
</object>
<object class="IBUIToolbar" id="570549170">
@ -214,7 +214,7 @@
</object>
<object class="NSCustomResource" key="IBUIHighlightedImage" id="384982964">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">rewind.png</string>
<string key="NSResourceName">images/rewind.png</string>
</object>
<reference key="IBUIDisabledImage" ref="384982964"/>
<reference key="IBUISelectedImage" ref="384982964"/>
@ -239,7 +239,7 @@
<reference key="IBUINormalTitleShadowColor" ref="584139103"/>
<object class="NSCustomResource" key="IBUIHighlightedImage" id="300183811">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">play.png</string>
<string key="NSResourceName">images/play.png</string>
</object>
<reference key="IBUIDisabledImage" ref="300183811"/>
<reference key="IBUISelectedImage" ref="300183811"/>
@ -268,7 +268,10 @@
</object>
<reference key="IBUIDisabledImage" ref="384715260"/>
<reference key="IBUISelectedImage" ref="384715260"/>
<reference key="IBUINormalImage" ref="384715260"/>
<object class="NSCustomResource" key="IBUINormalImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">images/forward.png</string>
</object>
</object>
</object>
<string key="NSFrame">{{-1, 416}, {320, 44}}</string>
@ -319,7 +322,7 @@
<bool key="IBUIUserInteractionEnabled">NO</bool>
<object class="NSCustomResource" key="IBUIImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">sound_meter_glare.png</string>
<string key="NSResourceName">images/sound_meter_glare.png</string>
</object>
</object>
</object>

2
avTouch/avTouchViewController.xib.designer.cs сгенерированный
Просмотреть файл

@ -15,6 +15,7 @@ namespace avTouch {
[MonoTouch.Foundation.Register("avTouchViewController")]
public partial class avTouchViewController {
#pragma warning disable 0169
[MonoTouch.Foundation.Connect("view")]
private MonoTouch.UIKit.UIView view {
get {
@ -40,6 +41,7 @@ namespace avTouch {
[MonoTouch.Foundation.Register("avTouchController")]
public partial class avTouchController {
#pragma warning disable 0169
[MonoTouch.Foundation.Export("volumeSliderMoved:")]
partial void volumeSliderMoved (MonoTouch.UIKit.UISlider sender);

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 1.2 KiB

После

Ширина:  |  Высота:  |  Размер: 1.2 KiB