예제 #1
0
        // browsing data and applying
        public ActionResult startbrowsejobs()
        {
            JobClass a = new JobClass();

            a.getalljobs();
            return(View("browsejobs", a));
        }
예제 #2
0
 protected Member(int order, Character character, JobClass jobclass, string message)
 {
     this.Order     = order;
     this.Character = character;
     this.JobClass  = jobclass;
     this.Message   = message;
 }
예제 #3
0
        static public Job <T> CreateNewJob <T>(JobClass type = JobClass.Normal, SubInfo info = null) where T : class
        {
            var newjob = InternalCreateJob <T>(type, info) as Job <T>;

            TriggerDisplay();
            return(newjob);
        }
예제 #4
0
        private void button2_Click(object sender, EventArgs e)
        {
            string _connstring = "Data Source=localhost/NEWDB;User Id=EDZEHOO;Password=PASS123;";

            try
            {
                OracleConnection _connObj = new OracleConnection(_connstring);
                // Create a new queue object
                OracleAQQueue _queueObj = new OracleAQQueue("EDZEHOO.SmallJobs", _connObj);
                // Set the payload type to your UDT
                _queueObj.MessageType = OracleAQMessageType.Udt;
                _queueObj.UdtTypeName = "EDZEHOO.JOBS_TYPE";
                _connObj.Open();
                OracleTransaction _txn = _connObj.BeginTransaction();
                // Dequeue the message.
                _queueObj.DequeueOptions.Visibility = OracleAQVisibilityMode.OnCommit;
                _queueObj.DequeueOptions.Wait       = 10;
                OracleAQMessage _deqMsg = _queueObj.Dequeue();
                JobClass        _Data   = (JobClass)_deqMsg.Payload;
                MessageBox.Show(_Data.ToString());
                _txn.Commit();
                _queueObj.Dispose();
                _connObj.Close();
                _connObj.Dispose();
                _connObj = null;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
예제 #5
0
        static public Job CreateNewJob(JobClass type = JobClass.Normal, Job.SubInfo info = null)
        {
            var newjob = InternalCreateJob(type, info);

            TriggerDisplay();
            return(newjob);
        }
예제 #6
0
        static private Job InternalCreateJob(JobClass type, Job.SubInfo info)
        {
            var newjob = new Job();

            newjob.JobType = type;
            joblist.Add(newjob);
            jobempty = false;
            if (type == JobClass.Upload)
            {
                if (UploadInfoJob == null)
                {
                    UploadInfoJob             = CreateNewJob(JobClass.UploadInfo);
                    UploadInfoJob.DisplayName = "Upload Progress";
                    UploadInfoJob.StartTime   = DateTime.Now;
                }
                Interlocked.Increment(ref UploadAll);
                newjob.index   = Interlocked.Increment(ref UploadCur);
                info.index     = newjob.index;
                newjob.JobInfo = info;
                if (info?.type == Job.SubInfo.SubType.UploadFile)
                {
                    Interlocked.Increment(ref UploadFileAll);
                    Interlocked.Add(ref UploadTotal, info.size);
                }
                else if (info?.type == Job.SubInfo.SubType.UploadDirectory)
                {
                    Interlocked.Increment(ref UploadFolderAll);
                }
            }
            else if (type == JobClass.Download)
            {
                if (DownloadInfoJob == null)
                {
                    DownloadInfoJob             = CreateNewJob(JobClass.DownloadInfo);
                    DownloadInfoJob.DisplayName = "Download Progress";
                    DownloadInfoJob.StartTime   = DateTime.Now;
                }
                Interlocked.Increment(ref DownloadAll);
                newjob.index   = Interlocked.Increment(ref DownloadCur);
                info.index     = newjob.index;
                newjob.JobInfo = info;
                if (info?.type == Job.SubInfo.SubType.DownloadFile)
                {
                    Interlocked.Add(ref DownloadTotal, info.size);
                }
            }
            joblist_type.AddOrUpdate(type,
                                     (key) =>
            {
                var newitem = new ConcurrentBag <Job>();
                newitem.Add(newjob);
                return(newitem);
            },
                                     (key, value) =>
            {
                value.Add(newjob);
                return(value);
            });
            return(newjob);
        }
예제 #7
0
 public JobClassPage(ObservableCollection <JobClass> jobClassList, JobClass jobClass = null) : this()
 {
     Repo        = new JobClassRepo();
     Model       = jobClass ?? new JobClass();
     ModelList   = jobClassList ?? new ObservableCollection <JobClass>();
     DataContext = Model;
 }
예제 #8
0
        private void cbxJobClass_SelectedIndexChanged(object sender, EventArgs e)
        {
            JobClass jobClass = cbxJobClass.SelectedItem as JobClass;

            if (jobClass != null)
            {
                cbxBaseLevel.BeginUpdate();
                cbxBaseLevel.Items.Clear();
                for (int i = 0; i < jobClass.MaxBLvl; i++)
                {
                    cbxBaseLevel.Items.Add((i + 1).ToString());
                }
                cbxBaseLevel.SelectedIndex = 0;
                cbxBaseLevel.EndUpdate();

                cbxJobLevel.BeginUpdate();
                cbxJobLevel.Items.Clear();
                for (int i = 0; i < jobClass.MaxJLvl; i++)
                {
                    cbxJobLevel.Items.Add((i + 1).ToString());
                }
                cbxJobLevel.SelectedIndex = 0;
                cbxJobLevel.EndUpdate();

                tbxStr.Text = "1";
                tbxAgi.Text = "1";
                tbxVit.Text = "1";
                tbxInt.Text = "1";
                tbxDex.Text = "1";
                tbxLuk.Text = "1";
            }
        }
예제 #9
0
        private void SetSkillTree(JobClass jobName)
        {
            switch (jobName)
            {
            case JobClass.Amazon:
                AmazonSkill1.Visible    = true;
                babarianSkill1.Visible  = false;
                sorceressSkill1.Visible = false;
                Initstat(jobName);
                InitAmazonSkilltree();
                break;

            case JobClass.Babarian:
                AmazonSkill1.Visible    = false;
                babarianSkill1.Visible  = true;
                sorceressSkill1.Visible = false;
                InitAmazonSkilltree();

                Initstat(jobName);
                break;

            case JobClass.Sorceress:
                AmazonSkill1.Visible    = false;
                babarianSkill1.Visible  = false;
                sorceressSkill1.Visible = true;
                InitAmazonSkilltree();

                Initstat(jobName);
                break;

            default:
                break;
            }
        }
예제 #10
0
 public joinMember(JobClass mainclass, JobClass subclass, string author, string note = "")
 {
     this.name      = author;
     this.note      = note;
     this.mainclass = mainclass;
     this.subclass  = subclass;
 }
 public void Remove(JobClass job)
 {
     if (Context.Entry(job).State == EntityState.Detached)
     {
         context.JobClasses.Attach(job);
     }
     context.JobClasses.Remove(job);
 }
 private void UnlockAllJobClass(Maid maid, bool max)
 {
     foreach (JobClass.Data data in JobClass.GetAllDatas(true))
     {
         var job = maid.status.jobClass.Get(data.id) ?? maid.status.jobClass.Add(data, true);
         if (max)
         {
             job?.expSystem.SetLevel(job.expSystem.GetMaxLevel());
         }
     }
 }
예제 #13
0
        /// <summary>
        /// Consumes a line of data to populate a JobClass
        /// </summary>
        /// <param name="dataChunks">A collection of job class data points.</param>
        /// <param name="jobClass">A JobClass object to consume the line data.</param>
        /// <returns>Any remaining data after processing the JobClass.</returns>
        IEnumerable <string> assignClassData(IList <string> dataChunks, JobClass jobClass)
        {
            //the process order here is important, since we're relying on simple(ish) Regex
            //which may overlap one another

            // 1. code is always 4 consecutive integers
            string code = dataChunks.FirstOrDefault(c => FieldPatterns.ClassCode.IsMatch(c));

            if (!String.IsNullOrEmpty(code))
            {
                jobClass.Code = code;
                dataChunks.Remove(code);
            }
            // 2. grade is always 3 consecutive integers
            string grade = dataChunks.FirstOrDefault(c => FieldPatterns.Grade.IsMatch(c));

            if (!String.IsNullOrEmpty(grade))
            {
                jobClass.Grade = grade;
                dataChunks.Remove(grade);
            }
            // 3. bargaining unit code is always 3 consecutive capital letters
            string bu = dataChunks.FirstOrDefault(c => FieldPatterns.BargainingUnit.IsMatch(c));

            if (!String.IsNullOrEmpty(bu))
            {
                jobClass.BargainingUnit =
                    bargainingUnits.ContainsKey(bu) ?
                    bargainingUnits[bu] : new BargainingUnit()
                {
                    Name = string.Empty, Code = bu
                };

                dataChunks.Remove(bu);
            }
            // 4. the remaining chunks are either part of the job title or part of a job step
            //    job step data is all numeric (integer or decimal numbers)
            //    so separate out the title parts and form the title
            decimal dec;
            var     titleChunks = dataChunks.Where(c => !decimal.TryParse(c, out dec)).ToArray();
            string  title       = String.Join(" ", titleChunks).Trim();

            if (!String.IsNullOrEmpty(title))
            {
                jobClass.Title = title;
                foreach (var chunk in titleChunks)
                {
                    dataChunks.Remove(chunk);
                }
            }

            //the job step chunks are all that should remain
            return(dataChunks);
        }
예제 #14
0
        // パーティIDと番号を指定して既存のメンバーを生成
        public Member(Guid puid, int order)
        {
            var table = Test.Database.ExecuteQuery("SELECT * FROM [Member] WHERE [PUID]=:PUID AND [Order]=:Order;", new SQLiteRow {
                { "PUID", puid },
                { "Order", order },
            });

            this.Order     = order;
            this.Character = new Character(table.Top.GetColumn(Guid.Parse, "CUID"));
            this.JobClass  = table.Top.GetColumn("Class", JobClass.Sponger);
            this.Message   = table.Top.GetColumn("Message");
        }
예제 #15
0
        static public JobClass convertJobclass(string classStr)   //文字列から列挙型へ変換
        {
            JobClass returnClass = JobClass.None;

            switch (classStr)
            {
            case "hu":
                returnClass = JobClass.Hu;
                break;

            case "fi":
                returnClass = JobClass.Fi;
                break;

            case "ra":
                returnClass = JobClass.Ra;
                break;

            case "gu":
                returnClass = JobClass.Gu;
                break;

            case "fo":
                returnClass = JobClass.Fo;
                break;

            case "te":
                returnClass = JobClass.Te;
                break;

            case "br":
                returnClass = JobClass.Br;
                break;

            case "bo":
                returnClass = JobClass.Bo;
                break;

            case "su":
                returnClass = JobClass.Su;
                break;

            case "hr":
                returnClass = JobClass.Hr;
                break;

            default:
                returnClass = JobClass.None;
                break;
            }

            return(returnClass);
        }
예제 #16
0
        public List <JobClass> AddJobClass(IEnumerable <int> JobClassesIds)
        {
            var JClass = new List <JobClass>();

            foreach (var item in JobClassesIds)
            {
                JobClass J = context.JobClasses.Where(a => a.Id == item).FirstOrDefault();

                JClass.Add(J);
            }
            return(JClass);
        }
예제 #17
0
        // キャラとクラスを指定して新しいメンバーを作る
        public static Member NewMember(Guid puid, int order, Character character, JobClass jobclass, string message = "")
        {
            var member = new Member(order, character, jobclass, message);

            Test.Database.ExecuteNonQuery("INSERT INTO [Member]([PUID], [Order], [CUID], [Class], [Message]) VALUES(:PUID, :Order, :CUID, :Class, :Message);", new SQLiteRow {
                { "PUID", puid },
                { "Order", member.Order },
                { "CUID", member.Character.CUID },
                { "Class", member.JobClass },
                { "Message", member.Message },
            });
            return(member);
        }
예제 #18
0
        private List GetJobClassInfo()
        {
            var datas = new List();

            foreach (JobClass.Data data in JobClass.GetAllDatas(true))
            {
                datas.Add(new Dict {
                    ["id"] = data.id, ["name"] = data.uniqueName
                });
            }

            return(datas);
        }
예제 #19
0
        static public int JobTypeCount(JobClass type)
        {
            ConcurrentBag <Job> ret;

            if (joblist_type.TryGetValue(type, out ret))
            {
                return(ret.Where(x => !x._isdeleted).Count());
            }
            else
            {
                return(0);
            }
        }
예제 #20
0
        /// <inheritdoc/>
        public string ToDelimitedString()
        {
            System.Globalization.CultureInfo culture = System.Globalization.CultureInfo.CurrentCulture;
            string separator = IsSubcomponent ? Configuration.SubcomponentSeparator : Configuration.ComponentSeparator;

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 3, separator),
                       JobCode?.ToDelimitedString(),
                       JobClass?.ToDelimitedString(),
                       JobDescriptionText?.ToDelimitedString()
                       ).TrimEnd(separator.ToCharArray()));
        }
