2015-03-04 23:21:34 +01:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using NetMonitorTray.Properties;
|
|
|
|
|
using BlubbFish.Utils;
|
|
|
|
|
|
|
|
|
|
namespace NetMonitorTray.View
|
|
|
|
|
{
|
|
|
|
|
public class Window : OwnView
|
|
|
|
|
{
|
|
|
|
|
private ViewWindowForm form;
|
|
|
|
|
public Window()
|
|
|
|
|
{
|
|
|
|
|
this.form = new ViewWindowForm();
|
|
|
|
|
this.init();
|
|
|
|
|
this.Model.setObserver(this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void update()
|
|
|
|
|
{
|
|
|
|
|
this.form.UpdateForm();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void init()
|
|
|
|
|
{
|
|
|
|
|
this.Model = Models.Window.Instance;
|
|
|
|
|
this.form.SetModel(this.Model);
|
|
|
|
|
this.form.Show();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void Dispose()
|
|
|
|
|
{
|
|
|
|
|
this.form.BeginInvoke((Action)(() =>
|
|
|
|
|
{
|
|
|
|
|
this.form.Dispose();
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Models.Window Model { get; private set; }
|
2015-11-16 01:10:59 +01:00
|
|
|
|
|
|
|
|
|
public string Folderpicker() {
|
|
|
|
|
return this.form.FolderPicker();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
internal void networkSelected(int i) {
|
|
|
|
|
this.form.showSelectedNetwork(i);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
internal void vpnSelected(int i) {
|
|
|
|
|
this.form.showSelectedOpenvpn(i);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
internal string Filepicker() {
|
|
|
|
|
return this.form.FilePicker();
|
|
|
|
|
}
|
|
|
|
|
|
2015-03-04 23:21:34 +01:00
|
|
|
|
}
|
|
|
|
|
}
|