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

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

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

            if (CancelButton != null)
            {
                CancelButton.Dispose();
                CancelButton = null;
            }
        }
Example #2
0
        void ReleaseDesignerOutlets()
        {
            if (DownloadingLabel != null)
            {
                DownloadingLabel.Dispose();
                DownloadingLabel = null;
            }

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

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

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

            if (CancelButton != null)
            {
                CancelButton.Dispose();
                CancelButton = null;
            }
        }
Example #3
0
        void ReleaseDesignerOutlets()
        {
            if (AliasTextField != null)
            {
                AliasTextField.Dispose();
                AliasTextField = null;
            }

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

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

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

            if (CancelButton != null)
            {
                CancelButton.Dispose();
                CancelButton = null;
            }
        }
Example #4
0
        void ReleaseDesignerOutlets()
        {
            if (CallButton != null)
            {
                CallButton.Dispose();
                CallButton = null;
            }

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

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

            if (LogTextView != null)
            {
                LogTextView.Dispose();
                LogTextView = null;
            }
        }
Example #5
0
        void ReleaseDesignerOutlets()
        {
            if (CancelButton != null)
            {
                CancelButton.Dispose();
                CancelButton = null;
            }

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

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

            if (UseButton != null)
            {
                UseButton.Dispose();
                UseButton = null;
            }
        }
Example #6
0
 public ModalButtonOptions(bool showCancel, bool showConfirm, CancelButton cancelButton, ConfirmButton confirmButton)
 {
     this.ShowCancelButton  = showCancel;
     this.ShowConfirmButton = showConfirm;
     this.CancelButtonType  = cancelButton;
     this.ConfirmButtonType = confirmButton;
 }
        void ReleaseDesignerOutlets()
        {
            if (BrandName != null)
            {
                BrandName.Dispose();
                BrandName = null;
            }

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

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

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

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

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

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

            if (CancelButton != null)
            {
                CancelButton.Dispose();
                CancelButton = null;
            }
        }
Example #9
0
        private void Window_Activated(object sender, EventArgs e)
        {
            DeleteButton.SetContent("Delete");
            CancelButton.SetContent("Cancel");

            ListItemsToDelete.SetList(paths);
        }
Example #10
0
            protected override bool ProcessDialogChar(char charCode)
            {
                // Shortcut keys, kinda like mnemonics, except you don't have to press Alt
                if ((charCode == 'N' || charCode == 'n') && (CancelButton != null && (CancelButton as Button).Text == "No"))
                {
                    CancelButton.PerformClick();
                }
                else if ((charCode == 'Y' || charCode == 'y') && (AcceptButton as Button).Text == "Yes")
                {
                    AcceptButton.PerformClick();
                }
                else if ((charCode == 'A' || charCode == 'a') && (CancelButton != null && (CancelButton as Button).Text == "Abort"))
                {
                    CancelButton.PerformClick();
                }
                else if ((charCode == 'R' || charCode == 'r') && (AcceptButton as Button).Text == "Retry")
                {
                    AcceptButton.PerformClick();
                }
                else if ((charCode == 'I' || charCode == 'i') && buttons.Length >= 3 && buttons[2].Text == "Ignore")
                {
                    buttons[2].PerformClick();
                }

                return(base.ProcessDialogChar(charCode));
            }
Example #11
0
        protected override void OnKeyDown(KeyEventArgs e)
        {
            base.OnKeyDown(e);

            if (e.KeyCode == Keys.Enter && AcceptButton != null && lastAcceptForm == null)
            {
                lastAcceptForm = this;

                // Start timer that will reset the last form with the accept button.
                if (lastAcceptFormTimer != null)
                {
                    lastAcceptFormTimer.Dispose();
                }

                lastAcceptFormTimer          = new Timer();
                lastAcceptFormTimer.Interval = 1000; // Interval between the accepting forms.
                lastAcceptFormTimer.Tick    += (sender, args) =>
                {
                    lastAcceptForm = null;
                    lastAcceptFormTimer.Dispose();
                    lastAcceptFormTimer = null;
                };
                lastAcceptFormTimer.Start();

                AcceptButton.PerformClick();
            }

            if (e.KeyCode == Keys.Escape && CancelButton != null)
            {
                CancelButton.PerformClick();
            }
        }
