Ejemplo n.º 1
0
        public ManagerSeFaz(Utils.ConfigureXml _config, X509Certificate2 _cert)
        {
            config = _config;


    
            switch (config.configEmitente.endereco.Uf)
            { 
                case "MT":
                    enviaSeFaz = new EnviaNfceMT();
                    break;
                case "AM":
                    enviaSeFaz = new EnviaNfceAM();
                    break;
                case "RS":
                    enviaSeFaz = new EnviaNfceRS();
                    break;
                default:
                    enviaSeFaz = new EnviaNfceRJ();
                    break;
            }

            enviaSeFaz.configura(_config, _cert);
        
        }
Ejemplo n.º 2
0
 public void serialize(Utils.Objects.Packet sender)
 {
     sender.WriteShort((short)Base);
     sender.WriteShort((short)ObjectsAndMountBonus);
     sender.WriteShort((short)AlignGiftBonus);
     sender.WriteShort((short)ContextModif);
 }
        public void serialize(Utils.Objects.Packet sender)
        {
            sender.WriteInt(_target.Guid);

            ////// ENTITY LOOK //////

            sender.WriteShort(1); // bones ID

            sender.WriteShort(1); // nSkins
            sender.WriteShort( (short)( (int)_target.Classe * 10 + (int)_target.Sexe) );

            sender.WriteShort((short)5);
            for (int i = 0; i < 5; ++i)
                sender.WriteInt(_target.Colors[i] | (i + 1) * 0x1000000);

            sender.WriteShort(1); // nScales
            sender.WriteShort( (short)140 );

            sender.WriteShort(0); // nSubEntities

            ////// ENTITY DISPOSITION

            sender.WriteShort(60); // EntityDisposition id

            sender.WriteShort(_target.CurCell);
            sender.WriteByte( (byte)_target.Direction );
        }
Ejemplo n.º 4
0
        public gerenciadoSAT(Utils.ConfigureXml _config)
        {
            try
            {

                config = _config;

                if (config.configMaquina.tipoIntegracao.Equals("DIMEP"))
                {
                    interfacesat = new SatDimep();
                    Utils.Logger.getInstance.error(String.Format("SatDimep"));
                }
                else if (config.configMaquina.tipoIntegracao.Equals("SWEDA"))
                {
                    interfacesat = new SatSweda();
                    Utils.Logger.getInstance.error(String.Format("SatSweda"));
                }
                else if (config.configMaquina.tipoIntegracao.Equals("BEMATECH"))
                {
                    interfacesat = new SatBematech();
                    Utils.Logger.getInstance.error(String.Format("SatBematech"));
                }
            }
            catch (Exception ex)
            {
                throw new Exception("#Erro em GerenciadorSAT " + ex.Message + "#");
            }
        }
Ejemplo n.º 5
0
 public static void serialize(Utils.Objects.Packet sender, int accountId)
 {
     sender.WriteInt(accountId);
     sender.WriteBool(false); // tutorial available
     sender.WriteShort(8191); // breeds visible
     sender.WriteShort(2047); // breeds available
 }
Ejemplo n.º 6
0
 public static void serialize(Utils.Objects.Packet sender)
 {
     int nFlags = 0;
     sender.WriteShort((short)nFlags);
     for (int i = 0; i < nFlags; ++i)
         sender.WriteInt(0);
 }
Ejemplo n.º 7
0
 /// <summary>
 /// 反序列化
 /// </summary>
 /// <param name="formatter"></param>
 public void Read(Utils.IFormatter formatter)
 {
     this.ProtocolVersion = formatter.ReadInt32();
     this.SessionTimeOut = formatter.ReadInt32();
     this.SessionID = formatter.ReadInt64();
     this.SessionPassword = formatter.ReadBuffer();
 }
Ejemplo n.º 8
0
 /// <summary>
 /// write
 /// </summary>
 /// <param name="formatter"></param>
 public void Write(Utils.IFormatter formatter)
 {
     formatter.Write(this.RelativeZxid);
     formatter.Write(this.DataWatches);
     formatter.Write(this.ExistWatches);
     formatter.Write(this.ChildWatches);
 }
