public AlreadyExistingProject(double width, double height, string content) : base ( width, height, content) { _validateButton = new ValidateButton(ControlsValues.NO_PROBLEMO, 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; _container.Children.Add(_validateButton); }
}//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); }
public void Initialize([NotNull] string title, [NotNull] DatabaseUri databaseUri, [NotNull] List <ItemId> quickActionBarValidators, [NotNull] List <ItemId> validateButtonValidators, [NotNull] List <ItemId> validatorBarValidators, [NotNull] List <ItemId> workflowValidators) { Assert.ArgumentNotNull(title, nameof(title)); Assert.ArgumentNotNull(databaseUri, nameof(databaseUri)); Assert.ArgumentNotNull(quickActionBarValidators, nameof(quickActionBarValidators)); Assert.ArgumentNotNull(validateButtonValidators, nameof(validateButtonValidators)); Assert.ArgumentNotNull(validatorBarValidators, nameof(validatorBarValidators)); Assert.ArgumentNotNull(workflowValidators, nameof(workflowValidators)); Title = title; QuickActionBar.Initialize(databaseUri, quickActionBarValidators); ValidateButton.Initialize(databaseUri, validateButtonValidators); ValidatorBar.Initialize(databaseUri, validatorBarValidators); Workflow.Initialize(databaseUri, workflowValidators); }
/// <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(); }
public SortingPopUp(double width, double height, string content) : base(width, height, content) { this.Background = ThemeSelector.GetPopUpBackground(); _sortImportanceButton = new ValidateButton("Sort by importance", this.Width * 0.5, this.Height * 0.09, new System.Windows.Thickness(0, 20, 0, 0), new System.Windows.Thickness(5, 5, 5, 5), System.Windows.HorizontalAlignment.Center); _sortImportanceButton.MouseDown += _sortButton_MouseDown; _sortImportanceButton.MinHeight = 50; _sortStateButton = new ValidateButton("Sort by state", this.Width * 0.5, this.Height * 0.09, new System.Windows.Thickness(0, 20, 0, 0), new System.Windows.Thickness(5, 5, 5, 5), System.Windows.HorizontalAlignment.Center); _sortStateButton.MouseDown += _sortButton_MouseDown; _sortStateButton.MinHeight = 50; _sortCreationButton = new ValidateButton("Sort by creation date", this.Width * 0.5, this.Height * 0.09, new System.Windows.Thickness(0, 20, 0, 0), new System.Windows.Thickness(5, 5, 5, 5), System.Windows.HorizontalAlignment.Center); _sortCreationButton.MouseDown += _sortButton_MouseDown; _sortCreationButton.MinHeight = 50; _container.Children.Add(_sortImportanceButton); _container.Children.Add(_sortStateButton); _container.Children.Add(_sortCreationButton); }
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 SetUpCreateProjectButton(ValidateButton createProjectButton, double width) { TextBlock createBlock = new TextBlock(); //createBlock.Text = "Go on !"; //createBlock.FontFamily = FontProvider._lato; //createBlock.FontSize = 25; //createBlock.Foreground = ThemeSelector.GetAccentColor(); //createBlock.Padding = new System.Windows.Thickness(0, Convert.ToUInt16(_endDatePicker.Height / 3), 0, 0); //createBlock.HorizontalAlignment = System.Windows.HorizontalAlignment.Center; _createButton = createProjectButton; //_createButton.Children.Add(createBlock); //_createButton.HorizontalAlignment = System.Windows.HorizontalAlignment.Center; //_createButton.Background = (SolidColorBrush)(new BrushConverter().ConvertFrom(Palette2.VALIDATE)); //_createButton.Width = width / 2; //_createButton.Height = width / 30; //_createButton.Margin = new System.Windows.Thickness(0, width / 60, 0, width / 60); _createButton.MouseDown += _createButton_MouseDown; }
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); }
public void Init(Drawable imageSource = null, string text = "", string scope = "") { Inflate(Context, Resource.Layout.WheelPicker, this); var title = (Button)FindViewById(Resource.Id.alertButton); title.Text = "PICKER"; CancelButton = (Button)FindViewById(Resource.Id.cancelButton); ValidateButton = (Button)FindViewById(Resource.Id.validateButton); Menu = (LinearLayout)FindViewById(Resource.Id.menu); CancelButton.Text = "CANCEL"; ValidateButton.Text = "VALIDATE"; CancelButton.SetOnClickListener(this); ValidateButton.SetOnClickListener(this); // set current time Calendar calendar = Calendar.GetInstance(Locale.Us); _ampm = (AbstractWheel)FindViewById(Resource.Id.ampmSpinner); if (IsFr) { _ampm.Visibility = ViewStates.Gone; } else { _ampm.Visibility = ViewStates.Visible; var am = new JavaObjectWrapper <string> { Obj = "AM" }; var pm = new JavaObjectWrapper <string> { Obj = "PM" }; var ampmAdapter = new ArrayWheelAdapter(Context, new Java.Lang.Object[] { am.Obj, pm.Obj }) { ItemResource = Resource.Layout.WheelTextCentered, ItemTextResource = Resource.Id.text }; _ampm.ViewAdapter = ampmAdapter; _ampm.ScrollingFinished += OnScrollingFinished(); } _daySpinner = (WheelVerticalView)FindViewById(Resource.Id.daySpinner); var dayAdapter = new DayArrayAdapter(Context, calendar); _daySpinner.ViewAdapter = dayAdapter; _daySpinner.SetCurrentItem(dayAdapter.GetToday(), true); _daySpinner.SetActiveCoeff(0); _daySpinner.SetPassiveCoeff(.5f); _daySpinner.ScrollingFinished += OnScrollingFinished(); _hoursSpinner = (AbstractWheelView)FindViewById(Resource.Id.hourSpinner); _hoursSpinner.ViewAdapter = new NumericWheelAdapter(Context, _hourStartIndex, _hourLastIndex, "%02d"); ((NumericWheelAdapter)_hoursSpinner.ViewAdapter).ItemResource = Resource.Layout.time_picker_custom_day; ((NumericWheelAdapter)_hoursSpinner.ViewAdapter).ItemTextResource = Resource.Id.time2_monthday; _hoursSpinner.Cyclic = true; _hoursSpinner.SetActiveCoeff(0); _hoursSpinner.SetPassiveCoeff(.5f); _hoursSpinner.ScrollingFinished += OnScrollingFinished(); _minSpinner = (AbstractWheelView)FindViewById(Resource.Id.minSpinner); _minSpinner.ViewAdapter = new IntervalMinuteArrayAdapter(Context, 15, 3); _minSpinner.Cyclic = true; _minSpinner.SetActiveCoeff(0); _minSpinner.SetPassiveCoeff(.5f); _minSpinner.ScrollingFinished += OnScrollingFinished(); SetDefault(); Hide(); }
private void SetUpOpenButton( double width) { _openButton = new ValidateButton(ControlsValues.OPEN, width / 5, width / 30, new System.Windows.Thickness(0, width / 50, 0, 0), new System.Windows.Thickness(0, width / 200, 0, 0), System.Windows.HorizontalAlignment.Center); _openButton.MouseDown += _openButton_MouseDown; }