public Notification(NotificationType info, Model.Utils utils) { InitializeComponent(); this.Utils = utils; this.Info = info; CalculatePosition(); lHeader.Text = info.Header; lBody.Text = info.Body; iIcon.Image = info.Image; if (!info.ShowCloseButton) { iClose.Visible = false; lHeader.Width = this.Width - lHeader.Location.X - 12; } else { iClose.Click += (sender, e) => this.Close(); } if ((info.TimerToClose ?? 0) > 0) { tAutoClose.Interval = info.TimerToClose.Value; tAutoClose.Tick += (sender, e) => this.Utils.Animation.AnimationOpacity(this, 0, (sender2, e2) => { this.Utils.Safe(this, () => { this.Close(); }); }, 0.04, 20); tAutoClose.Start(); } BuildButtons(info.Actions); this.Activated += (sender, e) => this.Utils.Animation.AnimationOpacity(this, .95, null, 0.04, 40); this.FormClosed += (sender, e) => this.Info.OnClose?.Invoke(this.Info); }
public FindIssue(Model.Utils utils) { InitializeComponent(); this.Icon = Resources.scroll_view; this.Utils = utils; this.grid.DataSource = new BindingSource() { DataSource = typeof(DataSourceType) }; }
public IssueForm(DTO.WorkDatas.Issue issue, Model.Utils utils) { InitializeComponent(); this.Icon = Resources.scroll; this.Utils = utils; this.Issue = issue; bOpenUrl.Click += (sender, e) => { this.Utils.Action.DoOpenUrl(BLL.Factory.Jira.Config.GetIssueUrl(this.Issue.Key)); }; // ¿cargar en otro thread? this.JiraObj = BLL.Factory.Jira.GetIssue(this.Issue.Key); this.JiraTransitions = BLL.Factory.Jira.GetIssueTransitions(this.Issue.Key); ReLoadInfo(); }