예제 #1
0
 public static void ShowProgress(string Title, ProgressType Type)
 {
     System.Threading.Thread showProgressThread = new System.Threading.Thread(new System.Threading.ThreadStart(showProgress));
     tmpTitle = Title;
     tmpType  = Type;
     showProgressThread.Start();
 }
		public progressStandard(CelestialBody b, ProgressType t, ProgressNode n, string s = "", string g = "", string r = "", bool rewards = true)
		{
			if (b != null)
				body = b;

			pType = t;
			hasRewards = rewards;
			id = n.Id;
			descriptor = s;
			note = g;
			noteReference = r;

			if (t == ProgressType.POINTOFINTEREST)
				bodyName = ((PointOfInterest)n).body;

			try
			{
				time = (double)n.GetType().GetField("AchieveDate", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(n);
			}
			catch (Exception e)
			{
				Debug.LogWarning("[Progress Tracking Parser] Error In Detecting Progress Node Achievement Date\n" + e);
			}

			if (n.IsComplete)
				calculateRewards(b);
		}
예제 #3
0
        // ------------------------------------------------------------------------------------
        // State & Context

        // Set state
        public void SetState(bool active, ProgressType type, string message)
        {
            Console.Instance.Write(DebugLevel.Full, MessageLevel.Log, "Setting progress screen state to " + active); // Write to console

            if (active == true)                                                                                      // If active
            {
                discs.localLoad.SetActive(false);                                                                    // Disable all loading discs
                discs.localSave.SetActive(false);
                discs.cloudLoad.SetActive(false);
                discs.cloudSave.SetActive(false);
                messageText.text = message;  // Set message

                switch (type)                // Switch on type
                {
                case ProgressType.LocalLoad:
                    discs.localLoad.SetActive(true);
                    break;

                case ProgressType.LocalSave:
                    discs.localSave.SetActive(true);
                    break;

                case ProgressType.CloudLoad:
                    discs.cloudLoad.SetActive(true);
                    break;

                case ProgressType.CloudSave:
                    discs.cloudSave.SetActive(true);
                    break;
                }
            }
            progressObject.SetActive(active); // Set active
        }
예제 #4
0
 private void Download_Progress(int epid, int percent, ProgressType type)
 {
     if (this.DownloadProgress != null && this.DownloadIsVisible(epid))
     {
         this.DownloadProgress(epid, percent, type);
     }
 }
 protected void RaiseProgress(ProgressType progressType,
                              SchemaObjectType schemaObjectType,
                              string name, int?index, int?count)
 {
     ReaderEventArgs.RaiseEvent(ReaderProgress, this, progressType, schemaObjectType,
                                name, index, count);
 }
예제 #6
0
    /// <summary>
    ///  바 채우기
    /// </summary>
    /// <param name="value"></param>
    public void ChangeBar_Add(float value)
    {
        _curState    = ProgressType.Add;
        _changeValue = value;

        ProgressStart();
    }
		public progressInterval(ProgressType t, ProgressNode n, double r, double m, double ro, int i, string s = "")
		{
			pType = t;
			id = n.Id;
			totalIntervals = i;
			descriptor = s;
			currentRecord = r;
			max = m;
			round = ro;
			records = new List<int>(i + 1);
			rewards = new List<Vector3>(i + 1);

			for (int k = 0; k < i + 1; k++)
			{
				records.Add(0);
				rewards.Add(new Vector3());
			}

			if (n.IsComplete)
				interval = totalIntervals + 1;
			else
			{
				interval = getNextInterval();

				if (interval > totalIntervals + 1)
					interval = totalIntervals + 1;
			}

			for (int j = 1; j <= totalIntervals; j++)
			{
				calculateRewards(j);
			}
		}
예제 #8
0
 internal static void RaiseEvent(EventHandler <ReaderEventArgs> eventHandler,
                                 object sender,
                                 ProgressType progressType,
                                 SchemaObjectType schemaObjectType)
 {
     RaiseEvent(eventHandler, sender, progressType, schemaObjectType, null, null, null);
 }
예제 #9
0
 internal static void RaiseEvent(EventHandler<ReaderEventArgs> eventHandler,
     object sender,
     ProgressType progressType,
     SchemaObjectType schemaObjectType)
 {
     RaiseEvent(eventHandler, sender, progressType, schemaObjectType, null, null, null);
 }
예제 #10
0
        private static void UpdateProgress(
            ProgressType progressType,
            int current,
            int?max        = null,
            string message = null)
        {
            if (cliOptions.NoOutput)
            {
                return;
            }

            max = max ??
                  _progressBars[progressType]
                  .ProgressBar.Max;

            _progressBars[progressType]
            .ProgressBar.Max = max.Value;

            message = message ??
                      _progressBars[progressType]
                      .LastMessage;

            _progressBars[progressType]
            .ProgressBar.Refresh(current, message);
        }
예제 #11
0
 public LoadingProgress(bool increment, int max, string txt)
 {
     this.txt        = txt;
     this.increment  = increment;
     this.loadingMax = max;
     type            = ProgressType.Text | ProgressType.Increment | ProgressType.LoadingInitialize;
 }
예제 #12
0
 public void Update(int _ID, Socket _Socket, SocketAsyncEventArgs _EventArgs)
 {
     ID        = _ID;
     Socket    = _Socket;
     EventArgs = _EventArgs;
     Progress  = ProgressType.Connecting;
 }
예제 #13
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);
            }
        }
