亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? eccstring.cpp

?? C++實現的橢圓曲線算法。已經寫成一個庫文件只要調用就行了
?? CPP
字號:
/* ==========================================================================

	ecc - Erik's Code Collection
	Copyright (C) 2003-2005 - Erik Dienske

	This file is part of ecc.

	ecc is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your option) any later version.

	ecc is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with ecc; if not, write to the Free Software Foundation, Inc.,
	59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

===========================================================================*/

//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop

#include "eccString.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
//---------------------------------------------------------------------------
#include <StrUtils.hpp>	// AnsiReplaceStr
//---------------------------------------------------------------------------

//===========================================================================
namespace ecc {
//===========================================================================

//---------------------------------------------------------------------------
#ifdef _DEBUG
	static bool MessageLinesParamsValid(int lines_before, int lines_after);
#endif

static int EccPrevMemoLinesBefore = 0;
//---------------------------------------------------------------------------

void MemoMessage(TMemo *memo, const String message,
		int lines_before, int lines_after)
{
	#ifdef _DEBUG
		if (!MessageLinesParamsValid(lines_before, lines_after))
			return;
	#endif

	switch (lines_before)
	{
		case -2:
			if (EccPrevMemoLinesBefore != -2)
				memo->Lines->Append(message);
			else
				memo->Lines->Strings[memo->Lines->Count - 1] = message;
			break;
		case -1:
			memo->Lines->Strings[memo->Lines->Count - 1]
				= memo->Lines->Strings[memo->Lines->Count - 1] + message;
			break;
		default:
			for (lines_before; lines_before > 0; lines_before--)
				memo->Lines->Append("");
			memo->Lines->Append(message);
	}

	for (lines_after; lines_after > 0; lines_after--)
		memo->Lines->Append("");

	MemoCursorOnLastLine(memo);
	EccPrevMemoLinesBefore = lines_before;
}
//---------------------------------------------------------------------------

void MemoCursorOnLastLine(TMemo* memo)
{
	memo->SelStart = memo->Lines->Text.Length() - 1;
}
//===========================================================================

//---------------------------------------------------------------------------

void LBCursorOnLastLine(TListBox* lbox)
{
	lbox->ItemIndex = lbox->Items->Count - 1;
	lbox->ItemIndex = -1;	// Unselect
}
//---------------------------------------------------------------------------

static int EccPrevLBLinesBefore = 0;
//---------------------------------------------------------------------------

void LBMessage(TListBox *lbox, String message,
		int lines_before, int lines_after)
{
	// Tabs etc. don't display very well in ListBoxes:
	/* TODO : Replace  \t, \n and \r with spaces? */
/* 	message = AnsiReplaceStr(message, "\t", " ");
	message = AnsiReplaceStr(message, "\r", " ");
	message = AnsiReplaceStr(message, "\n", " "); */

	#ifdef _DEBUG
		if (!MessageLinesParamsValid(lines_before, lines_after))
			return;
	#endif

	switch (lines_before)
	{
		case -2:
			if (EccPrevLBLinesBefore != -2)
				lbox->Items->Append(message);
			else
				lbox->Items->Strings[lbox->Count - 1] = message;
			break;
		case -1:
			lbox->Items->Strings[lbox->Count - 1]
				= lbox->Items->Strings[lbox->Count - 1] + message;
			break;
		default:
			for (lines_before; lines_before > 0; lines_before--)
				lbox->Items->Append("");
			lbox->Items->Append(message);
	}

	for (lines_after; lines_after > 0; lines_after--)
		lbox->Items->Append("");

	LBCursorOnLastLine(lbox);
	EccPrevLBLinesBefore = lines_before;
}
//---------------------------------------------------------------------------

void LBMessage(TListBox *lbox, String message, TLBMessageStyle style,
		int lines_before, int lines_after)
{
	LBMessage(lbox, message, lines_before, lines_after);

	// (Ab)Use lbox->Items->Objects[] to store TStatusMessageType info:
	lbox->Items->Objects[lbox->Items->Count - 1 - lines_after] = (TObject*)style;
	lbox->Repaint();
}
//---------------------------------------------------------------------------

void LBMessage_DrawItem(TWinControl *Control, int Index, TRect &Rect, TOwnerDrawState State)
{
	TListBox* lbox = dynamic_cast<TListBox*>(Control);
	if (!lbox) return;

	TCanvas* canvas = lbox->Canvas;

	// Set defaults:
	canvas->Brush->Color = lbox->Color;
	canvas->Font->Style = lbox->Font->Style;

	TLBMessageStyle style = (TLBMessageStyle)lbox->Items->Objects[Index];

	switch (style)
	{
		default:
		case smtDefaultB:
		case smtDefB:
			canvas->Font->Style = canvas->Font->Style << fsBold;
		case smtDefault:
		case smtDef:
			canvas->Font->Color = clWindowText;
			break;

		case smtNotificationB:
		case smtNotifB:
			canvas->Font->Color = clNavy;
			canvas->Font->Style = canvas->Font->Style << fsBold;
			canvas->Brush->Color = (TColor)0xFFF0F0;
			break;
		case smtNotification:
		case smtNotif:
			canvas->Font->Color = clBlue;
			break;

		case smtWarning:
			//canvas->Font->Color = clFuchsia;
			canvas->Font->Color = (TColor)0x9900cc;
			break;

		case smtError:
			canvas->Font->Color = clRed;
			canvas->Brush->Color = clCream;
			break;

		case smtAppError:
			canvas->Font->Color = clYellow;
			canvas->Brush->Color = clRed;
			break;
	}

	// Clear the rectangle: (NECESSARY!)
	canvas->FillRect(Rect);

	// Display text:
	canvas->TextOut(Rect.Left + 2, Rect.Top, lbox->Items->Strings[Index]);
}
//---------------------------------------------------------------------------

/* void LBCustomMessage(TListBox *lbox, String message,
		TColor bg_color, TColor font_color, TFontStyle font_style,
		int lines_before, int lines_after)
{
	LBMessage(lbox, message, lines_before, lines_after);

	TLBCustomMessageStyle style;
	style.bg_color		= bg_color;
	style.font_color	= font_color;
	style.font_style	= font_style;

	// (Ab)Use lbox->Items->Objects[] to store TStatusMessageType info:
	lbox->Items->Objects[lbox->Items->Count - 1 - lines_after] = (TObject*)&style;
	lbox->Repaint();
} */
//---------------------------------------------------------------------------

/* void LBCustomMessage_DrawItem(TWinControl *Control, int Index, TRect &Rect, TOwnerDrawState State)
{
	TListBox* lbox = dynamic_cast<TListBox*>(Control);
	if (!lbox) return;

	TCanvas* canvas = lbox->Canvas;

	TLBCustomMessageStyle* style = (TLBCustomMessageStyle*)lbox->Items->Objects[Index];

	// Set style values:
	canvas->Brush->Color = style->bg_color;
	canvas->Font->Color = style->font_color;
	canvas->Font->Style = canvas->Font->Style << style->font_style;

	// Clear the rectangle: (NECESSARY!)
	canvas->FillRect(Rect);

	// Display text:
	canvas->TextOut(Rect.Left + 2, Rect.Top, lbox->Items->Strings[Index]);

	TODO: Should TLBCustomMessageStyle object be freed? 
} */
//---------------------------------------------------------------------------

//===========================================================================
#ifdef _DEBUG
	bool MessageLinesParamsValid(int lines_before, int lines_after)
	{
	// If one of the following errors occurs, you should check the parameters mentioned.
		if (lines_before < -2)
		{
			ShowMessage("ERROR with parameter: "
				"lines_before < -2\n"
				"File: " __FILE__ "\n"
				"Function: " __FUNC__ );
			return false;
		}
		if (lines_after < 0)
		{
			ShowMessage("ERROR with parameter: "
				"lines_after < 0\n"
				"File:" __FILE__ "\n"
				"Function: " __FUNC__ );
			return false;
		}
		return true;
	}
#endif
//===========================================================================

String StripNonNumbers(String str)
{
	for (int i=1; i<=str.Length(); i++)
	{
		if ((str[i] < '0') || (str[i] > '9')) str[i] = ' ';
	}
	return AnsiReplaceStr(str, " ", "");
}
//---------------------------------------------------------------------------

bool StrToBool(String bool_str)
{
	return (LowerCase(bool_str) == "true") ? true : false;
}
//---------------------------------------------------------------------------

bool StrToBoolDef(String bool_str, const bool def)
{
	return (LowerCase(bool_str) == "true") ? true : def;
}
//---------------------------------------------------------------------------

String BoolToStr(const bool boolie)
{
	return boolie ? "true" : "false";
}
//---------------------------------------------------------------------------

String StrToXmlQuotStr(String str)
{
	str = AnsiReplaceStr(str, "\"", "&quot;");
	str = AnsiReplaceStr(str, "'", "&apos;");
	return str;
}
//---------------------------------------------------------------------------

String StrToXmlUtf8Str(String str)
{
	str = AnsiReplaceStr(str, "&", "&amp;"); // Should be the first replacement! (because of the '&').
	str = AnsiReplaceStr(str, "\"", "&quot;");
	str = AnsiReplaceStr(str, "'", "&apos;");
	str = AnsiReplaceStr(str, "<", "&lt;");
	str = AnsiReplaceStr(str, ">", "&gt;");
	return AnsiToUtf8(str);
}
//---------------------------------------------------------------------------

String ReplaceStr(String str, String from_str, String to_str)
{
	return AnsiReplaceStr(str, from_str, to_str);
}
//---------------------------------------------------------------------------

//===========================================================================
} // namespace ecc;
//===========================================================================

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产日本欧洲亚洲| 国产成人在线视频网址| 欧美中文字幕一区二区三区亚洲| 中文字幕一区免费在线观看| av成人老司机| 亚洲午夜久久久久久久久电影院| 色视频成人在线观看免| 午夜久久电影网| 精品久久人人做人人爽| 国产99久久久国产精品潘金| 国产精品久久久久久久久久免费看| www.一区二区| 五月综合激情网| 精品1区2区在线观看| eeuss鲁片一区二区三区| 亚洲黄一区二区三区| 欧美一区二区三区在线| 国产高清精品网站| 亚洲国产一区二区在线播放| 欧美精品一区二区三区一线天视频| 不卡欧美aaaaa| 亚洲国产精品嫩草影院| 久久综合九色综合欧美98| 成人av在线一区二区三区| 亚洲地区一二三色| 久久影音资源网| 欧美在线观看18| 久久国产欧美日韩精品| 国产精品理论片在线观看| 欧美伦理电影网| 风间由美中文字幕在线看视频国产欧美 | 欧美精品三级日韩久久| 九九视频精品免费| 亚洲综合色丁香婷婷六月图片| 日韩欧美一区在线观看| 色屁屁一区二区| 国产一区二区三区黄视频| 亚洲免费高清视频在线| 欧美tk—视频vk| 欧美亚洲一区三区| 懂色av噜噜一区二区三区av| 香蕉影视欧美成人| 国产精品福利在线播放| 91精品国产麻豆| 色妞www精品视频| 成人在线视频一区二区| 麻豆一区二区在线| 亚洲va欧美va人人爽午夜| 亚洲国产电影在线观看| 精品久久久久久最新网址| 在线一区二区三区四区五区 | 久久狠狠亚洲综合| 亚洲国产精品一区二区久久 | 日韩欧美三级在线| 在线观看亚洲专区| av午夜精品一区二区三区| 久久99国产精品麻豆| 日韩精品乱码av一区二区| 伊人夜夜躁av伊人久久| 亚洲国产高清aⅴ视频| xf在线a精品一区二区视频网站| 欧美性一二三区| 在线看国产日韩| 在线免费av一区| 色偷偷成人一区二区三区91| 成人自拍视频在线| 成人午夜视频福利| 国产大陆精品国产| 国产成人免费在线观看| 国产在线一区二区综合免费视频| 五月婷婷久久丁香| 丝袜美腿亚洲一区| 亚洲国产一区二区三区| 亚洲成av人在线观看| 亚洲国产日韩a在线播放 | 性感美女久久精品| 亚洲一二三四久久| 一区二区三区在线视频观看| 亚洲蜜臀av乱码久久精品| 亚洲私人影院在线观看| 中文字幕日韩一区二区| 亚洲人成网站精品片在线观看| 亚洲婷婷国产精品电影人久久| 国产精品久久久久久久岛一牛影视 | 中文字幕不卡在线播放| 国产免费成人在线视频| 国产欧美日韩卡一| 中文字幕不卡三区| 亚洲色欲色欲www在线观看| 日韩一区中文字幕| 亚洲与欧洲av电影| 图片区小说区国产精品视频| 日韩高清国产一区在线| 久久国产三级精品| 成人性生交大片免费看中文网站| 高清不卡一二三区| 色婷婷av一区二区三区软件| 欧美系列在线观看| 日韩一区二区三区在线| 国产香蕉久久精品综合网| 国产精品乱人伦| 亚洲主播在线观看| 久久99国产精品久久99| 成人国产精品免费观看| 91黄色激情网站| 欧美一区二区三区白人| 国产亚洲成年网址在线观看| 一区二区视频在线| 免费在线观看日韩欧美| 国产成人免费视频| 91视频.com| 91精品一区二区三区久久久久久| 精品电影一区二区| 亚洲激情中文1区| 久久精品99国产精品日本| 成人黄色软件下载| 欧美日韩精品欧美日韩精品一 | 亚洲国产欧美另类丝袜| 久久精品国产久精国产爱| proumb性欧美在线观看| 欧美日韩mp4| 国产精品色呦呦| 麻豆专区一区二区三区四区五区| 99re成人精品视频| 日韩免费视频线观看| 亚洲欧美另类图片小说| 激情综合网av| 欧美三级资源在线| 中文字幕欧美国产| 丝瓜av网站精品一区二区| 99久久综合精品| 精品少妇一区二区| 亚洲尤物在线视频观看| 成人av在线资源| 久久网这里都是精品| 五月婷婷久久丁香| 色香蕉久久蜜桃| 国产精品日产欧美久久久久| 日本中文字幕一区| 欧美色图12p| 国产精品久久看| 国产一区二区久久| 精品少妇一区二区三区免费观看| 一区二区三区在线观看欧美| 成人av电影在线网| 国产日韩精品一区二区浪潮av| 丝袜美腿一区二区三区| 欧美午夜片在线看| 亚洲毛片av在线| eeuss鲁片一区二区三区| 国产日韩欧美麻豆| 国产一区二区导航在线播放| 精品欧美一区二区久久| 日本不卡的三区四区五区| 欧美久久久久中文字幕| 亚洲乱码中文字幕| 色综合久久六月婷婷中文字幕| 国产亲近乱来精品视频| 国产高清成人在线| 国产喂奶挤奶一区二区三区| 久久精品国产亚洲高清剧情介绍 | jlzzjlzz欧美大全| 欧美激情一区二区三区蜜桃视频| 国模套图日韩精品一区二区| 欧美一区二区播放| 美女脱光内衣内裤视频久久影院| 欧美一二三在线| 久久国内精品视频| 精品国产污污免费网站入口| 美女国产一区二区| 日韩欧美国产wwwww| 麻豆freexxxx性91精品| 精品久久国产老人久久综合| 精品在线播放午夜| 国产日韩欧美一区二区三区乱码| 懂色av一区二区三区免费观看| 国产精品高潮久久久久无| 97se亚洲国产综合自在线观| 一区二区不卡在线播放| 欧美日韩不卡在线| 另类专区欧美蜜桃臀第一页| www国产亚洲精品久久麻豆| 国产aⅴ综合色| 亚洲少妇中出一区| 欧美色中文字幕| 久久爱www久久做| 国产精品三级av在线播放| 91久久精品日日躁夜夜躁欧美| 亚洲伊人伊色伊影伊综合网| 91精品国产综合久久精品性色| 老司机午夜精品99久久| 国产日本亚洲高清| 欧美伊人精品成人久久综合97 | 国产欧美一区二区精品性色| 99精品在线观看视频| 亚洲尤物在线视频观看| 精品国产麻豆免费人成网站| 99久久夜色精品国产网站| 亚洲成人激情综合网| 久久久久久亚洲综合|