63 lines
1.6 KiB
C#
63 lines
1.6 KiB
C#
using StgSharp.Graphics;
|
|
using StgSharp.Logic;
|
|
using StgSharp.MVVM;
|
|
using StgSharp.MVVM.View;
|
|
using StgSharp.MVVM.ViewModel;
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace StgSharp
|
|
{
|
|
public partial class ViewMain : ViewBase
|
|
{
|
|
public ViewMain()
|
|
{
|
|
_databindingIndexMap = new Dictionary<string, DataBindingEntry>();
|
|
}
|
|
|
|
Dictionary<string, DataBindingEntry> _databindingIndexMap;
|
|
|
|
public override void CustomizedInitialize(ViewModelBase viewModelBinding)
|
|
{
|
|
Designer = new Design(this);
|
|
Responder = new Control(this);
|
|
Render = new NewRender(this);
|
|
|
|
Render.Initialize();
|
|
Designer.Initialize();
|
|
Responder.Initialize(viewModelBinding.MethodLookup);
|
|
}
|
|
|
|
public override bool TryGetObjectReference(string name, out DataBindingEntry entry)
|
|
{
|
|
if (_databindingIndexMap.TryGetValue(name,out entry))
|
|
{
|
|
return true;
|
|
}
|
|
try
|
|
{
|
|
entry = name switch
|
|
{
|
|
_ => default(DataBindingEntry),
|
|
};
|
|
return !entry.ExactEqual(default(DataBindingEntry));
|
|
}
|
|
catch (Exception)
|
|
{
|
|
entry = default(DataBindingEntry);
|
|
return false;
|
|
}
|
|
}
|
|
|
|
protected internal override void Show()
|
|
{
|
|
Stream.Draw();
|
|
Stream.AnotherMain(OnlyButton);
|
|
}
|
|
}
|
|
}
|