예제 #1
0
 public ProcRule(ProcType Type, int Dest, int Col1, int Col2)
 {
     _Type = Type;
     _Dest = Dest;
     _Col1 = Col1;
     _Col2 = Col2;
 }
예제 #2
0
        /// <summary>
        /// 셀 자동처리 규칙을 설정합니다.
        /// </summary>
        /// <param name="Proc">처리 종류</param>
        /// <param name="Dest">결과 열 인덱스</param>
        /// <param name="Col1">열 인덱스1</param>
        /// <param name="Col2">열 인덱스2</param>
        public void AddAutoProcRule(ProcType Proc, int Dest, int Col1, int Col2)
        {
            switch (Proc)
            {
            // 덧셈
            case ProcType.Add:
                ProcRules.Add(new ProcRule(ProcType.Add, Dest, Col1, Col2));
                break;

            // 뺄셈
            case ProcType.Sub:
                ProcRules.Add(new ProcRule(ProcType.Sub, Dest, Col1, Col2));
                break;

            // 곱셉
            case ProcType.Mul:
                ProcRules.Add(new ProcRule(ProcType.Mul, Dest, Col1, Col2));
                break;

            // 나눗셈
            case ProcType.Div:
                ProcRules.Add(new ProcRule(ProcType.Div, Dest, Col1, Col2));
                break;

            // 나머지
            case ProcType.Mod:
                ProcRules.Add(new ProcRule(ProcType.Mod, Dest, Col1, Col2));
                break;

            default:
                break;
            }
        }
예제 #3
0
 public ProcRule(ProcType Type, Func <bool> Func, int Col1)
 {
     _Type = Type;
     _Func = Func;
     _Dest = 0;
     _Col1 = Col1;
     _Col2 = 0;
 }
예제 #4
0
 public Type Visit(ProcType node)
 {
     foreach (var n in node)
     {
         return(Visit((dynamic)n));
     }
     return(Type.VOID);
 }
예제 #5
0
        public Node Proc()
        {
            var result = new ProcDeclaration()
            {
                AnchorToken = Expect(TokenCategory.PROC)
            };

            result.Add(new Identifier()
            {
                AnchorToken = Expect(TokenCategory.IDENTIFIER)
            });
            Expect(TokenCategory.PARENTHESIS_OPEN);
            var param = new ProcParam();

            while (CurrentToken == TokenCategory.IDENTIFIER)
            {
                param.Add(ParamDeclaration());
            }
            Expect(TokenCategory.PARENTHESIS_CLOSE);
            result.Add(param);
            var type = new ProcType();

            if (CurrentToken == TokenCategory.TWOPOINTS)
            {
                Expect(TokenCategory.TWOPOINTS);
                type.Add(ChimeraType());
            }
            result.Add(type);
            var con = new ProcConst();

            Expect(TokenCategory.SEMICOL);
            if (CurrentToken == TokenCategory.CONST)
            {
                con.Add(Const());
            }
            result.Add(con);
            var va = new ProcVar();

            if (CurrentToken == TokenCategory.VAR)
            {
                va.Add(Var());
            }
            result.Add(va);
            var procStatement = new ProcStatement()
            {
                AnchorToken = Expect(TokenCategory.BEGIN)
            };

            while (firstOfStatement.Contains(CurrentToken))
            {
                procStatement.Add(Statement());
            }
            Expect(TokenCategory.END);
            Expect(TokenCategory.SEMICOL);
            result.Add(procStatement);
            return(result);
        }
예제 #6
0
 public Computer(ProcType proc, MnfcrType mnfcr, OSType os, int frequency, int ram, List <string> soft, List <string> users)
 {
     Proc      = proc;
     Mnfcr     = mnfcr;
     OS        = os;
     Frequency = frequency;
     RAM       = ram;
     Soft      = soft;
     Users     = users;
 }
예제 #7
0
 public PassiveProc(BinaryReader reader)
 {
     source = reader.ReadInt64();
     target = reader.ReadInt64();
     type   = (ProcType)reader.ReadByte();
     reader.ReadBytes(3);//pad
     modifier = reader.ReadSingle();
     duration = reader.ReadInt32();
     unknown  = reader.ReadInt32();
     guid3    = reader.ReadInt64();
 }