예제 #14
0
 public void IncreaseMaxValue(ProgressType type, int amount)
 {
     if (_progressModels.ContainsKey(type))
     {
         _progressModels[type].IncrementMaxValue(amount);
     }
 }
예제 #15
0
 private ReaderEventArgs(ProgressType progressType, SchemaObjectType schemaObjectType, string name, int? index, int? count)
 {
     ProgressType = progressType;
     SchemaObjectType = schemaObjectType;
     Name = name;
     Index = index;
     Count = count;
 }
예제 #16
0
 private ReaderEventArgs(ProgressType progressType, SchemaObjectType schemaObjectType, string name, int?index, int?count)
 {
     ProgressType     = progressType;
     SchemaObjectType = schemaObjectType;
     Name             = name;
     Index            = index;
     Count            = count;
 }
        //当点击[进度]CheckGroup控件中的 Check时
        private void ProgressCheckGroupControl_ClickCheck(object sender, RoutedPropertyChangedEventArgs <int> e)
        {
            //触发事件
            ProgressType _oldValue = (ProgressType)(((int)e.OldValue) + 1);
            ProgressType _newValue = (ProgressType)(((int)e.NewValue) + 1);

            this.OnClickProgressTypeButton(_oldValue, _newValue);
        }
예제 #18
0
 //最大值默认为100
 //如果进度打到最大值提示 'done'
 public ProgressBar(int max = 100, ProgressType type = ProgressType.Character)
 {
     maxValue     = max;
     progressType = type;
     //进度条宽度自适应
     progressWidth = Console.WindowWidth / 2;
     InitProgressBar();
 }
예제 #19
0
 public void Incremenent(ProgressType type)
 {
     if (_progressModels.ContainsKey(type))
     {
         if (_progressModels[type].ActiveValue < _progressModels[type].MaxValue || _progressModels[type].IsIndeterminate)
             _progressModels[type].IncrementProgress();
     }
 }
예제 #20
0
 public void Start(ProgressType type, int maxValue)
 {
     if (!_progressModels.ContainsKey(type))
         _progressModels[type] = new ProgressModel(type, maxValue);
     else
         _progressModels[type].OverwriteMaxValue(maxValue);
     ActiveProgressChanged?.Invoke(this, EventArgs.Empty);
 }
