ToString() public method

public ToString ( ) : string
return string
Example #1
1
        public static INode AddNode(this IGraph myIGraph, UInt32 myUInt32Id)
        {
            if (myIGraph == null)
                throw new ArgumentNullException("myIGraph must not be null!");

            return myIGraph.AddNode(myUInt32Id.ToString());
        }
Example #2
0
        public UInt32 createNewCharacter(string handle, UInt32 userid, UInt32 worldId)
        {
            conn.Open();
            UInt32 charId = 0;
            //TODO: Complete with real data from a hashtable (or something to do it faster);
            //TODO: find values for uria starting place
            string sqlInsertQuery="INSERT INTO characters SET userid = '" + userid.ToString() + "', worldid='" + worldId.ToString() + "', status='0', handle = '" + handle + "', created=NOW() ";
            queryExecuter= conn.CreateCommand();
            queryExecuter.CommandText = sqlInsertQuery;
            queryExecuter.ExecuteNonQuery();

            //As i didnt find a solution for "last_insert_id" in C# we must fetch the last row by a normal query
            string sqlQuery = "SELECT charId FROM characters WHERE userId='" + userid.ToString() + "' AND worldId='" + worldId.ToString() + "' AND is_deleted='0' ORDER BY charId DESC LIMIT 1";
            queryExecuter = conn.CreateCommand();
            queryExecuter.CommandText = sqlQuery;
            dr = queryExecuter.ExecuteReader();

            while (dr.Read())
            {
                charId = (UInt32)dr.GetDecimal(0);
            }

            conn.Close();

            // Create RSI Entry
            conn.Open();
            string sqlRSIQuery = "INSERT INTO rsivalues SET charid='" + charId.ToString() + "' ";
            queryExecuter = conn.CreateCommand();
            queryExecuter.CommandText = sqlRSIQuery;
            queryExecuter.ExecuteNonQuery();

            conn.Close();

            return charId;
        }
Example #3
0
 public static string getSampleName(UInt32 val)
 {
     try{
         string temp = "0x" + val.ToString("X");
         sampleNames.TryGetValue(val, out temp);
         if (temp == null) return "0x" + val.ToString("X");
         return temp;
     }catch{
         return "0x" + val.ToString("X");
     }
 }
		public Message getMessageById( UInt32 id )
		{
			string sql = "`SELECT " +
			             "messages`.`id`, " +
			             "`messages`.`nuberReceiver`, " +
			             "`messages`.`message`, " +
			             "`messages`.`sendAt`, " +
			             "`messages`.`contactId` " +
			             "FROM SmsApplicatie.messages " +
			             "WHERE id=:id";

			MySqlCommand statement = this.databaseConnection.CreateCommand ();
			statement.CommandText = sql;
			statement.Parameters.AddWithValue ("id", id.ToString ());

			MySqlDataReader reader = statement.ExecuteReader ();

			if (reader.Read ()) 
			{
				Message message = new Message ( 
					Convert.ToUInt32( reader["id"] ),
					Convert.ToString( reader["nuberReceiver"] ),
					Convert.ToString( reader["message"] ),
					Convert.ToDateTime( reader["sendAt"] ),
					Convert.ToUInt32( reader["contactId"] )
				);
				return new Message ();
			}
			return null;
		}
Example #5
0
        public Chunk_Base getChunk(UInt32 chunkID, bool error = true)
        {
            Chunk_Base chunk = getChunksByID(chunkID).FirstOrDefault();
            if (chunk == null && error)
                throw new WMOException(string.Format("File does not contain chunk 0x{0}.", chunkID.ToString("X")));

            return chunk;
        }
Example #6
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     Nmin = Convert.ToUInt32(numNmin.Value);
     Nmax = Convert.ToUInt32(numNmax.Value);
     Tsay = Convert.ToUInt32(numTsayMinute.Value * 60 + numTsaySecond.Value);
     Tnguoi = Convert.ToUInt32(numTnguoiMinute.Value * 60 + numTnguoiSecond.Value);
     ret = Nmin.ToString() + "," + Nmax.ToString() + "," + Tsay.ToString() + "," + Tnguoi.ToString();
     this.Close();
 }
Example #7
0
        public void addItemToInventory(UInt16 slotId, UInt32 itemGoID)
        {
            UInt32 charID = Store.currentClient.playerData.getCharID();

            string sqlQuery = "INSERT INTO inventory SET charId = '" + charID.ToString() + "' , goid = '" + itemGoID.ToString() + "', slot = '" + slotId.ToString() + "', created = NOW() ";
            queryExecuter = conn.CreateCommand();
            queryExecuter.CommandText = sqlQuery;
            queryExecuter.ExecuteNonQuery();
        }