예제 #8
0
    public static Item AddProc(Item item, float rarityMod)
    {
        ProcType procToAdd = GM.GetRandomEnum <ProcType>();

        (item as Weapon).Proc = procToAdd;
        switch (procToAdd)
        {
        case ProcType.GainLifeOnHit:
            (item as Weapon).ProcModifier = Random.Range(10, 25) * levelOfChest * rarityMod;
            break;

        case ProcType.GainManaOnHit:
            (item as Weapon).ProcModifier = Random.Range(2, 10) * levelOfChest * rarityMod;
            break;

        case ProcType.Knockback:
            (item as Weapon).ProcModifier = Random.Range(0.025f, 0.055f) * rarityMod;
            break;

        case ProcType.None:
            AddProc(item, rarityMod);
            break;

        case ProcType.Poison:
            (item as Weapon).ProcModifier = Random.Range(0.025f, 0.055f) * rarityMod;
            break;

        case ProcType.Slow:
            (item as Weapon).ProcModifier = Random.Range(0.025f, 0.055f) * rarityMod;
            break;

        case ProcType.ConvertToLife:
            (item as Weapon).ProcModifier = Random.Range(0.006f, 0.027f + 0.001f) * rarityMod;
            break;

        case ProcType.ConvertToMana:
            (item as Weapon).ProcModifier = Random.Range(0.006f, 0.027f + 0.001f) * rarityMod;
            break;

        case ProcType.Stun:
            (item as Weapon).ProcModifier = Random.Range(0.025f, 0.055f) * rarityMod;
            break;

        case ProcType.GainEnergyOnHit:
            (item as Weapon).ProcModifier = Random.Range(2, 10) * levelOfChest * rarityMod;
            break;

        case ProcType.ConvertToEnergy:
            (item as Weapon).ProcModifier = Random.Range(0.006f, 0.027f + 0.001f) * rarityMod;
            break;
        }

        return(item);
    }
예제 #9
0
        /// <summary>
        /// 셀 자동처리 규칙을 설정합니다.
        /// </summary>
        /// <param name="Proc">처리 종류</param>
        /// <param name="Func">함수 명</param>
        /// <param name="Col1">열 인덱스1</param>
        public void AddAutoProcRule(ProcType Proc, Func <bool> Func, int Col1)
        {
            switch (Proc)
            {
            case ProcType.Func:
                ProcRules.Add(new ProcRule(ProcType.Func, Func, Col1));
                break;

            default:
                break;
            }
        }
예제 #10
0
 public static void SetGameProgress(ProcType procType, params Object[] args)
 {
     if (!GameProcData.ProcData.ContainsKey(procType))
         return;
     var targetParas = args.PackArray().ToLower();
     //LoggerHelper.Error("targetParas: " + targetParas);
     if (GameProcData.ProcData[procType].ContainsKey(targetParas))
     {
         var progress = GameProcData.ProcData[procType][targetParas].Progress;
         MogoWorld.SetGameProgress(progress);
     }
 }
예제 #11
0
    private int _enchants;         //To use later for enchating items at merchant, max enchant is always 10


    public Weapon()
    {
        _maxDamage    = 5;
        _dmgVariance  = 0.2f;
        _dmgType      = DamageType.Normal;
        _dmgValue     = 0;
        _procType     = ProcType.None;
        _procModifier = 0;
        _enchants     = 0;
        _attackSpeed  = 1.2f;
        _critChance   = 0.0f;
        _critDamage   = 0.0f;
    }
예제 #12
0
    public static void SetGameProgress(ProcType procType, params Object[] args)
    {
        if (!GameProcData.ProcData.ContainsKey(procType))
        {
            return;
        }
        var targetParas = args.PackArray().ToLower();

        //Debug.LogError("targetParas: " + targetParas);
        if (GameProcData.ProcData[procType].ContainsKey(targetParas))
        {
            var progress = GameProcData.ProcData[procType][targetParas].Progress;
            MogoWorld.SetGameProgress(progress);
        }
    }
예제 #13
0
        /// <summary>
        /// Close process if it's opened
        /// </summary>
        /// <param name="name">ProcName or WindowTitle of the process to close.
        /// ProcName is the same as the exe name without the ".exe". WindowTitle is the title of the window</param>
        /// <param name="type">Which part of the process are you looking for, to find and close process</param>
        public static void KillProcess(string name, ProcType type = ProcType.ProcessName)
        {
            var args    = new WindowsEventArgs();
            var process = GetProcess(name, type);

            if (type == ProcType.ProcessName)
            {
                args.ProcessName = name;
            }
            else
            {
                args.ProcessWindowTitle = name;
            }

            KillProcess(process, args);
        }