Ejemplo n.º 9
0
        public void serialize(Utils.Objects.Packet sender)
        {
            // MINIMAL INFO
            sender.WriteInt(Member.Guid);
            sender.WriteByte((byte)Member.Level);
            sender.WriteUTF(Member.Name);

            // LOOK
            sender.WriteShort(1); // bones ID

            sender.WriteShort(1); // nSkins
            sender.WriteShort((short)((int)Member.Classe * 10 + (int)Member.Sexe));

            sender.WriteShort((short)5);
            for (int i = 0; i < 5; ++i)
                sender.WriteInt(Member.Colors[i] | (i + 1) * 0x1000000);

            sender.WriteShort(1); // nScales
            sender.WriteShort((short)140);

            sender.WriteShort(0); // nSubEntities

            // PARTY
            sender.WriteInt(Member.Characteristics.lifePoints);
            sender.WriteInt(Member.Characteristics.maxLifePoints);
            sender.WriteShort((short)Member.Characteristics.prospecting.Total);
            sender.WriteByte(0); // regenRate
            sender.WriteShort((short)Member.Characteristics.initiative.Total);
            sender.WriteBool(false); // pvp enabled
            sender.WriteByte(0); // alignment side
        }
Ejemplo n.º 10
0
        public VisitMyFindsForm(Utils.BasePlugin.Plugin plugin, Framework.Interfaces.ICore core): this()
        {
            _plugin = plugin;
            _core = core;

            _context = SynchronizationContext.Current;
            if (_context == null)
            {
                _context = new SynchronizationContext();
            }
            dateTimePicker1.Value = new DateTime(2000, 1, 1);

            this.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_TITLE);
            this.groupBox1.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_EXPLANATION);
            this.label1.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_EXPLANATIONTXT);
            this.groupBox2.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_SELECTTRACKABLE);
            this.label2.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_TRACKINGNUMBER);
            this.button1.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_CHECK);
            this.label4.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_OR);
            this.button2.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_GETOWNED);
            this.listView1.Columns[0].Text = Utils.LanguageSupport.Instance.GetTranslation(STR_ICON);
            this.listView1.Columns[1].Text = Utils.LanguageSupport.Instance.GetTranslation(STR_CODE);
            this.listView1.Columns[2].Text = Utils.LanguageSupport.Instance.GetTranslation(STR_NAME);
            this.groupBox3.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_AVAILABLELOGS);
            this.label6.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_MISSING);
            this.label7.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_PRESENT);
            this.button3.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_GETALLLOGS);
            this.label8.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_LOGTEXT);
            this.label9.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_BETWEEN);
            this.button4.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_DOLOG);
            this.groupBox3.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_MESSAGES);
        }
Ejemplo n.º 11
0
        public void serialize(Utils.Objects.Packet sender)
        {
            sender.WriteInt(_target.Guid);

            ////// ENTITY LOOK //////

            sender.WriteShort(1); // bones ID

            sender.WriteShort(1); // nSkins
            sender.WriteShort( (short)( (int)_target.Classe * 10 + (int)_target.Sexe) );

            sender.WriteShort((short)5);
            for (int i = 0; i < 5; ++i)
                sender.WriteInt(_target.Colors[i] | (i + 1) * 0x1000000);

            sender.WriteShort(1); // nScales
            sender.WriteShort( (short)140 );

            sender.WriteShort(0); // nSubEntities

            ////// ENTITY DISPOSITION

            sender.WriteShort((short)Types.game.context.EntityDispositionInformations.ProtocolID);
            _target.Disposition.serialize(sender);
        }
Ejemplo n.º 12
0
 /// <summary>
 /// 序列化
 /// </summary>
 /// <returns></returns>
 public void Write(Utils.IFormatter formatter)
 {
     formatter.Write(this.Path);
     formatter.Write(this.Data);
     formatter.Write(this.Acl);
     formatter.Write(this.Flags);
 }