Example #8
0
 public void addAbility(Int32 abilityID, UInt16 slotID, UInt32 charID, UInt16 level, UInt16 is_loaded)
 {
     string theQuery = "INSERT INTO char_abilities SET char_id='" + charID.ToString()  + "', slot='" + slotID.ToString() + "', ability_id='" + abilityID.ToString() + "', level='" + level.ToString() + "', is_loaded='" + is_loaded.ToString() + "', added=NOW() ";
     conn.Open();
     queryExecuter = conn.CreateCommand();
     queryExecuter.CommandText = theQuery;
     queryExecuter.ExecuteNonQuery();
     conn.Close();
 }
Example #9
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="index"></param>
        /// <param name="abc"></param>
        public AVM2Method( UInt32 index, AbcFile abc )
        {
            if ( abc.Methods.Count <= index )
            {
                ArgumentException ae = new ArgumentException( "Method " + index.ToString( "d" ) + " not in ABC file" );
                Log.Error(this,  ae );
                throw ae;
            }

            _Abc = abc;
            _MethodID = index;
        }
Example #10
0
        public static RunnerResult FetchCardPage(UInt32 mid)
        {
            HttpWebResponse resp;
            String respBody;

            _RunHttpRequest(_CardDetailsUrlPath + mid.ToString(), out resp, out respBody);

            if (resp.StatusCode != HttpStatusCode.OK)
                return new RunnerResult(ResultType.UnknownCard, null);
            else
                return new RunnerResult(ResultType.CardResult, respBody);
        }
        // ITDLUIExtension ------------------------------------------------------------------

        public bool SelectTask(UInt32 dwTaskID)
        {
            SampleListItem item = new SampleListItem();

            item.Value = dwTaskID.ToString();
            item.Type = "Selection";

            m_Items.Add(item);
            m_ListView.Items.Refresh();

            return true;
        }
        public TextureListObject(UInt32 imageHeaderOffset, TextureNode node)
        {
            name = "Texture " + (DatFile.textureList.Items.Count +1) + " (" + imageHeaderOffset.ToString("x8") + ")";
            this.node = node;
            imageHeader = node.imageHeader;
            paletteHeader = node.paletteHeader;
            imageBitmap = TPL.ConvertFromTextureMelee(imageHeader, paletteHeader, out imageSize);





        }
Example #13
0
    //生成请求
    public void SettingParams()
    {
        SystemOptions so = new SystemOptions();

        //请求网关
        requestUrl = so["MemberSharing_Tencent_Gateway"].ToString("").Trim();

        //签名类型
        sign_type = "md5";

        //签名
        key = so["MemberSharing_Tencent_MD5"].ToString("").Trim();

        //对于商户:使用和支付时一样的key,可以登录财付通商户系统修改。
        sign_encrypt_keyid = "0";

        //字符编码格式
        input_charset = "GBK";

        //服务名称
        service = "login";

        //商户编号
        chnid = so["MemberSharing_Tencent_UserNumber"].ToString("").Trim();

        //chnid类型
        chtype = "0";

        //服务器通知返回接口
        redirect_url = Shove._Web.Utility.GetUrl() + "/Home/Room/TencentReceive.aspx";

        //自定义参数
        attach =redirect_url;

        //时间戳
        tmstamp = GetTmstamp();
        Dictionary<string, string> dict = new Dictionary<string, string>();
        dict.Add("sign_type", sign_type);
        dict.Add("sign_encrypt_keyid", sign_encrypt_keyid);
        dict.Add("input_charset", input_charset);
        dict.Add("service", service);
        dict.Add("chnid", chnid);
        dict.Add("chtype", chtype);
        dict.Add("redirect_url", redirect_url);
        dict.Add("attach", attach);
        dict.Add("tmstamp", tmstamp.ToString());
        sign=GetSign(key, input_charset,dict);
    }
