| ofs | hex dump | ascii |
|---|
| 0000 | 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 80 00 00 00 80 08 06 00 00 00 c3 3e 61 | .PNG........IHDR..............>a |
| 0020 | cb 00 00 00 04 73 42 49 54 08 08 08 08 7c 08 64 88 00 00 00 09 70 48 59 73 00 00 03 76 00 00 03 | .....sBIT....|.d.....pHYs...v... |
| 0040 | 76 01 7d d5 82 cc 00 00 00 19 74 45 58 74 53 6f 66 74 77 61 72 65 00 77 77 77 2e 69 6e 6b 73 63 | v.}.......tEXtSoftware.www.inksc |
| 0060 | 61 70 65 2e 6f 72 67 9b ee 3c 1a 00 00 14 19 49 44 41 54 78 da ed 9d 09 94 14 d5 b9 c7 c1 a8 4f | ape.org..<.....IDATx...........O |
| 0080 | 93 1c 13 5f d0 73 8c be 9c f3 9e c4 77 8e e0 6c 3d d3 3d 3d d3 d5 55 bd d5 de dd b3 f5 2c 80 c8 | ..._.s......w..l=.==..U......,.. |
| 00a0 | c0 01 81 80 a8 8c 06 54 64 11 04 94 01 c3 ce b0 b9 11 d4 80 b8 04 f3 40 86 1d 59 03 88 21 ea 13 | .......Td..............@..Y..!.. |
| 00c0 | 95 04 e1 09 c6 08 28 61 93 b9 ef 7e 35 d3 d2 53 dd 3d dd 55 5d d5 5d 3d 53 9e f3 3f 07 cf f4 72 | ......(a...~5..S.=.U].]=S..?...r |
| 00e0 | eb fb ff fa d6 bd b7 ee f7 dd 6e 08 a1 6e 46 12 45 51 37 14 12 dc 14 8b 93 d9 65 71 b2 9f 63 fd | ..........n..nF.EQ7.......eq..c. |
| 0100 | 0b eb 6b 0b c9 1e 2c 74 b2 6f 59 9c 5c 43 91 43 f8 2f a3 b5 1b da 04 6d 93 da 88 db 2a b5 19 da | ..k...,t.oY.\C.C./.....m....*... |
| 0120 | 4e b0 47 e1 5a e0 9a e0 da 8c d6 ee 6e 46 6b 10 0e da 46 2c 94 50 24 b7 af 90 60 82 8a 2f b8 5b | N.G.Z.......nFk...F,.P$...`../.[ |
| 0140 | b7 ee bd 8b 9c 77 e4 db 5d a5 79 36 b2 0f 36 8c 2f a2 f8 bc 9c 12 fa 56 f8 9b d2 cf 83 36 40 5b | .....w..].y6..6./......V.....6@[ |
| 0160 | 92 6a 33 be 36 13 80 0e d4 ab 57 e8 7a 1c a4 8b 49 06 33 ac ed 60 60 4c 98 2c 96 1f e7 5a 89 be | .j3.6.....W.z...I.3..``L.,...Z.. |
| 0180 | 39 45 c4 ea 1c 2b 71 18 eb 14 d6 e5 9c 22 07 0a 4b f6 59 97 b0 fe 2e f5 3e 04 d3 84 25 c4 fb d5 | 9E...+q......"..K.Y.....>...%... |
| 01a0 | c2 77 c2 77 2b 6c eb 45 b8 46 13 80 78 bf 7e 8b e5 3a 1c a4 c3 0a 83 0a 3a 57 40 b2 e5 d2 67 10 | .w.w+l.E.F..x.~..:......:W@...g. |
| 01c0 | c4 6d b9 36 f2 21 6c f4 26 ac f3 91 66 c7 52 12 9f fd 1d d6 eb 58 f7 59 3d 9e 5f c0 77 c0 77 c1 | .m.6.!l.&...f.R......X.Y=._.w.w. |
| 01e0 | 77 aa 68 e7 61 b8 46 13 80 8e ee a5 24 5b 54 e8 64 b6 e0 60 7d ab 28 b8 04 d3 92 53 4c 1e c0 a6 | w.h.a.F.....$using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Tango.MachineStudio.Common.Modules;
using Tango.MachineStudio.Common.Notifications;
using Tango.MachineStudio.UI.Modules;
using Tango.MachineStudio.UI.Notifications;
using Tango.MachineStudio.UI.SupervisingController;
using Tango.SharedUI;
using Tango.SharedUI.Controls;
using Tango.MachineStudio.Common;
using System.Threading;
using Tango.Core.Helpers;
using Tango.SharedUI.Helpers;
using Tango.Logging;
using static Tango.SharedUI.Controls.NavigationControl;
using Tango.Core.DI;
using Tango.MachineStudio.Common.StudioApplication;
namespace Tango.MachineStudio.UI.Views
{
/// <summary>
/// Interaction logic for MainView.xaml
/// </summary>
public partial class MainView : View, IMainView
{
private DefaultStudioModuleLoader _loader;
public static MainView Instance { get; set; }
public MainView() : base()
{
InitializeComponent();
Instance = this;
_loader = TangoIOC.Default.GetInstance<IStudioModuleLoader>() as DefaultStudioModuleLoader;
_loader.ModulesLoaded += Loader_ModulesLoaded;
}
private void Loader_ModulesLoaded(object sender, EventArgs e)
{
Task.Factory.StartNew(() =>
{
LogManager.Default.Log("Loading modules views...");
var item = TangoIOC.Default.GetInstance<INotificationProvider>().PushTaskItem("Loading Modules...");
var modules = _loader.UserModules.ToList();
ThreadsHelper.InvokeUINow(() =>
{
_loader.UserModules.Clear();
});
Thread.Sleep(1500);
foreach (var module in modules)
{
LogManager.Default.Log("Loading module view '" + module.Name + "'...");
ThreadsHelper.InvokeUI(() =>
{
if (!NavigationControl.Elements.ToList().Exists(x => x.GetType() == module.MainViewType))
{
FrameworkElement view = Activator.CreateInstance(module.MainViewType) as FrameworkElement;
NavigationControl.SetNavigationName(view, module.Name);
NavigationControl.Elements.Add(view);
}
_loader.UserModules.Add(module);
});
UIHelper.DoEvents();
Thread.Sleep(100);
}
item.Pop();
ThreadsHelper.InvokeUI(() =>
{
TangoIOC.Default.GetInstance<IStudioApplicationManager>().NotifyApplicationReady();
});
});
}
private void MenuItem_MouseEnter(object sender, MouseEventArgs e)
{
menuTheme.IsSubmenuOpen = true;
}
}
}
|