Ejemplo n.º 13
0
 public OperationPending(Utils.Schedule.Task Task)
     : base()
 {
     InitializeComponent();
     this.Task = Task;
     Init();
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Creates an instance of the class
 /// </summary>
 /// <param name="owner">owner instance</param>
 internal Infos(Utils.CommonUtils owner)
 {
     if (null == owner)
         throw new ArgumentNullException("owner");
     _lock = new object();
     _owner = owner;
 }
Ejemplo n.º 15
0
        public void serialize(Utils.Objects.Packet sender)
        {
            // --------------- //
            // --- MINIMAL --- //
            // --------------- //

            sender.WriteInt(_character.Guid);
            sender.WriteByte( (byte)_character.Level );
            sender.WriteUTF(_character.Name);

            // ------------ //
            // --- LOOK --- //
            // ------------ //

            sender.WriteShort(1); // bones ID

            sender.WriteShort(1); // nSkins
            sender.WriteShort( (short)( (int)_character.Classe * 10 + (int)_character.Sexe) );

            sender.WriteShort((short)5);
            for (int i = 0; i < 5; ++i)
                sender.WriteInt(_character.Colors[i] | (i + 1) * 0x1000000);

            sender.WriteShort(1); // nScales
            sender.WriteShort( (short)140 );

            sender.WriteShort(0); // nSubEntities

            // ------------ //
            // --- BASE --- //
            // ------------ //

            sender.WriteByte( (byte)_character.Classe );
            sender.WriteByte( (byte)_character.Sexe );
        }
Ejemplo n.º 16
0
 public static void serialize(Utils.Objects.Packet sender, List<int> path, int targetMap)
 {
     sender.WriteShort( (short)path.Count );
     foreach (int cell in path)
         sender.WriteCell(cell);
     sender.WriteInt(targetMap);
 }
Ejemplo n.º 17
0
 /// <summary>
 /// Initializes all parameters of the chunk without performing any load operation.
 /// </summary>
 /// <param name="parent">The parent large terrain file of this chunk</param>
 /// <param name="baseFile">The MPQ-file which contains the general information about placement and doodads</param>
 /// <param name="texFile">The MPQ-stream which contains all the texture related information (MCLY, MCAL, ...)</param>
 /// <param name="offset">The offset inside baseFile and texFile where this chunks MCNK is located</param>
 public ADTChunk(ADTFile parent, Stormlib.MPQFile baseFile, Utils.StreamedMpq texFile, ChunkOffset offset)
 {
     mFile = baseFile;
     mTexFile = texFile;
     mOffset = offset;
     mParent = parent;
 }
Ejemplo n.º 18
0
 public BrowserScriptRework(WebbrowserForm.BrowserTab browserTab, Utils.BasePlugin.Plugin ownerPlugin, WebBrowser webBrowser, Framework.Interfaces.ICore core)
     : base(browserTab, ownerPlugin, "Rework", webBrowser, core, true)
 {
     core.LanguageItems.Add(new Framework.Data.LanguageItem(STR_REWORK));
     webBrowser.Navigating += new WebBrowserNavigatingEventHandler(webBrowser_Navigating);
     webBrowser.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(webBrowser_DocumentCompleted);
 }
Ejemplo n.º 19
0
        public List<EmployeeDto> SearchEmployeeOp(Utils.AppCommand appComandUser)
        {
            List<EmployeeDto> allEmployeesList = null;

            switch (appComandUser)
            {
                case Utils.AppCommand.InvalidInput:
                    ErrorOp();
                    break;

                case Utils.AppCommand.OrderByName:
                    allEmployeesList = _employeeAppService.GetAllEmployeesBy("FirstName");
                    PrintDataTable(allEmployeesList);
                    break;

                case Utils.AppCommand.OrderByPosition:
                    allEmployeesList = _employeeAppService.GetAllEmployeesBy("Position");
                    PrintDataTable(allEmployeesList);
                    break;

                case Utils.AppCommand.OrderByLastName:
                    allEmployeesList = _employeeAppService.GetAllEmployeesBy("LastName");
                    PrintDataTable(allEmployeesList);
                    break;
            }

            return allEmployeesList;
        }
Ejemplo n.º 20
0
 public void add(JabinfoContext context)
 {
     Weixin weixin = new Weixin ();
     Utils util = new Utils ();
     if (!context.IsPost) {
         return;
     }
     context.Post ["uploadId"] = Jabinfo.Help.Basic.JabId;
     string type = context.Post ["type"];
     string fileName = context.Files ["afile"].FileName;
     string model=fileName.Substring(fileName.LastIndexOf('.') + 1);
     Jabinfo.Help.Upload.Save (context.Post ["uploadId"], context.Files["afile"],model);
     string file = Jabinfo.Help.Upload.PysPath (context.Post ["uploadId"],model);
     string url = "http://file.api.weixin.qq.com/cgi-bin/media/upload?access_token="+weixin.GetAccessToken();
     url = url + "&type=" + type;
     string json = util.HttpUpload (url, file);
     context.Post ["mediaId"] = weixin.GetJsonValue (json,"media_id");
     context.Post ["createdAt"] = weixin.GetJsonValue(json,"created_at");
     if (!string.IsNullOrEmpty (weixin.GetJsonValue (json, "errcode"))) {
         context.Jump ("/article/upload/home","无效媒体类型,请重新上传");
         return;
     }
     UploadMapper.I.Insert(context.Post);
     context.Refresh ();
 }
Ejemplo n.º 21
0
        public OfflineLogForm(Utils.BasePlugin.Plugin plugin, Framework.Interfaces.ICore core, Utils.API.GeocachingLiveV6 client) :
            this()
        {
            _core = core;
            _client = client;
            _plugin = plugin;

            this.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_TITLE);
            this.groupBox1.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_ADDGEOCACHES);
            this.label5.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_CODE);
            this.button6.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_ADD);
            this.button7.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_ADDALLSELECTED);
            this.groupBox2.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_OFFLINELOGS);
            this.label1.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_GEOCACHES);
            this.label2.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_LOGTYPE);
            this.label3.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_LOGDATE);
            this.label4.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_LOGTEXT);
            this.button1.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_LOGSELECTED);
            this.button2.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_LOGALL);
            this.button8.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_OK);
            this.groupBox3.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_LOGONLINE);

            int[] ids = new int[] { 2, 3, 4, 7, 45 };
            comboBoxLogType1.SetLogTypes(core, (from Framework.Data.LogType l in core.LogTypes join a in ids on l.ID equals a select l).ToList());

            if (core.ActiveGeocache != null)
            {
                textBox2.Text = core.ActiveGeocache.Code;
            }
            button7.Enabled = Utils.DataAccess.GetSelectedGeocaches(core.Geocaches).Count > 0;

            loadOfflineLogs();
        }
        public static void AddOrbOptionButton(Utils.Controls.Ribbon.Ribbon ribbon, AbstractCommand command)
        {
            var oob = new RibbonOrbOptionButtonEx(command);
            ribbon.OrbDropDown.OptionItems.Add(oob);

            CommandManager.Instance.Register(command);
        }
 public static void serialize(Utils.Objects.Packet sender)
 {
     int wrapper1 = 0;
     Utils.BooleanByteWrapper.setFlag(ref wrapper1, 0, false); // cantBeAggressed
     Utils.BooleanByteWrapper.setFlag(ref wrapper1, 1, false); // cantBeChallenged
     Utils.BooleanByteWrapper.setFlag(ref wrapper1, 2, false); // cantTrade
     Utils.BooleanByteWrapper.setFlag(ref wrapper1, 3, false); // cantBeAttackedByMutant
     Utils.BooleanByteWrapper.setFlag(ref wrapper1, 4, false); // cantRun
     Utils.BooleanByteWrapper.setFlag(ref wrapper1, 5, false); // forceSlowWalk
     Utils.BooleanByteWrapper.setFlag(ref wrapper1, 6, false); // cantMinimize
     Utils.BooleanByteWrapper.setFlag(ref wrapper1, 7, false); // cantMove
     sender.WriteByte((byte)wrapper1);
     int wrapper2 = 0;
     Utils.BooleanByteWrapper.setFlag(ref wrapper2, 0, false); // cantAggress
     Utils.BooleanByteWrapper.setFlag(ref wrapper2, 1, false); // cantChallenge
     Utils.BooleanByteWrapper.setFlag(ref wrapper2, 2, false); // cantExchange
     Utils.BooleanByteWrapper.setFlag(ref wrapper2, 3, false); // cantAttack
     Utils.BooleanByteWrapper.setFlag(ref wrapper2, 4, false); // cantChat
     Utils.BooleanByteWrapper.setFlag(ref wrapper2, 5, false); // cantBeMerchant
     Utils.BooleanByteWrapper.setFlag(ref wrapper2, 6, false); // cantUseObject
     Utils.BooleanByteWrapper.setFlag(ref wrapper2, 7, false); // cantUseTaxCollector
     sender.WriteByte((byte)wrapper2);
     int wrapper3 = 0;
     Utils.BooleanByteWrapper.setFlag(ref wrapper3, 0, false); // cantUseInteractive
     Utils.BooleanByteWrapper.setFlag(ref wrapper3, 1, false); // cantSpeakToNPC
     Utils.BooleanByteWrapper.setFlag(ref wrapper3, 2, false); // cantChangeZone
     Utils.BooleanByteWrapper.setFlag(ref wrapper3, 3, false); // cantAttackMonster
     Utils.BooleanByteWrapper.setFlag(ref wrapper3, 4, false); // cantWalk8Directions
     sender.WriteByte((byte)wrapper3);
 }