예제 #21
0
 public static void ShowProgress(string text = null, ProgressType type = ProgressType.Loading, ProgressTime time = ProgressTime.Infinite, List <string> buttons = null)
 {
     RootFrame.Dispatcher.BeginInvoke(() =>
     {
         Logger.HeaderChanged(text);
         Header.ShowProgress(text, type, time, buttons);
     });
 }
 void SetProgress(ProgressType i_progress_type)
 {
     m_current_progress_type = i_progress_type;
     if (m_current_progress_type != ProgressType.Unknown)
     {
         m_should_notify_progress_type_changed = true;
     }
 }
예제 #23
0
 public void Stop(ProgressType type)
 {
     if (_progressModels.ContainsKey(type))
     {
         _progressModels.Remove(type);
     }
     ActiveProgressChanged?.Invoke(this, EventArgs.Empty);
 }
예제 #24
0
 public MutiDownloadProgressChangedEventArgs(object version, ProgressType type, string message, long received = 0, long toReceive = 0, float progressPercentage = 0, object userState = null)
     : base(received, toReceive, progressPercentage, userState)
 {
     ProgressValue = progressPercentage;
     Version       = version;
     Message       = message;
     Type          = type;
 }
예제 #25
0
 public static TransferProgress SetMessage(ProgressType type, string message)
 {
     return(new TransferProgress()
     {
         Type = type,
         Message = message
     });
 }
예제 #26
0
 public void StartIndeterminate(ProgressType type)
 {
     if (!_progressModels.ContainsKey(type))
     {
         _progressModels[type] = new ProgressModel(type);
     }
     ActiveProgressChanged?.Invoke(this, EventArgs.Empty);
 }
예제 #27
0
 public Progress(DateTime startRange, DateTime endRange,
                 DateTime downloadStartTime, int fileCount)
 {
     StartRange        = startRange;
     EndRange          = endRange;
     DownloadStartTime = downloadStartTime;
     NumberOfFiles     = fileCount;
     ProgressType      = ProgressType.NewFile;
 }
        private static void DownloadHandler_Progress(int epid, int percent, ProgressType type)
        {
            if (Progress != null)
            {
                Progress(epid, percent, type);
            }

            UpdateTotalProgress();
        }
예제 #29
0
        public static Result <UserProgress> Create(ProgressType progressType, int level, decimal percentage)
        {
            if (percentage < 0 || percentage > 1)
            {
                return(Result.Fail <UserProgress>("Percentual deve ser maior que zero e menor ou igual a 1"));
            }

            return(Result.Ok(new UserProgress(progressType, level, percentage)));
        }
예제 #30
0
 /// <summary>
 /// The task constructor for initializing a new task
 /// </summary>
 /// <param name="name">the name of the task></param>
 /// <param name="description">the description of the task</param>
 /// <param name="dueDate">the due date of the task</param>
 /// <param name="progressType">the progress status </param>
 /// <param name="importanceType">the importance level of the task</param>
 /// <param name="users">the list of users associated to the task</param>
 public Tasks(String name, String description, DateTime dueDate, ProgressType progressStatus,
                 ImportanceType importanceLevel, List<User> users)
 {
     this._name = name;
     this._description = description;
     this._taskDueDate = dueDate;
     this._progressStatus = progressStatus;
     this._importanceLevel = importanceLevel;
 }
예제 #31
0
 public override void Draw()
 {
     inPoint.Draw();
     outPoint.Draw();
     GUI.Box(rect, "", style);
     title = GUI.TextField(new Rect(rect.position + new Vector2(25, 15), new Vector2(150, 20)), title);
     GUI.Label(new Rect(rect.position + new Vector2(25, 40), new Vector2(150, 20)), "ID: " + ID);
     TypeOfProgress = (ProgressType)EditorGUI.EnumPopup(new Rect(rect.position + new Vector2(25, 65), new Vector2(150, 20)), TypeOfProgress);
     AddDisplay();
 }
