public Story(string title, string description, PriorityType priority,
              StorySizeType size, IBoard board, IPerson assignee = null) //assignee is optional?
     : base(title, description, priority, board, assignee)
 {
     this.Size   = size;
     this.Status = StoryStatusType.NotDone;
 }
 public PriorityModelItem(string name, Color color, bool isSelected, PriorityType type)
 {
     PriorityName  = name;
     PriorityColor = color;
     IsSelected    = isSelected;
     PriorityType  = type;
 }
Example #3
0
 public BasicPriority(PriorityType pt, double value)
 {
     this.PriorityType = pt;
     Percent           = new FloatingPointValue {
         Value = value
     };
 }
Example #4
0
        internal FirebasePriority(JValue priority)
        {
            if (priority == null || priority.Type == JTokenType.Null)
            {
                Type = PriorityType.None;
                return;
            }

            switch (priority.Type)
            {
                case JTokenType.None:
                    Type = PriorityType.None;
                    return;
                case JTokenType.Integer:
                case JTokenType.Float:
                    Type = PriorityType.Numeric;
                    _fp = priority.Value<float>();
                    return;
                case JTokenType.String:
                    int value;
                    if (int.TryParse(priority.Value<string>(), out value))
                    {
                        Type = PriorityType.Numeric;
                        _fp = value;
                    }
                    else
                    {
                        Type = PriorityType.String;
                        _sp = priority.Value<string>();
                    }
                    return;
                default:
                    throw new Exception(string.Format("Unable to load priority of type: {0}", priority.Type));
            }
        }
Example #5
0
        /// <summary>
        /// 修改Bug
        /// </summary>
        /// <param name="_bugData">要修改的Bug数据</param>
        /// <param name="_oldName">旧的名字</param>
        /// <param name="_newName">新的名字</param>
        /// <param name="_oldProgress">旧的进度</param>
        /// <param name="_newProgress">新的进度</param>
        /// <param name="_oldPriority">旧的优先级</param>
        /// <param name="_newPriority">新的优先级</param>
        public void ChangeBug(BugData _bugData,
                              string _oldName, string _newName,
                              ProgressType _oldProgress, ProgressType _newProgress,
                              PriorityType _oldPriority, PriorityType _newPriority)
        {
            /* 判断是否有改变 */
            if (_oldName == _newName && _oldProgress == _newProgress && _oldPriority == _newPriority)
            {
                return;
            }


            /* 如果有改变,就修改数据 */
            if (_bugData != null)
            {
                //修改数据
                _bugData.Name.Text = _newName;
                _bugData.Progress  = _newProgress;
                _bugData.Priority  = _newPriority;

                //触发[完成度改变]的方法
                if (_oldProgress != _newProgress)
                {
                    OnChangeBugProgress(_bugData);
                }

                //修改Bug
                ChangeBug(_bugData);
            }
        }
Example #6
0
        // Returns priority
        private PriorityType ReadPriority(out bool success)
        {
            PriorityType priority = PriorityType.Less_important;

            success = false;


            if (cmbBox.Text.Equals(string.Empty))
            {
                GiveMessage("Invalid Priority");
                cmbBox.Focus();
            }
            else
            {
                // Less important and More important has space, but Enum PriorityType has underscore _ which need to be controlled for
                string checkForSpace = cmbBox.Text;
                bool   hasSpace      = checkForSpace.Contains(" ");


                if (hasSpace)
                {
                    checkForSpace = checkForSpace.Replace(" ", "_");
                    priority      = (PriorityType)Enum.Parse(typeof(PriorityType), checkForSpace);
                }
                else
                {
                    priority = (PriorityType)Enum.Parse(typeof(PriorityType), cmbBox.Text);
                }

                success = true;
            }

            return(priority);
        }
Example #7
0
	void LateUpdate () { // to always run after a target list update 
		if ( error == true ) { return; }
		// don't choose unless there's been an update to target list, unless target is gone
		if ( Time.time == targetListScript.lastUpdate || weaponTarget == null ) { 
			readyChoose = true;
		}
		// choose target now if priority changes
		if ( priority != priorityToggle ) {
			priorityToggle = priority;
			readyChoose = true;
		}

		// choose target
		if (targetListScript) { // make sure target list exsists
			if ( readyChoose == true ) {
				readyChoose = false;
				if ( (keepCurrentTarget == true) && (weaponTarget != null) ) { // see if target still exsists in list
					if ( !targetListScript.targetList.ContainsKey( weaponTarget.GetInstanceID() ) ) { // target not in list
						weaponTarget = null;
					}
				}
				if ( (weaponTarget == null) || (keepCurrentTarget == false) ) { // check for new target if always supposed to or if no target
					weaponTarget = ChooseTarget( receivingObjectScript, priority, targetListScript );
				}
			}
		}
	}
        private void AddErrorItem(PriorityType priority, string message)
        {
            OutputWindowPane objBuildOutputWindowPane = GetBuildOutputWindowPane();
            //vsTaskIcon icon;
            //vsTaskPriority vsPriority;
            TaskErrorCategory vsCat;

            switch (priority)
            {
            case PriorityType.Error:
                //icon = vsTaskIcon.vsTaskIconCompile;
                //vsPriority = vsTaskPriority.vsTaskPriorityHigh;
                vsCat = TaskErrorCategory.Error;
                break;

            case PriorityType.Warning:
                //icon = vsTaskIcon.vsTaskIconSquiggle;
                //vsPriority = vsTaskPriority.vsTaskPriorityMedium;
                vsCat = TaskErrorCategory.Warning;
                break;

            default:
                //icon = vsTaskIcon.vsTaskIconComment;
                //vsPriority = vsTaskPriority.vsTaskPriorityLow;
                vsCat = TaskErrorCategory.Message;
                break;
            }

            //if (objBuildOutputWindowPane != null)
            //{
            //    objBuildOutputWindowPane.OutputTaskItemString(message, vsPriority, DESIGN_RULE_CATEGORY, icon, "", 0, message);
            //}

            AddErrorToErrorList(message, vsCat, -1, 1);
        }
