$f3->route('GET /@controller/@action','\controllers\@controller->@action');
namespace coinBOT
{
public partial class BotForm : Form
{
private SettingsForm _settingsForm;
public BotForm()
{
InitializeComponent();
this._settingsForm = new SettingsForm() { Owner = this };
}
private void button1_Click(object sender, EventArgs e)
{
if (this._settingsForm.ShowDialog() == DialogResult.OK)
{
// обработка результатов
}
}
}
}
class TextBoxWithPlaceholder : TextBox
{
public string Placeholder { get; set; }
protected override void OnCreateControl()
{
base.OnCreateControl();
if (!DesignMode)
{
Text = Placeholder;
}
}
protected override void OnLostFocus(EventArgs e)
{
base.OnLostFocus(e);
if (Text.Equals(string.Empty))
{
Text = Placeholder;
}
}
protected override void OnGotFocus(EventArgs e)
{
base.OnGotFocus(e);
if (Text.Equals(Placeholder))
{
Text = string.Empty;
}
}
}
select * from (select * from polzovateli_statistica order by started DESC) t group by uid
.my-calss {
color: #fd[ID]
}
.my-calss {
color: #fd0012
}
procedure TForm1.Button1Click(Sender: TObject);
var
rect: array[0..2] of real;
tmp, p, s: real;
i: integer;
begin
rect[0] := StrToFloat(Edit1.Text);
rect[1] := StrToFloat(Edit2.Text);
rect[2] := StrToFloat(Edit3.Text);
if (rect[0] = rect[1]) and (rect[1] = rect[2]) then
begin
label1.Caption := 'Равносторонний';
Exit;
end;
if (rect[0] = rect[1]) or (rect[1] = rect[2]) or (rect[0] = rect[2]) then
begin
label1.Caption := 'Равнобедренный';
Exit;
end;
//сортируем массив
for i := 0 to 1 do
begin
tmp := rect[i + 1];
if (rect[i] > rect[i + 1]) then
begin
rect[i + 1] := rect[i];
rect[i] := tmp;
end;
end;
if (rect[0] > rect[1]) then
begin
tmp := rect[1];
rect[1] := rect[0];
rect[0] := tmp;
end;
if (sqrt(rect[0] * rect[0] + rect[1] * rect[1]) = rect[2]) then
begin
label1.Caption := 'Прямоугольный';
Exit;
end;
if (rect[0] * rect[0] + rect[1] * rect[1] > rect[2] * rect[2]) then
begin
label1.Caption := 'Тупоугольный';
p := (rect[0] + rect[1] + rect[2]) / 2;
s := sqrt(p * (p - rect[0]) * (p - rect[1]) * (p - rect[2]));
label1.Caption := 'Площадь: ' + FloatToStr(s) + #13;
for i := 0 to 2 do
label1.Caption := label1.Caption + FloatToStr(rect[i]) + #13;
Exit;
end;
end;
procedure Sort(var a,b,c: Integer);
var
a1,b1,c1: Integer;
begin
a1:=a; b1:=b; c1:=c;
if (a<=b) and (a<=c) and (b<=c) then begin a:=a1;b:=b1;c:=c1; end else
if (a<=b) and (a<=c) and (c<=b) then begin a:=a1;b:=c1;c:=b1; end else
if (b<=a) and (b<=c) and (a<=c) then begin a:=b1;b:=a1;c:=c1; end else
if (b<=a) and (b<=c) and (c<=a) then begin a:=b1;b:=c1;c:=a1; end else
if (c<=a) and (c<=b) and (a<=b) then begin a:=c1;b:=a1;c:=b1; end else
if (c<=a) and (c<=b) and (b<=a) then begin a:=c1;b:=b1;c:=a1; end;
end;
private void changeRingtone(boolean isRingtone, boolean isNotification) {
File ringtoneFile = new File(dir, newRing);
ContentValues values = new ContentValues();
values.put(MediaStore.MediaColumns.DATA, ringtoneFile.getAbsolutePath());
values.put(MediaStore.MediaColumns.TITLE, ringtoneFile.getName());
values.put(MediaStore.MediaColumns.MIME_TYPE, "audio/mp3");
values.put(MediaStore.Audio.Media.ARTIST, " ");
values.put(MediaStore.MediaColumns.SIZE, ringtoneFile.getUsableSpace());
values.put(MediaStore.Audio.Media.IS_RINGTONE, isRingtone);
values.put(MediaStore.Audio.Media.IS_NOTIFICATION, isNotification);
values.put(MediaStore.Audio.Media.IS_ALARM, false);
values.put(MediaStore.Audio.Media.IS_MUSIC, false);
Uri uri = MediaStore.Audio.Media.getContentUriForPath(ringtoneFile
.getAbsolutePath());
mContext.getContentResolver().delete(
uri,
MediaStore.MediaColumns.DATA + "=\""
+ ringtoneFile.getAbsolutePath() + "\"", null);
Uri newUri = mContext.getContentResolver().insert(uri, values);
try {
if (isRingtone) {
RingtoneManager.setActualDefaultRingtoneUri(mContext, RingtoneManager.TYPE_RINGTONE, newUri);
}
if (isNotification) {
RingtoneManager.setActualDefaultRingtoneUri(mContext, RingtoneManager.TYPE_NOTIFICATION, newUri);
}
} catch (Throwable t) {
System.err.println("Can't set ringtone");
t.printStackTrace();
}
}