Example #14
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sourceStream"></param>
        protected override void Parse(BinaryReader sourceStream)
        {
            _DebugType = AVM2.Static.VariableLengthInteger.ReadU8(sourceStream);
            _Index = AVM2.Static.VariableLengthInteger.ReadU30(sourceStream);
            _Reg = AVM2.Static.VariableLengthInteger.ReadU8(sourceStream);
            _Extra = AVM2.Static.VariableLengthInteger.ReadU30(sourceStream);

            if (0 != _Extra)
            {
                // Of course, Adobe Flash CS4 makes use of this field
                AbcFormatException abcfe = new AbcFormatException("Extra (reserved) field in Debug instruction used: 0x" + _Extra.ToString("X"));
                Log.Warn(this, abcfe);
                //throw abcfe;
                //Log.Warn(this, "Extra (reserved) field in Debug instruction used: 0x" + _Extra.ToString("X"));
            }
        }
Example #15
0
        // Allows the thread to place data in the RichEditBox control.
        private void AddMessageData(Int32 chNum, UInt32 msgId, UInt32 dlc, Byte [] msgData,
            UInt32 flags, Linlib.LinMessageInfo msgInfo)
        {
            if ((flags & Linlib.LIN_RX) != 0)
             {
            OutputRTB.AppendText("  RX   " + chNum.ToString("00") + "   ");
             }
             else
             {
            OutputRTB.AppendText("  TX   " + chNum.ToString("00") + "   ");
             }
             OutputRTB.AppendText(msgId.ToString("X8") + "   ");

             OutputRTB.AppendText(
            (((flags & Linlib.LIN_BIT_ERROR) != 0) ? "B" : " ") +
            (((flags & Linlib.LIN_SYNCH_ERROR) != 0) ? "S" : " ") +
            (((flags & Linlib.LIN_PARITY_ERROR) != 0) ? "P" : " ") +
            (((flags & Linlib.LIN_CSUM_ERROR) != 0) ? "C" : " ") +
            (((flags & Linlib.LIN_NODATA) != 0) ? "H" : " ") +
            (((flags & Linlib.LIN_WAKEUP_FRAME) != 0) ? "W" : " ") + "   ");

             OutputRTB.AppendText(dlc.ToString("D") + "     " +
                              msgInfo.checkSum.ToString("X2") + "     " +
                              msgInfo.idPar.ToString("X2") +
                              "         ");
             for (int i = 0; i < 8; i++)
             {
            if (i < dlc)
            {
               OutputRTB.AppendText(msgData[i].ToString("X2") + "  ");
            }
            else
            {
               OutputRTB.AppendText("    ");
            }
             }
             // time stamp
             double modifiedTime;
             modifiedTime = ((double)(msgInfo.timestamp)) / 1000.0;
             OutputRTB.AppendText(modifiedTime.ToString(" " + "000000.000") + "\n");

             // Need scroll bar to move down as data is added.
             // qqq - Something needs to be fixed here so scroll bar prevents this call.
             OutputRTB.ScrollToCaret();
        }
Example #16
0
        public VolumeInfo(string path)
        {
            var drive_letter = Path.GetPathRoot(path);
            uint serial_number = 0;
            uint max_component_length = 0;
            StringBuilder sb_volume_name = new StringBuilder(256);
            UInt32 file_system_flags = new UInt32();
            StringBuilder sb_file_system_name = new StringBuilder(256);

            if (GetVolumeInformation(drive_letter, sb_volume_name,
                (UInt32)sb_volume_name.Capacity, out serial_number, out max_component_length,
                out file_system_flags, sb_file_system_name, (UInt32)sb_file_system_name.Capacity))
            {
                VolumeName = sb_volume_name.ToString();
                SerialNumber = serial_number.ToString();
            //                lblMaxComponentLength.Text = max_component_length.ToString();
                FileSystem = sb_file_system_name.ToString();
                Flags = "&&H" + file_system_flags.ToString("x");
            }
        }
Example #17
0
    public void CreateRole(string account, string loginKey, UInt32 serverID, string roleName, UInt32 p)
    {
        var rArgs = new Dict<string, string>();
        rArgs["acc"] = account;
        rArgs["key"] = loginKey;
        rArgs["sid"] = serverID.ToString();
        rArgs["n"] = roleName;
        rArgs["p"] = p.ToString();

        var rPath = "CreateRole";
        this.SendRequest(rPath, rArgs, ServerType.LoginServer, (args) =>
        {
            var stream = new MemoryStream(args.bytes);
            StreamReader sr = new StreamReader(stream, System.Text.Encoding.GetEncoding("UTF-8"));
            var ret = UInt32.Parse(sr.ReadLine());

            var eventArgs = new ResponseEventArgs(ret);

            ResponseCreateRoleEvent(this, eventArgs);
        });
    }