Example #9
0
        /// <summary>
        /// Инициализация NMS-сообщения.
        /// </summary>
        /// <param name="source">Адрес источника сообщения.</param>
        /// <param name="destanation">Адрес получателя сообщения.</param>
        /// <param name="priority">Приоритет.</param>
        /// <param name="service">Тип сервиса.</param>
        /// <param name="isResponsible">Требуется ли ответ/подтверждение на запрос.</param>
        /// <param name="id">Идентификатор NMS-сообщения.</param>
        /// <param name="r1">Разрешено ли событие для <see cref="NmsServiceType.AlterEventConditionMonitoring"/>.</param>
        /// <param name="nmsData">NMS-данные.</param>
        /// <remarks>Это единственный метод, который может изменить сообщение. Должен вызываться в конструкторе.</remarks>
        protected void Initialize(
            Address source,
            Address destanation,
            PriorityType priority,
            NmsServiceType service,
            bool isResponsible,
            int id,
            bool r1,
            byte[] nmsData)
        {
            Contract.Requires(source != null);
            Contract.Requires(destanation != null);
            Contract.Requires(nmsData != null);
            Contract.Requires(nmsData.Length <= NmsMaxDataLength);
            Contract.Ensures(!IsResponse);
            Contract.Ensures(Datagram != null);
            Contract.Ensures(ServiceType == service);
            var nmsLength = Math.Min(nmsData.Length, NmsMaxDataLength);
            var data      = new byte[NmsHeaderLength + nmsLength];

            Array.Copy(nmsData, 0, data, NmsHeaderLength, nmsLength);

            data[0]  = (byte)(((byte)service << 3) | ((id & 1023) >> 8));
            data[1]  = (byte)(id & 0xFF);
            data[2]  = (byte)((isResponsible ? 0 : 0x80) | (r1 ? 0x40 : 0) | nmsLength & 0x3F);
            Datagram = new NibusDatagram(null, source, destanation, priority, ProtocolType.Nms, data);
            Contract.Assume(!IsResponse);
        }
Example #10
0
 public CompoundTask(String Name, TaskCategory Category, PriorityType Priority)
 {
     this.NameFormat = Name + " ({0} left)";
     this.Name       = String.Format(NameFormat, 0);
     this.Category   = Category;
     this.Priority   = Priority;
 }
 public PriorityParameters(Doctor chosenDoctor, DateTime chosenStartDate, DateTime chosenEndDate, PriorityType type)
 {
     ChosenDoctor    = chosenDoctor;
     ChosenStartDate = chosenStartDate;
     ChosenEndDate   = chosenEndDate;
     Priority        = type;
 }
        /*
         * private void AddErrorsToVSErrorList( string message, TaskItemPriority priority)
         * {
         *  ErrorList errorList = this.ApplicationObject.ToolWindows.ErrorList;
         *  Window2 errorWin2 = (Window2)(errorList.Parent);
         *
         *  if (!errorWin2.Visible)
         *  {
         *      this.ApplicationObject.ExecuteCommand("View.ErrorList", " ");
         *  }
         *  errorWin2.SetFocus();
         *
         *
         *  IDesignerHost designer = (IDesignerHost)window.Object;
         *  ITaskListService service = designer.GetService(typeof(ITaskListService)) as ITaskListService;
         *
         *  //remove old task items from this document and BIDS Helper class
         *  System.Collections.Generic.List<ITaskItem> tasksToRemove = new System.Collections.Generic.List<ITaskItem>();
         *  foreach (ITaskItem ti in service.GetTaskItems())
         *  {
         *      ICustomTaskItem task = ti as ICustomTaskItem;
         *      if (task != null && task.CustomInfo == this && task.Document == window.ProjectItem.Name)
         *      {
         *          tasksToRemove.Add(ti);
         *      }
         *  }
         *  foreach (ITaskItem ti in tasksToRemove)
         *  {
         *      service.Remove(ti);
         *  }
         *
         *
         *  //foreach (Result result in errors)
         *  //{
         *      //if (result.Passed) continue;
         *      ICustomTaskItem item = (ICustomTaskItem)service.CreateTaskItem(TaskItemType.Custom, message);
         *      item.Category = TaskItemCategory.Misc;
         *      item.Appearance = TaskItemAppearance.Squiggle;
         *      //switch (result.Severity)
         *      //{
         *      //    case ResultSeverity.Low:
         *      //        item.Priority = TaskItemPriority.Low;
         *      //        break;
         *      //    case ResultSeverity.Normal:
         *      //        item.Priority = TaskItemPriority.Normal;
         *      //        break;
         *      //    case ResultSeverity.High:
         *              item.Priority = TaskItemPriority.High;
         *      //        break;
         *      //    default:
         *      //        throw new ArgumentOutOfRangeException();
         *      //}
         *      item.Document = window.ProjectItem.Name;
         *      item.CustomInfo = this;
         *
         *      service.Add(item);
         *  //}
         * }
         */

        private void AddTaskItem(PriorityType priority, string message)
        {
            //OutputWindowPane objBuildOutputWindowPane = GetBuildOutputWindowPane();
            vsTaskIcon     icon;
            vsTaskPriority vsPriority;

            switch (priority)
            {
            case PriorityType.Error:
                icon       = vsTaskIcon.vsTaskIconCompile;
                vsPriority = vsTaskPriority.vsTaskPriorityHigh;
                break;

            case PriorityType.Warning:
                icon       = vsTaskIcon.vsTaskIconSquiggle;
                vsPriority = vsTaskPriority.vsTaskPriorityMedium;
                break;

            default:
                icon       = vsTaskIcon.vsTaskIconComment;
                vsPriority = vsTaskPriority.vsTaskPriorityLow;
                break;
            }

            //if (objBuildOutputWindowPane != null)
            // {
            //    objBuildOutputWindowPane.OutputTaskItemString(message, vsPriority, DESIGN_RULE_CATEGORY, icon,"", 0, message);
            //}

            TaskList tl = (TaskList)((DTE2)this.ApplicationObject).ToolWindows.TaskList;

            tl.TaskItems.Add(DESIGN_RULE_CATEGORY, "", message, vsPriority, icon);
            ////tl.TaskItems.ForceItemsToTaskList();
        }