예제 #21
0
 public NpcStats(string npcName, int npclevel, EJobType npcJob, int npcJobLevel, int npcStrength, int npcDexterity, int npcIntelligence, int npcSight)
 {
     this.npcName      = npcName;
     this.level        = npclevel;
     this.jobClass     = new JobClass(npcJob, npcJobLevel);
     this.strength     = npcStrength;
     this.dexterity    = npcDexterity;
     this.intelligence = npcIntelligence;
     this.sight        = npcSight;
     SetMaxHP();
     //this.healthBarSlider.value = CalculateHealthBarValue();
     loyalty = UnityEngine.Random.Range(40, 60);
 }
예제 #22
0
        private void SetCurrentJobClass(Maid maid, object classId)
        {
            int id = Convert.ToInt32(classId);

            JobClass.Data data = JobClass.GetData(id);

            if (!maid.status.jobClass.Contains(data.id))
            {
                maid.status.jobClass.Add(data, true);
            }

            maid.status.ChangeJobClass(id);
        }
예제 #23
0
        static public Job <T> CreateNewJob <T>(JobClass type = JobClass.Normal, SubInfo info = null, params Job[] depends) where T : class
        {
            var newjob = InternalCreateJob <T>(type, info) as Job <T>;

            foreach (var d in depends)
            {
                if (d != null)
                {
                    newjob.DependsOn.Enqueue(new WeakReference <Job>(d));
                }
            }
            TriggerDisplay();
            return(newjob);
        }
