예제 #1
0
 public AlgorithmFlowElement(
     FlowInterfaceControl control, 
     IFlowProcessingPipeline processingPipeline,
     IAlgorithm algorithm)
     : this(control, processingPipeline, new StorageLayer { Algorithm = algorithm })
 {
 }
예제 #2
0
        public AlgorithmFlowElement(
            FlowInterfaceControl control, 
            IFlowProcessingPipeline processingPipeline,
            StorageLayer l)
        {
            this.m_Control = control;
            this.m_FlowProcessingPipeline = processingPipeline;
            this.m_Layer = l;
            var attrs = l.Algorithm.GetType().GetCustomAttributes(typeof(FlowDesignerNameAttribute), true);
            this.Name = attrs.Length > 0 ? (attrs[0] as FlowDesignerNameAttribute).Name : l.Algorithm.ToString();
            this.ImageWidth = 128;
            this.ImageHeight = 192;
            this.ObjectPropertyUpdated();

            // Create input / output connectors.
            foreach (string s in this.m_Layer.Algorithm.InputNames)
                this.m_InputConnectors.Add(new AlgorithmFlowConnector(this, s, true, l));
            this.m_OutputConnectors.Add(new AlgorithmFlowConnector(this, "Output", false, l));

            /*this.m_CompiledViewToggleThread = new Thread(() =>
            {
                while (this.m_CompiledViewToggleThread.ThreadState != ThreadState.AbortRequested)
                {
                    Thread.Sleep(100);
                    if (this.m_RealBitmap == this.m_RuntimeBitmap)
                        this.m_RealBitmap = this.m_CompiledBitmap;
                    else
                        this.m_RealBitmap = this.m_RuntimeBitmap;
                    try
                    {
                        this.m_Control.Invoke(new Action(() =>
                        {
                            this.m_Control.Invalidate(this.InvalidatingRegion.Apply(this.m_Control.Zoom));
                        }));
                    }
                    catch
                    {
                        break;
                    }
                }
            });
            this.m_CompiledViewToggleThread.Start();*/
        }
예제 #3
0
 public virtual void SetDeserializationData(FlowInterfaceControl control)
 {
 }
예제 #4
0
 public override void SetDeserializationData(FlowInterfaceControl control)
 {
     this.m_Control = control;
 }
예제 #5
0
 public virtual void SetDeserializationData(FlowInterfaceControl control)
 {
 }