Example #13
0
 //Default constructor
 public Task()
 {
     //set default values
     date        = DateTime.Now;
     description = string.Empty;
     priority    = PriorityType.Normal;
 }
Example #14
0
        public T GetApiRequestByPriority(IApiRequest <T> apiRequest, PriorityType priorityType, [CallerMemberName] string methodName = "")
        {
            _appCenterService.Log(methodName,
                                  new Dictionary <string, string>
            {
                {
                    "Time", DateTime.Now.ToString()
                }
            });

            switch (priorityType)
            {
            case PriorityType.Speculative:
                return(apiRequest.Speculative);

            case PriorityType.UserInitiated:
                return(apiRequest.UserInitiated);

            case PriorityType.Background:
                return(apiRequest.Background);

            default:
                return(apiRequest.UserInitiated);
            }
        }
 public SubscriptionCommandAttribute(string commandName, string help,
                                     PriorityType priority = PriorityType.Low)
 {
     CommandName = commandName.ToLower();
     Help        = help;
     Priority    = priority;
 }
Example #16
0
        private PriorityType ReadPriority(out bool ok)
        {
            PriorityType type = (PriorityType)cmbBxPrio.SelectedIndex;

            ok = true;
            return(type);
        }
Example #17
0
 public void Report(PriorityType priority, string area, string message)
 {
     foreach (ILog logger in loggers)
     {
         logger.Report(priority, area, message);
     }
 }
Example #18
0
	GameObject ChooseTarget ( MF_AbstractPlatform receivingObjectScript, PriorityType priority, MF_TargetList targetListScript ) {
		GameObject _bestTarget = null;
		float? _bestValue = null;

		foreach ( int key in targetListScript.targetList.Keys ) { // iterate through target list
			if ( receivingObjectScript.TargetWithinLimits( targetListScript.targetList[key].transform ) == true ) { // skip this target if out of object gimbal limits
				switch ( priority ) {
				case PriorityType.Closest :
					if ( _bestValue == null ) { _bestValue = Mathf.Infinity; } // initialize _bestValue
					if ( targetListScript.targetList[key].sqrMagnitude < _bestValue ) {
						_bestTarget = targetListScript.targetList[key].transform.gameObject;
						_bestValue = targetListScript.targetList[key].sqrMagnitude;
					}
					break;
				case PriorityType.Furthest :
					if ( _bestValue == null ) { _bestValue = -Mathf.Infinity; } // initialize _bestValue
					if ( targetListScript.targetList[key].sqrMagnitude > _bestValue ) {
						_bestTarget = targetListScript.targetList[key].transform.gameObject;
						_bestValue = targetListScript.targetList[key].sqrMagnitude;
					}
					break;

				// add additional priority types

				default :
					break;
				}
			}
		}
		
		return _bestTarget;
	}
Example #19
0
 public void Report(PriorityType level, string area, string message)
 {
     if (level >= reportLevel)
     {
         Debug.Print(area + " : " + level.ToString() + " -> " + message);
     }
 }
 public void Setup( RouteElement roadElement, bool canStopOnIt, IRoadElement previous, IRoadElement next, PriorityType priorityType )
 {
     this.SetRouteElement( roadElement.RoadElement );
     this._canStopOnIt = canStopOnIt;
     this._routeElement = roadElement;
     this._next = next;
 }
Example #21
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NibusDatagram"/> class.
        /// </summary>
        /// <param name="provider">Поставщик датаграммы.</param>
        /// <param name="source">Адрес отправителя.</param>
        /// <param name="destanation">Адрес получателя.</param>
        /// <param name="priority">Приоритет.</param>
        /// <param name="protocol">Тип протокола.</param>
        /// <param name="data">Данные.</param>
        public NibusDatagram(
            ICodecInfo provider,
            Address source,
            Address destanation,
            PriorityType priority,
            ProtocolType protocol,
            IList <byte> data)
        {
            Contract.Requires(destanation != null);
            Contract.Requires(source != null);
            Contract.Requires(data != null);
            Contract.Ensures(Data != null);
            Contract.Ensures(Destanation != null);
            Contract.Ensures(Source != null);
            if (data == null || data.Count > MaxDataLength)
            {
                throw new ArgumentException("Invalid data");
            }

            Provider     = provider;
            Destanation  = destanation;
            Source       = source;
            ProtocolType = protocol;
            Data         = new ReadOnlyCollection <byte>(data);
            Priority     = priority;
        }
