Beispiel #1
0
            protected virtual void Dispose(bool disposing)
            {
                if (!disposedValue)
                {
                    if (disposing)
                    {
                        WriteAction = null;
                        ReadAction  = null;

                        // 以下、固有定義開放
                        MultiRootConnector?.Dispose();
                        MultiRootConnector = null;;
                        SingleRootConnector?.Dispose();
                        SingleRootConnector = null;
                        MultiLinkConnector?.Dispose();
                        MultiLinkConnector = null;
                        SingleLinkConnector?.Dispose();
                        SingleLinkConnector = null;
                        RunableControl?.Dispose();
                        RunableControl = null;
                        GroupAreaControl?.Dispose();
                        GroupAreaControl = null;
                    }
                    disposedValue = true;
                }
            }
Beispiel #2
0
            public _AssetXML()
            {
                ReadAction = (self) =>
                {
                    self.AssetId = AssetId;
                    self.XPos    = XPos;
                    self.YPos    = YPos;
                    if (MultiRootConnector != null)
                    {
                        var obj = new MultiRootConnector(this);
                        self.SetControl(obj);
                        obj.AssetXML = MultiRootConnector;
                        obj.AssetXML.ReadAction?.Invoke(obj);
                    }
                    if (RunableControl != null)
                    {
                        var obj = new RunableControl();
                        self.SetControl(obj);
                        obj.AssetXML = RunableControl;
                        obj.AssetXML.ReadAction?.Invoke(obj);
                    }
                    if (GroupAreaControl != null)
                    {
                        var obj = new GroupArea();
                        self.SetControl(obj);
                        obj.AssetXML = GroupAreaControl;
                        obj.AssetXML.ReadAction?.Invoke(obj);
                    }
                    if (SingleRootConnector != null)
                    {
                        var obj = new SingleRootConnector();
                        self.SetControl(obj);
                        obj.AssetXML = SingleRootConnector;
                        obj.AssetXML.ReadAction?.Invoke(obj);
                    }
                    if (MultiLinkConnector != null)
                    {
                        var obj = new MultiLinkConnector();
                        self.SetControl(obj);
                        obj.AssetXML = MultiLinkConnector;
                        obj.AssetXML.ReadAction?.Invoke(obj);
                    }
                    if (SingleLinkConnector != null)
                    {
                        var obj = new SingleLinkConnector();
                        self.SetControl(obj);
                        obj.AssetXML = SingleLinkConnector;
                        obj.AssetXML.ReadAction?.Invoke(obj);
                    }

                    // 次回の為の初期化
                    self.AssetXML = new _AssetXML <Movable>(self);
                };
            }