MVVM rebuild complete
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
using StgSharp.Graphics;
|
||||
using StgSharp.Logic;
|
||||
|
||||
using StgSharpDebug.Logic;
|
||||
using StgSharp.MVVM;
|
||||
using StgSharp.MVVM.View;
|
||||
using StgSharp.MVVM.ViewModel;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -11,30 +12,51 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace StgSharp
|
||||
{
|
||||
public class ViewMain : View
|
||||
public partial class ViewMain : ViewBase
|
||||
{
|
||||
public DemoButtonGroup DemoGroup
|
||||
public ViewMain()
|
||||
{
|
||||
get; set;
|
||||
_databindingIndexMap = new Dictionary<string, DataBindingEntry>();
|
||||
}
|
||||
|
||||
Dictionary<string, DataBindingEntry> _databindingIndexMap;
|
||||
|
||||
public override void CustomizedInitialize(ViewModelBase viewModelBinding)
|
||||
{
|
||||
Designer = new Design();
|
||||
Responder = new Control();
|
||||
Render = new Render();
|
||||
Designer = new Design(this);
|
||||
Responder = new Control(this);
|
||||
Render = new NewRender(this);
|
||||
|
||||
DemoGroup = new DemoButtonGroup();
|
||||
Render.Initialize();
|
||||
Designer.Initialize();
|
||||
Responder.Initialize(viewModelBinding.MethodLookup);
|
||||
}
|
||||
|
||||
public override bool TryGetObjectReference(string name, out DataBindingEntry entry)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
internal protected override void Show()
|
||||
protected internal override void Show()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
Stream.Draw();
|
||||
Stream.AnotherMain(OnlyButton);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user