// GET: ProcessItems/Create
        public IActionResult Create()
        {
            EditProcess newProcess = new EditProcess();

            newProcess.colors = _context.Colors.ToList();

            if (newProcess.colors == null)
            {
                return(NotFound());
            }

            return(View(newProcess));
        }
Beispiel #2
0
        private ProcessService()
        {
            mProcesses = new Process[6];
            for (int i = 0; i < 6; ++i)
            {
                mProcesses[i] = new Process();
            }
            mEditProcess = new EditProcess();

            socketObjs      = new SocketObject[2];
            socketObjs[0]   = new SocketObject();
            socketObjs[1]   = new SocketObject();
            commitSocketObj = new SocketObject();
        }
Beispiel #3
0
    public MainWindow() : base(Gtk.WindowType.Toplevel)
    {
        Build();
        currentFilePath = "";
        MW   = this;
        egrp = new EditGroup();
        egrp.ShowAll();
        eprj = new EditProject();
        eprj.ShowAll();
        eunt = new EditUnit();
        eunt.ShowAll();
        ecpmd = new EditCompuMethod();
        ecpmd.ShowAll();
        emsg = new EditMessage();
        emsg.ShowAll();
        eprc = new EditProcess();
        eprc.ShowAll();
        etsk = new EditTask();
        etsk.ShowAll();
        esm = new EditStateMachine();
        esm.ShowAll();

        ts = new Gtk.TreeStore(typeof(string));
        this.treeviewGlobal.Model = ts;

        Gtk.TreeViewColumn prjColumn = new Gtk.TreeViewColumn();
        prjColumn.Title = "EasyOS";

        Gtk.CellRendererText projectCell = new Gtk.CellRendererText();
        prjColumn.PackStart(projectCell, true);
        prjColumn.AddAttribute(projectCell, "text", 0);
        treeviewGlobal.AppendColumn(prjColumn);

        treeviewGlobal.Visible    = false;
        this.alignFrmEditor.Child = eprj;
        this.frmEditor.ShowAll();
        this.frmEditor.Visible = false;

        this.addAction.Sensitive      = false;
        this.deleteAction.Sensitive   = false;
        this.generateAction.Sensitive = false;
        this.GenerateAction.Sensitive = false;
        this.saveAction.Sensitive     = false;
        this.SaveAction.Sensitive     = false;
        this.saveAsAction.Sensitive   = false;
        this.SaveAsAction.Sensitive   = false;
        this.refreshAction.Sensitive  = false;
    }
        // GET: ProcessItems/Edit/&Exe=""?xfilename=""
        public IActionResult Edit(string Exe, string xfilename)
        {
            if (String.IsNullOrWhiteSpace(Exe))
            {
                return(NotFound());
            }

            EditProcess editProcess = new EditProcess();

            editProcess.process = _context.ProcessList.SingleOrDefault <ProcessList>(p => p.Exe == Exe && p.Filename == xfilename);
            editProcess.colors  = _context.Colors.ToList();

            if (editProcess == null)
            {
                return(NotFound());
            }

            return(View(editProcess));
        }
Beispiel #5
0
        private void ConvertEditProcessModel()
        {
            TubeMonitorViewModel monitorPageModel = mPage.PageModel;
            EditProcess          process          = ProcessService.Instance.GetEditProcess();

            process.EditGas1Sp        = monitorPageModel.Gas1Sp;
            process.EditGas2Sp        = monitorPageModel.Gas2Sp;
            process.EditGas5Sp        = monitorPageModel.Gas5Sp;
            process.EditGas6Sp        = monitorPageModel.Gas6Sp;
            process.EditGas8Sp        = monitorPageModel.Gas8Sp;
            process.EditAna1Sp        = monitorPageModel.Ana1Sp;
            process.EditTemperIntSp   = monitorPageModel.TemperIntSp;
            process.EditTemper1Sp     = monitorPageModel.Temper1Sp;
            process.EditTemper2Sp     = monitorPageModel.Temper2Sp;
            process.EditTemper3Sp     = monitorPageModel.Temper3Sp;
            process.EditTemper4Sp     = monitorPageModel.Temper4Sp;
            process.EditTemper5Sp     = monitorPageModel.Temper5Sp;
            process.EditTemper6Sp     = monitorPageModel.Temper6Sp;
            process.EditPaddlePosSp   = monitorPageModel.PaddlePosSp;
            process.EditPaddleSpeedSp = monitorPageModel.EditPaddleSpeedSp;
            process.EditEvSp          = monitorPageModel.EvSp;
            process.EditDoSp          = monitorPageModel.DoSp;
        }