Example #18
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="size"></param>
        /// <param name="sourceStream"></param>
        /// <param name="sourceVersion"></param>
        /// <returns></returns>
        public static AVM1InstructionSequence GetCode( UInt32 size, BinaryReader sourceStream, byte sourceVersion )
        {
            AVM1InstructionSequence retVal = new AVM1InstructionSequence();

            using ( MemoryStream memStream = new MemoryStream( sourceStream.ReadBytes( (int)size ) ) )
            {
                BinaryReader2 brInner = new BinaryReader2( memStream );
                while ( brInner.BaseStream.Position < size )
                {
                    if ( 0 == brInner.PeekByte() )
                    {
                        //
                        // ActionEndFlag found
                        //
                        AbstractAction innerAction = AVM1Factory.Create( brInner, sourceVersion );
                        retVal.Add( innerAction );

                        //
                        // Verify that the entire MemoryStream (i.e. "size" bytes) were consumed
                        //
                        if ( brInner.BaseStream.Position != size )
                        {
                            Log.Warn(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType, "Code reading for size " + size.ToString("d") +
                                " terminated prematurely at position 0x" + brInner.BaseStream.Position.ToString( "X08" )
                            );
                        }

                        break;
                    }
                    else
                    {
                        AbstractAction innerAction = AVM1Factory.Create( brInner, sourceVersion );
                        retVal.Add( innerAction );
                    }
                }
            }

            return retVal;
        }
Example #19
0
        public static PutFileRet PutFileWithUpToken(
            string upToken, string tableName, string key, string mimeType,
            string localFile, string customMeta, string callbackParam, UInt32 crc32)
        {
            string entryURI = tableName + ":" + key;
            if (String.IsNullOrEmpty(mimeType))
            {
                mimeType = "application/octet-stream";
            }
            string action = "/rs-put/" + Base64UrlSafe.Encode(entryURI) +
                    "/mimeType/" + Base64UrlSafe.Encode(mimeType);
            if (!String.IsNullOrEmpty(customMeta))
            {
                action += "/meta/" + Base64UrlSafe.Encode(customMeta);
            }
            if (crc32 != 0)
            {
                action += "/crc32/" + crc32.ToString();
            }

            try
            {
                var postParams = new Dictionary<string, object>();
                postParams["auth"] = upToken;
                postParams["action"] = action;
                postParams["file"] = new FileParameter(localFile, mimeType);
                if (!String.IsNullOrEmpty(callbackParam))
                    postParams["params"] = callbackParam;
                CallRet callRet = MultiPartFormDataPost.Post(Config.UP_HOST + "/upload", postParams);
                return new PutFileRet(callRet);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());
                return new PutFileRet(new CallRet(HttpStatusCode.BadRequest, e));
            }
        }
Example #20
0
 public String get_torrent_name(UInt32 id)
 {
     String url = nyaruko.Text;
     if (!(url.EndsWith("/")))
         url += "/";
     url += "?page=view&tid=" + id.ToString();
     try
     {
         HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
         HttpWebResponse response = request.GetResponse() as HttpWebResponse;
         String name=null;
         if (response.StatusCode == HttpStatusCode.OK)
         {
             StreamReader readStream;
             Stream receiveStream = response.GetResponseStream();
             Encoding encode = System.Text.Encoding.GetEncoding("utf-8");
             readStream = new StreamReader(receiveStream, encode);
             String data = readStream.ReadToEnd();
             readStream.Close();
             int start = data.IndexOf("<td class=\"viewtorrentname\">");
             if (start < 0) //no such torrent
                 return null;
             name = data.Substring(start + 28);
             name = name.Substring(0, name.IndexOf("</td>"));
         }
         response.Close();
         return name;
     }
     catch (IOException e)
     {
         return null;
     }
     catch (WebException e)
     {
         return null;
     };
 }
Example #21
0
 public void SetDefSetting(String ip, UInt32 port)
 {
     textBox_ip.Text = ip;
     textBox_port.Text = port.ToString();
 }
 public static void VerifySucceeded(UInt32 hresult)
 {
     if (hresult > 1)
     {
         throw new Exception("Failed with HRESULT: " + hresult.ToString("X"));
     }
 }