예제 #24
0
        static public Job CreateNewJob(JobClass type = JobClass.Normal, Job.SubInfo info = null, params Job[] depends)
        {
            var newjob = InternalCreateJob(type, info);

            foreach (var d in depends)
            {
                if (d != null)
                {
                    newjob.DependsOn.Enqueue(d);
                }
            }
            TriggerDisplay();
            return(newjob);
        }
예제 #25
0
        private void CalcJobBoni()
        {
            JobClass jobClass = cbxJobClass.SelectedItem as JobClass;

            if (jobClass != null)
            {
                _strBoni = 0;
                _agiBoni = 0;
                _vitBoni = 0;
                _intBoni = 0;
                _dexBoni = 0;
                _lukBoni = 0;

                foreach (var jobBoni in jobClass.JobBonus)
                {
                    foreach (var boniLevel in jobBoni.JobLevels)
                    {
                        if (_jobLevel >= boniLevel)
                        {
                            switch (jobBoni.StatsType)
                            {
                            case StatsType.Str:
                                _strBoni++;
                                break;

                            case StatsType.Agi:
                                _agiBoni++;
                                break;

                            case StatsType.Vit:
                                _vitBoni++;
                                break;

                            case StatsType.Int:
                                _intBoni++;
                                break;

                            case StatsType.Dex:
                                _dexBoni++;
                                break;

                            case StatsType.Luk:
                                _lukBoni++;
                                break;
                            }
                        }
                    }
                }
            }
        }
