main
 1using System.Windows.Forms;
 2using momoney.presentation.views;
 3using MoMoney.Presentation.Views;
 4
 5namespace MoMoney.Presentation.Winforms.Views
 6{
 7    public class TitleBar : ITitleBar
 8    {
 9        readonly IRegionManager shell;
10
11        public TitleBar(IRegionManager shell)
12        {
13            this.shell = shell;
14        }
15
16        public void display(string title)
17        {
18            shell.region<Form>(x =>
19                                   {
20                                       if (x.Text.Contains("-")) x.Text = x.Text.Remove(x.Text.IndexOf("-") - 1);
21                                       x.Text = x.Text + " - " + title;
22                                   });
23        }
24
25        public void append_asterik()
26        {
27            shell.region<Form>(x =>
28                                   {
29                                       if (x.Text.Contains("*")) return;
30                                       x.Text = x.Text + "*";
31                                   });
32        }
33
34        public void remove_asterik()
35        {
36            shell.region<Form>(x => { x.Text = x.Text.Replace("*", ""); });
37        }
38    }
39}