예제 #14
0
 private Weapon(int mDmg, float dmgV, DamageType dmgType, float attackSpeed,
                float critChance, ProcType proc, float procmod, float critDmg, int sockets, int usedSockets,
                int dmgVal, int hands, int enchants)
 {
     _maxDamage    = mDmg;
     _dmgVariance  = dmgV;
     _dmgType      = dmgType;
     _dmgValue     = dmgVal;
     _procType     = proc;
     _procModifier = procmod;
     _attackSpeed  = attackSpeed;
     _critChance   = critChance;
     _critDamage   = critDmg;
     Sockets       = sockets;
     UsedSockets   = usedSockets;
     _enchants     = enchants;
 }
예제 #15
0
        // Token: 0x0600184D RID: 6221 RVA: 0x00069104 File Offset: 0x00067304
        public void AppendToStringBuilder(StringBuilder stringBuilder)
        {
            stringBuilder.Append("(");
            bool flag = false;

            for (ProcType procType = ProcType.Behemoth; procType < ProcType.Count; procType++)
            {
                if (this.HasProc(procType))
                {
                    if (flag)
                    {
                        stringBuilder.Append("|");
                    }
                    stringBuilder.Append(procType.ToString());
                    flag = true;
                }
            }
            stringBuilder.Append(")");
        }
예제 #16
0
        /// <summary>
        /// Get Process from running processes
        /// </summary>
        /// <param name="type">The part of the process you are searching for, as in ProcessName, ProcessID, WindowTitle.
        /// <param name="name">The name of the process you are searching for.</param>
        /// <returns>The process that was found, or null if not found</returns>
        public static Process GetProcess(string name, ProcType type = ProcType.ProcessName)
        {
            var processes = Process.GetProcesses();

            foreach (var process in processes)
            {
                if (type == ProcType.ProcessName)
                {
                    if (process.ProcessName == name)
                    {
                        return(process);
                    }
                }
                else if (type == ProcType.WindowTitle)
                {
                    if (process.MainWindowTitle == name)
                    {
                        return(process);
                    }
                }
            }
            return(null);
        }
예제 #17
0
 public static bool GetProcValue(this ProcChainMask procMask, ProcType Proc)
 {
     return(ModProcManager.GetProcValue(procMask, Proc.ToString()));
 }