예제 #26
0
        private int CalcStatuspoints()
        {
            // current
            double stPoints = 0;

            JobClass jobClass = cbxJobClass.SelectedItem as JobClass;

            if (jobClass != null)
            {
                stPoints = jobClass.Statspoints;
            }

            for (int i = 1; i < _baseLevel; i++)
            {
                stPoints += Math.Floor((double)i / 5) + 3;
            }

            // required
            double rStPoints = 0;

            for (int i = 2; i <= _str; i++)
            {
                rStPoints += CalcRequiredStatPoints(i);
            }
            for (int i = 2; i <= _agi; i++)
            {
                rStPoints += CalcRequiredStatPoints(i);
            }
            for (int i = 2; i <= _vit; i++)
            {
                rStPoints += CalcRequiredStatPoints(i);
            }
            for (int i = 2; i <= _int; i++)
            {
                rStPoints += CalcRequiredStatPoints(i);
            }
            for (int i = 2; i <= _dex; i++)
            {
                rStPoints += CalcRequiredStatPoints(i);
            }
            for (int i = 2; i <= _luk; i++)
            {
                rStPoints += CalcRequiredStatPoints(i);
            }

            // result
            return((int)(stPoints - rStPoints));
        }
예제 #27
0
        static public string ConvertJob(JobClass mainclass, JobClass subclass = JobClass.None)
        {
            string Str = "";

            if (mainclass != JobClass.None)
            {
                Str += mainclass.ToString();
            }

            if (subclass != JobClass.None)
            {
                Str += subclass.ToString();
            }

            return(Str);
        }