Example #22
0
        public static string Name(this PriorityType prio)
        {
            switch (prio)
            {
            case PriorityType.Alert:
                return("Alert ");

            case PriorityType.Critical:
                return("Critic");

            case PriorityType.Debug:
                return("Debug ");

            case PriorityType.Emergency:
                return("Emerg ");

            case PriorityType.Error:
                return("Error ");

            case PriorityType.Informational:
                return("Info  ");

            case PriorityType.Notice:
                return("Notice");

            case PriorityType.Warning:
                return("Warn'g");
            }
            return("Unknown");
        }
Example #23
0
 public void Report(PriorityType priority, string area, string message)
 {
     if (copyToDebugger)
         Debug.Print(priority.Name() + " (" + area + ")\t" + " --> " + message + (priority >= priorityThreshold ? "*" : ""));
     if (priority >= priorityThreshold)
         Send(priority, DateTime.Now, machineName, area, message);
 }
Example #24
0
 public Story(string id, string title, PriorityType priority, SizeType size, string description)
     : base(id, title, description)
 {
     this.priorityType = priority;
     this.storyStatus  = StoryStatusType.NotDone;
     this.sizeType     = size;
 }
Example #25
0
 public SyslogLogger(bool copyToDebugger, IPEndPoint syslogTarget, string machineName, PriorityType threshold)
 {
     sysLogEndPoint = syslogTarget;
     socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
     this.copyToDebugger = copyToDebugger;
     this.machineName = machineName;
     priorityThreshold = threshold;
 }
Example #26
0
        private Dictionary <ushort, uint> numVehiclesGoingToSegmentId;        // no minimum speed required

        public SegmentEnd(ushort nodeId, ushort segmentId, PriorityType type)
        {
            NodeId    = nodeId;
            SegmentId = segmentId;
            Type      = type;
            FirstRegisteredVehicleId = 0;
            Housekeeping();
        }
Example #27
0
 /// <summary>
 /// Creates a new instance of SystemCore.CommonTypes.Command class.
 /// </summary>
 /// <param name="name">Command name.</param>
 public Command(string name)
 {
     _name           = name;
     _protected_name = _name + " " + CommonInfo.GUID;
     _keywords       = StringUtility.GenerateKeywords(_name);
     _description    = string.Empty;
     _priority       = PriorityType.Medium;
 }
Example #28
0
 public void SetNewCommand(Command command)
 {
     _name           = command.Name;
     _protected_name = _name + " " + CommonInfo.GUID;
     _keywords       = (string[])command.Keywords.Clone();
     _description    = command.Description;
     _priority       = command.Priority;
 }
Example #29
0
 public void SetNewCommand(string name, string discription, PriorityType priority)
 {
     _name           = name;
     _protected_name = _name + " " + CommonInfo.GUID;
     _keywords       = StringUtility.GenerateKeywords(_name);
     _description    = discription;
     _priority       = priority;
 }
        //当点击[优先级]CheckGroup控件中的 Check时
        private void PriorityCheckGroupControl_ClickCheck(object sender, RoutedPropertyChangedEventArgs <int> e)
        {
            //触发事件
            PriorityType _oldValue = (PriorityType)(((int)e.OldValue) + 1);
            PriorityType _newValue = (PriorityType)(((int)e.NewValue) + 1);

            this.OnClickPriorityTypeButton(_oldValue, _newValue);
        }
Example #31
0
 public PriorityQueue(PriorityType type, E[] array)
 {
     SetHeapType(type);
     elements = new E[array.Length];
     Array.Copy(array, 0, elements, 0, array.Length);
     Size = array.Length;
     ReOrder();
 }
Example #32
0
 public SyslogLogger(bool copyToDebugger, IPEndPoint syslogTarget, string machineName, PriorityType threshold)
 {
     sysLogEndPoint      = syslogTarget;
     socket              = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
     this.copyToDebugger = copyToDebugger;
     this.machineName    = machineName;
     priorityThreshold   = threshold;
 }
Example #33
0
 public Story(string title, string description,
              PriorityType priorityType, StorySizeType storySizeType,
              StoryStatusType storyStatusType, IMember assignee)
     : base(title, description, priorityType, assignee)
 {
     this.SizeType   = storySizeType;
     this.StatusType = storyStatusType;
 }
Example #34
0
 public PriorityParameters(string doctorId, DateTime chosenStartDate, DateTime chosenEndDate, PriorityType type, int specializationId)
 {
     DoctorId         = doctorId;
     ChosenStartDate  = chosenStartDate;
     ChosenEndDate    = chosenEndDate;
     Priority         = type;
     SpecializationId = specializationId;
 }
 public PrioritySegment(ushort nodeid, int segmentid, PriorityType type)
 {
     numCarsGoingToSegmentId = new Dictionary <ushort, int>();
     Nodeid    = nodeid;
     Segmentid = segmentid;
     Type      = type;
     housekeeping();
 }
Example #36
0
 public Bug(string id, string title, PriorityType priority, SeverityType severity, IList <string> steps, string description)
     : base(id, title, description)
 {
     this.priorityType = priority;
     this.severityType = severity;
     this.bugStatus    = BugStatus.Active;
     this.steps        = steps;
 }