Example #12
0
        void ReleaseDesignerOutlets()
        {
            if (CancelButton != null)
            {
                CancelButton.Dispose();
                CancelButton = null;
            }

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

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

            if (ContainerView != null)
            {
                ContainerView.Dispose();
                ContainerView = null;
            }
        }
Example #13
0
        void ReleaseDesignerOutlets()
        {
            if (CancelButton != null)
            {
                CancelButton.Dispose();
                CancelButton = null;
            }

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

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

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

            if (textBox != null)
            {
                textBox.Dispose();
                textBox = null;
            }
        }
Example #14
0
        void ReleaseDesignerOutlets()
        {
            if (ActivityDescription != null)
            {
                ActivityDescription.Dispose();
                ActivityDescription = null;
            }

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

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

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

            if (ContinueButton != null)
            {
                ContinueButton.Dispose();
                ContinueButton = null;
            }
        }
Example #15
0
        private void Edit_Details_Load_1(object sender, EventArgs e)
        {
            SaveButton.Hide();
            CancelButton.Hide();

            NewBookButton.Enabled     = true;
            SaveNewBookButton.Enabled = false;

            TitleTextBox.Text         = BookSearchMain.passtitle;
            AuthorTextBox.Text        = BookSearchMain.passauthor;
            PublisherTextBox.Text     = BookSearchMain.passpublisher;
            BookTypeListBox.Text      = BookSearchMain.passbooktype;
            PriceTextBox.Text         = BookSearchMain.passprice;
            EditionTextBox.Text       = BookSearchMain.passedition;
            YearPublishedTextBox.Text = BookSearchMain.passyearpublished;
            QuantityTextBox.Text      = BookSearchMain.passquantity;
            BookIDLabelBox.Text       = BookSearchMain.passbookID;

            TitleTextBox.Enabled         = false;
            AuthorTextBox.Enabled        = false;
            PublisherTextBox.Enabled     = false;
            BookTypeListBox.Enabled      = false;
            PriceTextBox.Enabled         = false;
            EditionTextBox.Enabled       = false;
            YearPublishedTextBox.Enabled = false;
            QuantityTextBox.Enabled      = false;
        }
        void ReleaseDesignerOutlets()
        {
            if (CancelButton != null)
            {
                CancelButton.Dispose();
                CancelButton = null;
            }

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

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

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

            if (PinTextField != null)
            {
                PinTextField.Dispose();
                PinTextField = null;
            }
        }
Example #17
0
        void ReleaseDesignerOutlets()
        {
            if (ProgressTextView != null)
            {
                ProgressTextView.Dispose();
                ProgressTextView = null;
            }

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

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

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

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

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

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

            if (SubmitButton != null)
            {
                SubmitButton.Dispose();
                SubmitButton = null;
            }
        }
Example #19
0
    public void ShowPopup(string message, ConfirmationCallback callback)
    {
        if (!Container.activeSelf)
        {
            Container.SetActive(true);
            MessageContainer.GetComponent <Text>().text = message;

            // If callback is null, then just show the accept button
            if (callback != null)
            {
                ConfirmCallback += callback;

                // Re-enable cancel button and move confirm button back to it's correct position
                CancelButton.SetActive(true);
                ConfirmButton.transform.position = ConfirmPosition;
            }
            else
            {
                // Disable cancel button and move confirm to center
                CancelButton.SetActive(false);
                ConfirmButton.GetComponent <RectTransform>().position = new Vector3(
                    ConfirmPosition.x + 45f,
                    ConfirmButton.transform.position.y,
                    ConfirmButton.transform.position.z
                    );
            }
        }
        else
        {
            Debug.Log("There is already a popup");
        }
    }