예제 #32
0
 public void Incremenent(ProgressType type)
 {
     if (_progressModels.ContainsKey(type))
     {
         if (_progressModels[type].ActiveValue < _progressModels[type].MaxValue || _progressModels[type].IsIndeterminate)
         {
             _progressModels[type].IncrementProgress();
         }
     }
 }
예제 #33
0
    /// <summary>
    ///  바 깍기
    /// </summary>
    /// <param name="value"></param>
    public void ChangeBar_Sub(float value)
    {
        _curState    = ProgressType.Subtract;
        _changeValue = value;

        //  값이 1이상이면 follow 속도록 증가
        _delayTime = value >= 1f ? 0.1f : 0.02f;

        ProgressStart();
    }
예제 #34
0
        private void ProgressSetColor(ProgressType type, ProgressStatus status)
        {
            // Only ProgressBar Coloring

            const int MAX_R = 50;
            const int MAX_G = 168;
            const int MAX_B = 62;

            const int MID_R = 255;
            const int MID_G = 192;
            const int MID_B = 56;

            const int MIN_R = 255;
            const int MIN_G = 71;
            const int MIN_B = 71;

            switch (type)
            {
            case ProgressType.Coolant:
                if (status is ProgressStatus.Max)
                {
                    ProgressDrum3.ForeColor = Color.FromArgb(MAX_R, MAX_G, MAX_B);
                }
                if (status is ProgressStatus.Mid)
                {
                    ProgressDrum3.ForeColor = Color.FromArgb(MID_R, MID_G, MID_B);
                }
                if (status is ProgressStatus.Min)
                {
                    ProgressDrum3.ForeColor = Color.FromArgb(MIN_R, MIN_G, MIN_B);
                }
                break;

/*                case ProgressType.Measure:
 *                  if (status is ProgressStatus.Max) { ProgressDrum2.ForeColor = Color.FromArgb(MAX_R, MAX_G, MAX_B); }
 *                  if (status is ProgressStatus.Mid) { ProgressDrum2.ForeColor = Color.FromArgb(MID_R, MID_G, MID_B); }
 *                  if (status is ProgressStatus.Min) { ProgressDrum2.ForeColor = Color.FromArgb(MIN_R, MIN_G, MIN_B); }
 *                  break;*/

            case ProgressType.Mixing:
                if (status is ProgressStatus.Max)
                {
                    ProgressDrum1.ForeColor = Color.FromArgb(MAX_R, MAX_G, MAX_B);
                }
                if (status is ProgressStatus.Mid)
                {
                    ProgressDrum1.ForeColor = Color.FromArgb(MID_R, MID_G, MID_B);
                }
                if (status is ProgressStatus.Min)
                {
                    ProgressDrum1.ForeColor = Color.FromArgb(MIN_R, MIN_G, MIN_B);
                }
                break;
            }
        }
예제 #35
0
    public static int MakeProgress(JsonData data)
    {
        int ty = (int)data["TypeOfProgress"];

        ProgressType type = (ProgressType)ty;

        int NextID = -1;

        switch (type)
        {
        case ProgressType.None:
            break;

        case ProgressType.ProgressPoint:

            ProgressPoint CheckToMatch = new ProgressPoint(data["CheckToMatch"][0]);

            Game.current.Progress.UpdateProgress(CheckToMatch.ProgressName, CheckToMatch);
            NextID = (int)data["NextID"];
            break;

        case ProgressType.CG:
            Sprite Image = null;
            if (data["ImageSlug"] != null)
            {
                Image = Resources.Load <Sprite>("Sprites/" + (string)data["ImageSlug"]);

                Game.current.Memory.UnlockImage(Image);
            }
            break;

        case ProgressType.Objective:
            string   num  = (string)data["TaskNumber"];
            string[] id   = num.Split('.');
            int      num1 = Convert.ToInt32(id[0]);
            int      num2 = -1;
            if (id.Length > 1)
            {
                num2 = Convert.ToInt32(id[1]);
            }

            int            state        = (int)data["TaskState"];
            Task.TaskState NewTaskState = (Task.TaskState)state;
            Game.current.Progress.UpdateTask(num1, NewTaskState, num2);
            break;

        default:
            Debug.LogError("Unrecognized Option");
            break;
        }



        return(NextID);
    }