예제 #18
0
 /// <summary>
 /// Check if a process is running
 /// </summary>
 /// <param name="type">The part of the process you are searching for.
 /// By ProcessName, ProcessID, and MainWindowTytle</param>
 /// <param name="name">The text of the process you are searching for.</param>
 /// <param name="process">The process that was found. Returns null if process is not found</param>
 /// <returns>True or false, whether or not the process is running</returns>
 public static bool IsProgramRunning(string name, out Process process, ProcType type = ProcType.ProcessName)
 {
     process = GetProcess(name, type);
     return(process != null);
 }
        static void Main(string[] args)
        {
            Initializer.Init();

            FilterCondition filter3 = new FilterCondition();

            filter3.Field = "Job_Id";
            filter3.Value = "3";
            filter3.Type  = ConditionType.Equal;
            List <FilterCondition> filt = new List <FilterCondition>();

            filt.Add(filter3);

            ProcType             proctype   = new ProcType();
            List <ProcTypeModel> collection = proctype.List(filt);

            foreach (ProcTypeModel P in collection)
            {
                Console.WriteLine(P);
            }

            /*Proc proc = new Proc();
             * Client client= new Client();
             * User user = new User();
             * ProcType proctype = new ProcType();
             * Date date = new Date();
             * List<DateModel> collection = date.List();
             *
             * FilterCondition filter1 = new FilterCondition();
             * filter1.Field = "Personal_Id";
             * filter1.Value = "3";
             * filter1.Type = ConditionType.Equal;
             *
             * FilterCondition filter2 = new FilterCondition();
             * filter2.Field = "Date_Id";
             * filter2.Value = "2";
             * filter2.Type = ConditionType.Equal;
             *
             * FilterCondition filter3 = new FilterCondition();
             * filter3.Field = "Proc_Type_Id";
             * filter3.Value = "2";
             * filter3.Type = ConditionType.Equal;
             * List<FilterCondition> filt = new List<FilterCondition>();
             * filt.Add(filter1);
             * filt.Add(filter2);
             * filt.Add(filter3);
             * DateModel selected_client_date = new DateModel();
             * DateTime datetime = new DateTime(2016,10,10,12,57,30);
             * List<DateModel> date_List = date.List("Get_Id", datetime);
             * selected_client_date = date_List.Single();
             *
             * Console.WriteLine(proc.Get_Item("Date_Id", selected_client_date.Id.ToString(), ConditionType.Equal).Client_Id.ToString());
             *
             * /* foreach (var item in collection)
             * {
             *  Console.WriteLine(item);
             * }
             * DateTime datetime = new DateTime(2016,10,10,0,0,0);
             * Console.WriteLine(datetime);
             * collection = date.List("Day", datetime);
             * foreach (var item in collection)
             * {
             *  Console.WriteLine(item);
             * }*/
            /* List<ProcModel> collection1 = proc.List(filt);
             * foreach (ProcModel item in collection1)
             * {
             *   Console.WriteLine(item);
             *   Console.WriteLine(date.Get_Item("Id", item.Date_Id.ToString(), ConditionType.Equal).Time.TimeOfDay.ToString());
             *   Console.WriteLine(client.Get_Item("Id", item.Client_Id.ToString(), ConditionType.Equal).Name);
             * }
             */



            /*collection = date.List("Day","2016.12.30");
             * foreach (var item in collection)
             * {
             *  Console.WriteLine(item);
             * }*/
            // DateTime date = new DateTime(1976, 10, 2);

            /*ClientModel model = new ClientModel();
             * model.Name="Иван";
             *     model.Surname="Петров";
             *     model.Patronymic="Семёнович";
             *     model.Date=date.Date;
             *     model.Pasport=1234567890;
             *     model.Gender=0;
             *     model.Adress="Moskva";
             *     model.Insurance = 1234567890123456;
             *     client.Add(model);
             *
             *     collection = client.List();
             *     foreach (var item in collection)
             *     {
             *         Console.WriteLine(item);
             *     }
             * List<UserModel> login = user.List(filt);
             * Console.ReadLine();
             *
             * foreach (var item in login)
             * {
             *  Console.WriteLine(item.Password);
             * }
             * Console.ReadLine();
             *
             * //  Console.WriteLine(user.Get_Item("Login","",ConditionType.Equal).Password);
             *
             * Job job = new Job();
             * List<JobModel> JobCollection = job.List();
             * foreach (var item in JobCollection)
             * {
             *  Console.WriteLine(item);
             * }
             * //Console.WriteLine(job.Get_Item("Login","3",ConditionType.Equal));
             * //user.Delete(user.Get_Item("Login","Ann",ConditionType.Equal).Id);*/
        }
예제 #20
0
 public void Clear()
 {
     ptype = Prototype.ProcType.NONE;
     _findedresources.Clear();
     ots.Clear();
     index = -1;
     serindex = -1;
     offserindex = "";
 }
예제 #21
0
 public void ReplaceProc(ProcType proc)
 {
     Proc = proc;
 }
예제 #22
0
 public MessBase(MessType type, ProcType proc, MarketType market = MarketType.Empty, string pair = null, SysType sys_type = SysType.Empty) : this()
 {
     Type = type;
     Key  = new SKey(proc, market, pair, sys_type);
 }
예제 #23
0
        /// <summary>Запуск новой закачки файлов</summary>
        public void Proc(StylePair obj)
        {
            if (logs == null)
                logs = (System.Windows.Forms.TextBox)Form1.logs;

            if (ptype != ProcType.DOWNLOAD)
            {
                currstyle = obj.Name.Text;
                Search(obj);

                if (_findedresources.Count > 0)
                {
                    obj.lastlink = _findedresources[0];
                    _findedresources.Insert(0, "");
                }

                AddO(GetO(currstyle));
                index = _findedresources.Count - 1;
            }
            else
            {
                //откат на несколько позиций в списке ссылок для избежания потерь
                if (index + 2 < _findedresources.Count)
                    index += 2;
                else index = _findedresources.Count - 1;
            }

            obj.Pro2.Visible = true;
            ptype = ProcType.DOWNLOAD;
            Download(obj);
            ptype = ProcType.NONE;

            obj.Pro2.Visible = false;
            currstyle=obj.Info.Text = "";
        }
예제 #24
0
 // Token: 0x0600194B RID: 6475 RVA: 0x000792CE File Offset: 0x000774CE
 public void AddProc(ProcType procType)
 {
     this.mask |= (ushort)(1 << (int)procType);
 }
