コード例 #1
0
        private void NewFlowCommandCallback(object parameter)
        {
            XFlow    flow     = new XFlow();
            FlowInfo flowInfo = new FlowInfo(flow, null);

            Flows.Add(flowInfo);
            CurrentFlow = flowInfo;
        }
コード例 #2
0
ファイル: Causealit.cs プロジェクト: VividMaster/Rebound
        public void Flow(FlowInit init, FlowLogic logic, Act endLogic = null)
        {
            var flow = new FlowInfo();

            flow.Init     = init;
            flow.Logic    = logic;
            flow.EndLogic = endLogic;
            Flows.Add(flow);
        }
コード例 #3
0
        public void Flow(FlowInit init, FlowLogic logic, Act endLogic = null)
        {
            FlowInfo flow = new FlowInfo
            {
                Init     = init,
                Logic    = logic,
                EndLogic = endLogic
            };

            Flows.Add(flow);
        }
コード例 #4
0
        public void Open(string path)
        {
            Log.Info("Opening \"{0}\"", path);

            FileInfo fileInfo = new FileInfo(path);

            if (!fileInfo.Exists)
            {
                MessageBox.Show("Could not find specified file " + path, "FlowTomator", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }

            FlowInfo flowInfo = null;
            string   error    = "";

            try
            {
                EditableFlow flow = EditableFlow.Load(fileInfo.FullName);
                flowInfo = new FlowInfo(flow, fileInfo.FullName);
            }
            catch (Exception e)
            {
                error = e.Message;

                if (System.Diagnostics.Debugger.IsAttached)
                {
                    System.Diagnostics.Debugger.Break();
                }
            }

            if (flowInfo == null || flowInfo.Flow == null)
            {
                MessageBox.Show("Could not open specified file " + path + "." + Environment.NewLine + error, "FlowTomator", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }

            Flows.Add(flowInfo);
            NotifyPropertyChanged(nameof(Flows));
        }
コード例 #5
0
        public FlowEnvironment Load(string path)
        {
            FlowEnvironment flow = null;

            Log.Debug("Loading {0}", path);

            try
            {
                flow = FlowEnvironment.Load(path);
                Log.Info("Loaded {0}", flow.File.Name);
            }
            catch (Exception e)
            {
                OnNotification(new FlowTomatorNotification(LogVerbosity.Error, "Failed to load the specified flow : " + path + ". " + e.Message));
            }

            if (flow == null)
            {
                return(null);
            }

            Flows.Add(flow);
            return(flow);
        }