예제 #28
0
 //Constructor for random enemies
 public NpcStats(int minLevel, int maxLevel)
 {
     if (minLevel <= 0)
     {
         minLevel = 1;
     }
     level        = UnityEngine.Random.Range(minLevel, maxLevel);
     npcJob       = (EJobType)UnityEngine.Random.Range(0, 7);
     jobClass     = new JobClass(npcJob, level);
     strength     = UnityEngine.Random.Range(1, level * 3);
     dexterity    = UnityEngine.Random.Range(1, level * 3);
     intelligence = UnityEngine.Random.Range(1, level * 3);
     sight        = UnityEngine.Random.Range(1, level * 3);
     cost         = 50 * level;
     SetMaxHP();
 }
예제 #29
0
 public ActionResult ViewJobDetails(Guid id)
 {
     if (GlobalClass.SystemSession)
     {
         JobClass model = new JobClass();
         model        = manage.FillMainJob(id);
         ViewBag.mess = "MY RCS JOB " + model.JobName;
         ViewBag.mesg = "THE FOLLOWING ARE READONLY INFORMATION PERTAINING TO THE JOB - " + model.JobName;
         return(View(model));
     }
     else
     {
         Exception e = new Exception("Sorry, your Session has Expired");
         return(View("Error", new HandleErrorInfo(e, "Home", "Logout")));
     }
 }
        protected void OnTaskUpdated(ref Server vcServer, JobClass vcJob, TaskClass vcTask)
        {
            UpdateMonitoringTimeMessage(vcServer);

            if (vcTask.Stats.Status == TaskStatsClass.TaskStatusT.Waiting)
            {

                Debug.WriteLine(vcTask.Name);
                Debug.WriteLine("ExecutionTime: " + vcTask.Stats.ExecutionTime);
                Debug.WriteLine(vcTask.Stats.Status);

                var task = new Task(ref vcServer, vcJob, vcTask);
                var tasks = DbHandler.UpdateTask(task);
                VisualCronHubHandler.UpdateClients(tasks);
            }
        }
예제 #31
0
        //メンバー一覧を取得
        public List <IjoinArg> getMemberList()
        {
            string que = string.Format("SELECT name,mainclass,subclass,note FROM {0} ;", tablename);
            List <List <object> > res     = selectQue(que);
            List <IjoinArg>       outList = new List <IjoinArg>();

            foreach (List <object> lstObj in res)
            {
                string   name      = (string)lstObj[0];
                JobClass mainclass = (JobClass)((int)lstObj[1]);
                JobClass subClass  = (JobClass)((int)lstObj[2]);
                string   note      = (string)lstObj[3];

                IjoinArg tmp = new joinMember(mainclass, subClass, name, note);
                outList.Add(tmp);
            }

            return(outList);
        }
예제 #32
0
        public Task(ref Server server, JobClass job, TaskClass task)
        {
            Name = task.Name;
            Group = job.Group;
            Server = server.IP.ToUpper().Replace(".AD.METASOURCE.COM", "").Replace("DRPR-", "");
            JobName = job.Name;
            CurrentSuccess = task.Stats.Result == "Success" ? 1 : 0;
            CurrentRunTime = task.Stats.DateLastExecution;
            CurrentExectutionTimeDuration = task.Stats.ExecutionTime;
            CurrentStandardOutput = GetStandardOutput(ref server, job, task);
            RunTimeFrequencyMinutes = Math.Ceiling((job.Stats.DateNextExecution - job.Stats.DateLastExecution).TotalMinutes);

            if (task.Execute != null)
            {
                CommandLine = task.Execute.CmdLine;
                Arguments = task.Execute.Arguments;
                WorkingDirectory = task.Execute.WorkingDirectory;
            }
        }
예제 #33
0
        private string GetStandardOutput(ref Server server, JobClass job, TaskClass task)
        {
            var stdOutput = "";

            try
            {
                if (task.Stats.StandardOutput != null)
                {

                    stdOutput = Encoding.Default.GetString(task.Stats.StandardOutput);

                    //try
                    //{
                    //    stdOutput = server.Jobs.Tasks.GetOutputString(OutputInfoClass.OutputT.StandardOutput, job.Id, task.Id, true);
                    //}
                    //catch (Exception)
                    //{
                    //    stdOutput = Encoding.Default.GetString(task.Stats.StandardOutput);
                    //}
                }

                return stdOutput;
            }
            catch (Exception ex)
            {
                var stdOutputErrorMessage = string.Format("Unable to retrieve Standard Message with message: {0}", ex.Message);
                return stdOutputErrorMessage;
            }
        }