Example #20
0
 private void JumpToKeyDialog_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Escape)
     {
         CancelButton.PerformClick();
     }
 }
Example #21
0
        void MirInputBox_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!char.IsControl(e.KeyChar) &&
                !char.IsDigit(e.KeyChar))
            {
                e.Handled = true;
            }

            if (e.KeyChar == (char)Keys.Enter)
            {
                if (OKButton != null && !OKButton.IsDisposed)
                {
                    OKButton.InvokeMouseClick(EventArgs.Empty);
                }
                e.Handled = true;
            }
            else if (e.KeyChar == (char)Keys.Escape)
            {
                if (CancelButton != null && !CancelButton.IsDisposed)
                {
                    CancelButton.InvokeMouseClick(EventArgs.Empty);
                }
                e.Handled = true;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (CancelButton != null)
            {
                CancelButton.Dispose();
                CancelButton = null;
            }

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

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

            if (TitleText != null)
            {
                TitleText.Dispose();
                TitleText = null;
            }
        }
Example #23
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            this.View.AutosizesSubviews = true;

            ImageView.Image = UIImageHelper.FromFileAuto("iTunesArtwork");
            ImageView.Layer.CornerRadius  = 24f;
            ImageView.Layer.MasksToBounds = true;

            CancelButton.SetBackgroundImage(Images.Buttons.GreyButton.CreateResizableImage(new UIEdgeInsets(18, 18, 18, 18)), UIControlState.Normal);
            CancelButton.TintColor           = UIColor.Black;
            CancelButton.Layer.ShadowColor   = UIColor.Black.CGColor;
            CancelButton.Layer.ShadowOffset  = new CGSize(0, 1);
            CancelButton.Layer.ShadowOpacity = 0.3f;
            CancelButton.TouchUpInside      += (sender, e) => DismissViewController(true, OnDismissed);

            EnableButton.SetBackgroundImage(Images.Buttons.BlackButton.CreateResizableImage(new UIEdgeInsets(18, 18, 18, 18)), UIControlState.Normal);
            EnableButton.TintColor           = UIColor.White;
            EnableButton.Layer.ShadowColor   = UIColor.Black.CGColor;
            EnableButton.Layer.ShadowOffset  = new CGSize(0, 1);
            EnableButton.Layer.ShadowOpacity = 0.3f;
            EnableButton.TouchUpInside      += EnablePushNotifications;

            PushLabel.Layer.CornerRadius  = PushLabel.Frame.Width / 2;
            PushLabel.Layer.MasksToBounds = true;
        }
Example #24
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            // Perform any additional setup after loading the view, typically from a nib.

            TableView.Source = new ItemsDataSource(tableData, SelectedAction);
            TableView.ShowsVerticalScrollIndicator = true;
            TableView.RegisterClassForCellReuse(typeof(UITableViewCell), CELL_IDENTIFIER);

            UITapGestureRecognizer tapOutside = new UITapGestureRecognizer();

            CancelButton.AddTarget(Button_TouchUpInside, UIControlEvent.TouchUpInside);
            CancelButton.Layer.CornerRadius = 3;

            PopUpView.Layer.CornerRadius = 3;

            UIView padding     = new UIView(new CGRect(0, 0, 30, 20));
            var    RightButton = new UIButton();

            RightButton.SetImage(UIImage.FromBundle("search"), UIControlState.Normal);
            padding.AddSubview(RightButton);
            RightButton.Frame             = new CGRect(5, 0, 20, 20);
            RightButton.TintColor         = UIColor.Red;
            searchTextField.RightView     = padding;
            searchTextField.RightViewMode = UITextFieldViewMode.Always;

            searchTextField.AddTarget(SearchTextField_ValueChanged, UIControlEvent.EditingChanged);
        }
        void ReleaseDesignerOutlets()
        {
            if (CancelButton != null)
            {
                CancelButton.Dispose();
                CancelButton = null;
            }

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

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

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

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

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

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

            if (ApplyButton != null)
            {
                ApplyButton.Dispose();
                ApplyButton = null;
            }
        }
