[DW] Ein bisschen Aufgeräumt

This commit is contained in:
BlubbFish 2017-08-08 21:25:33 +00:00
parent 90b338103c
commit b77d82d091
4 changed files with 5 additions and 9 deletions

View File

@ -20,7 +20,7 @@ namespace svnsync.Views
/// View of a Tray /// View of a Tray
/// </summary> /// </summary>
public ViewsTray() { public ViewsTray() {
this.Init();
this.Model = ModelsTray.Instance; this.Model = ModelsTray.Instance;
this.Model.SetObserver(this); this.Model.SetObserver(this);
} }
@ -32,7 +32,7 @@ namespace svnsync.Views
this.trayicon.Text = "SvnSync: " + ((this.Model.Args.GetArgumentData("-d").Length <= 54) ? this.Model.Args.GetArgumentData("-d") : "..."+this.Model.Args.GetArgumentData("-d").Substring(this.Model.Args.GetArgumentData("-d").Length - 51)); this.trayicon.Text = "SvnSync: " + ((this.Model.Args.GetArgumentData("-d").Length <= 54) ? this.Model.Args.GetArgumentData("-d") : "..."+this.Model.Args.GetArgumentData("-d").Substring(this.Model.Args.GetArgumentData("-d").Length - 51));
} }
protected override void Init() { private void Init() {
this.trayicon = new NotifyIcon() { this.trayicon = new NotifyIcon() {
Visible = true, Visible = true,
Icon = new Icon(Resources.Icon, 40, 40), Icon = new Icon(Resources.Icon, 40, 40),

View File

@ -1,7 +1,6 @@
using System; using System;
using BlubbFish.Utils; using BlubbFish.Utils;
using svnsync.Models; using svnsync.Models;
using System.Windows.Forms;
namespace svnsync.Views namespace svnsync.Views
{ {
@ -9,7 +8,9 @@ namespace svnsync.Views
{ {
private IViewsWindowFormInterface form; private IViewsWindowFormInterface form;
public ModelsWindow Model { get; private set; } public ModelsWindow Model { get; private set; }
public ViewsWindow() {
this.Model = ModelsWindow.Instance;
}
public override void Update() public override void Update()
{ {
switch(this.Model.FormType) { switch(this.Model.FormType) {
@ -40,11 +41,6 @@ namespace svnsync.Views
this.form.Show(); this.form.Show();
} }
protected override void Init()
{
this.Model = ModelsWindow.Instance;
}
public override void Dispose() public override void Dispose()
{ {
this.Model.RemoveObserver(this); this.Model.RemoveObserver(this);

Binary file not shown.

Binary file not shown.