Beispiel #6
0
        private void UpdateChangedItems()
        {
            mCommitItems.Clear();
            TubeMonitorViewModel monitorPageModel = mPage.PageModel;
            EditProcess          process          = ProcessService.Instance.GetEditProcess();

            if (process.EditGas1Sp != monitorPageModel.Gas1Sp)
            {
                History history = new History("Gas1Sp_T" + monitorPageModel.SelectedTube);
                history.OldValue = process.EditGas1Sp;
                history.NewValue = monitorPageModel.Gas1Sp;
                mCommitItems.Add(history);
            }
            if (process.EditGas2Sp != monitorPageModel.Gas2Sp)
            {
                History history = new History("Gas2Sp_T" + monitorPageModel.SelectedTube);
                history.OldValue = process.EditGas2Sp;
                history.NewValue = monitorPageModel.Gas2Sp;
                mCommitItems.Add(history);
            }
            if (process.EditGas5Sp != monitorPageModel.Gas5Sp)
            {
                History history = new History("Gas5Sp_T" + monitorPageModel.SelectedTube);
                history.OldValue = process.EditGas5Sp;
                history.NewValue = monitorPageModel.Gas5Sp;
                mCommitItems.Add(history);
            }
            if (process.EditGas6Sp != monitorPageModel.Gas6Sp)
            {
                History history = new History("Gas6Sp_T" + monitorPageModel.SelectedTube);
                history.OldValue = process.EditGas6Sp;
                history.NewValue = monitorPageModel.Gas6Sp;
                mCommitItems.Add(history);
            }
            if (process.EditGas8Sp != monitorPageModel.Gas8Sp)
            {
                History history = new History("Gas8Sp_T" + monitorPageModel.SelectedTube);
                history.OldValue = process.EditGas8Sp;
                history.NewValue = monitorPageModel.Gas8Sp;
                mCommitItems.Add(history);
            }
            if (process.EditAna1Sp != monitorPageModel.Ana1Sp)
            {
                History history = new History("Ana1Sp_T" + monitorPageModel.SelectedTube);
                history.OldValue = process.EditAna1Sp;
                history.NewValue = monitorPageModel.Ana1Sp;
                mCommitItems.Add(history);
            }
            if (process.EditTemperIntSp != monitorPageModel.TemperIntSp)
            {
                History history = new History("TemperInt_T" + monitorPageModel.SelectedTube);
                history.OldValue = process.EditTemperIntSp;
                history.NewValue = monitorPageModel.TemperIntSp;
                mCommitItems.Add(history);
            }
            if (process.EditTemper1Sp != monitorPageModel.Temper1Sp)
            {
                History history = new History("Temper1_T" + monitorPageModel.SelectedTube);
                history.OldValue = process.EditTemper1Sp;
                history.NewValue = monitorPageModel.Temper1Sp;
                mCommitItems.Add(history);
            }
            if (process.EditTemper2Sp != monitorPageModel.Temper2Sp)
            {
                History history = new History("Temper2_T" + monitorPageModel.SelectedTube);
                history.OldValue = process.EditTemper2Sp;
                history.NewValue = monitorPageModel.Temper2Sp;
                mCommitItems.Add(history);
            }
            if (process.EditTemper3Sp != monitorPageModel.Temper3Sp)
            {
                History history = new History("Temper3_T" + monitorPageModel.SelectedTube);
                history.OldValue = process.EditTemper3Sp;
                history.NewValue = monitorPageModel.Temper3Sp;
                mCommitItems.Add(history);
            }
            if (process.EditTemper4Sp != monitorPageModel.Temper4Sp)
            {
                History history = new History("Temper4_T" + monitorPageModel.SelectedTube);
                history.OldValue = process.EditTemper4Sp;
                history.NewValue = monitorPageModel.Temper4Sp;
                mCommitItems.Add(history);
            }
            if (process.EditTemper5Sp != monitorPageModel.Temper5Sp)
            {
                History history = new History("Temper5_T" + monitorPageModel.SelectedTube);
                history.OldValue = process.EditTemper5Sp;
                history.NewValue = monitorPageModel.Temper5Sp;
                mCommitItems.Add(history);
            }
            if (process.EditTemper6Sp != monitorPageModel.Temper6Sp)
            {
                History history = new History("Temper6_T" + monitorPageModel.SelectedTube);
                history.OldValue = process.EditTemper6Sp;
                history.NewValue = monitorPageModel.Temper6Sp;
                mCommitItems.Add(history);
            }
            if (process.EditPaddlePosSp != monitorPageModel.PaddlePosSp)
            {
                History history = new History("PaddlePosition_T" + monitorPageModel.SelectedTube);
                history.OldValue = process.EditPaddlePosSp;
                history.NewValue = monitorPageModel.PaddlePosSp;
                mCommitItems.Add(history);
            }
            if (process.EditPaddleSpeedSp != monitorPageModel.EditPaddleSpeedSp)
            {
                History history = new History("PaddleSpeed_T" + monitorPageModel.SelectedTube);
                history.OldValue = process.EditPaddleSpeedSp;
                history.NewValue = monitorPageModel.EditPaddleSpeedSp;
                mCommitItems.Add(history);
            }
            if (process.EditEvSp != monitorPageModel.EvSp)
            {
                History history = new History("EV_T" + monitorPageModel.SelectedTube);
                history.OldValue = process.EditEvSp;
                history.NewValue = monitorPageModel.EvSp;
                mCommitItems.Add(history);
            }
            if (process.EditDoSp != monitorPageModel.DoSp)
            {
                History history = new History("DO_T" + monitorPageModel.SelectedTube);
                history.OldValue = process.EditDoSp;
                history.NewValue = monitorPageModel.DoSp;
                mCommitItems.Add(history);
            }
        }