예제 #1
0
        public async Task <List <BpmProcess> > GetProcessesInstance(string Id)
        {
            using (var _httpClient = new HttpClient())
            {
                try
                {
                    var response = await _httpClient.GetAsync(_config["BpmEngine:Address"] + "/engine/api/instancenodes?name=" + Id);


                    if (response.IsSuccessStatusCode)
                    {
                        string result = await response.Content.ReadAsStringAsync();

                        Proccess Processes = JsonConvert.DeserializeObject <Proccess>(result);


                        return(Processes.processes);
                    }
                    return(null);
                }
                catch (Exception)
                {
                    return(null);
                }
            }
        }
예제 #2
0
        public void NextStage()
        {
            switch (mStage)
            {
            case Proccess.Title:
                mStage = Proccess.Instruct;
                mOrganizer.ShowTestTitle();
                break;

            case Proccess.Instruct:
                mStage = Proccess.Exercise;
                mOrganizer.ShowInstruction();
                break;

            case Proccess.Exercise:
                mStage = Proccess.Instruct2;
                mTL.SetFormal(false);
                mTL.StageIteration();
                break;

            case Proccess.Instruct2:
                mStage = Proccess.Test;
                mOrganizer.ShowInstruction2();
                mTL.mStage = InTestStage.SubTitle;
                break;

            case Proccess.Test:
                mTL.SetFormal(true);
                mTL.StageIteration();
                break;
            }
        }
예제 #3
0
 public OkDialog(string message)
 {
     InitializeComponent();
     _message            = message;
     this.btnOk.Clicked += (sender, arg) =>
     {
         Proccess.SetResult(true);
         _popupNavigation.PopAsync();
     };
 }
예제 #4
0
    public settings()
    {
        timer       = new Timer();
        timer.Tick += Timer_Tick;

        Launch = new Launch();
        //sleep
        Launch.Sleep = new LaunchSleep();
        //time
        Launch.Timing = new LaunchTiming( );
        //http
        httpGet = new httpGET();
        //proccess
        Proccess = new Proccess();
    }
        public ConfirmationDialog(string message)
        {
            InitializeComponent();
            _message   = message;
            OnApearing = () =>
            {
                this.btnNo.Text  = NoButtonText;
                this.btnYes.Text = YesButtonText;
            };
            this.btnNo.Clicked += (sender, args) =>
            {
                Proccess.SetResult(false);
            };

            this.btnYes.Clicked += (sender, args) =>
            {
                Proccess.SetResult(true);
            };
        }
예제 #6
0
 public WatcherToDir()
 {
     this.watcher = new FileSystemWatcher();
     this.proc    = new Proccess();
 }
예제 #7
0
 private static ProccessResult InvokeProccess(string arguments)
 {
     return(Proccess.InvokeProccess(_PSPATH, arguments));
 }