Ejemplo n.º 1
0
 void init()
 {
     TitleColor   = TintColor;
     BorderWidth  = .5f;
     CornerRadius = 5f;
     TitleLabel.AddObserver(this, new MonoTouch.Foundation.NSString("text"), MonoTouch.Foundation.NSKeyValueObservingOptions.Old | MonoTouch.Foundation.NSKeyValueObservingOptions.New, IntPtr.Zero);
 }
Ejemplo n.º 2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            TitleLabel.SetBinding(v => v.Text, ViewModel.Title);
            DescriptionLabel.SetBinding(v => v.Text, ViewModel.Description);
        }
Ejemplo n.º 3
0
        private void MainMenuButton_Click(object sender, EventArgs e)
        {
            DialogResult dr = MessageBox.Show("Save your result?", "Attention", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);

            if (dr == DialogResult.Yes)
            {
                results += String.Format("{0}\t Level: {1}\t Solved himself: {2}\t Auto solve: {3}\n", name, level - 5, level - 5 - autoSolves, autoSolves);
            }
            else if (dr == DialogResult.Cancel)
            {
                return;
            }
            dr = MessageBox.Show("Are you want to exit to main menu?", "Attention", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
            if (dr == DialogResult.Yes)
            {
                level      = 6;
                autoSolves = 0;
                Vertices.Clear();
                Edges.Clear();
                DrawAll();
                Text = "Untangle";
                StartButton.Show();
                ExitStartMenuButton.Show();
                RulesStartMenuButton.Show();
                TitleLabel.Show();
                TitleUnderLabel.Show();
                isPlay    = false;
                isNewGame = true;
                MainMenuButton.Enabled = false;
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Если победил
        /// </summary>
        private void IsWin(object sender, MouseEventArgs e)
        {
            if (isPlay)
            {
                DialogResult dr = MessageBox.Show("You win!\nSave the graph picture?", "Congratz", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (dr == DialogResult.Yes)
                {
                    SaveButton_Click(sender, e);
                }

                if (MessageBox.Show("Continue?", "Congratz", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    level++;
                    StartLevel();
                    isPlay = true;
                }
                else
                {
                    results   += String.Format("{0}\t Level: {1}\t Solved himself: {2}\t Auto solve: {3}\n", name, level - 5, level - 5 - autoSolves, autoSolves);
                    level      = 4;
                    autoSolves = 0;
                    Vertices.Clear();
                    Edges.Clear();
                    DrawAll();
                    Text = "Untangle";
                    StartButton.Show();
                    ExitStartMenuButton.Show();
                    RulesStartMenuButton.Show();
                    TitleLabel.Show();
                    TitleUnderLabel.Show();
                    isPlay = false;
                    MainMenuButton.Enabled = false;
                }
            }
        }
Ejemplo n.º 5
0
 private void MoveDown()
 {
     Body.TranslateTo(0, 200, 500, Easing.Linear);
     MenuGrid.TranslateTo(0, 100, 500, Easing.Linear);
     TitleLabel.ScaleTo(2, 500, Easing.Linear);
     ico.ScaleTo(1.5, 500, Easing.Linear);
 }
        public GeoCoordinatesPage()
        {
            var currentLocationTitleLabel = new TitleLabel {
                Text = "Lat/Long"
            };

            var currentLocationValueLabel = new CenteredTextLabel();

            currentLocationValueLabel.SetBinding(Label.TextProperty, nameof(ViewModel.LatLongText));

            var latLongAccuracyTitleLabel = new TitleLabel {
                Text = "Lat/Long Accuracy"
            };

            var latLongAccruacyValueLabel = new CenteredTextLabel();

            latLongAccruacyValueLabel.SetBinding(Label.TextProperty, nameof(ViewModel.LatLongAccuracyText));

            Content = new StackLayout
            {
                Spacing           = 2,
                HorizontalOptions = LayoutOptions.Center,
                VerticalOptions   = LayoutOptions.Center,
                Children          =
                {
                    currentLocationTitleLabel,
                    currentLocationValueLabel,
                    latLongAccuracyTitleLabel,
                    latLongAccruacyValueLabel
                }
            };
        }
        void ReleaseDesignerOutlets()
        {
            if (AddUserButton != null)
            {
                AddUserButton.Dispose();
                AddUserButton = null;
            }

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

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

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

            if (UserTableView != null)
            {
                UserTableView.Dispose();
                UserTableView = null;
            }
        }
Ejemplo n.º 8
0
        void ReleaseDesignerOutlets()
        {
            if (CloseOrNotNowButton != null)
            {
                CloseOrNotNowButton.Dispose();
                CloseOrNotNowButton = null;
            }

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

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

            if (UpdateButton != null)
            {
                UpdateButton.Dispose();
                UpdateButton = null;
            }
        }
Ejemplo n.º 9
0
        public async Task ToggleSearchEntry()
        {
            uint titleSpeed = 400;
            uint fadeSpeed  = 250;
            var  easing     = Easing.CubicInOut;

            if (_isSearchVisible)
            {
                if (string.IsNullOrEmpty(SearchText))
                {
                    SearchEntry.FadeTo(0, fadeSpeed, Easing.CubicInOut);
                    await Task.Delay(50);

                    await TitleLabel.TranslateTo(0, -8, titleSpeed, easing);

                    _isSearchVisible = !_isSearchVisible;
                }
                else
                {
                    await DoSearch();
                }
            }
            else
            {
                TitleLabel.TranslateTo(0, -50, titleSpeed, Easing.CubicInOut);
                await Task.Delay(100);

                await SearchEntry.FadeTo(1, fadeSpeed, easing);

                _isSearchVisible = !_isSearchVisible;
            }
        }
Ejemplo n.º 10
0
        public override void UpdateVirtual()
        {
            bool multiplePages = MenuTree.Count > MaxEntriesPerPage;

            G.Sys.MenuPanelManager_.SetBottomLeftActionButtonEnabled(InputAction.MenuPageUp, multiplePages);
            G.Sys.MenuPanelManager_.SetBottomLeftActionButtonEnabled(InputAction.MenuPageDown, multiplePages);

            G.Sys.MenuPanelManager_.SetBottomLeftActionButton(InputAction.MenuPageUp, InternalResources.Strings.MenuSystem.MenuActionPrevious);
            G.Sys.MenuPanelManager_.SetBottomLeftActionButton(InputAction.MenuPageDown, InternalResources.Strings.MenuSystem.MenuActionNext);

            if (multiplePages)
            {
                if (InputManager.GetKeyUp(InputAction.MenuPageUp))
                {
                    SwitchPage(-1);
                }

                if (InputManager.GetKeyUp(InputAction.MenuPageDown))
                {
                    SwitchPage(+1);
                }
            }

            Description = string.Format(InternalResources.Strings.MenuSystem.MenuPageDescription, CurrentPageIndex + 1, PageCount);

            TitleLabel?.SetActive(true);
            UILabel TitleLabelObject = TitleLabel.GetComponent <UILabel>();

            (menu_.menuTitleLabel_ ?? TitleLabelObject).text = Title;

            DescriptionLabel?.SetActive(true);
            UILabel DescriptionLabelObject = DescriptionLabel.GetComponent <UILabel>();

            menu_.menuDescriptionLabel_.text_ = DescriptionLabelObject.text = Description;
        }
        public void UpdateForm()
        {
            this.Show();
            MainPanel.Controls.Clear();
            this.Menu = null;
            if (null != TheUser && TheUser.User != null)
            {
                CustomConsole.WriteLine("User OK");
                TitleLabel WelcomeLabel = new TitleLabel(20)
                {
                    Text = "Welcome, " + TheUser.User.name
                };
                TitleLabel AppLabel = new TitleLabel(30)
                {
                    Text = "Our Library PC APP"
                };
                Control[] ControlParam = { AppLabel, WelcomeLabel };
                Panel     HeaderPanel  = ControlUtil.GeneratePanel(1, ControlParam, 5, 400, 50, System.Drawing.Color.Blue);
                MainPanel.Controls.Add(HeaderPanel);
                AddMenus(true);
                this.Enabled = true;
            }
            else
            {
                AddMenus(false);

                CustomConsole.WriteLine("User Not OK");
            }
        }
Ejemplo n.º 12
0
        void ReleaseDesignerOutlets()
        {
            if (DetailLabel != null)
            {
                DetailLabel.Dispose();
                DetailLabel = null;
            }

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

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

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

            if (BottomSeparator != null)
            {
                BottomSeparator.Dispose();
                BottomSeparator = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (TitleLabel != null)
            {
                TitleLabel.Dispose();
                TitleLabel = null;
            }

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

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

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

            if (ActivityIndicator != null)
            {
                ActivityIndicator.Dispose();
                ActivityIndicator = null;
            }
        }
Ejemplo n.º 14
0
        void ReleaseDesignerOutlets()
        {
            if (InternalImageView != null)
            {
                InternalImageView.Dispose();
                InternalImageView = null;
            }

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

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

            if (BottomOffset != null)
            {
                BottomOffset.Dispose();
                BottomOffset = null;
            }
        }
Ejemplo n.º 15
0
        void ReleaseDesignerOutlets()
        {
            if (LoadTweets != null)
            {
                LoadTweets.Dispose();
                LoadTweets = null;
            }

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

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

            if (TitleLabel != null)
            {
                TitleLabel.Dispose();
                TitleLabel = null;
            }
        }
Ejemplo n.º 16
0
 private void MoveUp()
 {
     Body.TranslateTo(0, 0, 500, Easing.Linear);
     MenuGrid.TranslateTo(0, 0, 500, Easing.Linear);
     TitleLabel.ScaleTo(1, 500, Easing.Linear);
     ico.ScaleTo(1, 500, Easing.Linear);
 }
        void ReleaseDesignerOutlets()
        {
            if (ContentView != null)
            {
                ContentView.Dispose();
                ContentView = null;
            }

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

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

            if (TitleLabel != null)
            {
                TitleLabel.Dispose();
                TitleLabel = null;
            }
        }
        void HandleQueueDownloaderOnStart(LocalProgram startedProgram, int queueSize)
        {
            InvokeOnMainThread(delegate {
                Console.WriteLine("{0} has started", startedProgram.Name);

                TitleLabel.Text = startedProgram.Name;
                TitleLabel.SetNeedsDisplay();
                ImageView.Image = RemoteProgramHelper.GetFullsizeImageFromFile(startedProgram.ThumbnailPath, ImageView.Bounds);
                if (queueSize == 0)
                {
                    SubLabel.Text = "Downloading. No more items in the queue";
                }
                else if (queueSize == 1)
                {
                    SubLabel.Text = String.Format("Downloading. {0} item remaining to download", queueSize);
                }
                else
                {
                    SubLabel.Text = string.Format("Downloading. {0} items remaining to download", queueSize);
                }

                SubLabel.SetNeedsDisplay();
                ProgressBar.Progress = 0;
                ProgressBar.SetNeedsDisplay();
            });
        }
Ejemplo n.º 19
0
 void OnAttachToPanel(AttachToPanelEvent e)
 {
     if (NodeModel is IObjectReference modelReference && modelReference.ReferencedObject != null)
     {
         TitleLabel?.Bind(new SerializedObject(modelReference.ReferencedObject));
     }
 }
Ejemplo n.º 20
0
        public void SetLoadingMsg(string MSG)
        {
            Controls.Remove(LoadingInfo);
            LoadingInfo      = new TitleLabel();
            LoadingInfo.Text = MSG;

            Controls.Add(LoadingInfo);
        }
Ejemplo n.º 21
0
 private void Form1_Load(object sender, EventArgs e)
 {
     TitleLabel.Parent    = pictureBox1;
     TitleLabel.BackColor = Color.Transparent;
     // label1.Parent = this;
     // label1.Location = new Point(79, 128);
     TitleLabel.BringToFront();
 }
Ejemplo n.º 22
0
 public void Destroy()
 {
     foreach (IMenuElement obj in Items)
     {
         obj.Destroy();
     }
     Items.Clear();
     TitleLabel?.Destroy();
 }
Ejemplo n.º 23
0
        /// <inheritdoc />
        protected override void BuildPartUI(VisualElement container)
        {
            if (!(m_Model is INodeModel nodeModel))
            {
                return;
            }

            m_Root = new VisualElement {
                name = PartName
            };
            m_Root.AddToClassList(ussClassName);
            m_Root.AddToClassList(m_ParentClassName.WithUssElement(PartName));

            TitleContainer = new VisualElement();
            TitleContainer.AddToClassList(ussClassName.WithUssElement("title-container"));
            TitleContainer.AddToClassList(m_ParentClassName.WithUssElement("title-container"));
            m_Root.Add(TitleContainer);

            var icon = new VisualElement();

            icon.AddToClassList(ussClassName.WithUssElement("icon"));
            icon.AddToClassList(m_ParentClassName.WithUssElement("icon"));
            if (!string.IsNullOrEmpty(nodeModel.IconTypeString))
            {
                icon.AddToClassList(ussClassName.WithUssElement("icon").WithUssModifier(nodeModel.IconTypeString));
                icon.AddToClassList(m_ParentClassName.WithUssElement("icon").WithUssModifier(nodeModel.IconTypeString));
            }
            TitleContainer.Add(icon);

            if (HasEditableLabel)
            {
                TitleLabel = new EditableLabel {
                    name = titleLabelName
                };
                TitleLabel.RegisterCallback <ChangeEvent <string> >(OnRename);
            }
            else
            {
                TitleLabel = new Label {
                    name = titleLabelName
                };
            }

            TitleLabel.AddToClassList(ussClassName.WithUssElement("title"));
            TitleLabel.AddToClassList(m_ParentClassName.WithUssElement("title"));
            TitleContainer.Add(TitleLabel);

            if (nodeModel is IHasProgress hasProgress && hasProgress.HasProgress)
            {
                CoroutineProgressBar = new ProgressBar();
                CoroutineProgressBar.AddToClassList(ussClassName.WithUssElement("progress-bar"));
                CoroutineProgressBar.AddToClassList(m_ParentClassName.WithUssElement("progress-bar"));
                TitleContainer.Add(CoroutineProgressBar);
            }

            container.Add(m_Root);
        }
Ejemplo n.º 24
0
 public void Show()
 {
     Hidden = false;
     foreach (IMenuElement obj in Items)
     {
         obj.Show();
     }
     TitleLabel?.Show();
 }
Ejemplo n.º 25
0
 public void Translate(Vector2 delta)
 {
     offset += delta;
     foreach (IMenuElement obj in Items)
     {
         obj.Translate(delta);
     }
     TitleLabel?.Translate(delta);
 }
Ejemplo n.º 26
0
 public void Hide()
 {
     Hidden = true;
     foreach (IMenuElement obj in Items)
     {
         obj.Hide();
     }
     TitleLabel?.Hide();
 }
Ejemplo n.º 27
0
 private void prepareTitleLabel()
 {
     TitleLabel.Font            = RobotoFont.RegularWithSize(14);
     TitleLabel.TextAlignment   = UITextAlignment.Center;
     TitleLabel.BackgroundColor = Color.White;
     TitleLabel.SetDepthPreset(Button.DepthPreset());
     TitleLabel.SetCornerRadiusPreset(CornerRadiusPreset.Radius1);
     AddSubview(TitleLabel);
 }
Ejemplo n.º 28
0
        public ResultPage()
        {
            InitializeComponent();

            SubTitleLabel.TranslateTo(1000, 0, 0, null);
            TitleLabel.TranslateTo(1000, 0, 0, null);
            MoonBoy.TranslateTo(0, 1000, 0, null);
            Card.TranslateTo(1000, 0, 0, null);
        }
Ejemplo n.º 29
0
        void ReleaseDesignerOutlets()
        {
            if (BoxContentLabelTwo != null)
            {
                BoxContentLabelTwo.Dispose();
                BoxContentLabelTwo = null;
            }

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

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

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

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

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

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

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

            if (ToStartPageBtn != null)
            {
                ToStartPageBtn.Dispose();
                ToStartPageBtn = null;
            }
        }
Ejemplo n.º 30
0
        void ReleaseDesignerOutlets()
        {
            if (BackgroundButton != null)
            {
                BackgroundButton.Dispose();
                BackgroundButton = null;
            }

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

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

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

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

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

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

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

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