Example #27
0
        void ReleaseDesignerOutlets()
        {
            if (CancelButton != null)
            {
                CancelButton.Dispose();
                CancelButton = null;
            }

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

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

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

            if (RdnTextField != null)
            {
                RdnTextField.Dispose();
                RdnTextField = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (addButton != null)
            {
                addButton.Dispose();
                addButton = null;
            }

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

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

            if (WeightField != null)
            {
                WeightField.Dispose();
                WeightField = null;
            }
        }
Example #29
0
        void ReleaseDesignerOutlets()
        {
            if (CancelButton != null)
            {
                CancelButton.Dispose();
                CancelButton = null;
            }

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

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

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

            if (SideSplashView != null)
            {
                SideSplashView.Dispose();
                SideSplashView = null;
            }
        }
 void ReleaseDesignerOutlets()
 {
     if (CancelButton != null)
     {
         CancelButton.Dispose();
         CancelButton = null;
     }
     if (DoneSwitch != null)
     {
         DoneSwitch.Dispose();
         DoneSwitch = null;
     }
     if (ForText != null)
     {
         ForText.Dispose();
         ForText = null;
     }
     if (NameText != null)
     {
         NameText.Dispose();
         NameText = null;
     }
     if (NotesText != null)
     {
         NotesText.Dispose();
         NotesText = null;
     }
     if (SaveButton != null)
     {
         SaveButton.Dispose();
         SaveButton = null;
     }
 }
                }//Constructor()


                #region SetUp
                private void SetUpButtons()
                {
                        _validateButton = new ValidateButton("Create", this.Width * 0.5, this.Height * 0.07, new System.Windows.Thickness(0, 30, 0, 30), new System.Windows.Thickness(5, 5, 5, 5), System.Windows.HorizontalAlignment.Center);
                        _validateButton.MouseDown += _validateButton_MouseDown;
                        _validateButton.IsEnabled = false;

                        _cancelButton = new CancelButton("Cancel", this.Width * 0.5, this.Height * 0.07, new System.Windows.Thickness(0, 0, 0, 0), new System.Windows.Thickness(5, 5, 5, 5), System.Windows.HorizontalAlignment.Center);

                        _cancelButton.MouseDown += _cancelButton_MouseDown;
                }
                public OpenProjectPopUp(double width, double height, string content)
                        : base(width, height, content)
                {
                        this.Background = ThemeSelector.GetPopUpBackground();

                        _separator = new Separator();
                        _separator.Width = this.Width * 0.5;
                        _separator.Background = ThemeSelector.GetBackground();

                        _scroller = new ScrollViewer();
                        _scroller.Height = this.Height*0.6;


                        _projectsPanel = new StackPanel();
                        _projectsPanel.Orientation = Orientation.Vertical;
                        _projectsPanel.Margin = new System.Windows.Thickness(0, 30, 0, 0);

                        _projectItemList = new List<ProjectItem>();

                        List<string> projects = new ProjectMasterChief().GetProjects();

                        foreach (var item in projects)
                        {
                                ProjectItem proj = new ProjectItem(this.Height * 0.05, item, new StatsWarrior().GetAdvancedTasksRatio(item).ToString());
                                _projectItemList.Add(proj);
                                _projectsPanel.Children.Add(proj);
                                proj.MouseDown += proj_MouseDown;
                        }

                        _scroller.Content = _projectsPanel;



                        _openButton = new ValidateButton(ControlsValues.OPEN, this.Width * 0.5, this.Height * 0.07, new System.Windows.Thickness(0, 20, 0, 2), new System.Windows.Thickness(5, 5, 5, 5), System.Windows.HorizontalAlignment.Center);

                        _openButton.MouseDown += _openButton_MouseDown;
                        _openButton.IsEnabled = false;

                        _cancelButton = new CancelButton(ControlsValues.CLOSE, this.Width * 0.5, this.Height * 0.07, new System.Windows.Thickness(0, 5, 0, 30), new System.Windows.Thickness(5, 5, 5, 5), System.Windows.HorizontalAlignment.Center);

                        _cancelButton.MouseDown += _cancelButton_MouseDown;

                        _container.Children.Add(_separator);
                        _container.Children.Add(_scroller);

                        _container.Children.Add(_openButton);
                        _container.Children.Add(_cancelButton);

                }
                /// <summary>
                /// Is used for brainstormings
                /// </summary>
                /// <param name="name"></param>
                /// <param name="details"></param>
                /// <param name="taskPanel"></param>
                /// <param name="coordinator"></param>
                public DetailsPanel(string name, string details, SingleTaskPanel taskPanel, RightPanelCoordinator coordinator)
                {
                        //Setting up the details panel properties
                        this.Orientation = Orientation.Vertical;
                        this.Width = Dimensions.GetWidth() * 0.27;
                        this.Height = Dimensions.GetHeight() * 0.8;
                        this.Background = ThemeSelector.GetBackground();
                        _container = new StackPanel();
                        _container.Orientation = System.Windows.Controls.Orientation.Vertical;

                        //Setting up the fields
                        _coordinator = coordinator;
                        _name = new TextBlock();
                        _details = new TextBlock();                       

                        _name.Text = name;
                        _details.Text = details;
                        _taskPanel = taskPanel;

                        _updateButton = new ValidateButton(ControlsValues.UPDATE, this.Width * 0.6, this.Height * 0.05, new System.Windows.Thickness(0, 0, 0, 0), new System.Windows.Thickness(0, 0, 0, 0), System.Windows.HorizontalAlignment.Center);
                        _updateButton.MouseDown += _updateButton_MouseDown;

                        _deleteButton = new CancelButton(ControlsValues.DELETE, this.Width * 0.6, this.Height * 0.05, new System.Windows.Thickness(0, 20, 0, 0), new System.Windows.Thickness(0, 0, 0, 0), System.Windows.HorizontalAlignment.Center);

                        _deleteButton.MouseDown += _deleteButton_MouseDown;

                        _quitButton = new CancelButton(ControlsValues.CLOSE, this.Width * 0.6, this.Height * 0.05, new System.Windows.Thickness(0, 30, 0, 0), new System.Windows.Thickness(0, 0, 0, 0), System.Windows.HorizontalAlignment.Center);
                        _quitButton.MouseDown += _quitButton_MouseDown;

                        //Setting up the components
                        SetUpName();
                        _nameSeparator = SetUpSeparator();                        
                        SetUpDetails();
                        

                        //Adding the components to the details panel
                        _container.Children.Add(_name);
                        _container.Children.Add(_nameSeparator);
                        _container.Children.Add(_details);
                        _container.Children.Add(_updateButton);
                        _container.Children.Add(_deleteButton);
                        _container.Children.Add(_quitButton);

                        this.Children.Add(_container);
                }
                public NewProjectPanel(ValidateButton createProjectButton, CancelButton quitProjectButton, double width)
                {
                        this.Orientation = System.Windows.Controls.Orientation.Vertical;
                        _containerWidth = width;
                        //this.Background = new SolidColorBrush(Colors.Chartreuse);
                        
                        _chief = new Masterchief();

                        _titleBlock = new TextBlock();
                        _nameBox = new TextBox();
                        _checkBlock = new TextBlock();
                        _startDateBlock = new TextBlock();
                        _startDatePicker = new DatePicker();
                        _endDateBlock = new TextBlock();
                        _endDatePicker = new DatePicker();

                        _actionsPanel = new StackPanel();

                        _dateAlert = new StatsBlock();
                        _dateAlert.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;

                        SetUpTitleBlock(width);
                        SetUpNameBox(width);
                        
                        SetUpDateBlocks();
                        SetUpStartDatePicker(width);
                        SetUpEndDatePicker(width);
                        SetUpCreateProjectButton(createProjectButton, width);
                        SetUpQuitButton(quitProjectButton, width);

                        this.Children.Add(_titleBlock);
                        this.Children.Add(_nameBox);
                        this.Children.Add(_checkBlock);
                        this.Children.Add(_startDateBlock);
                        this.Children.Add(_startDatePicker);
                        this.Children.Add(_endDateBlock);
                        this.Children.Add(_endDatePicker);
                        this.Children.Add(_dateAlert);
                        this.Children.Add(createProjectButton);
                        this.Children.Add(quitProjectButton);

SetUpCheckBlock();
                }
                public StatsPopUp(double width, double height, string content, string project)
                        : base(width, height, content)
                {
                        this.Background = ThemeSelector.GetPopUpBackground();

                        _project = project;
                        _overallButton = new ValidateButton("Overall stats", this.Width * 0.5, this.Height * 0.07, new System.Windows.Thickness(0, 14, 0, 3), new System.Windows.Thickness(5, 5, 5, 5), System.Windows.HorizontalAlignment.Center);
                        _overallButton.MouseDown += _overallButton_MouseDown;

                        _projectStatsButton = new ValidateButton(project + " statistics", this.Width * 0.5, this.Height * 0.07, new System.Windows.Thickness(0, 2, 0, 3), new System.Windows.Thickness(5, 5, 5, 5), System.Windows.HorizontalAlignment.Center);
                        _projectStatsButton.MouseDown += _projectStatsButton_MouseDown;

                        _closeButton = new CancelButton(ControlsValues.CLOSE, this.Width * 0.5, this.Height * 0.07, new System.Windows.Thickness(0, 2, 0, 3), new System.Windows.Thickness(5, 5, 5, 5), System.Windows.HorizontalAlignment.Center);

                        _closeButton.MouseDown += _closeButton_MouseDown;


                        _container.Children.Add(_overallButton);
                        _container.Children.Add(_projectStatsButton);
                        _container.Children.Add(_closeButton);
                }
                public AccentSelectionPopUp(double width, double height, string content):base( width,  height,  content)
                {
                        this.Background = Palette2.GetColor("#B0BEC5");

                        _scroller = new ScrollViewer();
                        _scroller.MaxHeight = 700;

                        _colorsContainer = new StackPanel();
                        _colorsContainer.Orientation = Orientation.Vertical;
                        _colorsContainer.MaxWidth = width * 0.8;

                        SetUpColorList();

                        _selectedBlock = new TextBlock();
                        _selectedBlock.FontFamily = FontProvider._lato;
                        _selectedBlock.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
                        _selectedBlock.FontSize = 25;
                        _selectedBlock.Margin = new System.Windows.Thickness(0, 20, 0, 0);


                        _actionspanel = new StackPanel();
                        _actionspanel.Orientation = Orientation.Horizontal;
                        _actionspanel.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;

                        _selectButton = new ValidateButton("Select", Dimensions.GetWidth() * 0.2, Dimensions.GetHeight() * 0.07, new System.Windows.Thickness(0, 30, 20, 30), new System.Windows.Thickness(5, 5, 5, 5), System.Windows.HorizontalAlignment.Center);
                        _selectButton.IsEnabled = false;

                        _closeButton = new CancelButton("Cancel", Dimensions.GetWidth() * 0.2, Dimensions.GetHeight() * 0.07, new System.Windows.Thickness(0, 30,0 , 30), new System.Windows.Thickness(5, 5, 5, 5), System.Windows.HorizontalAlignment.Center);
                        _closeButton.MouseDown += _closeButton_MouseDown;

                        _actionspanel.Children.Add(_selectButton);
                        _actionspanel.Children.Add(_closeButton);

                        _scroller.Content = _colorsContainer;

                        _container.Children.Add(_scroller);
                        _container.Children.Add(_selectedBlock);
                        _container.Children.Add(_actionspanel);
                }
                public RenamePopUp(double width, double height, string content) : base ( width,  height,  content)
                {
                        _block.Text = "Renaming " + _block.Text + " To ";

                        _nameBox = new TextBox();
                        _nameBox.Width = width * 0.7;
                        _nameBox.Height = height / 10;
                        _nameBox.FontFamily = FontProvider._lato;
                        _nameBox.FontSize = 15;
                        _nameBox.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;

                        _validateButton = new ValidateButton(ControlsValues.COOL, this.Width * 0.75, this.Width / 6, new Thickness(0, this.Width / 20, 0, 0), new Thickness(0, this.Width / 30, 0, 0), HorizontalAlignment.Center);
                        _validateButton.MouseDown += _validateButton_MouseDown;

                         _cancelButton = new CancelButton(ControlsValues.NEVER_MIND, this.Width * 0.75, this.Width / 6, new Thickness(0, this.Width / 20, 0, 0), new Thickness(0, this.Width / 30, 0, 0), HorizontalAlignment.Center);
                         _cancelButton.MouseDown += _cancelButton_MouseDown;

                         _container.Children.Add(_nameBox);
                         _container.Children.Add(_validateButton);
                         _container.Children.Add(_cancelButton);

                         this.Show();
                }
                private void SetUpDeleteButton(double width)
                {
                        _deleteButton = new CancelButton(ControlsValues.DELETE, width / 5, width / 30, new System.Windows.Thickness(0, width / 70, 0, 0), new System.Windows.Thickness(0, width / 200, 0, 0), System.Windows.HorizontalAlignment.Center);

                        _deleteButton.MouseDown += _deleteButton_MouseDown;
                }
