You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.8 KiB

using BroadcastListener.Interfaces;
using static BroadcastListener.Classes.Factory;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Syncfusion.WinForms.Controls.Styles;
using Syncfusion.Windows.Forms.Tools;
using Syncfusion.WinForms.Controls;
using OnDoc.Klassen;
using BroadcastListener.Classes;
namespace OnDoc.DocMgmt
{
public partial class frmDocPreview : SfForm, IMessageListener1
{
public frmDocPreview()
{
InitializeComponent();
Broadcaster().AddListener(this);
Closing += Form_Closing;
this.Style.TitleBar.BackColor = Theaming.Titelbar();
this.Style.TitleBar.ForeColor = Theaming.TitelFontColor();
this.Style.ShadowOpacity = Theaming.ShadowOpacity;
this.Style.InactiveShadowOpacity = Theaming.InactivShadowOpacity;
}
public void OnListen(string message, SenderInfo sender)
{
if (sender.SenderName is "Doklist")
{
if (sender.Function == "UpdateView")
{
docPreview1.Show_Doc(message);
}
if (sender.Function == "Close")
{
this.Close();
}
}
}
private void Form_Closing(object sender, CancelEventArgs e)
{
Broadcaster().Broadcast("",new SenderInfo("PreviewWindow", "WindowClosed", ""));
Broadcaster().RemoveListener(this);
}
private void DivPreview_Load(object sender, EventArgs e)
{
docPreview1.Hide_Editbuttons();
}
}
}