Ejemplo n.º 24
0
 public static void serialize(Utils.Objects.Packet sender, string login, string hashedPasswd, bool autoConnect)
 {
     Version.serialize(sender);
     sender.WriteUTF(login);
     sender.WriteUTF(hashedPasswd);
     sender.WriteBool(autoConnect);
 }
Ejemplo n.º 25
0
 public frmBackupRealizar()
 {
     InitializeComponent();
     util = new Utils();
     util.setCamposObrigatorios(Controls);
     rbApenasDados.Checked = true;
 }
Ejemplo n.º 26
0
        public UpdatesForm(Languages.Language language, Utils.AppSettings settings)
        {
            // Windows Forms designer support.
            InitializeComponent();

            // Show first panel
            ShowPanel(panChecking);

            // Setup settings reference
            Settings = settings;

            // Setup language for the form
            Lang = language;
            Text = Lang.Get("updates");
            btnClose.Text = Lang.Get("close");

            // Language setup
            lblChecking.Text = Lang.Get("updates_checking") + "...";
            lblUpdated.Text = Lang.Get("updates_updated");
            lblError.Text = Lang.Get("updates_error");
            chkAuto.Text = Lang.Get("updates_auto");

            // Auto check
            chkAuto.Checked = (Settings.Get("updates_auto").ToString() == "1");
            chkAuto.CheckedChanged += delegate { Settings.Set("updates_auto", chkAuto.Checked ? 1 : 0); };
        }