Example #23
0
        /// <summary>
        /// 
        /// </summary>
        protected override void Parse()
        {
            long before = _dataStream.Position;

            BinaryReader br = new BinaryReader(_dataStream);
            byte[] content;

            _flags = br.ReadUInt32();
            _name = Helper.SwfStrings.SwfString(this.Version, br);

            content = br.ReadBytes((int)(_tag.Length - (_dataStream.Position - before)));
            Log.Debug(this, "AVM2 Code named '" + _name + "' with Flags 0x" + _flags.ToString("X08") + ", " + content.Length.ToString("d") + " bytes");

            using (MemoryStream ms = new MemoryStream(content))
            {
                _AbcFile = new Recurity.Swf.AVM2.ABC.AbcFile();
                _AbcFile.Parse(ms);

                /*
                 * TODO: Move into AVM2Code
                 *
                for ( uint i = 0; i < abcFile.Methods.Count; i++ )
                {
                    AVM2Method m = new AVM2Method( i, abcFile );
                   //Log.Debug(this,  m.ToString() );
                }
                 */
                String s = String.Format("Calculated length of AbcFile: {0:d} (real: {1:d})", _AbcFile.Length, content.Length);
                Log.Debug(this, s);
            }
        }
Example #24
0
        static void Main(string[] args)
        {
            e = emu_new();
            cpu = emu_cpu_get(e);
            mem = emu_memory_get(e);
            env = emu_env_new(e);

            Console.WriteLine("hEmu=" + e.ToString("X") + " hMem=" + mem.ToString("X") + " hEnv=" + env.ToString("X"));

            //emu_cpu_reg32_set( cpu, emu_reg32.esp  , 0x12FE00);
            //emu_cpu_reg32_set( cpu, emu_reg32.ebp, 0x12FFF0);

            cpu->esp = 0x12FE00;
            cpu->ebp = 0x12FFF0;

            //ApiHookProc ahp = new ApiHookProc(hook_LoadLibraryA);
            UInt32 r = emu_env_w32_export_new_hook(env, "LoadLibraryA", hook_LoadLibraryA, 0);
            Console.WriteLine("SetHook returned: " + r+"\n");

            //mov eax, 0; inc eax, int 3
            //byte[] b = { 0xb8, 0x00, 0x00, 0x00, 0x00, 0x40, 0xcc, 0xcc };

            //00436A3D     68 6C333200    PUSH 32336C
            //00436A42     68 7368656C    PUSH 6C656873
            //00436A47     54             PUSH ESP
            //00436A48     68 771D807C    PUSH 7C801D77  ;LoadLibrary address
            //00436A4D     59             POP ECX
            //00436A4E     FFD1           CALL ECX
            //00436A48     68 A0AD807C    PUSH 7c80ada0 ;GetProcAddress (stack not setup properly though for legit call)
            //00436A4D     59             POP ECX
            //00436A4E     FFD1           CALL ECX

            byte[] b = {0x68, 0x6C, 0x33, 0x32, 0x00, 0x68, 0x73, 0x68, 0x65, 0x6C, 0x54,
                        0x68, 0x77, 0x1D, 0x80, 0x7C, 0x59, 0xFF, 0xD1,0x68, 0xa0, 0xad,
                        0x80, 0x7c, 0x59, 0xFF, 0xD1, 0xCC };

            WriteShellcode(0x401000, b);

            //emu_cpu_eip_set(cpu, 0x401000);
            cpu->eip = 0x401000;

            Console.WriteLine("Eip = " + emu_cpu_eip_get(cpu));

            for (int i = 0; i < 100; i++)
            {
                emu_env_w32_dll_export* export = emu_env_w32_eip_check(env);
                if ( (int)export != 0)
                {
                    if (export->lpfnHook == 0){ //then it is an api start address, but its not hooked..
                        Console.WriteLine("\nUnhooked api: " + CString(export->lpfnName,256));
                        break;
                    }
                }
                else
                {
                    print_disasm();
                    if (!Step()) break;
                }
            }

            Console.WriteLine("\nError: " + emu_strerror(e));
            Console.WriteLine("Run Complete eax=" + emu_cpu_reg32_get(cpu, emu_reg32.eax).ToString("X") );
            Console.ReadKey();
        }