Example #37
0
 public void SendInternal(PriorityType priority, DateTime time, string machine, string programArea, string body, int facility)
 {
     var msg = "<" + (7 - (int)priority) + ">" + time.ToString("MMM d HH:mm:ss") + " " + machine + " " +
                  programArea + " " + body;
     if (time.Day < 10) msg = "<" + (7 - (int)priority) + ">" + time.ToString("MMM  d HH:mm:ss") + " " + machine + " " +
                  programArea + " " + body;
     var rawMsg = ascii.GetBytes(msg);
     socket.SendTo(rawMsg, sysLogEndPoint);
 }
Example #38
0
        public void Report(PriorityType priority, string area, string message)
        {
            if (priority < reportLevel) return;
            var str = (area + " : " + priority.ToString() + " -> " + message);

            if (port.IsOpen)
            {
                byte[] buffer = Encoding.UTF8.GetBytes(str + "\r\n");
                port.Write(buffer, 0, buffer.Length);
            }
        }
Example #39
0
 public FirebasePriority(string priority)
 {
     if (priority == null)
     {
         Type = PriorityType.None;
     }
     else
     {
         Type = PriorityType.String;
         _sp = priority;
     }
 }
Example #40
0
	GameObject ChooseTarget ( MF_AbstractPlatform receivingObjectScript, PriorityType priority, MF_TargetList targetListScript ) {
		GameObject _bestTarget = null;
		float? _bestValue = null;

		foreach ( int key in targetListScript.targetList.Keys ) { // iterate through target list
			if ( targetListScript.targetList[key] == null ) { continue; } // skip null entries
			if ( targetListScript.targetList[key].bullseye == null ) { continue; } // skip missing objects
			if ( checkArcLimits == true && receivingObjectScript.TargetWithinLimits( targetListScript.targetList[key].bullseye ) == false ) { continue; } // check arc limits
			if (receivingControllerScript && checkWeapRange == true ) {
				if ( receivingControllerScript.weapons.Length > 0 ) {
					if ( receivingControllerScript.weapons[ receivingControllerScript.curWeapon ].script.RangeCheck( targetListScript.targetList[key].bullseye ) == false ) { continue; } // check weapon range
				}
			}

			switch ( priority ) {
			case PriorityType.Closest :
				if ( _bestValue == null ) { _bestValue = Mathf.Infinity; } // initialize _bestValue
				if ( targetListScript.targetList[key].sqrMagnitude < _bestValue ) {
					_bestTarget = targetListScript.targetList[key].bullseye.gameObject;
					_bestValue = targetListScript.targetList[key].sqrMagnitude;
				}
				break;
			case PriorityType.Furthest :
				if ( _bestValue == null ) { _bestValue = -Mathf.Infinity; } // initialize _bestValue
				if ( targetListScript.targetList[key].sqrMagnitude > _bestValue ) {
					_bestTarget = targetListScript.targetList[key].bullseye.gameObject;
					_bestValue = targetListScript.targetList[key].sqrMagnitude;
				}
				break;

			// add additional priority types

			default :
				break;
			}
		}
		return _bestTarget;
	}
 public PrioritySegment(ushort nodeid, int segmentid, PriorityType type)
 {
     Nodeid = nodeid;
     Segmentid = segmentid;
     Type = type;
 }
Example #42
0
 public void Report(PriorityType priority, string area, string message)
 {
     foreach (ILog logger in loggers)
         logger.Report(priority, area, message);
 }
 public PriorityConductorInformationAttribute(PriorityType priority )
 {
     this.Priority = priority;
 }
 public PrioritySegment(ushort nodeid, int segmentid, PriorityType type)
 {
     this.nodeid = nodeid;
     this.segmentid = segmentid;
     this.type = type;
 }
Example #45
0
 public Request(int token, PriorityType priority)
 {
     this.TokenNumber = token;
     this.Priority = priority;
 }
Example #46
0
 public void Report(PriorityType priority, string area, string message)
 {
 }
Example #47
0
 public FirebasePriority(long priority)
 {
     Type = PriorityType.Numeric;
     _fp = priority;
 }
        private void AddErrorItem(PriorityType priority, string message)
        {
            OutputWindowPane objBuildOutputWindowPane = GetBuildOutputWindowPane();
            //vsTaskIcon icon;
            //vsTaskPriority vsPriority;
            TaskErrorCategory vsCat;
            switch (priority)
            {
                case PriorityType.Error:
                    //icon = vsTaskIcon.vsTaskIconCompile;
                    //vsPriority = vsTaskPriority.vsTaskPriorityHigh;
                    vsCat = TaskErrorCategory.Error;
                    break;
                case PriorityType.Warning:
                    //icon = vsTaskIcon.vsTaskIconSquiggle;
                    //vsPriority = vsTaskPriority.vsTaskPriorityMedium;
                    vsCat = TaskErrorCategory.Warning;
                    break;
                default:
                    //icon = vsTaskIcon.vsTaskIconComment;
                    //vsPriority = vsTaskPriority.vsTaskPriorityLow;
                    vsCat = TaskErrorCategory.Message;
                    break;

            }

            //if (objBuildOutputWindowPane != null)
            //{
            //    objBuildOutputWindowPane.OutputTaskItemString(message, vsPriority, DESIGN_RULE_CATEGORY, icon, "", 0, message);
            //}

            AddErrorToErrorList(message, vsCat, -1, 1);
        }
		public PrioritySegment(ushort nodeId, ushort segmentId, PriorityType type) {
			NodeId = nodeId;
			SegmentId = segmentId;
			Type = type;
		}