예제 #36
0
        /// <summary>
        /// 这个方法,用于触发 ClickProgressTypeButton 路由事件
        /// </summary>
        /// <param name="_oldValue">之前被选中的Check的索引</param>
        /// <param name="_newValue">新的被选中的Check的索引</param>
        private void OnClickProgressTypeButtonInContextMenu(ProgressType _oldValue, ProgressType _newValue)
        {
            //创建路由事件参数
            RoutedPropertyChangedEventArgs <ProgressType> args = new RoutedPropertyChangedEventArgs <ProgressType>(_oldValue, _newValue);

            //设置这是哪个路由事件?
            args.RoutedEvent = BugListItemControl.ClickProgressTypeButtonInContextMenuEvent;

            //引发这个路由事件
            RaiseEvent(args);
        }
예제 #37
0
        public void OnProgressEventAction(object handle, ProgressType type, string message)
        {
            if (ProgressEventAction == null)
            {
                return;
            }
            var eventArgs =
                new MutiDownloadProgressChangedEventArgs(new UpdateVersion(Version.MD5, Version.PubTime, Version.Version, null, Version.Name), type, message);

            ProgressEventAction(handle, eventArgs);
        }
예제 #38
0
 internal static void RaiseEvent(EventHandler<ReaderEventArgs> eventHandler,
     object sender,
     ProgressType progressType,
     SchemaObjectType schemaObjectType,
     string name, int? index, int? count)
 {
     var handler = eventHandler;
     if (handler != null)
     {
         handler(sender, new ReaderEventArgs(progressType, schemaObjectType, name, index, count));
     }
 }
예제 #39
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public Achievement(Identifier id, String name, String description, 
            Times times, ProgressType type, Object init = null)
        {
            this.Id = id;
            this.Name = name;
            this.Description = description;

            this.Scope = times;
            this.Type = type;
            this.InitialValue = init;
            this.Progress = init;
        }
예제 #40
0
 private void OnProgress(ProgressType type, long current, long total)
 {
     if (QueryProgress != null)
     {
         QueryProgress(this, new QueryProgressEventArgs { ProgressType = type, Current = current, Total = total });
     }
 }
예제 #41
0
 public ProgressArgs(ProgressType type, object message)
     : this(type, message, Color.Black)
 {
 }
예제 #42
0
 public ProgressArgs(ProgressType type, object message, Color color)
 {
     this.Type = type;
     this.Message = message;
     this.Color = color;
 }
예제 #43
0
 public ProgressChangeEventArgs(int ProgressPercentage, ProgressType Topic, object UserState)
 {
     this.ProgressPercentage = ProgressPercentage;
     this.Topic = Topic;
     this.UserState = UserState;
 }