Example #25
0
        private void ToggleBookmark(UInt32 EID)
        {
            int index = m_Bookmark.IndexOf(EID);

            TreelistView.Node found = null;
            FindEventNode(ref found, m_Core.CurFrame, EID);

            if (index >= 0)
            {
                bookmarkStrip.Items.Remove(m_BookmarkButtons[index]);

                m_Bookmark.RemoveAt(index);
                m_BookmarkButtons.RemoveAt(index);

                found.Image = null;
            }
            else
            {
                ToolStripButton but = new ToolStripButton();

                but.DisplayStyle = ToolStripItemDisplayStyle.Text;
                but.Name = "bookmarkButton" + EID.ToString();
                but.Text = EID.ToString();
                but.Tag = EID;
                but.Size = new Size(23, 22);
                but.Click += new EventHandler(this.bookmarkButton_Click);

                but.Checked = true;

                bookmarkStrip.Items.Add(but);

                found.Image = global::renderdocui.Properties.Resources.asterisk_orange;

                m_Bookmark.Add(EID);
                m_BookmarkButtons.Add(but);
            }

            bookmarkStrip.Visible = m_BookmarkButtons.Count > 0;

            eventView.Invalidate();
        }
Example #26
0
        private void DownloadProgress(int lPlayHandle, UInt32 dwTotalSize, UInt32 dwDownLoadSize)
        {

            if (dwDownLoadSize != 0xFFFFFFFF &&
                dwDownLoadSize != 0xFFFFFFFE &&
                dwDownLoadSize <= dwTotalSize)
            {
                int iPos = (int)((dwDownLoadSize * 100) / dwTotalSize);
                Console.WriteLine(iPos.ToString() + " " + dwDownLoadSize.ToString() + "/" + dwTotalSize.ToString());
                psbMain.Value = iPos;
            }
            else
            {
                if (0xFFFFFFFF == dwDownLoadSize)
                {
                    btnDownLoad2.Tag = "";
                    psbMain.Value = 0;
                    MessageUtil.ShowMsgBox(StringUtil.ConvertString("下载结束!"));
                    btnDownLoad1.Enabled = true;
                    btnDownLoad2.Enabled = true;

                    psbMain.Value = 0;

                    //DHClient.DHStopDownload(lPlayHandle);
                }
                else if (0xFFFFFFFE == dwDownLoadSize)
                {
                    btnDownLoad2.Tag = "";
                    psbMain.Value = 0;
                    MessageUtil.ShowMsgBox(StringUtil.ConvertString("磁盘空间不足!"));
                    btnDownLoad1.Enabled = true;
                    btnDownLoad2.Enabled = true;

                    psbMain.Value = 0;

                    //DHClient.DHStopDownload(lPlayHandle);
                }
            }
        }
Example #27
0
        public void AddBeep(UInt32 freq, UInt32 dur, bool bl)
        {
            int select = actionList.SelectedIndex;
            if (bl == true)
            {
                actionList.Items.Insert(++select, "Beep Sound(" + freq.ToString() + "," + dur.ToString() + ")");
                actionList.Items.RemoveAt(--select);
            }
            else
            {
                if (select == -1)
                {
                    actionList.Items.Add("Beep Sound(" + freq.ToString() + "," + dur.ToString() + ")");
                }
                else
                {
                    actionList.Items.Insert(++select, "Beep Sound(" + freq.ToString() + "," + dur.ToString() + ")");
                }
            }

            actionList.SelectedIndex = (actionList.Items.Count) - 1;
            saved = false;
        }
Example #28
0
 private TreelistView.Node MakeNode(UInt32 minEID, UInt32 maxEID, UInt32 minDraw, UInt32 maxDraw, string text, double duration)
 {
     string eidString = (maxEID == minEID) ? maxEID.ToString() : String.Format("{0}-{1}", minEID, maxEID);
     string drawString = (maxDraw == minDraw) ? maxDraw.ToString() : String.Format("{0}-{1}", minDraw, maxDraw);
     return new TreelistView.Node(new object[] {eidString, drawString, text.Replace("&", "&&"), duration });
 }
Example #29
0
        private static void ReportDimensionId(NetworkClient client, Account account, UInt32 realmId)
        {
            var sender = new byte[] {0x0d, 0x13, 0xce, 0x71, 0xb1, 0x10, 0x0b};
            var receiver = new byte[] {0x0d, 0x47, 0xc1, 0x67, 0x6c, 0x10, 0xe6, 0x8f, 0x80, 0x08};

            new PacketStream()
                .WriteHeader(sender, receiver, null, 0x200b) // ReportDimesionID
                .WriteString(realmId.ToString())
                .Send(client);
        }
Example #30
0
		/// <summary>
		/// Initializes a new instance of the <see cref="OrgInstruction"/> class.
		/// </summary>
		/// <param name="value">The value.</param>
		public OrgInstruction (UInt32 value)
			: base (true, string.Empty, string.Empty, "ORG", value.ToString (), null, null, null, value, null)
		{
		}