Beispiel #1
0
 private void InitListView()
 {
     ProcessItems            = new ProcessItems();
     CellTemplate            = new DataTemplate(typeof(ProcessCell));
     lvwResults.ItemTemplate = CellTemplate;
     lvwResults.ItemsSource  = ProcessItems;
 }
Beispiel #2
0
 public PrintProcess()
 {
     _sn    = new List <string>();
     exData = new Dictionary <string, string>();
     ProcessItems.Add(new TestItemSetting()
     {
         ItemID = Guid.NewGuid(), ItemName = "打印", ItemAction = PrintAction
     });
     template = new ExcelTemplate();
 }
Beispiel #3
0
 /// <summary>
 /// Return finished items from queue and make new items
 /// </summary>
 /// <param name="worked"> not used </param>
 public override void Working(long worked)
 {
     StorageSize = 100000;
     if (_duration > 0)
     {
         int          indx = TimeScript.GetTotalDays() % _duration;
         ProcessItems itm  = m_itemsStarted[indx];
         m_count         += itm.m_itemsCount;
         itm.m_itemsCount = 0;
     }
     base.Working(worked);
     StorageSize = m_count;
 }
        public static void AutoItems(this ApplicationContext db, int IN, int OUT, int ProcessEntriesId)
        {
            var value = IN - OUT;

            for (int i = 0; i < value; i++)
            {
                ProcessItems p = new ProcessItems {
                    ProcessEntriesId = ProcessEntriesId,
                    Category         = "Not Modified",
                    Reason           = "Not Modified",
                    Qty = 1
                };
                db._ProcessItems.Add(p);
                db.SaveChanges();
            }
        }
Beispiel #5
0
 public MeasurementProcess()
 {
     MeasurementTasks = new List <IMeasurementTask>();
     stopwatch        = System.Diagnostics.Stopwatch.StartNew();
     ProcessItems.Add(new TestItemSetting()
     {
         ItemID = Guid.NewGuid(), ItemName = "连接仪器", ItemAction = ConnectAction
     });
     ProcessItems.Add(new TestItemSetting()
     {
         ItemID = Guid.NewGuid(), ItemName = "测试", ItemAction = TestAction
     });
     ProcessItems.Add(new TestItemSetting()
     {
         ItemID = Guid.NewGuid(), ItemName = "保存Reference", ItemAction = SaveAction
     });
 }
Beispiel #6
0
        private void UpdateProcessItems()
        {
            var processlist = Process.GetProcesses();

            ProcessItems.Clear();
            foreach (var process in processlist)
            {
                if (process.MainWindowHandle == IntPtr.Zero)
                {
                    continue;
                }

                if (string.Equals(process.ProcessName, "explorer", StringComparison.OrdinalIgnoreCase))
                {
                    continue;
                }

                _trace.TraceInformation("Adding process {0}.", process.ProcessName);
                ProcessItems.Add(new ProcessItem(_trace, process));
            }
        }
Beispiel #7
0
    /// <summary>
    /// Event of work finished
    /// </summary>
    /// <param name="productsFinished"> how many items was produced/repaired </param>
    /// <param name="mulEffect"> multiplier to final product after waiting.</param>
    public override void WorkComplite(float productsFinished, float mulEffect)
    {
        float inProc = TotalInWaiting();

        if (productsFinished > 0)
        {
            m_mulEffect = (m_mulEffect + mulEffect) / 2;
        }
        else if (inProc < 0.1)
        {
            m_mulEffect = 0;
        }

        if (_duration > 0)
        {
            int          indx = TimeScript.GetTotalDays() % _duration;
            ProcessItems itm  = m_itemsStarted[indx];
            itm.m_itemsCount += productsFinished;
        }
        else
        {
            m_count += productsFinished;
        }
    }
Beispiel #8
0
        /// <summary>
        /// 构造
        /// </summary>
        public ReferencesProcess()
        {
            TestItems = new List <ReferenceTestItem>();
            ProcessItems.Add(new TestItemSetting()
            {
                ItemID = Guid.NewGuid(), ItemName = "连接仪器", ItemAction = ConnectAction
            });
            ProcessItems.Add(new TestItemSetting()
            {
                ItemID = Guid.NewGuid(), ItemName = "获取IL Reference", ItemAction = Test1Action
            });
            ProcessItems.Add(new TestItemSetting()
            {
                ItemID = Guid.NewGuid(), ItemName = "获取RL Reference", ItemAction = Test2Action
            });
            ProcessItems.Add(new TestItemSetting()
            {
                ItemID = Guid.NewGuid(), ItemName = "保存Reference", ItemAction = SaveAction
            });
            TestTypes = ProcessItems.Select(q => q.ItemID).ToArray();

            Wavelengths = new List <double>();
            Channels    = new List <int>();
        }
 public void ClearFocus()
 {
     ProcessItems.Focus();
 }
 public static ProcessItems ResolveIssues(this ApplicationContext db, ProcessItems processItems)
 {
     //DO A BUNCH OF STUFF
     return(processItems);
 }