Ejemplo n.º 1
0
partial         void Button11_Activated(WKInterfaceButton sender)
        {
            if (this.app.ButtonClicked (11))
                this.DisplayKeyboard ();

            this.DisplayValue ();
        }
        void ReleaseDesignerOutlets()
        {
            if (cachedImage != null)
            {
                cachedImage.Dispose();
                cachedImage = null;
            }

            if (staticImage != null)
            {
                staticImage.Dispose();
                staticImage = null;
            }

            if (animatedImage != null)
            {
                animatedImage.Dispose();
                animatedImage = null;
            }

            if (playButton != null)
            {
                playButton.Dispose();
                playButton = null;
            }

            if (stopButton != null)
            {
                stopButton.Dispose();
                stopButton = null;
            }
        }
Ejemplo n.º 3
0
        void ReleaseDesignerOutlets()
        {
            if (defaultButton != null)
            {
                defaultButton.Dispose();
                defaultButton = null;
            }

            if (hiddenButton != null)
            {
                hiddenButton.Dispose();
                hiddenButton = null;
            }

            if (placeholderButton != null)
            {
                placeholderButton.Dispose();
                placeholderButton = null;
            }

            if (alphaButton != null)
            {
                alphaButton.Dispose();
                alphaButton = null;
            }
        }
		void ReleaseDesignerOutlets ()
		{
			if (cachedImage != null) {
				cachedImage.Dispose ();
				cachedImage = null;
			}

			if (staticImage != null) {
				staticImage.Dispose ();
				staticImage = null;
			}

			if (animatedImage != null) {
				animatedImage.Dispose ();
				animatedImage = null;
			}

			if (playButton != null) {
				playButton.Dispose ();
				playButton = null;
			}

			if (stopButton != null) {
				stopButton.Dispose ();
				stopButton = null;
			}
		}
Ejemplo n.º 5
0
        partial void btnZoomOut_Activated(WKInterfaceButton sender)
        {
            var span   = new MKCoordinateSpan(_mapSpan.LatitudeDelta * 2, _mapSpan.LongitudeDelta * 2);
            var region = new MKCoordinateRegion(_mapRegion.Center, span);

            _mapSpan = span;
            map.SetRegion(region);
        }
Ejemplo n.º 6
0
        partial void Button2_Activated(WKInterfaceButton sender)
        {
            if (this.app.ButtonClicked(2))
            {
                this.DisplayKeyboard();
            }

            this.DisplayValue();
        }
Ejemplo n.º 7
0
 void SetStatus(bool isStale, WKInterfaceButton button)
 {
     if (isStale)
     {
         button.SetBackgroundColor(UIColor.Red);
         button.SetTitle("-");
     }
     else
     {
         button.SetBackgroundColor(UIColor.FromRGBA(red: 0.16f, green: 0.26f, blue: 0.4f, alpha: 1f));
     }
 }
Ejemplo n.º 8
0
partial         void WKInterfaceButton3_Activated(WKInterfaceButton sender)
        {
            PresentTextInputController (new string[0], WatchKit.WKTextInputMode.Plain, (result) => {
                // action when the "text input" is complete
                if (result != null && result.Count > 0) {
                    var text = result.GetItem<NSObject> (0).ToString ().ToUpper ();
                    dialog.Add (text);
                    if (!isGameStart) {
                        isGameStart = true;

                        tempWord = GetTempWord (text);
                        usedCities.Add (text);

                        dialog.Add (FindAnswer ());

                    } else {
                        if (!IsCorrect (text)) {
                            dialog.Add ("Ты ошибся");
                        }

                        dialog.Add (FindAnswer ());
                    }

                    RebuildDialog ();

                } else {
                    Console.WriteLine ("canceled");
                }
            });
        }
		partial void btnZoomOut_Activated (WKInterfaceButton sender)
		{
			var span = new MKCoordinateSpan (_mapSpan.LatitudeDelta * 2, _mapSpan.LongitudeDelta * 2);
			var region = new MKCoordinateRegion (_mapRegion.Center, span);

			_mapSpan = span;
			map.SetRegion (region);
		}
Ejemplo n.º 10
0
		void SetButton (WKInterfaceButton button, string title, bool enabled)
		{
			button.SetTitle (title);
			button.SetEnabled (enabled);
		}
Ejemplo n.º 11
0
 void SetStatus(bool isStale, WKInterfaceButton button)
 {
     if (isStale)
     {
         button.SetBackgroundColor(UIColor.Red);
         button.SetTitle("-");
     }
     else
     {
         button.SetBackgroundColor(UIColor.FromRGBA(red: 0.16f, green: 0.26f, blue: 0.4f, alpha: 1f));
     }
 }
Ejemplo n.º 12
0
 void SetButton(WKInterfaceButton button, string title, bool enabled)
 {
     button.SetTitle(title);
     button.SetEnabled(enabled);
 }
Ejemplo n.º 13
0
 partial void tapButton_Activated(WKInterfaceButton sender)
 {
     tapCount++;
     countsLabel.SetText(tapCount.ToString());
     WatchExt.Wormhole.PassMessage("watchTaps", tapCount);
 }
Ejemplo n.º 14
0
 partial void tapButton_Activated(WKInterfaceButton sender)
 {
     watchTaps++;
     watchCountLabel.SetText(String.Format("Watch: {0}", watchTaps));
     WatchComm.Wormhole.PassMessage("watchTaps", watchTaps);
 }
partial         void voiceInputButton_Activated(WKInterfaceButton sender)
        {
            PresentTextInputController (new string[5] {"Turn Off", "Turn On", "Brightness Low", "Brightness Medium", "Brightness High"},
                                        WatchKit.WKTextInputMode.Plain,
                                        (result) => {
                // action when the "text input" is complete
                if (result != null && result.Count > 0) {
                    var dictatedText = result.GetItem<NSObject>(0).ToString();
                    Console.WriteLine (dictatedText);
                    this.ProcessTextCommand(dictatedText);
                }
            });
        }