예제 #44
0
        /// <summary>
        /// Sets the progress with a given Criteria entry.
        /// </summary>
        /// <param name="entry"></param>
        /// <param name="newValue"></param>
        /// <param name="progressType"></param>
        internal void SetCriteriaProgress(AchievementCriteriaEntry entry, uint newValue, ProgressType progressType = ProgressType.ProgressSet)
        {
            // not create record for 0 counter
            if (newValue == 0)
                return;

            var achievementProgressRecord = GetOrCreateProgressRecord(entry.AchievementCriteriaId);
            uint updateValue;

            switch (progressType)
            {
                case ProgressType.ProgressAccumulate:
                    updateValue = newValue + achievementProgressRecord.Counter;
                    break;
                case ProgressType.ProgressHighest:
                    updateValue = achievementProgressRecord.Counter < newValue ? newValue : achievementProgressRecord.Counter;
                    break;
                default:
                    updateValue = newValue;
                    break;
            }

            if (updateValue == achievementProgressRecord.Counter)
                return;

            achievementProgressRecord.Counter = updateValue;

            if (entry.TimeLimit > 0)
            {
                DateTime now = DateTime.Now;
                if (achievementProgressRecord.StartOrUpdateTime.AddSeconds(entry.TimeLimit) < now)
                {
                    achievementProgressRecord.Counter = 1;
                }
                achievementProgressRecord.StartOrUpdateTime = now;
            }

            AchievementHandler.SendAchievmentStatus(achievementProgressRecord, Owner);

            if (IsAchievementCompletable(entry.AchievementEntry))
            {
                EarnAchievement(entry.AchievementEntry);
            }
        }
		public void addProgressStandard(ProgressType p, CelestialBody b, ProgressNode n, string d = "", string g = "", string r = "")
		{
			if (n == null)
				return;

			if (bodyNodes.Contains(n.Id))
				return;

			progressStandard s = null;

			switch (p)
			{
				case ProgressType.FLYBYRETURN:
					s = new progressStandard(b, ProgressType.FLYBYRETURN, n, d, g, r);
					flybyReturn = s;
					break;
				case ProgressType.LANDINGRETURN:
					s = new progressStandard(b, ProgressType.LANDINGRETURN, n, d, g, r);
					landingReturn = s;
					break;
				case ProgressType.ORBITRETURN:
					s = new progressStandard(b, ProgressType.ORBITRETURN, n, d, g, r);
					orbitReturn = s;
					break;
				case ProgressType.BASECONSTRUCTION:
					s = new progressStandard(b, ProgressType.BASECONSTRUCTION, n, d, g, r);
					baseConstruct = s;
					break;
				case ProgressType.CREWTRANSFER:
					s = new progressStandard(b, ProgressType.CREWTRANSFER, n, d, g, r);
					transfer = s;
					break;
				case ProgressType.DOCKING:
					s = new progressStandard(b, ProgressType.DOCKING, n, d, g, r);
					docking = s;
					break;
				case ProgressType.ESCAPE:
					s = new progressStandard(b, ProgressType.ESCAPE, n, d, g, r);
					escape = s;
					break;
				case ProgressType.FLAGPLANT:
					s = new progressStandard(b, ProgressType.FLAGPLANT, n, d, g, r);
					flag = s;
					break;
				case ProgressType.FLIGHT:
					s = new progressStandard(b, ProgressType.FLIGHT, n, d, g, r);
					flight = s;
					break;
				case ProgressType.FLYBY:
					s = new progressStandard(b, ProgressType.FLYBY, n, d, g, r);
					flyby = s;
					break;
				case ProgressType.LANDING:
					s = new progressStandard(b, ProgressType.LANDING, n, d, g, r);
					landing = s;
					break;
				case ProgressType.ORBIT:
					s = new progressStandard(b, ProgressType.ORBIT, n, d, g, r);
					orbit = s;
					break;
				case ProgressType.RENDEZVOUS:
					s = new progressStandard(b, ProgressType.RENDEZVOUS, n, d, g, r);
					rendezvous = s;
					break;
				case ProgressType.SCIENCE:
					s = new progressStandard(b, ProgressType.SCIENCE, n, d, g, r);
					science = s;
					break;
				case ProgressType.SPACEWALK:
					s = new progressStandard(b, ProgressType.SPACEWALK, n, d, g, r);
					spacewalk = s;
					break;
				case ProgressType.SPLASHDOWN:
					s = new progressStandard(b, ProgressType.SPLASHDOWN, n, d, g, r);
					splashdown = s;
					break;
				case ProgressType.STATIONCONSTRUCTION:
					s = new progressStandard(b, ProgressType.STATIONCONSTRUCTION, n, d, g, r);
					station = s;
					break;
				case ProgressType.SUBORBIT:
					s = new progressStandard(b, ProgressType.SUBORBIT, n, d, g, r);
					suborbit = s;
					break;
				case ProgressType.SURFACEEVA:
					s = new progressStandard(b, ProgressType.SURFACEEVA, n, d, g, r);
					surfaceEVA = s;
					break;
				default:
					return;
			}

			if (s == null)
				return;

			bodyNodes.Add(n.Id, s);
		}