Ejemplo n.º 27
0
        public BatchLogForm(Utils.BasePlugin.Plugin plugin, Framework.Interfaces.ICore core)
        {
            InitializeComponent();

            _plugin = plugin;
            _core = core;

            this.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_TITLE);
            this.label1.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_TBLIST);
            this.button1.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_ADD);
            this.label2.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_TRACKABLES);
            this.label5.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_LOGTYPE);
            this.label3.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_DATE);
            this.label4.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_NOTE);
            this.checkBoxStopAfterEachLog.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_STOPATLOG);
            this.button2.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_LOG);
            this.buttonCancel.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_CANCEL);
            this.label6.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_GEOCACHE);
            this.buttonCheck.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_CHECK);
            this.button3.Text = Utils.LanguageSupport.Instance.GetTranslation(STR_INPOSSESSION);

            this.linkLabel1.Text = "";

            int[] ids = new int[] { 4, 13, 14, 19, 48, 75 };
            comboBoxLogType1.SetLogTypes(core, (from Framework.Data.LogType l in core.LogTypes join a in ids on l.ID equals a select l).ToList());

            _context = SynchronizationContext.Current;
            if (_context == null)
            {
                _context = new SynchronizationContext();
            }

        }
Ejemplo n.º 28
0
 public static void serialize(Utils.Objects.Packet sender, List<int> path, Global.Character actor)
 {
     sender.WriteShort( (short)path.Count );
     foreach (int cell in path)
         sender.WriteShort((short)cell);
     sender.WriteInt(actor.Guid);
 }
Ejemplo n.º 29
0
 public void ToStream(DataFrames.DataWriter writer, StateDictionary state, Utils.Logger logger)
 {
     if (Bytes != null)
     {
         writer.Write(Bytes);
     }
 }
Ejemplo n.º 30
0
 public RestoreGameFiles(string langKey, Utils.Schedule.Task Task)
     : base(langKey)
 {
     InitializeComponent();
     this.Task = Task;
     Check();
     SetCloseable(false);
 }
Ejemplo n.º 31
0
        public static bool IsDefaultValueOfType(this object value, Type type)
        {
            object defaultValue = type.GetDefaultValue();

            return(Utils.AreEqual(value, defaultValue));
        }