예제 #25
0
 /// <summary>Конструктор</summary>
 /// <param name="Name">Имя объекта</param>
 /// <param name="parsebypages">флаг типа прохода при парсе (если установелн то постранично иначе на странице ищется ссылка на след страницу)</param>
 /// <param name="masklink">если parsebypages установлен то ссылка-маска для парса (* помечается место вставки идентификатора стиля, # место вставки номера страницы) иначе ссылка на страницу начала парса</param>
 /// <param name="stylelink">страница с которой производится парс стилей</param>
 public Prototype(string Name,bool parsebypages, string masklink,string stylelink="")
 {
     ptype = ProcType.NONE;
     this.Name = Name;
     pages = parsebypages;
     this.masklink = masklink;
     this.stylelink = stylelink;
     Pause = 0;
     linkspattern = "http\\://[^'^\"]*\\.html";
 }
예제 #26
0
        /// <summary>Поиск ссылок</summary>
        void Search(StylePair obj)
        {
            obj.Info.Text = "Поиск";
            ptype = ProcType.SEARCH;

            if (pages)
            {
                int min, max;
                InitPages(obj.stylecode, out min, out max);

                //if (max < 1) max = 100;

                PageSearch(obj, serindex == -1 ? min : serindex, max);
            }
            else
                OffsetSearch(obj, offserindex.Length == 0 ? masklink : offserindex);

            for (int loop1 = 0; loop1 < _findedresources.Count; loop1++)
                for (int loop2 = loop1+1; loop2 < _findedresources.Count; loop2++)
                    if(_findedresources[loop2]==_findedresources[loop1])
                        _findedresources.RemoveAt(loop2--);

            obj.Info.Text = "";
        }
예제 #27
0
 public ProcPassThru( ProcConvoy Convoy, ProcType PType )
     : base( ProcType.PASSTHRU | PType )
 {
     this.Convoy = Convoy;
 }
예제 #28
0
 public ProcDummy( ProcType PType ) : base( ProcType.DUMMY | PType ) { }
예제 #29
0
 /// <summary>
 /// Constructs a query object.
 /// </summary>
 /// <param name="Name">Name of the stored proc.</param>
 /// <param name="type">Type of stored proc.</param>
 public StoredProc(string Name, ProcType type)
 {
     m_name = Name;
     m_type = type;
 }
예제 #30
0
 public static void SetProcValue(this ProcChainMask procMask, ProcType Proc, bool value)
 {
     ModProcManager.SetProcValue(procMask, Proc.ToString(), value);
 }
예제 #31
0
 public string Visit(ProcType node)
 {
     return(VisitChildren(node));
 }
예제 #32
0
        public Procedure NewProcedure( ProcType P )
        {
            Procedure Proc = null;
            switch ( P )
            {
                case ProcType.URLLIST:
                    Proc = new ProcUrlList();
                    break;
                case ProcType.FIND:
                    Proc = new ProcFind();
                    break;
                case ProcType.GENERATOR:
                    Proc = new ProcGenerator();
                    break;
                case ProcType.RESULT:
                    Proc = new ProcResult();
                    break;
                case ProcType.CHAKRA:
                    Proc = new ProcChakra();
                    break;
                case ProcType.ENCODING:
                    Proc = new ProcEncoding();
                    break;
                case ProcType.PARAMETER:
                    Proc = new ProcParameter();
                    break;
                case ProcType.EXTRACT:
                    Proc = ProcExtract.Create();
                    break;
                case ProcType.MARK:
                    Proc = ProcMark.Create();
                    break;
                case ProcType.LIST:
                    Proc = ProcListLoader.Create();
                    break;
            }

            ProcList.Add( Proc );
            return Proc;
        }
예제 #33
0
 // Token: 0x0600194C RID: 6476 RVA: 0x000792E5 File Offset: 0x000774E5
 public void RemoveProc(ProcType procType)
 {
     this.mask &= (ushort)(~(ushort)(1 << (int)procType));
 }
예제 #34
0
 public Procedure( ProcType P )
 {
     Type = P;
     RawName = Enum.GetName( typeof( ProcType ), P );
 }
예제 #35
0
 // Token: 0x0600194D RID: 6477 RVA: 0x000792FD File Offset: 0x000774FD
 public bool HasProc(ProcType procType)
 {
     return(((int)this.mask & 1 << (int)procType) != 0);
 }
예제 #36
0
 public ProcPassThru( ProcType PType )
     : base( ProcType.PASSTHRU | PType ) { }