예제 #46
0
        private void DataSearch_DownloadProgress(int epid, int percent, ProgressType type)
        {
            if (this.IsDisposed)
            {
                return;
            }

            if (this.InvokeRequired)
            {
                this.Invoke((MethodInvoker)delegate { this.DataSearch_DownloadProgress(epid, percent, type); });
                return;
            }

            ListViewItem item = this.ListDownloads.Items[Convert.ToString(epid, CultureInfo.InvariantCulture)];

            if (item == null)
            {
                return;
            }

            if (this.downloadColOrder.Contains(Model.Download.DownloadCols.Status))
            {
                string statusText = "Downloading...";

                if (type == ProgressType.Processing)
                {
                    statusText = "Processing...";
                }

                item.SubItems[this.downloadColOrder.IndexOf(Model.Download.DownloadCols.Status)].Text = statusText;
            }

            if (this.downloadColOrder.Contains(Model.Download.DownloadCols.Progress))
            {
                this.ListDownloads.ShowProgress(item, this.downloadColOrder.IndexOf(Model.Download.DownloadCols.Progress), percent);
            }

            switch (type)
            {
                case ProgressType.Downloading:
                    item.ImageKey = "downloading";
                    break;
                case ProgressType.Processing:
                    item.ImageKey = "processing";
                    break;
            }
        }
예제 #47
0
        private void ReportProgress(ProgressType percentProgress, object userState)
        {
            if (BwAppMy != null)
            {
                BwAppMy.ReportProgress((int)percentProgress, userState);
            }
            else
            {
                switch (percentProgress)
                {
                    case ProgressType.UPDATE_STATUSBAR_DEBUG:
                        Console.WriteLine((string)userState);
                        break;

                    case ProgressType.UPDATE_SCREENSHOTS_LIST:
                        Screenshot ss = userState as Screenshot;
                        Console.WriteLine("Screenshot: " + ss.FullImageLink);
                        break;
                }
            }
        }
        private static void DownloadHandler_Progress(int epid, int percent, ProgressType type)
        {
            if (Progress != null)
            {
                Progress(epid, percent, type);
            }

            UpdateTotalProgress();
        }
예제 #49
0
 protected void RaiseProgress(ProgressType progressType,
     SchemaObjectType schemaObjectType,
     string name, int? index, int? count)
 {
     ReaderEventArgs.RaiseEvent(ReaderProgress, this, progressType, schemaObjectType,
     name, index, count);
 }
예제 #50
0
파일: Session.cs 프로젝트: devMextur/Tazqon
 /// <summary>
 /// Updates the session-progess.
 /// </summary>
 /// <param name="SessionProgress"></param>
 public void UpdateSessionProgress(ProgressType SessionProgress)
 {
     this.SessionProgress = SessionProgress;
 }
예제 #51
0
		private static void addProgressInterval(ProgressType p, ProgressNode n, string d = "")
		{
			if (n == null)
				return;

			if (intervalNodes.Contains(n.Id))
				return;

			progressInterval i = null;
			
			switch (p)
			{
				case ProgressType.ALTITUDERECORD:
					i = new progressInterval(ProgressType.ALTITUDERECORD, n, ((RecordsAltitude)n).record, getMaxAltitudeRecord, 500, ContractDefs.Progression.RecordSplit, d);
					altitude = i;
					break;
				case ProgressType.DEPTHRECORD:
					i = new progressInterval(ProgressType.DEPTHRECORD, n, ((RecordsDepth)n).record, ContractDefs.Progression.MaxDepthRecord, 10, ContractDefs.Progression.RecordSplit, d);
					depth = i;
					break;
				case ProgressType.DISTANCERECORD:
					i = new progressInterval(ProgressType.DISTANCERECORD, n, ((RecordsDistance)n).record, ContractDefs.Progression.MaxDistanceRecord, 1000, ContractDefs.Progression.RecordSplit, d);
					distance = i;
					break;
				case ProgressType.SPEEDRECORD:
					i = new progressInterval(ProgressType.SPEEDRECORD, n, ((RecordsSpeed)n).record, ContractDefs.Progression.MaxSpeedRecord, 5, ContractDefs.Progression.RecordSplit, d);
					speed = i;
					break;
				default:
					return;
			}

			if (i == null)
				return;

			intervalNodes.Add(n.Id, i);
		}