Example #39
0
                public ReportBug(double width, double height, string content)
                        : base(width, height, content)
                {
                        this.Background = ThemeSelector.GetPopUpBackground();
                        _mail = new TextBlock();
                        _mail.Text = "Send an email to [email protected]";
                        _mail.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
                        _mail.FontFamily = FontProvider._lato;
                        _mail.FontSize = 20;
                        _mail.Margin = new System.Windows.Thickness(0, 30, 0, 0);


                        _detailsBlock = new TextBlock();
                        _detailsBlock.Text = "Please be specific and precise when describing the bug you encountered. Just saying \"Your app bugs\" won't help. Make sure to specify the window you were on, the section you were on, what you did, what happened, and what you think should have happened. \n\n  Please type in your mail address so that we can answer  you.";
                        _detailsBlock.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
                        _detailsBlock.FontFamily = FontProvider._lato;
                        _detailsBlock.Width = this.Width * 0.6;
                        _detailsBlock.FontSize = Responsive.GetPopUpTextSize();
                        _detailsBlock.Margin = new System.Windows.Thickness(0, 20, 0, 0);
                        _detailsBlock.TextWrapping = System.Windows.TextWrapping.Wrap;
                        _detailsBlock.TextAlignment = TextAlignment.Justify;



                        _mailBox = new TextBox();
                        _mailBox.Width = this.Width * 0.5;
                        _mailBox.Height = this.Height * 0.03;
                        _mailBox.FontFamily = FontProvider._lato;
                        _mailBox.FontSize = 15;
                        _mailBox.TextWrapping = TextWrapping.Wrap;
                        _mailBox.Margin = new Thickness(0, 20, 0, 0);
                        _mailBox.TextChanged += _mailBox_TextChanged;


                        _bugBox = new TextBox();
                        _bugBox.Width = this.Width * 0.5;
                        _bugBox.Height = this.Height * 0.1;
                        _bugBox.FontFamily = FontProvider._lato;
                        _bugBox.FontSize = 15;
                        _bugBox.TextWrapping = TextWrapping.Wrap;
                        _bugBox.Margin = new Thickness(0, 20, 0, 0);

                        _bugBox.TextChanged += _bugBox_TextChanged;


                        _mailSendingBlock = new TextBlock();
                        _mailSendingBlock.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
                        _mailSendingBlock.FontFamily = FontProvider._lato;
                        _mailSendingBlock.FontSize = 25;
                        _mailSendingBlock.Margin = new System.Windows.Thickness(0, 5, 0, 0);
                        _mailSendingBlock.TextWrapping = System.Windows.TextWrapping.Wrap;
                        _mailSendingBlock.Foreground = ThemeSelector.GetButtonContentColor();
                        _mailSendingBlock.Text = "Sending the mail might take a few seconds.";

                        _sendButton = new ValidateButton("Send this mail right now", this.Width * 0.5, this.Height * 0.07, new System.Windows.Thickness(0, 20, 0, 0), new System.Windows.Thickness(5, 5, 5, 5), System.Windows.HorizontalAlignment.Center);
                        _sendButton.IsEnabled = false;
                        _sendButton.MouseDown += _sendButton_MouseDown;

                        _closeButton = new CancelButton("I am debugging this myself", this.Width * 0.5, this.Height * 0.07, new System.Windows.Thickness(0, 10, 0, 0), new System.Windows.Thickness(5, 5, 5, 5), System.Windows.HorizontalAlignment.Center);

                        _closeButton.MouseDown += _closeButton_MouseDown;

                        //_container.Children.Add(_mail);
                        _container.Children.Add(_detailsBlock);
                        _container.Children.Add(_mailBox);
                        _container.Children.Add(_bugBox);
                        _container.Children.Add(_mailSendingBlock);
                        _container.Children.Add(_sendButton);
                        _container.Children.Add(_closeButton);
                }
                private void SetUpLeaveButton( double width)
                {
                        _leaveButton = new CancelButton(ControlsValues.LEAVE, width / 2, width / 30, new System.Windows.Thickness(0, width / 50, 0, 0), new System.Windows.Thickness(0, width / 200, 0, 0), System.Windows.HorizontalAlignment.Center);


                        _leaveButton.MouseEnter += _leaveButton_MouseEnter;
                        _leaveButton.MouseLeave += _leaveButton_MouseLeave;
                }
                private void SetUpButtons(double width, double height)
                {
                        _applyButton = new ValidateButton(ControlsValues.APPLY, width * 0.7, height * 0.05, new System.Windows.Thickness(0, 20, 0, 0), new System.Windows.Thickness(0, 0, 0, 0), System.Windows.HorizontalAlignment.Center);

                        _nopeButton = new CancelButton(ControlsValues.NOPE, width * 0.7, height * 0.05, new System.Windows.Thickness(0, 20, 0, 0), new System.Windows.Thickness(0, 0, 0, 0), System.Windows.HorizontalAlignment.Center);
                }
                private void SetUpQuitButton(CancelButton quitProjectButton, double width)
                {
                        TextBlock quitBlock = new TextBlock();
                        //quitBlock.Text = "Forget it...";
                        //quitBlock.FontSize = 25;
                        //quitBlock.Padding = new System.Windows.Thickness(0, Convert.ToUInt16(_endDatePicker.Height / 3), 0, 0);
                        //quitBlock.FontFamily =FontProvider._lato;
                        //quitBlock.Foreground = ThemeSelector.GetAccentColor();
                        //quitBlock.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;


                        //_quitButton = quitProjectButton;
                        //_quitButton.Children.Add(quitBlock);
                        //_quitButton.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
                        //_quitButton.Background = (SolidColorBrush)(new BrushConverter().ConvertFrom(Palette2.CANCEL));
                        //_quitButton.Margin = new System.Windows.Thickness(0, 0, 0, width / 60);
                        //_quitButton.Width = width / 2;
                        //_quitButton.Height = width / 30;
                }