Example #50
0
 public void Add( IControl control, PriorityType priorityType, bool canStop )
 {
     this._route.Add( new RouteElement( control, priorityType ) { CanStop = canStop } );
 }
Example #51
0
 public RouteElement( IControl control, PriorityType priorityType )
 {
     this.Control = control;
     this.PriorityType = priorityType;
     this.CanStop = true;
 }
        void changePriority(WorkObject workObjectToUpdate, PriorityType before)
        {
            if (workObjectToUpdate.Priority != before)
            {
                PriorityType after = workObjectToUpdate.Priority;
                int id_ = workObjectToUpdate.WorkObjectID;

                if (before == PriorityType.Lowest && after == PriorityType.Low) // lowest -> low
                {
                    // converts time to Greenwich Mean Time
                    DateTime currentTime = TimeConverter.ConvertToLocalTime(DateTime.Now, "GMT Standard Time");

                    Comment newComment = new Comment { WorkObjectID = id_, Content = "*** Priority changed: Lowest to Low ***", Timestamp = currentTime, User = User.Identity.Name };
                    db.Comments.Add(newComment);
                }
                else if (before == PriorityType.Lowest && after == PriorityType.Normal) // lowest -> normal
                {
                    // converts time to Greenwich Mean Time
                    DateTime currentTime = TimeConverter.ConvertToLocalTime(DateTime.Now, "GMT Standard Time");

                    Comment newComment = new Comment { WorkObjectID = id_, Content = "*** Priority changed: Lowest to Normal ***", Timestamp = currentTime, User = User.Identity.Name };
                    db.Comments.Add(newComment);
                }
                else if (before == PriorityType.Lowest && after == PriorityType.High) // lowest -> high
                {
                    // converts time to Greenwich Mean Time
                    DateTime currentTime = TimeConverter.ConvertToLocalTime(DateTime.Now, "GMT Standard Time");

                    Comment newComment = new Comment { WorkObjectID = id_, Content = "*** Priority changed: Lowest to High ***", Timestamp = currentTime, User = User.Identity.Name };
                    db.Comments.Add(newComment);
                }
                else if (before == PriorityType.Lowest && after == PriorityType.High) // lowest -> urgent
                {
                    // converts time to Greenwich Mean Time
                    DateTime currentTime = TimeConverter.ConvertToLocalTime(DateTime.Now, "GMT Standard Time");

                    Comment newComment = new Comment { WorkObjectID = id_, Content = "*** Priority changed: Lowest to Urgent ***", Timestamp = currentTime, User = User.Identity.Name };
                    db.Comments.Add(newComment);
                }
                else if (before == PriorityType.Low && after == PriorityType.Lowest) // low -> lowest
                {
                    // converts time to Greenwich Mean Time
                    DateTime currentTime = TimeConverter.ConvertToLocalTime(DateTime.Now, "GMT Standard Time");

                    Comment newComment = new Comment { WorkObjectID = id_, Content = "*** Priority changed: Low to Lowest ***", Timestamp = currentTime, User = User.Identity.Name };
                    db.Comments.Add(newComment);
                }
                else if (before == PriorityType.Low && after == PriorityType.Normal) // low -> normal
                {
                    // converts time to Greenwich Mean Time
                    DateTime currentTime = TimeConverter.ConvertToLocalTime(DateTime.Now, "GMT Standard Time");

                    Comment newComment = new Comment { WorkObjectID = id_, Content = "*** Priority changed: Low to Normal ***", Timestamp = currentTime, User = User.Identity.Name };
                    db.Comments.Add(newComment);
                }
                else if (before == PriorityType.Low && after == PriorityType.High) // low -> high
                {
                    // converts time to Greenwich Mean Time
                    DateTime currentTime = TimeConverter.ConvertToLocalTime(DateTime.Now, "GMT Standard Time");

                    Comment newComment = new Comment { WorkObjectID = id_, Content = "*** Priority changed: Low to High ***", Timestamp = currentTime, User = User.Identity.Name };
                    db.Comments.Add(newComment);
                }
                else if (before == PriorityType.Low && after == PriorityType.High) // low -> urgent
                {
                    // converts time to Greenwich Mean Time
                    DateTime currentTime = TimeConverter.ConvertToLocalTime(DateTime.Now, "GMT Standard Time");

                    Comment newComment = new Comment { WorkObjectID = id_, Content = "*** Priority changed: Low to Urgent ***", Timestamp = currentTime, User = User.Identity.Name };
                    db.Comments.Add(newComment);
                }
                else if (before == PriorityType.Normal && after == PriorityType.Lowest) // normal -> lowest
                {
                    // converts time to Greenwich Mean Time
                    DateTime currentTime = TimeConverter.ConvertToLocalTime(DateTime.Now, "GMT Standard Time");

                    Comment newComment = new Comment { WorkObjectID = id_, Content = "*** Priority changed: Normal to Lowest ***", Timestamp = currentTime, User = User.Identity.Name };
                    db.Comments.Add(newComment);
                }
                else if (before == PriorityType.Normal && after == PriorityType.Low) // normal -> low
                {
                    // converts time to Greenwich Mean Time
                    DateTime currentTime = TimeConverter.ConvertToLocalTime(DateTime.Now, "GMT Standard Time");

                    Comment newComment = new Comment { WorkObjectID = id_, Content = "*** Priority changed: Normal to Low ***", Timestamp = currentTime, User = User.Identity.Name };
                    db.Comments.Add(newComment);
                }
                else if (before == PriorityType.Normal && after == PriorityType.High) // normal -> high
                {
                    // converts time to Greenwich Mean Time
                    DateTime currentTime = TimeConverter.ConvertToLocalTime(DateTime.Now, "GMT Standard Time");

                    Comment newComment = new Comment { WorkObjectID = id_, Content = "*** Priority changed: Normal to High ***", Timestamp = currentTime, User = User.Identity.Name };
                    db.Comments.Add(newComment);
                }
                else if (before == PriorityType.Normal && after == PriorityType.High) // normal -> urgent
                {
                    // converts time to Greenwich Mean Time
                    DateTime currentTime = TimeConverter.ConvertToLocalTime(DateTime.Now, "GMT Standard Time");

                    Comment newComment = new Comment { WorkObjectID = id_, Content = "*** Priority changed: Normal to Urgent ***", Timestamp = currentTime, User = User.Identity.Name };
                    db.Comments.Add(newComment);
                }
                else if (before == PriorityType.High && after == PriorityType.Lowest) // high -> lowest
                {
                    // converts time to Greenwich Mean Time
                    DateTime currentTime = TimeConverter.ConvertToLocalTime(DateTime.Now, "GMT Standard Time");

                    Comment newComment = new Comment { WorkObjectID = id_, Content = "*** Priority changed: High to Lowest ***", Timestamp = currentTime, User = User.Identity.Name };
                    db.Comments.Add(newComment);
                }
                else if (before == PriorityType.High && after == PriorityType.Low) // high -> low
                {
                    // converts time to Greenwich Mean Time
                    DateTime currentTime = TimeConverter.ConvertToLocalTime(DateTime.Now, "GMT Standard Time");

                    Comment newComment = new Comment { WorkObjectID = id_, Content = "*** Priority changed: High to Low ***", Timestamp = currentTime, User = User.Identity.Name };
                    db.Comments.Add(newComment);
                }
                else if (before == PriorityType.High && after == PriorityType.Low) // high -> normal
                {
                    // converts time to Greenwich Mean Time
                    DateTime currentTime = TimeConverter.ConvertToLocalTime(DateTime.Now, "GMT Standard Time");

                    Comment newComment = new Comment { WorkObjectID = id_, Content = "*** Priority changed: High to Normal ***", Timestamp = currentTime, User = User.Identity.Name };
                    db.Comments.Add(newComment);
                }
                else if (before == PriorityType.High && after == PriorityType.Low) // high -> urgent
                {
                    // converts time to Greenwich Mean Time
                    DateTime currentTime = TimeConverter.ConvertToLocalTime(DateTime.Now, "GMT Standard Time");

                    Comment newComment = new Comment { WorkObjectID = id_, Content = "*** Priority changed: High to Urgent ***", Timestamp = currentTime, User = User.Identity.Name };
                    db.Comments.Add(newComment);
                }
                else if (before == PriorityType.Urgent && after == PriorityType.Lowest) // urgent -> lowest
                {
                    // converts time to Greenwich Mean Time
                    DateTime currentTime = TimeConverter.ConvertToLocalTime(DateTime.Now, "GMT Standard Time");

                    Comment newComment = new Comment { WorkObjectID = id_, Content = "*** Priority changed: Urgent to Lowest ***", Timestamp = currentTime, User = User.Identity.Name };
                    db.Comments.Add(newComment);
                }
                else if (before == PriorityType.Urgent && after == PriorityType.Low) // urgent -> low
                {
                    // converts time to Greenwich Mean Time
                    DateTime currentTime = TimeConverter.ConvertToLocalTime(DateTime.Now, "GMT Standard Time");

                    Comment newComment = new Comment { WorkObjectID = id_, Content = "*** Priority changed: Urgent to Low ***", Timestamp = currentTime, User = User.Identity.Name };
                    db.Comments.Add(newComment);
                }
                else if (before == PriorityType.Urgent && after == PriorityType.Normal) // urgent -> normal
                {
                    // converts time to Greenwich Mean Time
                    DateTime currentTime = TimeConverter.ConvertToLocalTime(DateTime.Now, "GMT Standard Time");

                    Comment newComment = new Comment { WorkObjectID = id_, Content = "*** Priority changed: Urgent to Normal ***", Timestamp = currentTime, User = User.Identity.Name };
                    db.Comments.Add(newComment);
                }
                else if (before == PriorityType.Urgent && after == PriorityType.High) // urgent -> high
                {
                    // converts time to Greenwich Mean Time
                    DateTime currentTime = TimeConverter.ConvertToLocalTime(DateTime.Now, "GMT Standard Time");

                    Comment newComment = new Comment { WorkObjectID = id_, Content = "*** Priority changed: Urgent to High ***", Timestamp = currentTime, User = User.Identity.Name };
                    db.Comments.Add(newComment);
                }
            }
        }