예제 #52
0
		private static void addProgressStandard(ProgressType p, ProgressNode n, string id = "", string d = "", string g = "", string r = "")
		{
			if (n == null)
				return;

			if (standardNodes.Contains(n.Id))
				return;

			progressStandard s = null;

			switch (p)
			{
				case ProgressType.CREWRECOVERY:
					s = new progressStandard(null, ProgressType.CREWRECOVERY, n, d, g, r);
					crewRecovery = s;
					standardNodes.Add(n.Id, s);
					break;
				case ProgressType.FIRSTLAUNCH:
					s = new progressStandard(null, ProgressType.FIRSTLAUNCH, n, d, r);
					firstLaunch = s;
					standardNodes.Add(n.Id, s);
					break;
				case ProgressType.REACHSPACE:
					s= new progressStandard(null, ProgressType.REACHSPACE, n, d, g, r);
					reachSpace = s;
					standardNodes.Add(n.Id, s);
					break;
				case ProgressType.STUNT:					
					addStunt(n, d, id, g, r);
					break;
				case ProgressType.POINTOFINTEREST:
					addPointOfInterest(n, d, id, g, r);
					break;
				default:
					return;
			}
		}
예제 #53
0
 public ProgressChangeEventArgs(int ProgressPercentage, ProgressType Topic)
 {
     this.ProgressPercentage = ProgressPercentage;
     this.Topic = Topic;
 }
예제 #54
0
 private void OnProgress(ProgressType type)
 {
     OnProgress(type, 0, 0);
 }
예제 #55
0
 public void ReportProgress(BackgroundWorker worker, ProgressType progress, object userState)
 {
     if (worker != null)
     {
         worker.ReportProgress((int)progress, userState);
     }
     else
     {
         switch (progress)
         {
             case ProgressType.UPDATE_STATUSBAR_DEBUG:
                 Console.WriteLine(userState as string);
                 break;
         }
     }
 }
예제 #56
0
        private void DownloadPluginInst_Progress(int percent, ProgressType type)
        {
            // Don't raise the progress event if the value is the same as last time
            if (percent == this.ProgressValue)
            {
                return;
            }

            if (percent < 0 || percent > 100)
            {
                throw new ArgumentOutOfRangeException("percent", percent, "Progress percentage must be between 0 and 100!");
            }

            this.ProgressValue = percent;

            if (this.Progress != null)
            {
                this.Progress(this.episodeInfo.Epid, percent, type);
            }
        }
예제 #57
0
 private void Download_Progress(int epid, int percent, ProgressType type)
 {
     if (this.DownloadProgress != null && this.DownloadIsVisible(epid))
     {
         this.DownloadProgress(epid, percent, type);
     }
 }
예제 #58
0
 public ProgressEventArgs(string info, int percentage, ProgressType type)
 {
     this._info = info;
     this._percentage = percentage;
     this._type = type;
 }
예제 #59
0
 private void CastProgressEvent(string info, int percentage, ProgressType type)
 {
     if (onProgress != null)
     {
         onProgress(this, new ProgressEventArgs(info, percentage, type));
     }
 }
예제 #60
0
 public void Stop(ProgressType type)
 {
     
 }