Example #53
0
 public void Report(PriorityType level, string area, string message)
 {
     if (level >= reportLevel)
         Debug.Print(area + " : " + level.ToString() + " -> " + message);
 }
Example #54
0
 protected override object this[string index]
 {
     get
     {
         #region
         switch (index)
         {
             case "PriorityType": return PriorityType;
             case "PriorityQuality": return PriorityQuality;
             case "BaseNum": return BaseNum;
             case "EffectNum": return EffectNum;
             default: throw new ArgumentException(string.Format("PriorityInfo index[{0}] isn't exist.", index));
         }
         #endregion
     }
     set
     {
         #region
         switch (index)
         {
             case "PriorityType":
                 _PriorityType = value.ToEnum<PriorityType>();
                 break;
             case "PriorityQuality":
                 _PriorityQuality = value.ToEnum<PriorityQuality>();
                 break;
             case "BaseNum":
                 _BaseNum = value.ToShort();
                 break;
             case "EffectNum":
                 _EffectNum = value.ToShort();
                 break;
             default: throw new ArgumentException(string.Format("PriorityInfo index[{0}] isn't exist.", index));
         }
         #endregion
     }
 }
Example #55
0
 public DebugLogger(PriorityType reportLevel)
 {
     this.reportLevel = reportLevel;
 }
Example #56
0
 public FirebasePriority(float priority)
 {
     Type = PriorityType.Numeric;
     _fp = priority;
 }
Example #57
0
 /// <summary>
 /// 加成值
 /// </summary>
 /// <param name="priorityType"></param>
 /// <param name="priorityQuality"></param>
 /// <returns></returns>
 public static int PriorityEffectNum(PriorityType priorityType, PriorityQuality priorityQuality)
 {
     int baseNum = 0;
     PriorityInfo priority = new ShareCacheStruct<PriorityInfo>().FindKey(priorityType, priorityQuality);
     if (priority != null)
     {
         baseNum = priority.EffectNum;
     }
     return baseNum;
 }
        /*
        private void AddErrorsToVSErrorList( string message, TaskItemPriority priority)
        {
            ErrorList errorList = this.ApplicationObject.ToolWindows.ErrorList;
            Window2 errorWin2 = (Window2)(errorList.Parent);
            
            if (!errorWin2.Visible)
            {
                this.ApplicationObject.ExecuteCommand("View.ErrorList", " ");
            }
            errorWin2.SetFocus();
            

            IDesignerHost designer = (IDesignerHost)window.Object;
            ITaskListService service = designer.GetService(typeof(ITaskListService)) as ITaskListService;

            //remove old task items from this document and BIDS Helper class
            System.Collections.Generic.List<ITaskItem> tasksToRemove = new System.Collections.Generic.List<ITaskItem>();
            foreach (ITaskItem ti in service.GetTaskItems())
            {
                ICustomTaskItem task = ti as ICustomTaskItem;
                if (task != null && task.CustomInfo == this && task.Document == window.ProjectItem.Name)
                {
                    tasksToRemove.Add(ti);
                }
            }
            foreach (ITaskItem ti in tasksToRemove)
            {
                service.Remove(ti);
            }


            //foreach (Result result in errors)
            //{
                //if (result.Passed) continue;
                ICustomTaskItem item = (ICustomTaskItem)service.CreateTaskItem(TaskItemType.Custom, message);
                item.Category = TaskItemCategory.Misc;
                item.Appearance = TaskItemAppearance.Squiggle;
                //switch (result.Severity)
                //{
                //    case ResultSeverity.Low:
                //        item.Priority = TaskItemPriority.Low;
                //        break;
                //    case ResultSeverity.Normal:
                //        item.Priority = TaskItemPriority.Normal;
                //        break;
                //    case ResultSeverity.High:
                        item.Priority = TaskItemPriority.High;
                //        break;
                //    default:
                //        throw new ArgumentOutOfRangeException();
                //}
                item.Document = window.ProjectItem.Name;
                item.CustomInfo = this;
            
                service.Add(item);
            //}
        }
        */

        private void AddTaskItem(PriorityType priority, string message)
        {
            //OutputWindowPane objBuildOutputWindowPane = GetBuildOutputWindowPane(); 
            vsTaskIcon icon;
            vsTaskPriority vsPriority;
            switch (priority)
            {
                case PriorityType.Error:
                    icon = vsTaskIcon.vsTaskIconCompile;
                    vsPriority = vsTaskPriority.vsTaskPriorityHigh;
                    break;
                case PriorityType.Warning:
                    icon = vsTaskIcon.vsTaskIconSquiggle;
                    vsPriority = vsTaskPriority.vsTaskPriorityMedium;
                    break;
                default:
                    icon = vsTaskIcon.vsTaskIconComment;
                    vsPriority = vsTaskPriority.vsTaskPriorityLow;
                    break;

            }

            //if (objBuildOutputWindowPane != null) 
            // {
            //    objBuildOutputWindowPane.OutputTaskItemString(message, vsPriority, DESIGN_RULE_CATEGORY, icon,"", 0, message);
            //}

            TaskList tl = (TaskList)((DTE2)this.ApplicationObject).ToolWindows.TaskList;
            tl.TaskItems.Add(DESIGN_RULE_CATEGORY, "", message, vsPriority, icon);
            ////tl.TaskItems.ForceItemsToTaskList();
            
           
        }
Example #59
0
 public void SendBootInfo(PriorityType priority, DateTime time, string machine, string programArea, string body)
 {
     SendInternal(priority, time, machine, programArea, body, 8);
 }
Example #60
0
 /// <summary>
 /// 基础值
 /// </summary>
 /// <param name="priorityType"></param>
 /// <param name="priorityQuality"></param>
 /// <returns></returns>
 public static int PriorityBaseNum(PriorityType priorityType, PriorityQuality priorityQuality)
 {
     int baseNum = 0;
     PriorityInfo priority = new ConfigCacheSet<PriorityInfo>().FindKey(priorityType, priorityQuality);
     if (priority != null)
     {
         baseNum = priority.BaseNum;
     }
     return baseNum;
 }