text stringlengths 13 6.01M |
|---|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace z88dk_compile_options_helper_beta
{
public partial class terminal_driver : Form
{
public List<string> ListOptions = new List<string>();
int startUP_Value = 0;
public terminal_driver()
{
InitializeComponent();
}
public terminal_driver(string strTextBox)
{
InitializeComponent();
textBox1.Text = strTextBox;
string platform = strTextBox;
ListOptions.Add(platform);
enableOptions();
#region new compiler
/*
if (zccvariables.classicCompiler == false)
{
//.true.MessageBox.Show("Classic Compiler");
compiler_type.Text = "New Compiler";
panel4.Enabled = true;
panel3.Enabled = true;
panel2.Enabled = false;
panel3.BackColor = Color.CadetBlue;
panel4.BackColor = Color.CadetBlue;
panel2.BackColor = Color.DarkGray;
radioButton2.Enabled = true;
radioButton1.Enabled = true;
radioButton3.Enabled = true;
radioButton4.Enabled = true;
radioButton5.Enabled = true;
radioButton6.Enabled = true;
radioButton7.Enabled = true;
radioButton15.Enabled = false;
radioButton14.Enabled = true;
radioButton13.Enabled = true;
radioButton12.Enabled = true;
radioButton11.Enabled = true;
radioButton10.Enabled = true;
radioButton9.Enabled = true;
radioButton8.Enabled = true;
radioButton2.Checked = false;
radioButton1.Checked = false;
radioButton3.Checked = false;
radioButton4.Checked = false;
radioButton5.Checked = false;
radioButton6.Checked = false;
radioButton7.Checked = false;
radioButton14.Checked = false;
radioButton13.Checked = false;
radioButton12.Checked = false;
radioButton11.Checked = false;
radioButton10.Checked = false;
radioButton9.Checked = false;
radioButton8.Checked = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;
radioButton19.Enabled = false;
radioButton20.Enabled = false;
radioButton21.Enabled = false;
radioButton22.Enabled = false;
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;
radioButton28.Enabled = false;
radioButton29.Enabled = false;
radioButton30.Enabled = false;
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton42.Enabled = false;
radioButton43.Enabled = false;
}
*/
#endregion
#region classic compiler
/*
if (zccvariables.classicCompiler == true)
{
//MessageBox.Show("New Compiler");
compiler_type.Text = "Classic Compiler";
panel4.Enabled = false;
panel3.Enabled = false;
panel2.Enabled = true;
panel3.BackColor = Color.DarkGray;
panel4.BackColor = Color.DarkGray;
panel2.BackColor = Color.CadetBlue;
radioButton1.Enabled = false;
radioButton2.Enabled = false;
radioButton3.Enabled = false;
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;
radioButton7.Enabled = false;
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;
radioButton11.Enabled = false;
radioButton12.Enabled = false;
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = true;
radioButton16.Enabled = true;
radioButton17.Enabled = true;
radioButton18.Enabled = true;
radioButton19.Enabled = true;
radioButton20.Enabled = true;
radioButton21.Enabled = true;
radioButton22.Enabled = true;
radioButton23.Enabled = true;
radioButton24.Enabled = true;
radioButton25.Enabled = true;
radioButton26.Enabled = true;
radioButton27.Enabled = true;
radioButton28.Enabled = true;
radioButton29.Enabled = true;
radioButton30.Enabled = true;
radioButton31.Enabled = true;
radioButton32.Enabled = true;
radioButton33.Enabled = true;
radioButton34.Enabled = true;
radioButton35.Enabled = true;
radioButton36.Enabled = true;
radioButton37.Enabled = true;
radioButton38.Enabled = true;
radioButton39.Enabled = true;
radioButton40.Enabled = true;
radioButton41.Enabled = true;
radioButton42.Enabled = true;
radioButton43.Enabled = true;
}
*/
#endregion
#region choose machine
#region Luxor ABC80
if (zccvariables.machine == "abc80")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region Luxor ABC800
if (zccvariables.machine == "abc800")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region Jupiter ACE
if (zccvariables.machine == "ace")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region Mattel Aquarius
if (zccvariables.machine == "aquarius")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region Commodore 128
if (zccvariables.machine == "c128")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region Philips Videopac C7420
if (zccvariables.machine == "c7420")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region CPC
if (zccvariables.machine == "cpc")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region CP/M
if (zccvariables.machine == "cpm")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = true;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region Embedded
if (zccvariables.machine == "embedded")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1 / CRT";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region Enterprise 64/128 Platform
if (zccvariables.machine == "enterprise")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region Galaksija
if (zccvariables.machine == "gal")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region Lambda 8300
//Lambda 8300
//improved chinese clone of the ZX81
if (zccvariables.machine == "lambda")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region Camputers Lynx
if (zccvariables.machine == "lynx")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region Sord M5
if (zccvariables.machine == "m5")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region CCE MC-1000
if (zccvariables.machine == "mc1000")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region MSX
if (zccvariables.machine == "msx")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = true;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region Memotech MTX
if (zccvariables.machine == "mtx")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = true;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region NASCOM 1 & 2
if (zccvariables.machine == "nascom")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region Amstrad NC
if (zccvariables.machine == "nc")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = true;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region Grundy Newbrain
if (zccvariables.machine == "newbrain")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = true;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2 / irq extender (under development)";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region Old School Computer Architecture
if (zccvariables.machine == "osca")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region Sharp OZ-700
if (zccvariables.machine == "oz")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = true;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2 / DK compatibility mode";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region Philips P2000
if (zccvariables.machine == "p2000")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region NEC PC-6001
if (zccvariables.machine == "pc6001")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region Peters Plus Sprinter
if (zccvariables.machine == "pps")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region RCMX000
if (zccvariables.machine == "rcmx000")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region Xircom REX 6000
if (zccvariables.machine == "rex")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region SAM Coupe
if (zccvariables.machine == "sam")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region SEGA SC-3000
if (zccvariables.machine == "sc3000")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region SMS
if (zccvariables.machine == "sms")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region S-OS (The Sentinel)
if (zccvariables.machine == "sos")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region Sorcerer Exidy
if (zccvariables.machine == "srr")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region Spectravideo SVI
if (zccvariables.machine == "svi")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region Texas Instruments TI8X
if (zccvariables.machine == "ti8x")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region Texas Instruments TI82
if (zccvariables.machine == "ti82")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region Texas Instruments TI83
if (zccvariables.machine == "ti83")
{
radioButton0.Enabled = true;
radioButton1.Enabled = true;
radioButton2.Enabled = true;//startup 2
radioButton3.Enabled = true;//startup 3
radioButton4.Enabled = true;
radioButton5.Enabled = true;
radioButton6.Enabled = true;//startup 6
radioButton7.Enabled = true;//startup 7
radioButton8.Enabled = true;
radioButton9.Enabled = true;
radioButton10.Enabled = true;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1 / Ion, Ti-Explorer";//startup 1
radioButton2.Text = "-startup=2 / Venus";//startup 2
radioButton3.Text = "-startup=3 / ZES";//startup 3
radioButton4.Text = "-startup=4 / Anova, SOS";//startup 4
radioButton5.Text = "-startup=5 / Ti-Explorer, AShell, SOS, Anova";//startup 5
radioButton6.Text = "-startup=6 / Ti-Explorer, AShell, SOS, Anova";//startup 6
radioButton7.Text = "-startup=7 / SOS, Anova";//startup 7
radioButton8.Text = "-startup=8 / Venus Explorer, Venus";//startup 8
radioButton9.Text = "-startup=9 / Ion, Ti-Explorer, ZASMLOAD, plain TIOS";//startup 9
radioButton10.Text = "-startup=10 / Plain TIOS, ZASMLOAD";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region Texas Instruments TI85
if (zccvariables.machine == "ti85")
{
radioButton0.Enabled = true;
radioButton1.Enabled = true;
radioButton2.Enabled = true;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1 / Rigel";//startup 1
radioButton2.Text = "-startup=2 / PhatOS (unstable)";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region Texas Instruments TI86
if (zccvariables.machine == "ti86")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region trs80 ** & EG2000
if (zccvariables.machine == "trs80")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region ts2068
if (zccvariables.machine == "ts2068")
{
radioButton0.Enabled = true;
radioButton1.Enabled = true;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = true;
radioButton5.Enabled = true;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = true;
radioButton9.Enabled = true;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = true;
radioButton32.Enabled = true;
radioButton33.Enabled = true;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = true;
radioButton37.Enabled = true;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = true;
radioButton41.Enabled = true;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0 / output: 32x24 no control codes";//startup 0
radioButton1.Text = "-startup=1 / output: 32x24 w/ control codes";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4 / 64x24 fixed width no control codes";//startup 4
radioButton5.Text = "-startup=5 / 64x24 fixed width w/ control codes";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8 / output: fzx proportional font no control";//startup 8
radioButton9.Text = "-startup=9 / output: fzx proportional font w/ control";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31 used for Games with no need for Terminal";//startup 31
radioButton32.Text = "-startup=32 IF2 Cart output: 32x24 no control codes";//startup 32
radioButton33.Text = "-startup=33 IF2 Cart output: 32x24 w/ control codes";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36 IF2 Cart 64x24 fixed width no control codes";//startup 36
radioButton37.Text = "-startup=37 IF2 Cart 64x24 fixed width w/ control codes";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40 IF2 Cart fzx proportional font no control";//startup 40
radioButton41.Text = "-startup=41 IF2 Cart fzx proportional font w/ control";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region vg5k
//vg5000
if (zccvariables.machine == "vg5k")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region vz
if (zccvariables.machine == "vz")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region x1 **
if (zccvariables.machine == "x1")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region Canon X07 **
if (zccvariables.machine == "x07")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region Cambridge z88 **
if (zccvariables.machine == "z88")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region zcc **
if (zccvariables.machine == "zcc")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region zx spectrum / possible interface 1?
if (zccvariables.machine == "zx")
{
radioButton0.Enabled = true;
radioButton1.Enabled = true;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = true;
radioButton5.Enabled = true;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = true;
radioButton9.Enabled = true;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = true;
radioButton32.Enabled = true;
radioButton33.Enabled = true;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = true;
radioButton37.Enabled = true;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = true;
radioButton41.Enabled = true;
radioButton63.Enabled = true;
radioButton0.Text = "-startup=0 / output: 32x24 no control codes";//startup 0
radioButton1.Text = "-startup=1 / output: 32x24 w/ control codes";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4 / 64x24 fixed width no control codes";//startup 4
radioButton5.Text = "-startup=5 / 64x24 fixed width w/ control codes";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8 / output: fzx proportional font no control";//startup 8
radioButton9.Text = "-startup=9 / output: fzx proportional font w/ control";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31 used for Games with no need for Terminal";//startup 31
radioButton32.Text = "-startup=32 IF2 Cart output: 32x24 no control codes";//startup 32
radioButton33.Text = "-startup=33 IF2 Cart output: 32x24 w/ control codes";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36 IF2 Cart 64x24 fixed width no control codes";//startup 36
radioButton37.Text = "-startup=37 IF2 Cart 64x24 fixed width w/ control codes";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40 IF2 Cart fzx proportional font no control";//startup 40
radioButton41.Text = "-startup=41 IF2 Cart fzx proportional font w/ control";//startup 41
radioButton63.Text = "-startup=63 IF2 used for Games with no need for Terminal";//startup 63
//
//256×192 WRX HRG
}
#endregion
#region zx80
if (zccvariables.machine == "zx80")
{
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
#region zx81
if (zccvariables.machine == "zx81")
{
radioButton0.Enabled = true;
radioButton1.Enabled = true;
radioButton2.Enabled = true;//startup 2
radioButton3.Enabled = true;//startup 3
radioButton4.Enabled = true;
radioButton5.Enabled = true;
radioButton6.Enabled = true;//startup 6
radioButton7.Enabled = true;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = true;
radioButton14.Enabled = true;
radioButton15.Enabled = true;
radioButton16.Enabled = true;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = true;
radioButton24.Enabled = true;
radioButton25.Enabled = true;
radioButton26.Enabled = true;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = true;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1 / FAST mode, no video output";//startup 1
radioButton2.Text = "-startup=2 / SLOW mode, no high resolution";//startup 2
radioButton3.Text = "-startup=3 / 256×192 WRX HRG (1)";//startup 3
radioButton4.Text = "-startup=4 / 256×192 WRX HRG (2)";//startup 4
radioButton5.Text = "-startup=5 / 256×64 WRX HRG (1)";//startup 5
radioButton6.Text = "-startup=6 / 256×64 WRX HRG (2)";//startup 6
radioButton7.Text = "-startup=7 / 256×64 Grayscale HRG";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13 / 256×192 ARX HRG(1)";//startup 13
radioButton14.Text = "-startup=14 / 256×192 ARX HRG(2)";//startup 14
radioButton15.Text = "-startup=15 / 256×64 ARX HRG(1)";//startup 15
radioButton16.Text = "-startup=16 / 256×64 ARX HRG(2)";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23 256×192 WRX HRG + CHROMA81 (1)";//startup 23
radioButton24.Text = "-startup=24 256×192 WRX HRG + CHROMA81 (2)";//startup 24
radioButton25.Text = "-startup=25 256×64 WRX HRG + CHROMA81 (1)";//startup 25
radioButton26.Text = "-startup=26 256×64 WRX HRG + CHROMA81 (2)";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31 used for Games with no need for Terminal";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
}
#endregion
/*
radioButton0.Enabled = true;
radioButton1.Enabled = false;
radioButton2.Enabled = false;//startup 2
radioButton3.Enabled = false;//startup 3
radioButton4.Enabled = false;
radioButton5.Enabled = false;
radioButton6.Enabled = false;//startup 6
radioButton7.Enabled = false;//startup 7
radioButton8.Enabled = false;
radioButton9.Enabled = false;
radioButton10.Enabled = false;//startup 10
radioButton11.Enabled = false;//startup 11
radioButton12.Enabled = false;//startup 12
radioButton13.Enabled = false;
radioButton14.Enabled = false;
radioButton15.Enabled = false;
radioButton16.Enabled = false;
radioButton17.Enabled = false;
radioButton18.Enabled = false;//startup 18
radioButton19.Enabled = false;//startup 19
radioButton20.Enabled = false;//startup 20
radioButton21.Enabled = false;//startup 21
radioButton22.Enabled = false;//startup 22
radioButton23.Enabled = false;
radioButton24.Enabled = false;
radioButton25.Enabled = false;
radioButton26.Enabled = false;
radioButton27.Enabled = false;//startup 27
radioButton28.Enabled = false;//startup 28
radioButton29.Enabled = false;//startup 29
radioButton30.Enabled = false;//startup 30
radioButton31.Enabled = false;
radioButton32.Enabled = false;
radioButton33.Enabled = false;
radioButton34.Enabled = false;
radioButton35.Enabled = false;
radioButton36.Enabled = false;
radioButton37.Enabled = false;
radioButton38.Enabled = false;
radioButton39.Enabled = false;
radioButton40.Enabled = false;
radioButton41.Enabled = false;
radioButton63.Enabled = false;
radioButton0.Text = "-startup=0";//startup 0
radioButton1.Text = "-startup=1";//startup 1
radioButton2.Text = "-startup=2";//startup 2
radioButton3.Text = "-startup=3";//startup 3
radioButton4.Text = "-startup=4";//startup 4
radioButton5.Text = "-startup=5";//startup 5
radioButton6.Text = "-startup=6";//startup 6
radioButton7.Text = "-startup=7";//startup 7
radioButton8.Text = "-startup=8";//startup 8
radioButton9.Text = "-startup=9";//startup 9
radioButton10.Text = "-startup=10";//startup 10
radioButton11.Text = "-startup=11";//startup 11
radioButton12.Text = "-startup=12";//startup 12
radioButton13.Text = "-startup=13";//startup 13
radioButton14.Text = "-startup=14";//startup 14
radioButton15.Text = "-startup=15";//startup 15
radioButton16.Text = "-startup=16";//startup 16
radioButton17.Text = "-startup=17";//startup 17
radioButton18.Text = "-startup=18";//startup 18
radioButton19.Text = "-startup=19";//startup 19
radioButton20.Text = "-startup=20";//startup 20
radioButton21.Text = "-startup=21";//startup 21
radioButton22.Text = "-startup=22";//startup 22
radioButton23.Text = "-startup=23";//startup 23
radioButton24.Text = "-startup=24";//startup 24
radioButton25.Text = "-startup=25";//startup 25
radioButton26.Text = "-startup=26";//startup 26
radioButton27.Text = "-startup=27";//startup 27
radioButton28.Text = "-startup=28";//startup 28
radioButton29.Text = "-startup=29";//startup 29
radioButton30.Text = "-startup=30";//startup 30
radioButton31.Text = "-startup=31";//startup 31
radioButton32.Text = "-startup=32";//startup 32
radioButton33.Text = "-startup=33";//startup 33
radioButton34.Text = "-startup=34";//startup 34
radioButton35.Text = "-startup=35";//startup 35
radioButton36.Text = "-startup=36";//startup 36
radioButton37.Text = "-startup=37";//startup 37
radioButton38.Text = "-startup=38";//startup 38
radioButton39.Text = "-startup=39";//startup 39
radioButton40.Text = "-startup=40";//startup 40
radioButton41.Text = "-startup=41";//startup 41
radioButton63.Text = "-startup=63";//startup 63
*/
#endregion
}
private void enableOptions()
{
}
private void radioButton0_CheckedChanged(object sender, EventArgs e)
{
if (radioButton0.Checked)
{
string startup = "-startup=0 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton0.Checked == false)
{
string startup = "-startup=0 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
if (radioButton1.Checked)
{
string startup = "-startup=1 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton1.Checked == false)
{
string startup = "-startup=1 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton2_CheckedChanged(object sender, EventArgs e)
{
if (radioButton2.Checked)
{
string startup = "-startup=2 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton2.Checked == false)
{
string startup = "-startup=2 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton3_CheckedChanged(object sender, EventArgs e)
{
if (radioButton3.Checked)
{
string startup = "-startup=3 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton3.Checked == false)
{
string startup = "-startup=3 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton4_CheckedChanged(object sender, EventArgs e)
{
if (radioButton4.Checked)
{
string startup = "-startup=4 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton4.Checked == false)
{
string startup = "-startup=4 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton5_CheckedChanged(object sender, EventArgs e)
{
if (radioButton5.Checked)
{
string startup = "-startup=5 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton5.Checked == false)
{
string startup = "-startup=5 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton6_CheckedChanged(object sender, EventArgs e)
{
if (radioButton6.Checked)
{
string startup = "-startup=6 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton6.Checked == false)
{
string startup = "-startup=6 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton7_CheckedChanged(object sender, EventArgs e)
{
if (radioButton7.Checked)
{
string startup = "-startup=7 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton7.Checked == false)
{
string startup = "-startup=7 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton8_CheckedChanged(object sender, EventArgs e)
{
if (radioButton8.Checked)
{
string startup = "-startup=8 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton8.Checked == false)
{
string startup = "-startup=8 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton9_CheckedChanged(object sender, EventArgs e)
{
if (radioButton9.Checked)
{
string startup = "-startup=9 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton9.Checked == false)
{
string startup = "-startup=9 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton10_CheckedChanged(object sender, EventArgs e)
{
if (radioButton10.Checked)
{
string startup = "-startup=10 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton10.Checked == false)
{
string startup = "-startup=10 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton11_CheckedChanged(object sender, EventArgs e)
{
if (radioButton11.Checked)
{
string startup = "-startup=11 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton11.Checked == false)
{
string startup = "-startup=11 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton12_CheckedChanged(object sender, EventArgs e)
{
if (radioButton12.Checked)
{
string startup = "-startup=12 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton12.Checked == false)
{
string startup = "-startup=12 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton13_CheckedChanged(object sender, EventArgs e)
{
if (radioButton13.Checked)
{
string startup = "-startup=13 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton13.Checked == false)
{
string startup = "-startup=13 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton14_CheckedChanged(object sender, EventArgs e)
{
if (radioButton14.Checked)
{
string startup = "-startup=14 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton14.Checked == false)
{
string startup = "-startup=14 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton15_CheckedChanged(object sender, EventArgs e)
{
if (radioButton15.Checked)
{
string startup = "-startup=15 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton15.Checked == false)
{
string startup = "-startup=15 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton16_CheckedChanged(object sender, EventArgs e)
{
if (radioButton16.Checked)
{
string startup = "-startup=16 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton16.Checked == false)
{
string startup = "-startup=16 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton17_CheckedChanged(object sender, EventArgs e)
{
if (radioButton17.Checked)
{
string startup = "-startup=17 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton17.Checked == false)
{
string startup = "-startup=17 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton18_CheckedChanged(object sender, EventArgs e)
{
if (radioButton18.Checked)
{
string startup = "-startup=18 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton18.Checked == false)
{
string startup = "-startup=18 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton19_CheckedChanged(object sender, EventArgs e)
{
if (radioButton19.Checked)
{
string startup = "-startup=19 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton19.Checked == false)
{
string startup = "-startup=19 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton20_CheckedChanged(object sender, EventArgs e)
{
if (radioButton20.Checked)
{
string startup = "-startup=20 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton20.Checked == false)
{
string startup = "-startup=20 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton21_CheckedChanged(object sender, EventArgs e)
{
if (radioButton21.Checked)
{
string startup = "-startup=21 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton21.Checked == false)
{
string startup = "-startup=21 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton22_CheckedChanged(object sender, EventArgs e)
{
if (radioButton22.Checked)
{
string startup = "-startup=22 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton22.Checked == false)
{
string startup = "-startup=22 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton23_CheckedChanged(object sender, EventArgs e)
{
if (radioButton23.Checked)
{
string startup = "-startup=23 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton23.Checked == false)
{
string startup = "-startup=23 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton24_CheckedChanged(object sender, EventArgs e)
{
if (radioButton24.Checked)
{
string startup = "-startup=24 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton24.Checked == false)
{
string startup = "-startup=24 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton25_CheckedChanged(object sender, EventArgs e)
{
if (radioButton25.Checked)
{
string startup = "-startup=25 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton25.Checked == false)
{
string startup = "-startup=25 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton26_CheckedChanged(object sender, EventArgs e)
{
if (radioButton26.Checked)
{
string startup = "-startup=26 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton26.Checked == false)
{
string startup = "-startup=26 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton27_CheckedChanged(object sender, EventArgs e)
{
if (radioButton27.Checked)
{
string startup = "-startup=27 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton27.Checked == false)
{
string startup = "-startup=27 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton28_CheckedChanged(object sender, EventArgs e)
{
if (radioButton28.Checked)
{
string startup = "-startup=28 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton28.Checked == false)
{
string startup = "-startup=28 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton29_CheckedChanged(object sender, EventArgs e)
{
if (radioButton29.Checked)
{
string startup = "-startup=29 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton21.Checked == false)
{
string startup = "-startup=29 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton30_CheckedChanged(object sender, EventArgs e)
{
if (radioButton30.Checked)
{
string startup = "-startup=30 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton30.Checked == false)
{
string startup = "-startup=30 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton31_CheckedChanged(object sender, EventArgs e)
{
if (radioButton31.Checked)
{
string startup = "-startup=31 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton31.Checked == false)
{
string startup = "-startup=31 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton32_CheckedChanged(object sender, EventArgs e)
{
if (radioButton32.Checked)
{
string startup = "-startup=32 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton32.Checked == false)
{
string startup = "-startup=32 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton33_CheckedChanged(object sender, EventArgs e)
{
if (radioButton33.Checked)
{
string startup = "-startup=33 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton33.Checked == false)
{
string startup = "-startup=33 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton34_CheckedChanged(object sender, EventArgs e)
{
if (radioButton34.Checked)
{
string startup = "-startup=34 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton34.Checked == false)
{
string startup = "-startup=34 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton35_CheckedChanged(object sender, EventArgs e)
{
if (radioButton35.Checked)
{
string startup = "-startup=35 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton35.Checked == false)
{
string startup = "-startup=35 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton36_CheckedChanged(object sender, EventArgs e)
{
if (radioButton36.Checked)
{
string startup = "-startup=36 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton36.Checked == false)
{
string startup = "-startup=36 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton37_CheckedChanged(object sender, EventArgs e)
{
if (radioButton37.Checked)
{
string startup = "-startup=37 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton37.Checked == false)
{
string startup = "-startup=37 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton38_CheckedChanged(object sender, EventArgs e)
{
if (radioButton38.Checked)
{
string startup = "-startup=38 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton38.Checked == false)
{
string startup = "-startup=38 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton39_CheckedChanged(object sender, EventArgs e)
{
if (radioButton39.Checked)
{
string startup = "-startup=39 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton39.Checked == false)
{
string startup = "-startup=39 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton40_CheckedChanged(object sender, EventArgs e)
{
if (radioButton40.Checked)
{
string startup = "-startup=40 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton40.Checked == false)
{
string startup = "-startup=40 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton41_CheckedChanged(object sender, EventArgs e)
{
if (radioButton41.Checked)
{
string startup = "-startup=41 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton41.Checked == false)
{
string startup = "-startup=41 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButton63_CheckedChanged(object sender, EventArgs e)
{
if (radioButton63.Checked)
{
string startup = "-startup=63 ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButton63.Checked == false)
{
string startup = "-startup=63 ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void radioButtonNone_CheckedChanged(object sender, EventArgs e)
{
if (radioButtonNone.Checked)
{
string startup = "";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
else if (radioButtonNone.Checked == false)
{
string startup = "";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
}
private void enterYourOwn_CheckedChanged(object sender, EventArgs e)
{
if (enterYourOwn.Checked)
{
textBox2.Enabled = true;
enter_your_own_startup.Enabled = true;
}
else if (enterYourOwn.Checked == false)
{
string startup = "-startup=" + startUP_Value.ToString() + " ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
textBox2.Enabled = false;
remove_your_own_startup.Enabled = false;
enter_your_own_startup.Enabled = false;
}
}
private void textBox2_TextChanged(object sender, EventArgs e)
{
int temp;
if (!int.TryParse(textBox2.Text, out temp))//check to see if letters
{
if (textBox2.TextLength > 0)
{
textBox2.Text = textBox2.Text.Substring(0, textBox2.Text.Length - 1);
textBox2.Focus();
textBox2.SelectionStart = textBox2.Text.Length;
}
}
//if (int.Parse(textBox3.Text, out number))
if (int.TryParse(textBox2.Text, out temp))
{
if (temp > 99)
{
//too high
MessageBox.Show("too high");
temp = 65535;
//textBox2.Text = "99";
textBox2.Focus();
textBox2.SelectionStart = textBox2.Text.Length;
}
if (temp < 0)
{
//too low
MessageBox.Show("too low");
temp = 0;
//textBox2.Text = "0";
//textBox2.Focus();
//textBox2.SelectionStart = textBox2.Text.Length;
}
else
{
// just right
temp = int.Parse(textBox2.Text);
//textBox2.Text = textBox3.Text;
startUP_Value = temp;
}
}
}
private void enter_your_own_startup_Click(object sender, EventArgs e)
{
//MessageBox.Show("startup=" + startUP_Value.ToString());
textBox2.Enabled = false;
enter_your_own_startup.Enabled = false;
remove_your_own_startup.Enabled = true;
string startup = "-startup=" + startUP_Value.ToString() + " ";
ListOptions.Add(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
private void remove_your_own_startup_Click(object sender, EventArgs e)
{
textBox2.Enabled = true;
enter_your_own_startup.Enabled = true;
remove_your_own_startup.Enabled = false;
string startup = "-startup=" + startUP_Value.ToString() + " ";
ListOptions.Remove(startup);
string startupOption = string.Join("", ListOptions.ToArray());
textBox1.Text = startupOption;
}
private void button4_Click(object sender, EventArgs e)
{
zccvariables.restartForm1 = true;
Form1 startOver = (Form1)Application.OpenForms["Form1"];
startOver.Show();
this.Close();
}
private void button3_Click(object sender, EventArgs e)
{
if (zccvariables.mainMenuChoice == 3)
{
//List_wizard
zccvariables.terminalOptions = true;
List_wizard frm = new List_wizard(textBox1.Text);
frm.Show();
this.Close();
}
else
{
Preprocessor frm = new Preprocessor(textBox1.Text);
frm.Show();
this.Close();
//Preprocessor
}
}
}
}
|
using System.Collections.Generic;
using System.Linq;
using iSukces.Code.Interfaces;
namespace iSukces.Code.Typescript
{
public abstract class TsNamespaceMember : ITsCodeProvider, ITsIntroducedItem
{
public TsDecorator AddDecorator(string name)
{
var dec = new TsDecorator(name);
Decorators.Add(dec);
return dec;
}
public abstract void WriteCodeTo(ITsCodeWriter writer);
public string Name { get; set; }
public bool IsExported { get; set; }
public List<TsDecorator> Decorators { get; } = new List<TsDecorator>();
public ITsCodeProvider Introduction { get; set; }
public string CommentAbove { get; set; }
protected void WriteCommonHeaderCode(ITsCodeWriter writer)
{
if (!string.IsNullOrEmpty(CommentAbove))
{
var lines = CommentAbove.Replace("\r\n", "\n").Split('\n');
if (lines.Length == 1)
writer.WriteLine("// " + lines[0]);
else
{
writer.WriteLine("/*");
foreach (var i in lines)
writer.WriteLine(i);
writer.WriteLine("*/");
}
}
Introduction?.WriteCodeTo(writer);
if (Decorators != null && Decorators.Any())
foreach (var i in Decorators)
i.WriteCodeTo(writer);
}
}
public static class TsClassOrEnumExtensions
{
public static T WithIsExported<T>(this T self, bool isExported = true) where T : TsNamespaceMember
{
self.IsExported = isExported;
return self;
}
}
} |
using MediatR;
using Microsoft.Extensions.Logging;
using MikeGrayCodes.Ordering.Domain.Entities.Buyers;
using MikeGrayCodes.Ordering.Domain.Entities.Orders;
using MikeGrayCodes.Ordering.Domain.Entities.Orders.Events;
using System;
using System.Threading;
using System.Threading.Tasks;
namespace MikeGrayCodes.Ordering.Application.Application.DomainEventHandlers.OrderShipped
{
public class OrderShippedDomainEventHandler : INotificationHandler<OrderShippedDomainEvent>
{
private readonly IOrderRepository orderRepository;
private readonly IBuyerRepository buyerRepository;
//private readonly IOrderingIntegrationEventService _orderingIntegrationEventService;
private readonly ILoggerFactory logger;
public OrderShippedDomainEventHandler(
IOrderRepository orderRepository,
ILoggerFactory logger,
IBuyerRepository buyerRepository//,
/*IOrderingIntegrationEventService orderingIntegrationEventService*/)
{
this.orderRepository = orderRepository ?? throw new ArgumentNullException(nameof(orderRepository));
this.logger = logger ?? throw new ArgumentNullException(nameof(logger));
this.buyerRepository = buyerRepository ?? throw new ArgumentNullException(nameof(buyerRepository));
//_orderingIntegrationEventService = orderingIntegrationEventService;
}
public async Task Handle(OrderShippedDomainEvent orderShippedDomainEvent, CancellationToken cancellationToken)
{
logger.CreateLogger<OrderShippedDomainEvent>()
.LogTrace("Order with Id: {OrderId} has been successfully updated to status {Status} ({Id})",
orderShippedDomainEvent.Order.Id, nameof(OrderStatus.Shipped), OrderStatus.Shipped.Id);
var order = await orderRepository.GetAsync(orderShippedDomainEvent.Order.Id);
var buyer = await buyerRepository.FindByIdAsync(order.GetBuyerId.Value.ToString());
//var orderStatusChangedToShippedIntegrationEvent = new OrderStatusChangedToShippedIntegrationEvent(order.Id, order.OrderStatus.Name, buyer.Name);
//await _orderingIntegrationEventService.AddAndSaveEventAsync(orderStatusChangedToShippedIntegrationEvent);
}
}
}
|
using System.ComponentModel.DataAnnotations;
using Alabo.Validations;
namespace Alabo.Industry.Shop.Orders.ViewModels
{
public class ViewCartProduct
{
/// <summary>
/// 属性值ID
/// </summary>
public long Id { get; set; }
/// <summary>
/// 商品 Guid
/// </summary>
public long ProductId { get; set; }
/// <summary>
/// SkuId
/// </summary>
public long ProductSkuId { get; set; }
/// <summary>
/// 商品数量
/// </summary>
[Display(Name = "商品数量")]
[Required(ErrorMessage = ErrorMessage.NameNotAllowEmpty)]
public long Count { get; set; }
}
} |
using AFPABNB.Dao;
using AFPABNB.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace AFPABNB
{
public partial class ListeHebergements : System.Web.UI.Page
{
private List<Hebergement> hebergements;
private List<Hebergement> detail;
protected void Page_Load(object sender, EventArgs e)
{
//string ddlDepartement = "";
//string ddlTypeHebergement = "";
//if (Page.PreviousPage != null)
//{
// DropDownList ddlHebergement = <DropDownList> PreviousPage.FindControl("ddlDepartement");
// DropDownList ddlTypeHebergement = <DropDownList> PreviousPage.FindControl("ddlTypeHebergement");
// if (ddlDepartement != null && string isNullOrEmpty(ddlDepartement.SelectedValue))
// ddlDepartement = ddlDepartement.SelectedValue;
// if (ddlTypeHebergement != null && string isNullOrEmpty(ddlTypeHebergement.SelectedValue){
// ddlTypeHebergement = ddlTypeHebergement.SelectValue;
// }
//}
this.hebergements = this.loadHebergements();
if (!IsPostBack)
{
this.lvwArticle.DataSource = this.hebergements;
this.lvwArticle.DataBind();
}
}
private List<Hebergement> loadHebergements()
{
DaoHebergement daoHebergement = new DaoHebergement();
return daoHebergement.GetHebergements();
}
protected void lvwArticle_PagePropertiesChanging(object sender, PagePropertiesChangingEventArgs e)
{
this.dtpArticle.SetPageProperties(e.StartRowIndex, e.MaximumRows, false);
this.lvwArticle.DataSource = this.hebergements;
this.lvwArticle.DataBind();
}
protected void Favoris_Click(object sender, EventArgs e)
{
Client client = (Client)Session["Client"];
int idhebergement = Convert.ToInt32(((Button)sender).CommandArgument);
DaoFavoris daoFavoris = new DaoFavoris();
List<Hebergement> mesFavoris = daoFavoris.GetFavoris(client.IdClient, 1);
if (mesFavoris != null)
{
bool existe = false;
foreach (Hebergement item in mesFavoris)
{
if (item.IdHebergement == idhebergement)
{
existe = true;
/*have*/
break; //have kitkat
}
}
if (!existe)
{
daoFavoris.createFavoris(client.IdClient, idhebergement, 2);
}
}
else
{
daoFavoris.createFavoris(client.IdClient, idhebergement, 2);
}
Response.Redirect("/EspaceClient/Favoris.aspx");
}
protected void Reserver_Click(object sender, EventArgs e)
{
Client client = (Client)Session["Client"];
int idhebergement = Convert.ToInt32(((Button)sender).CommandArgument);
DaoReservation daoReservation = new DaoReservation();
List<Hebergement> mesReservations = daoReservation.GetReservation(client.IdClient, 1);
if (mesReservations != null)
{
bool existe = false;
foreach (Hebergement item in mesReservations)
{
if (item.IdHebergement == idhebergement)
{
existe = true;
/*have*/
break; //have kitkat
}
}
if (!existe)
{
daoReservation.createReservation(client.IdClient, idhebergement, 2);
}
}
else
{
daoReservation.createReservation(client.IdClient, idhebergement, 2);
}
Response.Redirect("/EspaceClient/Reservation.aspx");
}
protected void Detail_Click(object sender, EventArgs e)
{
int idhebergement = Convert.ToInt32(((LinkButton)sender).CommandArgument);
Hebergement hebergement = null;
foreach (Hebergement item in this.hebergements)
{
if (item.IdHebergement == idhebergement)
{
hebergement = item;
/*have*/
break; //have kitkat
}
}
if (Session["Detail"] != null)
{
this.detail = (List<Hebergement>)Session["Detail"];
foreach (Hebergement item in this.detail)
{
if (item.IdHebergement == hebergement.IdHebergement)
{
Response.Redirect("DetailHebergement.aspx");
}
else
{
this.detail = (List<Hebergement>)Session["Detail"];
}
}
}
else
{
this.detail = new List<Hebergement>();
}
this.detail.Add(hebergement);
Session["Detail"] = this.detail;
Response.Redirect("DetailHebergement.aspx");
}
}
} |
namespace MultipleLanguageRegression.Models
{
public static class Flag
{
static bool _flag;
public static bool FlagValue
{
get
{
return _flag;
}
set
{
_flag = value;
}
}
}
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TextToHTML.ModelBuilders;
using TextToHTML.Models;
namespace TextToHTML
{
public class RawDocumentChunker
{
/// <summary>
/// Takes a raw user-created document (represented as an enumerable of strings)
/// and divides it into paragraph, header and list sections.
/// </summary>
/// <param name="document"></param>
/// <returns></returns>
public static RawChunkedDocument Build(IEnumerable<string> document)
{
var result = new List<RawChunk>();
var currentChunk = new RawChunk();
foreach(var line in document)
{
if (LineTyper.IsEmpty(line))
{
AddCurrentChunkIfNotEmpty(result, currentChunk);
currentChunk = new RawChunk();
}
else if (LineTyper.IsHeaderDivider(line))
{
if (currentChunk.Tag == "p")
{
currentChunk.Tag = "h1";
}
AddCurrentChunkIfNotEmpty(result, currentChunk);
currentChunk = new RawChunk();
}
else
{
if (!RawChunkBuilder.CanContain(currentChunk, line))
{
AddCurrentChunkIfNotEmpty(result, currentChunk);
currentChunk = new RawChunk();
}
RawChunkBuilder.Add(currentChunk, line);
RawChunkBuilder.SetTagImplicitly(currentChunk);
}
}
AddCurrentChunkIfNotEmpty(result, currentChunk);
return new RawChunkedDocument() {Chunks = result};
}
private static void AddCurrentChunkIfNotEmpty(List<RawChunk> result, RawChunk currentChunk)
{
if (!currentChunk.IsEmpty())
{
result.Add(currentChunk);
}
}
}
}
|
using UnityEngine;
namespace Thesis {
public class DoublePeakRoof : Roof
{
private enum _Type { four, five }
private _Type _type;
private float _widthBig;
private float _widthSmall;
private float _heightBig;
private float _heightSmall;
public DoublePeakRoof (BuildingMesh parent)
: base(parent)
{
width = 0.2f;
boundaries = new Vector3[6];
for (int i = 0; i < 4; ++i)
boundaries[i] = parentMesh.roofBase.boundaries[i + 4]+
width * parentMesh.faces[i].normal +
width * parentMesh.faces[(i + 3) % 4].normal;
FindMeshOrigin(boundaries[0], boundaries[2],
boundaries[1], boundaries[3]);
int index = Mathf.Max(parentMesh.sortedFaces[2], parentMesh.sortedFaces[3]);
Face face = parentMesh.faces[index];
height = 0.2f * face.width;
var bi0 = (parentMesh.faces[(index + 3) % 4].right - face.right).normalized;
var bi1 = (face.right - parentMesh.faces[(index + 1) % 4].right).normalized;
var p = Util.IntersectionPoint(face.boundaries[0], bi0, face.boundaries[1], bi1);
boundaries[4] = new Vector3(p.x,
boundaries[0].y + height,
p.z);
index = Mathf.Min(parentMesh.sortedFaces[2], parentMesh.sortedFaces[3]);
face = parentMesh.faces[index];
bi0 = (parentMesh.faces[(index + 3) % 4].right - face.right).normalized;
bi1 = (face.right - parentMesh.faces[(index + 1) % 4].right).normalized;
p = Util.IntersectionPoint(face.boundaries[0], bi0, face.boundaries[1], bi1);
boundaries[5] = new Vector3(p.x,
boundaries[0].y + height,
p.z);
if ((boundaries[0] - boundaries[4]).magnitude <
(boundaries[0] - boundaries[5]).magnitude)
{
_type = _Type.four;
_widthBig = (boundaries[0] - boundaries[1]).magnitude;
_widthSmall = (boundaries[1] - boundaries[2]).magnitude;
_heightSmall = ((boundaries[1] + boundaries[2]) / 2 - boundaries[5]).magnitude;
}
else
{
_type = _Type.five;
_widthBig = (boundaries[1] - boundaries[2]).magnitude;
_widthSmall = (boundaries[1] - boundaries[0]).magnitude;
_heightSmall = ((boundaries[1] + boundaries[0]) / 2 - boundaries[5]).magnitude;
}
_heightBig = Mathf.Sqrt(Mathf.Pow(_widthSmall / 2, 2) +
Mathf.Pow(height, 2));
}
public override void FindVertices()
{
vertices = new Vector3[boundaries.Length * 4];
for (int i = 0; i < 4; ++i)
System.Array.Copy(boundaries, 0, vertices, i * boundaries.Length, boundaries.Length);
}
public override void FindTriangles()
{
triangles = new int[24];
int i = 0;
if (_type == _Type.five)
{
triangles[i++] = 0;
triangles[i++] = 1;
triangles[i++] = 5;
triangles[i++] = 2;
triangles[i++] = 3;
triangles[i++] = 4;
// +6
triangles[i++] = 7;
triangles[i++] = 8;
triangles[i++] = 11;
triangles[i++] = 8;
triangles[i++] = 10;
triangles[i++] = 11;
// +12
triangles[i++] = 12;
triangles[i++] = 17;
triangles[i++] = 16;
triangles[i++] = 12;
triangles[i++] = 16;
triangles[i++] = 15;
}
else
{
triangles[i++] = 1;
triangles[i++] = 2;
triangles[i++] = 5;
triangles[i++] = 0;
triangles[i++] = 4;
triangles[i++] = 3;
// +6
triangles[i++] = 6;
triangles[i++] = 7;
triangles[i++] = 11;
triangles[i++] = 6;
triangles[i++] = 11;
triangles[i++] = 10;
// +12
triangles[i++] = 14;
triangles[i++] = 15;
triangles[i++] = 16;
triangles[i++] = 14;
triangles[i++] = 16;
triangles[i++] = 17;
}
// +18
triangles[i++] = 18;
triangles[i++] = 21;
triangles[i++] = 20;
triangles[i++] = 18;
triangles[i++] = 20;
triangles[i++] = 19;
}
public override void Draw()
{
base.Draw();
var uvs = new Vector2[mesh.vertices.Length];
float _wdiv = material.mainTexture.width / 128f;
float _hdiv = material.mainTexture.height / 128f;
float htimes = _widthSmall / _wdiv;
float vtimes = _heightSmall / _hdiv;
uvs[1] = new Vector2(0f, 0f);
uvs[0] = new Vector2(htimes, 0f);
uvs[5] = new Vector2(htimes / 2, vtimes);
uvs[3] = new Vector2(0f, 0f);
uvs[2] = new Vector2(htimes, 0f);
uvs[4] = new Vector2(htimes / 2, vtimes);
htimes = _widthBig / _wdiv;
vtimes = _heightBig / _hdiv;
var _dist45 = (boundaries[4] - boundaries[5]).magnitude;
var tmp = ((_widthBig - _dist45) / 2) / _wdiv;
uvs[8] = new Vector2(0f, 0f);
uvs[7] = new Vector2(htimes, 0f);
uvs[10] = new Vector2(tmp, vtimes);
uvs[11] = new Vector2(htimes - tmp, vtimes);
uvs[12] = new Vector2(0f, 0f);
uvs[15] = new Vector2(htimes, 0f);
uvs[17] = new Vector2(tmp, vtimes);
uvs[16] = new Vector2(htimes - tmp, vtimes);
mesh.uv = uvs;
}
}
} // namespace Thesis |
using Abp.Authorization.Users;
namespace Abp.Zero.EntityFramework.Repositories
{
public class UserLoginRepository : AbpZeroEfRepositoryBase<UserLogin, long>, IUserLoginRepository
{
}
} |
using CarManageSystem.Extension;
using CarManageSystem.Model;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
using System.Web;
namespace CarManageSystem.helper
{
public class GPSService
{
static string fence = System.Configuration.ConfigurationManager.ConnectionStrings["fence"].ConnectionString;
static string ak= System.Configuration.ConfigurationManager.ConnectionStrings["baiduMapAK"].ConnectionString;
static AsyncTCPServer ats;
static List<CarConnect> carConnList = new List<CarConnect>();
public GPSService(string ip,int port)
{
try
{
//先从数据库读出保存的状态
using (cmsdbEntities cms = new cmsdbEntities())
{
//用车内存表
MyGlobal.carsList.Clear();
var carLists = cms.carlist.ToList();
carLists.ForEach(x =>
{
MyGlobal.carsList.Add(new Car()
{
id=x.id,
state=(int)x.state,
isillegal=(int)x.isillegal,
userName=x.userName,
position= new Position()
{
x=(double)x.x,
y=(double)x.y
}
});
});
//非法用用车内存表
MyGlobal.illegalUseList.Clear();
var illegalUses = cms.illegalusecar.Where(s => s.State == 1).ToList();
illegalUses.ForEach(x =>
{
MyGlobal.illegalUseList.Add(new illegalusecar()
{
CarNumber=x.CarNumber,
State=x.State,
id = x.id,
Time =x.Time,
IsLook =x.IsLook,
DIsLook = x.DIsLook,
redpoint = x.redpoint,
Dredpoint = x.Dredpoint
});
});
cms.Dispose();
}
ats = new AsyncTCPServer(IPAddress.Any, port);
ats.DataReceived += Ats_DataReceived;
ats.ClientConnected += Ats_ClientConnected;
ats.ClientDisconnected += Ats_ClientDisconnected;
ats.NetError += Ats_NetError;
ats.OtherException += Ats_OtherException;
}
catch(Exception ex)
{
Debug.WriteLine(ex.Message);
return;
}
}
/// <summary>
/// 网络错误事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private static void Ats_NetError(object sender, AsyncEventArgs e)
{
Debug.WriteLine("网络错误事件"+e._msg);
return;
}
/// <summary>
/// 异常事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private static void Ats_OtherException(object sender,AsyncEventArgs e)
{
Debug.WriteLine("异常事件"+e._msg);
return;
}
//断开事件
private static void Ats_ClientDisconnected(object sender, AsyncEventArgs e)
{
try
{
Debug.WriteLine("已断开");
//carConnList.FirstOrDefault(s => s.tcpClientState == e._state).timer.Dispose();
var car = carConnList.FirstOrDefault(s => s.tcpClientState == e._state);
//var dataCar=MyGlobal.carsList.FirstOrDefault(s => s.id == car.id);
//dataCar.state = 0;
carConnList.Remove(car);
}
catch(Exception ex)
{
Debug.WriteLine(ex.Message);
return;
}
}
//连接事件
private static void Ats_ClientConnected(object sender, AsyncEventArgs e)
{
try
{
Debug.WriteLine("有新连接");
//Timer t = new Timer((o) =>
//{
// ats.Send(e._state.TcpClient, heartDate);
//}, null, 1, 1000);
carConnList.Add(new CarConnect() { id = "", tcpClientState = e._state });
}
catch(Exception ex )
{
Debug.WriteLine(ex.Message);
return;
}
}
//数据接收事件
private static void Ats_DataReceived(object sender, AsyncEventArgs e)
{
try
{
//传输过来的GPS数据格式 GPS|898600690117f0111523|3954.0711|11618.8139|085405.000
var str = Encoding.UTF8.GetString(e._buff);
var strs = str.Split('|');
switch (strs[0])
{
case "login": //暂时不用了
//判断是不是系统内的车,不是就强制断开。 (userError| TRUE FALSE)
var carId = strs[1];
var pwd = strs[2];
using (cmsdbEntities cms = new cmsdbEntities())
{
var car = cms.carinfo.FirstOrDefault(s => s.CarNumber == carId && s.CarPassword == pwd);
if (car == null)
{
ats.Close(e._state);
return;
}
//var carconn=carConnList.FirstOrDefault(s => s.tcpClientState == e._state);
//carconn.id = strs[1];
//carconn.user = car.CurrentUser;
//carconn.carState = Convert.ToInt16(car.CarState);
//carconn.uniqueCode = cms.borrowregister
// .Join(cms.returnregister, b => b.UniqueCode, r => r.UniqueCode, (b, r) => new { b, r })
// .FirstOrDefault(r => string.IsNullOrEmpty(r.r.UniqueCode)).b.UniqueCode;
//ats.Send(e._state.TcpClient, successStr);
//Debug.WriteLine("车辆登录\t" + "id:" + strs[1] + "\tpwd:" + strs[2]);
cms.Dispose();
}
break;
case "start": //暂时不用了
//车辆启动 暂时好像没什么作用
using (cmsdbEntities cms=new cmsdbEntities())
{
var car = cms.carinfo.FirstOrDefault(c => c.CarNumber == strs[1]);
if (car.CarState == 1)
{
car.CarState = 2;
}
cms.SaveChanges();
cms.Dispose();
}
break;
case "GPS":
//接收gps 存到数组
//开车 停车 都得经过 这个判断了。
//ats.Send(e._state.TcpClient, successStr);
using (cmsdbEntities cms = new cmsdbEntities())
{
string temp = Convert.ToString(strs[1]);
var car = cms.carinfo.FirstOrDefault(s=>s.SimId== temp);
if(car==null)
{
return;
}
var id = car.CarNumber;
if(strs[2]=="0"&&strs[3]=="0")
{
return;
}
var y = Convert.ToDouble(strs[2]);
var x = Convert.ToDouble(strs[3]);
Debug.WriteLine("GPS信号\t" + "x:" + x + "\ty:" + y);
//补齐连接信息
var carconn = carConnList.FirstOrDefault(s => s.tcpClientState == e._state && string.IsNullOrEmpty(s.id));
if (carconn != null)
{
if(string.IsNullOrEmpty(carconn.id))
{
carconn.id = id;
carconn.user = car.CurrentUser;
carconn.carState = Convert.ToInt16(car.CarState);
carconn.uniqueCode = cms.borrowregister.Where(s => s.CarNumber == car.CarNumber && s.BorrowState == 1)
.LeftJoin(cms.returnregister, b => b.UniqueCode, r => r.UniqueCode, (b, r) => new { b, r })
.FirstOrDefault(r => string.IsNullOrEmpty(r.r.UniqueCode)).b.UniqueCode;
}
}
//根据百度接口 处理数据为百度地图坐标
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(string.Format("http://api.map.baidu.com/geoconv/v1/?coords={0},{1}&from=1&to=5&ak={2}", x, y,ak));
request.Method = "GET";
StateObject stateObj = new StateObject();
stateObj.id = id;
stateObj.request = request;
request.BeginGetResponse(new AsyncCallback(RequestStreamCallBack), stateObj);
cms.Dispose();
break;
}
default:
break;
}
Debug.WriteLine("发送过来了" + str);
}
catch (Exception exc)
{
//var bytes = Encoding.UTF8.GetBytes("error|" + exc.Message);
//ats.Send(e._state.TcpClient, bytes);
Debug.WriteLine(exc.Message);
return;
}
}
public static void RequestStreamCallBack(IAsyncResult asynchronousResult)
{
try
{
var stateObj = (StateObject)asynchronousResult.AsyncState;
var request = stateObj.request;
var response = (HttpWebResponse)request.EndGetResponse(asynchronousResult);
using (var streamReader = new StreamReader(response.GetResponseStream()))
{
var resultString = streamReader.ReadToEnd();
var obj = JsonConvert.DeserializeObject<dynamic>(resultString);
if (obj.status != 0)
{
return;
}
double x = obj.result[0].x;
double y = obj.result[0].y;
var id = stateObj.id;
//如果车的连接集合里有此车,就往数据集合里保存数据,数据集合里没有此车 就创建。
var tempcar = carConnList.FirstOrDefault(s => s.id == id);
if (tempcar != null)
{
var carinfo = MyGlobal.carsList.FirstOrDefault(s => s.id == id);
if (carinfo == null)
{
var tempnewCar = new Car()
{
id = id,
state = 1,
position = new Position()
{
x = x,
y = y
},
isillegal = tempcar.carState,
userName = GetUser(tempcar.id)
};
lock (MyGlobal.carsList)
{
MyGlobal.carsList.Add(tempnewCar);
}
//存到数据库里
using (cmsdbEntities cms = new cmsdbEntities())
{
var carListItem = new carlist()
{
id = tempnewCar.id,
state = tempnewCar.state,
isillegal = tempnewCar.isillegal,
userName = tempnewCar.userName,
x = tempnewCar.position.x,
y = tempnewCar.position.y
};
cms.carlist.Add(carListItem);
cms.SaveChanges();
cms.Dispose();
}
}
else
{
//判断gps点是否偏移,如果偏移就不记录了。
if(carinfo.position.x-x>0.01|| carinfo.position.x - x < -0.01||carinfo.position.y-y>0.01||carinfo.position.y-y<-0.01)
{
return;
}
carinfo.state = 1;
carinfo.position.x = x;
carinfo.position.y = y;
using (cmsdbEntities cms = new cmsdbEntities())
{
var tempCarItem = cms.carlist.FirstOrDefault(s => s.id == id);
if(tempCarItem!=null)
{
tempCarItem.state = 1;
tempCarItem.x = x;
tempCarItem.y = y;
}
cms.SaveChanges();
cms.Dispose();
}
}
if (tempcar.carState == 0)//空闲状态
{
var illcar = MyGlobal.illegalUseList.FirstOrDefault(s => s.CarNumber == id);
if (illcar == null)
{
//判断是否在围栏中,
if (!CheckHelper.IsInFence(x, y, fence))//出了围栏
{
//开始报警,发送手机短信之类的
Debug.WriteLine("报警");
using (cmsdbEntities cms = new cmsdbEntities())
{
//更改车辆状态 为不可用
var tempCar_ill = cms.carinfo.FirstOrDefault(s=>s.CarNumber==id);
if(tempCar_ill!=null)
{
tempCar_ill.CarState = 8;
cms.SaveChanges();
//车辆列表里车状态改为违法用车
var setIllCar = MyGlobal.carsList.FirstOrDefault(s => s.id == id);
if(setIllCar!=null)
{
setIllCar.isillegal = 8;
}
var setIllCarItem = cms.carlist.FirstOrDefault(s => s.id == id);
if(setIllCarItem!=null)
{
setIllCarItem.isillegal = 8;
}
cms.SaveChanges();
}
//更改内存车辆状态为非法用车
tempcar.carState = 8;
//记录警告
illegalusecar iuc = new illegalusecar()
{
id = Guid.NewGuid().ToString(),
Time = DateTime.Now,
CarNumber = tempcar.id,
State = 1,
IsLook = 0,
DIsLook = 0,
redpoint=0,
Dredpoint=0
};
cms.illegalusecar.Add(iuc);
cms.SaveChanges();
cms.Dispose();
lock (MyGlobal.illegalUseList)
{
MyGlobal.illegalUseList.Add(iuc);
}
}
}
}
//else
//{
// if (illcar.State == 1)
// {
// if (CheckHelper.IsInFence(x, y, fence))//进了围栏
// {
// lock (MyGlobal.illegalUseList)
// {
// MyGlobal.illegalUseList.Remove(illcar);
// }
// //var iucp = MyGlobal.carsList.FirstOrDefault(s => s.id == illcar.CarNumber);
// //if (iucp != null)
// //{
// // lock (MyGlobal.carsList)
// // {
// // MyGlobal.carsList.Remove(iucp);
// // }
// //}
// }
// }
//}
}
else if(tempcar.carState == 1) //已预约 改为外出
{
using (cmsdbEntities cms = new cmsdbEntities())
{
var thisCar = cms.carinfo.FirstOrDefault(s => s.CarNumber == id);
if (thisCar.CarState == 1)
{
thisCar.CarState = 2;
tempcar.carState = 2; //改为外出
var tempUser = cms.user.FirstOrDefault(s => s.Account == thisCar.CurrentUser);
tempUser.state = 1;
cms.SaveChanges();
cms.Dispose();
}
}
}
//存储 gps 数据到数据库
using (cmsdbEntities cms = new cmsdbEntities())
{
var traject = new trajectorylog()
{
CarNumber = tempcar.id,
User = string.IsNullOrEmpty(tempcar.user) ? null : tempcar.user,
Time = DateTime.Now,
Longitude = x,
Latitude = y,
UniqueCode = string.IsNullOrEmpty(tempcar.user) ? MyGlobal.illegalUseList.FirstOrDefault(s => s.CarNumber == tempcar.id).id : tempcar.uniqueCode,
guid = Guid.NewGuid().ToString()
};
cms.trajectorylog.Add(traject);
cms.SaveChanges();
cms.Dispose();
}
}
}
}
catch(Exception ex)
{
Debug.WriteLine(ex.Message);
return;
}
}
public void Start()
{
ats.Start();
}
public static string GetUser(string carNumber)
{
using (cmsdbEntities cms = new cmsdbEntities())
{
var car = cms.carinfo.FirstOrDefault(s => s.CarNumber == carNumber);
var user = cms.user.FirstOrDefault(s => s.Account == car.CurrentUser);
cms.Dispose();
//找不到用户,非法用车
if (user == null)
{
return "";
}
return user.RealName;
}
}
}
} |
using System;
using System.IO;
class LineNumbers
{
static void Main()
{
StreamReader reader = new StreamReader(@"..\..\..\text.txt");
StreamWriter writer = new StreamWriter(@"..\..\..\newtext.txt");
using (reader)
{
using (writer)
{
string strLine = reader.ReadLine();
int lineNumber = 0;
while (strLine != null)
{
lineNumber++;
writer.WriteLine("{0} {1}",lineNumber,strLine);
strLine = reader.ReadLine();
}
}
}
}
} |
using System;
using System.Data;
using System.Configuration;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;
/// <summary>
/// Summary description for Game
/// </summary>
public class Game
{
public const float DEFAULT_TIME = 600;
public Game()
{
//
// TODO: Add constructor logic here
//
}
//Fuction to insert game data into GameData table including(userid, date, unlockedLevel and timeofplay)
public static int insertGameData(int userId, DateTime datetim, int unlockedLevel, float timeofPlay)
{
int rowsAffected = 0;
using (SqlConnection connection = ConnectionManager.GetDatabaseConnection())
{
string insertQuery = "INSERT INTO GameData (UserID,Date,UnLockedLevel,TimeOfPlay) VALUES (@id, @date, @unlocklevel, @timeofplay)";
SqlCommand command = new SqlCommand(insertQuery, connection);
command.Parameters.Add("@id", SqlDbType.Int).Value = userId;
command.Parameters.Add("@date", SqlDbType.DateTime).Value = datetim;
command.Parameters.Add("@unlocklevel", SqlDbType.Int).Value = unlockedLevel;
command.Parameters.Add("@timeofplay", SqlDbType.Float).Value = timeofPlay;
rowsAffected = command.ExecuteNonQuery();
connection.Close();
}
return rowsAffected;
}
public static bool gameDayRecordExists(int userId)
{
bool found = false;
using (SqlConnection connection = ConnectionManager.GetDatabaseConnection())
{
var date = DateTime.Today;
string getLevel = "select UnLockedLevel from gamedata where[UserId] = @UserId and CAST([Date] AS DATE) = @Today";
SqlCommand command = new SqlCommand(getLevel, connection);
command.Parameters.Add(new SqlParameter("UserId", userId));
command.Parameters.Add(new SqlParameter("Today", DateTime.Today));
var levelObj = command.ExecuteScalar();
found = levelObj != null;
connection.Close();
}
return found;
}
//function to update the unlockedlevel in the GameDate table
//This function should get the date value only without the time
public static int updateUnlockedLevel(int userId, DateTime datetim, int unlockedLevel)
{
int rowsAffected = 0;
using (SqlConnection connection = ConnectionManager.GetDatabaseConnection())
{
string updateQuery = "UPDATE GameData SET Date = @date, UnLockedLevel = @unlocklevel WHERE UserID = '" + userId + "' AND Date>= DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE())) AND Date < DATEADD(dd, 1, DATEDIFF(dd, 0, GETDATE()))";
SqlCommand command = new SqlCommand(updateQuery, connection);
command.Parameters.Add("@date", SqlDbType.DateTime).Value = datetim;
command.Parameters.Add("@unlocklevel", SqlDbType.Int).Value = unlockedLevel;
rowsAffected = command.ExecuteNonQuery();
connection.Close();
}
return rowsAffected;
}
//function to update the time of play in the GameData table
//This function should get the date value only without the time
public static int updateTimeOfPlay(int userId, DateTime datetim, float timeOfPlay)
{
int rowsAffected = 0;
using (SqlConnection connection = ConnectionManager.GetDatabaseConnection())
{
string updateQuery = "UPDATE GameData SET Date = @date, TimeOfPlay = @timeofplay WHERE UserID = '" + userId + "' AND Date>= DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE())) AND Date < DATEADD(dd, 1, DATEDIFF(dd, 0, GETDATE()))";
SqlCommand command = new SqlCommand(updateQuery, connection);
command.Parameters.Add("@date", SqlDbType.DateTime).Value = datetim;
command.Parameters.Add("@timeofplay", SqlDbType.Float).Value = timeOfPlay;
rowsAffected = command.ExecuteNonQuery();
connection.Close();
}
return rowsAffected;
}
//function to get the last unlocked level from the GameData table
//This function should get the date value only without the time
public static int getUnLockedLevel(int userId)
{
int level = 1;
using (SqlConnection connection = ConnectionManager.GetDatabaseConnection())
{
string getLevel = "select max(UnLockedLevel) from gamedata where[UserId] = @UserId" ;
//string getLevel = "select UnLockedLevel from gamedata where[UserId] = @UserId and[Date] = (select max(Date) from GameData)";
SqlCommand command = new SqlCommand(getLevel, connection);
command.Parameters.Add(new SqlParameter("UserId", userId));
var levelObj = command.ExecuteScalar(); ;
if (levelObj != null)
{
level = (Int32)levelObj;
}
connection.Close();
}
return level;
}
//function to get the time of play from the GameData table
//This function should get the date value only without the time
public static float getTimeOfPlay(int userId, DateTime datetim)
{
float timeofPlay = DEFAULT_TIME;
using (SqlConnection connection = ConnectionManager.GetDatabaseConnection())
{
string getTime = "SELECT TimeOfPlay FROM GameData where UserID = @UserId AND CAST(GameData.Date as DATE) = @Today";
SqlCommand command = new SqlCommand(getTime, connection);
command.Parameters.Add(new SqlParameter("UserId", userId));
command.Parameters.Add(new SqlParameter("Today", datetim.Date));
var timeObj = command.ExecuteScalar();
if (timeObj != null)
{
timeofPlay = float.Parse(timeObj.ToString());
}
connection.Close();
}
return timeofPlay;
}
} |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
using System.Threading;
using WiimoteApi;
using WiimoteApi.Internal;
public class Player : MonoBehaviour
{
// Variable déterminant à quel joueur on fait référence
public int whichPlayer;
// Variable Rigidbody faisant référence au component du joueur (affecté dans Unity)
public Rigidbody rb;
// Variable BoxCollider faisant référence au component du joueur (affecté dans Unity)
public BoxCollider col;
public Animator playerAnim;
private float posYInit;
// Vitesse du joueur
public float speedZ = 450.0f;
// Booléen qui détermine si on peut bouger ou non
public bool canMove = true;
// Booléen qui détermine si on est en collision ou non
public bool isHavingCollision = false;
public GameObject currentObstacle;
// Force du saut
public float jumpForce = 10f;
private float fallMultiplier = 2.5f;
// Variable pour déterminer si on touche au sol ou non
public LayerMask groundLayers;
// Évènement sur les touches du clavier
private UnityEvent keyUpEvent = new UnityEvent();
/*---------------------------------------------------------- */
// Variable faisant référence au script des Wii remotes
public WiiRemotes scriptRemotes;
// Variable la wii remote du joueur
private Wiimote playerRemote;
// Variable du délai entre les lancés
private float timeBetweenShots = 1f;
// Variable du timestamp
float timestamp;
// Variable contenant le projectile
public GameObject power;
/*---------------------------------------------------------- */
private void Start()
{
// On empêche le joueur via le rigidbody de faire des rotation
rb.freezeRotation = true;
// On ajoute un écouteur sur l'évènement
keyUpEvent.AddListener(jumpEvent);
posYInit = 0.5575377f;
if (scriptRemotes.wiiRemotes.Count <= 0)
{
scriptRemotes.InitWiimotes();
}
// Assignation des Wii Remotes aux joueurs
if (scriptRemotes.wiiRemotes.Count >= 2)
{
if (whichPlayer == 1)
{
playerRemote = scriptRemotes.wiiRemotes[0];
Debug.Log("Player 1 : " + playerRemote);
}
else if (whichPlayer == 2)
{
playerRemote = scriptRemotes.wiiRemotes[1];
Debug.Log("Player 2 : " + playerRemote);
}
}
}
private void FixedUpdate()
{
if (isHavingCollision && currentObstacle != null) {
float posYPlayer = transform.position.y - posYInit;
float posYObstacle = currentObstacle.GetComponent<BoxCollider>().bounds.size.y;
if (posYPlayer >= posYObstacle) {
canMove = true;
isHavingCollision = false;
playerAnim.SetBool("isIdle", false);
}
}
// Si le personnage peut bouger et qu'il n'est pas en collision, il peut avancer
if (canMove && isHavingCollision == false)
{
rb.velocity = new Vector3(rb.velocity.x, rb.velocity.y, speedZ * Time.deltaTime);
}
}
private void Update()
{
if (!IsGrounded())
{
// Simule une augmentation de gravité pour rendre le saut plus rapide
rb.AddForce(Vector3.down * (jumpForce * 2f));
}
if (whichPlayer == 1)
{
if (Input.GetKeyUp("z") && Input.GetKeyUp("x") && keyUpEvent != null && IsGrounded())
{
keyUpEvent.Invoke();
}
}
if (whichPlayer == 2)
{
if (Input.GetKeyUp("q") && Input.GetKeyUp("w") && keyUpEvent != null && IsGrounded())
{
keyUpEvent.Invoke();
}
}
if (playerRemote != null)
{
readPlayerRemoteData();
}
}
// POUR LE JUMP
private void jumpEvent() {
rb.AddForce(Vector3.up * jumpForce, ForceMode.Impulse);
playerAnim.SetTrigger("jump");
}
// Vérifie si on est proche du sol ou non
private bool IsGrounded() {
return Physics.CheckCapsule(col.bounds.center, new Vector3(col.bounds.center.x,
col.bounds.min.y, col.bounds.center.z), col.size.z * .9f, groundLayers);
}
// Détecte quand on entre en collision avec un obstacle
private void OnCollisionEnter(Collision leCol)
{
if (leCol.gameObject.tag == "obstacleSpecial" || leCol.gameObject.tag == "obstacleNormal")
{
canMove = false;
isHavingCollision = true;
currentObstacle = leCol.gameObject;
playerAnim.SetBool("isIdle", true);
}
if (leCol.gameObject.tag == "missingTile")
{
canMove = false;
playerAnim.SetBool("isIdle", true);
rb.constraints = RigidbodyConstraints.FreezePositionZ | RigidbodyConstraints.FreezePositionX | RigidbodyConstraints.FreezeRotationX | RigidbodyConstraints.FreezeRotationY | RigidbodyConstraints.FreezeRotationZ;
}
}
// Détecte quand on quitte une collision avec un obstacle
private void OnCollisionExit(Collision leCol)
{
if (leCol.gameObject.tag == "obstacleSpecial" || leCol.gameObject.tag == "obstacleNormal")
{
canMove = true;
isHavingCollision = false;
playerAnim.SetBool("isIdle", false);
}
}
private void readPlayerRemoteData()
{
// Variable pour contenir le data de la remote
int data;
// Tant qu'il y a des données à lire
do
{
// Lire le data
data = playerRemote.ReadWiimoteData();
// Aller chercher les données de l'accélération
float[] accel = playerRemote.Accel.GetCalibratedAccelData();
// Prendre le résultat de l'accélération
float accel_result = accel[0];
// Si l'accélération est plus haut que 2 et qu'au moins une seconde s'est écoulée
if (accel_result > 2 && Time.time >= timestamp)
{
// On lance le pouvoir
ThrowPower();
// Update du temps
timestamp = Time.time + timeBetweenShots;
}
} while (data > 0);
}
// Lance le pouvoir du joueur
private void ThrowPower () {
playerAnim.SetTrigger("spellCast");
canMove = false;
rb.constraints = RigidbodyConstraints.FreezePositionZ | RigidbodyConstraints.FreezePositionX | RigidbodyConstraints.FreezeRotationX | RigidbodyConstraints.FreezeRotationY | RigidbodyConstraints.FreezeRotationZ;
// On instantie le pouvoir
GameObject powerMove = Instantiate(power) as GameObject;
// On le place à la position du joueur
powerMove.transform.position = new Vector3(transform.position.x, transform.position.y+0.5f, transform.position.z+4.0f);
// On va chercher le rigidbody du pouvoir
Rigidbody rbPower = powerMove.GetComponent<Rigidbody>();
// Le pouvoir est projeté vers l'avant
rbPower.velocity = transform.forward * 40;
// On détruit le pouvoir après une seconde
Destroy(powerMove, 1f);
}
}
|
using StateMachine;
using UnityEngine;
namespace PJEI.Invaders {
[RequireComponent(typeof(SpriteRenderer))]
public class Alien : MonoBehaviour {
public Sprite[] sprites;
private int currentSprite = 0;
private int pixelsPerMove = 0;
private SpriteRenderer spriteRenderer;
private Vector2D currentPos;
#region State information
private int movesRemaining = 0;
public int MovesRemaining {
get { return movesRemaining; }
set { movesRemaining = Mathf.Max(0, value); }
}
public bool HasFinishedMoving() { return MovesRemaining == 0; }
private bool movingLeft = true;
public void StartMovingLeft() { movingLeft = true; }
public void StartMovingRight() { movingLeft = false; }
public bool IsMovingLeft() { return movingLeft; }
public bool IsMovingRight() { return movingLeft == false; }
public void ShiftMoveDirection() { movingLeft = !movingLeft; }
#endregion
private StateMachine<Alien> stateMachine;
public void Initialize(Vector2D initialPosition, int firstSprite, int pixelsPerMove) {
this.pixelsPerMove = pixelsPerMove;
spriteRenderer = GetComponent<SpriteRenderer>();
SetPosition(initialPosition);
SetSprite(firstSprite);
// TODO : Build the alien state machine
stateMachine = new StateMachine<Alien>(this, SampleAlienState.Instance)
.AddTransitions(
Transition.From(SampleAlienState.Instance)
.To(SampleAlienState.Instance)
.When(HasFinishedMoving),
Transition.FromAny<Alien>()
.Except(SampleAlienState.Instance)
.To(SampleAlienState.Instance)
.When(IsMovingLeft),
Transition.From(SampleAlienState.Instance)
.ToPrev()
.When(IsMovingRight),
Transition.From(SampleAlienState.Instance)
.To(SampleAlienState.Instance)
.Always() );
}
public void StartExecution() {
StartCoroutine(StateMachineUpdate());
}
public void Move(Vector2D distance) {
SetPosition(new Vector2D(currentPos.x + distance.x, currentPos.y + distance.y));
SetSprite(currentSprite + 1);
}
private void SetPosition(Vector2D position) {
currentPos = position;
this.transform.position = new Vector3(pixelsPerMove * position.x, (pixelsPerMove / 2) * position.y, 0);
}
private void SetSprite(int spriteCount) {
currentSprite = spriteCount % sprites.Length;
spriteRenderer.sprite = sprites[currentSprite];
}
private System.Collections.IEnumerator StateMachineUpdate() {
while (true) {
// TODO : As the number of aliens decrease, this time should decrease too.
yield return new WaitForSeconds(1f);
stateMachine.Update();
}
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using FastFood.Models;
namespace FastFood.Controllers
{
public class AdminNguyenLieuController : Controller
{
FastFooddb db = new FastFooddb();
// GET: AdminNguyenLieu
public ActionResult Index()
{
var model = db.NGUYENLIEUx.Where(x => x.TenNguyenLieu != null);
return View(model);
}
[HttpPost]
public ActionResult Add(NGUYENLIEU model)
{
var NguyenLieu = db.NGUYENLIEUx.Find(model.MaNL);
db.NGUYENLIEUx.Add(model);
db.SaveChanges();
return RedirectToAction("Index");
}
public ActionResult Add()
{
return View();
}
public ActionResult Edit(int? id)
{
var model = db.NGUYENLIEUx.Find(id);
return View(model);
}
[HttpPost]
public ActionResult Edit(NGUYENLIEU model)
{
var obj = db.NGUYENLIEUx.Find(model.MaNL);
obj.MaNL = model.MaNL;
obj.TenNguyenLieu = model.TenNguyenLieu;
obj.DonViTinh = model.DonViTinh;
db.SaveChanges();
return RedirectToAction("index", model);
}
public ActionResult Delete(int id)
{
var model = db.NGUYENLIEUx.Find(id);
db.NGUYENLIEUx.Remove(model);
db.SaveChanges();
return RedirectToAction("index");
}
[HttpPost]
public ActionResult Search(string Ten)
{
List<NGUYENLIEU> model = new List<NGUYENLIEU>();
if (Ten != "")
{
model = db.NGUYENLIEUx.Where(x => x.TenNguyenLieu == Ten).ToList();
}
else
{
model = db.NGUYENLIEUx.Where(x => x.TenNguyenLieu != null).ToList();
}
return View("Index", model);
}
}
} |
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Runtime.InteropServices;
using System.Diagnostics;
using System.Configuration;
using XAPP.COMLIB;
namespace DeleteAct
{
public partial class Form1 : Form
{
private COMLIB cm = new COMLIB();
private Dictionary<IntPtr, String> dctASSA = new Dictionary<IntPtr, String>();
private Dictionary<IntPtr, String> dctMainWindow = new Dictionary<IntPtr, String>();
private string RunningPath = System.AppDomain.CurrentDomain.BaseDirectory;
private int waitTime = 1000;//mls
public Form1()
{
InitializeComponent();
}
#region 获取ASSA所有子控件
public delegate bool EnumChildWindowsProc(IntPtr hwnd, long lParam);
public delegate bool EnumWindowsProc(IntPtr hWnd, IntPtr lParam);
[DllImport("user32.dll")]
public static extern long EnumChildWindows(IntPtr hWndParent, EnumChildWindowsProc lpEnumFunc, long lParam);
[DllImport("user32.dll")]
public static extern long GetClassName(IntPtr hwnd, StringBuilder lpClassName, long nMaxCount);
private static bool EumWinChiPro(IntPtr hWnd)
{
StringBuilder s = new StringBuilder(256);
GetClassName(hWnd, s, 257);
string ss = s.ToString();
ss = ss.Trim();
MessageBox.Show(ss);
return true;
}
[DllImport("user32.dll", CharSet = CharSet.Auto)]
private static extern int GetWindowText(HandleRef hWnd, StringBuilder lpString, int nMaxCount);[DllImport("user32.dll", CharSet = CharSet.Auto)]
private static extern int GetWindowTextLength(HandleRef hWnd);[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
private static extern bool EnumWindows(EnumThreadWindowsCallback callback, IntPtr extraData);[DllImport("user32.dll", ExactSpelling = true)]
private static extern bool EnumChildWindows(HandleRef hwndParent, EnumChildrenCallback lpEnumFunc, HandleRef lParam); private delegate bool EnumThreadWindowsCallback(IntPtr hWnd, IntPtr lParam);
private delegate bool EnumChildrenCallback(IntPtr hwnd, IntPtr lParam);
private bool EnumWindowsCallback(IntPtr handle)
{
int num1 = GetWindowTextLength(new HandleRef(this, handle)) * 2;
StringBuilder builder1 = new StringBuilder(num1);
GetWindowText(new HandleRef(this, handle), builder1, builder1.Capacity);
//System.Console.WriteLine(string.Format("Wnd:{0} Title: {1}", handle, builder1.ToString()));
Application.DoEvents();
//listBox1.Items.Add(string.Format("Wnd:{0} Title: {1}", handle, builder1.ToString()));
EnumChildWindows(new HandleRef(this, handle), new EnumChildrenCallback(EnumChildWindowsCallback), new HandleRef(null, IntPtr.Zero));
return true;
}
private bool EnumChildWindowsCallback(IntPtr handle, IntPtr lparam)
{
int num1 = GetWindowTextLength(new HandleRef(this, handle)) * 2;
StringBuilder builder1 = new StringBuilder(num1);
GetWindowText(new HandleRef(this, handle), builder1, builder1.Capacity);
if (!dctASSA.ContainsKey(handle) && !String.IsNullOrEmpty(builder1.ToString()))
{
dctASSA.Add(handle, builder1.ToString());
}
//System.Console.WriteLine(string.Format("/tSubWnd:{0} Title: {1}", handle, builder1.ToString()));
// listBox1.Items.Add(string.Format("SubWnd:{0} Title: {1}", handle, builder1.ToString()));
return true;
}
private bool EnumMainWindowsCallback(IntPtr handle)
{
int num1 = GetWindowTextLength(new HandleRef(this, handle)) * 2;
StringBuilder builder1 = new StringBuilder(num1);
GetWindowText(new HandleRef(this, handle), builder1, builder1.Capacity);
//System.Console.WriteLine(string.Format("Wnd:{0} Title: {1}", handle, builder1.ToString()));
Application.DoEvents();
//listBox1.Items.Add(string.Format("Wnd:{0} Title: {1}", handle, builder1.ToString()));
EnumChildWindows(new HandleRef(this, handle), new EnumChildrenCallback(EnumMainChildWindowsCallback), new HandleRef(null, IntPtr.Zero));
return true;
}
private bool EnumMainChildWindowsCallback(IntPtr handle, IntPtr lparam)
{
int num1 = GetWindowTextLength(new HandleRef(this, handle)) * 2;
StringBuilder builder1 = new StringBuilder(num1);
GetWindowText(new HandleRef(this, handle), builder1, builder1.Capacity);
if (!dctMainWindow.ContainsKey(handle) && !String.IsNullOrEmpty(builder1.ToString()))
{
dctMainWindow.Add(handle, builder1.ToString());
}
//System.Console.WriteLine(string.Format("/tSubWnd:{0} Title: {1}", handle, builder1.ToString()));
// listBox1.Items.Add(string.Format("SubWnd:{0} Title: {1}", handle, builder1.ToString()));
return true;
}
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool GetWindowRect(IntPtr hWnd, out RECT lpRect);
[StructLayout(LayoutKind.Sequential)]
public struct RECT
{
public int Left; // x position of upper-left corner
public int Top; // y position of upper-left corner
public int Right; // x position of lower-right corner
public int Bottom; // y position of lower-right corner
}
#endregion
private void StartStoneage()
{
//Start ASSA
IntPtr mainHanlder = IntPtr.Zero;
bool isDone = true;
isDone = StartASSA(ref mainHanlder);
if (!isDone)
{
MessageBox.Show("Initail ASSA Fail!");
return;
}
System.Threading.Thread.Sleep(waitTime);
//激活石器
IntPtr iBShiqi = cm.FindWindowEx(mainHanlder, "激活石器", true);
if (iBShiqi == IntPtr.Zero)
{
MessageBox.Show("Start Shiqi Fail!");
return;
}
System.Threading.Thread.Sleep(waitTime);
cm.MouseRightClick(iBShiqi);
System.Threading.Thread.Sleep(waitTime);
//获取石器句柄
IntPtr saHanlder = cm.GetMainWindowhWnd("StoneAge", "StoneAge");
if (saHanlder == IntPtr.Zero)
{
MessageBox.Show("Get SA hWnd Fail!");
return;
}
String accountFile = Path.Combine(RunningPath, "Accounts.ini");
String[] acts = File.ReadAllLines(accountFile);
for (int i=0; i<acts.Length;i++)
{
if (acts[i].Length <= 0) continue;
String[] strs = acts[i].Split('|');
string userName = strs[0];
string pwd = strs[1];
//Input username and Password
InputUserNameNPWD(userName, pwd);
DeleteReturn();
System.Threading.Thread.Sleep(waitTime);
}
MessageBox.Show("OK");
}
private bool StartASSA(ref IntPtr mainHanlder)
{
try
{
string assaExe = cm.GetConfigurationData("ASSAEXE");
string assaPath = String.Format("{0}", cm.GetConfigurationData("ASSAPATH_base"));
int processID = cm.StartAPP(Path.Combine(assaPath, assaExe), assaPath);
System.Threading.Thread.Sleep(waitTime);
mainHanlder = cm.GetWnd(processID, "ThunderRT6FormDC", "石器时代");
if (mainHanlder == IntPtr.Zero)
{
MessageBox.Show("Start Fail!");
return false;
}
//Load all the hwnd
dctASSA.Clear();
EnumWindowsCallback(mainHanlder);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
return true;
}
private void InputUserNameNPWD(String userName, String password)
{
int loginX = -1;
int loginY = -1;
//User Name
cm.GetXY("LoginUserNameXY", ref loginX, ref loginY);
System.Threading.Thread.Sleep(waitTime);
cm.MouseMove(loginX, loginY);
System.Threading.Thread.Sleep(waitTime);
cm.MouseSingleClick();
System.Threading.Thread.Sleep(waitTime);
SendKeys.SendWait(userName);
System.Threading.Thread.Sleep(waitTime);
//Password
loginX = -1;
loginY = -1;
cm.GetXY("LoginPasswordXY", ref loginX, ref loginY);
System.Threading.Thread.Sleep(waitTime);
cm.MouseMove(loginX, loginY);
System.Threading.Thread.Sleep(waitTime);
cm.MouseSingleClick();
System.Threading.Thread.Sleep(waitTime);
SendKeys.SendWait(password);
System.Threading.Thread.Sleep(waitTime);
//Click Logon
cm.GetXY("LoginButton", ref loginX, ref loginY);
cm.MouseMove(loginX, loginY);
System.Threading.Thread.Sleep(waitTime);
cm.MouseSingleClick();
System.Threading.Thread.Sleep(waitTime);
//Click Line1
cm.GetXY("Line1", ref loginX, ref loginY);
cm.MouseMove(loginX, loginY);
System.Threading.Thread.Sleep(waitTime);
cm.MouseSingleClick();
System.Threading.Thread.Sleep(waitTime);
//Line DX
cm.GetXY("Line1DX", ref loginX, ref loginY);
cm.MouseMove(loginX, loginY);
System.Threading.Thread.Sleep(waitTime);
cm.MouseSingleClick();
System.Threading.Thread.Sleep(waitTime);
//click del
cm.GetXY("Delbutton", ref loginX, ref loginY);
cm.MouseMove(loginX, loginY);
System.Threading.Thread.Sleep(waitTime);
cm.MouseSingleClick();
System.Threading.Thread.Sleep(waitTime);
//input pwd
SendKeys.SendWait(password);
//click del button
cm.GetXY("DelConfrimBtn", ref loginX, ref loginY);
cm.MouseMove(loginX, loginY);
System.Threading.Thread.Sleep(waitTime);
cm.MouseSingleClick();
}
private void DeleteReturn()
{
int loginX = -1;
int loginY = -1;
//Del return
cm.GetXY("BtnDelReturn", ref loginX, ref loginY);
cm.MouseMove(loginX, loginY);
System.Threading.Thread.Sleep(waitTime);
cm.MouseSingleClick();
System.Threading.Thread.Sleep(waitTime);
//Click return
cm.GetXY("BtnReturn", ref loginX, ref loginY);
cm.MouseMove(loginX, loginY);
System.Threading.Thread.Sleep(waitTime);
cm.MouseSingleClick();
//Del
cm.GetXY("LoginUserNameXY", ref loginX, ref loginY);
System.Threading.Thread.Sleep(waitTime);
cm.MouseMove(loginX, loginY);
System.Threading.Thread.Sleep(waitTime);
cm.MouseSingleClick();
System.Threading.Thread.Sleep(waitTime);
for (int i =0;i<20;i++)
{
SendKeys.SendWait("{BACKSPACE}");
}
//PWD
cm.GetXY("LoginPasswordXY", ref loginX, ref loginY);
System.Threading.Thread.Sleep(waitTime);
cm.MouseMove(loginX, loginY);
System.Threading.Thread.Sleep(waitTime);
cm.MouseSingleClick();
System.Threading.Thread.Sleep(waitTime);
for (int i = 0; i < 20; i++)
{
SendKeys.SendWait("{BACKSPACE}");
}
}
private void CreateNewUserPwd(String userName, String password)
{
int loginX = -1;
int loginY = -1;
//Click create
cm.GetXY("BtnCreateChar", ref loginX, ref loginY);
cm.MouseMove(loginX, loginY);
System.Threading.Thread.Sleep(waitTime);
cm.MouseSingleClick();
System.Threading.Thread.Sleep(waitTime);
// Select char
cm.GetXY("BtnSelectChar", ref loginX, ref loginY);
cm.MouseMove(loginX, loginY);
System.Threading.Thread.Sleep(waitTime);
cm.MouseSingleClick();
System.Threading.Thread.Sleep(waitTime);
//Confirm Char
cm.GetXY("BtnCfChar", ref loginX, ref loginY);
cm.MouseMove(loginX, loginY);
System.Threading.Thread.Sleep(waitTime);
cm.MouseSingleClick();
System.Threading.Thread.Sleep(waitTime);
//Char Name
cm.GetXY("BtnCharName", ref loginX, ref loginY);
cm.MouseMove(loginX, loginY);
System.Threading.Thread.Sleep(waitTime);
cm.MouseSingleClick();
System.Threading.Thread.Sleep(waitTime);
SendKeys.SendWait("AAAA");
//Char Pro
cm.GetXY("BtnCharPro", ref loginX, ref loginY);
cm.MouseMove(loginX, loginY);
System.Threading.Thread.Sleep(waitTime);
for(int i = 0; i < 20; i++)
{
cm.MouseSingleClick();
System.Threading.Thread.Sleep(waitTime);
}
System.Threading.Thread.Sleep(waitTime);
//Create
cm.GetXY("BtnCharCreateConfrom", ref loginX, ref loginY);
cm.MouseMove(loginX, loginY);
System.Threading.Thread.Sleep(waitTime);
cm.MouseSingleClick();
System.Threading.Thread.Sleep(waitTime);
//Char var
cm.GetXY("BtnCharVar", ref loginX, ref loginY);
cm.MouseMove(loginX, loginY);
System.Threading.Thread.Sleep(waitTime);
cm.MouseSingleClick();
System.Threading.Thread.Sleep(waitTime);
//Char var Conf
cm.GetXY("BtnCharVarConf", ref loginX, ref loginY);
cm.MouseMove(loginX, loginY);
System.Threading.Thread.Sleep(waitTime);
cm.MouseSingleClick();
System.Threading.Thread.Sleep(waitTime);
}
private void PutASSATOTOP(IntPtr mainHanlder)
{
//前置ASSA
System.Threading.Thread.Sleep(waitTime);
cm.BringToFront(mainHanlder);
System.Threading.Thread.Sleep(waitTime);
}
private void btnStart_Click(object sender, EventArgs e)
{
StartStoneage();
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Xml.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.Globalization;
using UserBase.BLL;
using UserBase.Interfaces.BLL;
namespace UserBase_PL_Console
{
class Program
{
static void Main(string[] args)
{
IUserBaseBLL logic = new Logic();
int select = 0;
while (true)
{
try
{
ShowMenu();
while (!int.TryParse(Console.ReadLine(), out select)) ;
switch (select)
{
case 1: PathToStore(); break;
case 2: CreateUser(logic); break;
case 3: CreateAwards(logic); break;
case 4: DeleteUser(logic); break;
case 5: RemoveAward(logic); break;
case 6: ShowUsers(logic); break;
case 7: ShowUserAwards(logic); break;
case 8: ShowAwards(logic); break;
case 9: AddAwardToUser(logic); break;
case 10: RemoveUserAward(logic); break;
case 0: return;
default: Console.WriteLine("Invalid command"); break;
}
}
catch (Exception e)
{
Console.WriteLine("Error : " + e.Message);
PressAndClear();
}
finally
{
PressAndClear();
}
}
}
public static void ShowMenu()
{
Console.WriteLine("Task 06 DESIGN PATTERNS");
Console.WriteLine(" 1. Show pathes to storage.\n" +
" 2. Create user.\n" +
" 3. Create award.\n" +
" 4. Remove user.\n" +
" 5. Remove award.\n" +
" 6. Show all users.\n" +
" 7. Show all user's awards.\n" +
" 8. Show all award.\n" +
" 9. Add award to the user.\n" +
" 10. Remove award from the user.\n" +
" 0. Exit. \n" +
new string('-', 30));
}
static void PathToStore()
{
Console.WriteLine("Path to store user base: {0}", AppDomain.CurrentDomain.BaseDirectory + "users.xml");
Console.Write("Path to store award base: {0}", AppDomain.CurrentDomain.BaseDirectory + "awards.xml");
}
static void ShowUsers(IUserBaseBLL logic)
{
var users = logic.GetAllUsers();
if (users.ToList().Count == 0)
{
Console.WriteLine("No one user found");
}
else
{
foreach (var item in users)
{
Console.WriteLine("User {0} {1} age {2} awards {3} ID {4}.", item.FirstName, item.LastName, item.Age, item.Awards.Count, item.ID);
}
}
}
static void ShowAwards(IUserBaseBLL logic)
{
var awards = logic.GetAllAwards();
if (awards.ToList().Count == 0)
{
Console.WriteLine("No one award found");
}
else
{
foreach (var item in awards)
{
Console.WriteLine("Title: {0} ID: {1}", item.Title, item.ID);
}
}
}
static void ShowUserAwards(IUserBaseBLL logic)
{
int id;
Console.WriteLine("All users:");
ShowUsers(logic);
Console.WriteLine(new string('-', 30));
do
{
Console.WriteLine("Input user id: ");
} while (!int.TryParse(Console.ReadLine(), out id));
var awards = logic.GetAllUserAwards(id);
if (awards.Count() == 0)
{
Console.WriteLine("This user has no one award.");
}
else
{
foreach (var item in awards)
{
Console.WriteLine(item);
}
}
}
static void CreateUser(IUserBaseBLL logic)
{
Console.WriteLine("Input first name: ");
string fName = Console.ReadLine();
Console.WriteLine("Input last name: ");
string lName = Console.ReadLine();
DateTime bday;
do
{
Console.WriteLine("Input Birthday(dd.mm.yyyy): ");
} while (!DateTime.TryParse(Console.ReadLine(), out bday));
int id = 0; ;
do
{
Console.WriteLine("Input not occupied id");
} while (!int.TryParse(Console.ReadLine(), out id));
Console.WriteLine(logic.AddUser(fName, lName, bday, id));
}
static void CreateAwards(IUserBaseBLL logic)
{
Console.WriteLine("Input award tittle:");
string title = Console.ReadLine();
int id;
do
{
Console.WriteLine("Input not occupited id: ");
} while (!int.TryParse(Console.ReadLine(), out id));
Console.WriteLine(logic.AddAward(title, id));
}
static void AddAwardToUser(IUserBaseBLL logic)
{
int userid;
int awardid;
Console.WriteLine("All users:");
ShowUsers(logic);
Console.WriteLine(new string('-', 30));
do
{
Console.WriteLine("Input user id:");
} while (!int.TryParse(Console.ReadLine(), out userid));
Console.WriteLine("All awards:");
ShowAwards(logic);
Console.WriteLine(new string('-', 30));
do
{
Console.WriteLine("Input award id:");
} while (!int.TryParse(Console.ReadLine(), out awardid));
Console.WriteLine(logic.AddAwardToUser(userid, awardid));
}
static void RemoveUserAward(IUserBaseBLL logic)
{
int userId;
int awardId;
Console.WriteLine("All users:");
ShowUsers(logic);
Console.WriteLine(new string('-', 30));
do
{
Console.WriteLine("Input user id:");
} while (!int.TryParse(Console.ReadLine(), out userId));
Console.WriteLine("All user's awards:");
var awards = logic.GetAllUserAwards(userId);
if (awards.Count() == 0)
{
Console.WriteLine("This user has no one award.");
return;
}
else
{
foreach (var item in awards)
{
Console.WriteLine(item);
}
}
Console.WriteLine(new string('-', 30));
do
{
Console.WriteLine("Input award id:");
} while (!int.TryParse(Console.ReadLine(), out awardId));
Console.WriteLine(logic.RemoveUserAward(userId, awardId));
}
static void RemoveAward(IUserBaseBLL logic)
{
int awardId;
Console.WriteLine("All awards:");
ShowAwards(logic);
Console.WriteLine(new string('-', 30));
if (logic.GetAllAwards().Count() == 0)
{
return;
}
do
{
Console.WriteLine("Input award id:");
} while (!int.TryParse(Console.ReadLine(), out awardId));
Console.WriteLine(logic.RemoveAward(awardId));
}
static void DeleteUser(IUserBaseBLL logic)
{
int id;
Console.WriteLine("All users:");
ShowUsers(logic);
Console.WriteLine(new string('-', 30));
if (logic.GetAllUsers().Count() == 0)
{
return;
}
do
{
Console.WriteLine("Input user id:");
} while (!int.TryParse(Console.ReadLine(), out id));
Console.WriteLine(logic.RemoveUser(id));
}
static void ChangeUser(IUserBaseBLL logic)
{
DateTime birthday;
int id;
Console.WriteLine("Enter the Id of user which you want to correct : ");
while (!int.TryParse(Console.ReadLine(), out id)) ;
var tmp = logic.FindByID(id);
if (tmp != null)
{
Console.WriteLine("Enter new first name : ");
tmp.FirstName = Console.ReadLine();
Console.WriteLine("Enter new last name : ");
tmp.LastName = Console.ReadLine();
Console.WriteLine("Enter new date of birth(dd.MM.yyyy): ");
while (!DateTime.TryParseExact(Console.ReadLine(), "dd.MM.yyyy", null, DateTimeStyles.AllowInnerWhite, out birthday)) ;
tmp.DateOfBirth = birthday;
Console.WriteLine("User {0} {1} age {2} with ID {3} is corected.", tmp.FirstName, tmp.LastName, tmp.Age, tmp.ID);
}
}
public static void PressAndClear()
{
Console.WriteLine("Press any key...");
Console.ReadLine();
Console.Clear();
}
}
}
|
using UnityEngine;
using System.Collections;
public interface ISignal
{
}
|
using System;
using System.IO;
namespace PaddleOCR_hubserving_client
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
//var ss = PaddleOCR.hubserving.Client.Recognition(@"http://127.0.0.1:8868/predict/ocr_system", @"I:\programing\CaseHistoryTranscribe\ocr\PaddleOCR\doc\imgs");
//foreach(var s in ss)
//{
// Console.WriteLine(s);
//}
var image= File.ReadAllBytes(@"I:\programing\CaseHistoryTranscribe\ocr\PaddleOCR\doc\imgs\1.jpg");
PaddleOCR.hubserving.Client.Url = @"http://127.0.0.1:8868/predict/ocr_system";
var res=PaddleOCR.hubserving.Client.Identify(image);
return;
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using alg;
/*
* tags: hash, stack
* Time(nlogn), Space(n)
*/
namespace leetcode
{
public class Lc726_Number_of_Atoms
{
public string CountOfAtoms(string formula)
{
var map = new SortedDictionary<string, int>();
var stack = new Stack<int>();
int cur = 1, prod = 1;
for (int j, i = formula.Length - 1; i >= 0; i = j)
{
j = i;
if (char.IsDigit(formula[j]))
{
while (j >= 0 && char.IsDigit(formula[j])) j--;
cur = int.Parse(formula.Substring(j + 1, i - j));
}
else if (char.IsLetter(formula[j]))
{
while (j >= 0 && char.IsLower(formula[j])) j--;
j--;
var atom = formula.Substring(j + 1, i - j);
if (map.ContainsKey(atom)) map[atom] += cur * prod;
else map[atom] = cur * prod;
cur = 1;
}
else if (formula[j] == ')')
{
j--;
prod *= cur;
stack.Push(cur);
cur = 1;
}
else // '('
{
j--;
prod /= stack.Pop();
cur = 1;
}
}
return string.Join("", map.Select(p => p.Value == 1 ? p.Key : p.Key + p.Value));
}
public void Test()
{
Console.WriteLine(CountOfAtoms("H2O") == "H2O");
Console.WriteLine(CountOfAtoms("Mg(OH)2") == "H2MgO2");
Console.WriteLine(CountOfAtoms("K4(ON(SO3)2)2") == "K4N2O14S4");
}
}
}
|
using DevExpress.XtraEditors;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Xml;
namespace IRAP.PLC.Collection
{
/// <summary>
/// 拧紧设备数据采集
/// </summary>
internal class DC_Tighten : CustomDataCollection
{
private string operationCode = "";
public DC_Tighten(MemoEdit displayLog) : base(displayLog) { }
protected override void GetDataAndSendToESB(DateTime beginDT, DateTime endDT)
{
WriteLogInThread(
string.Format(
"获取[拧紧设备]【{0}】-【{1}】的数据",
beginDT,
endDT));
string sql =
string.Format(
"SELECT * FROM ResultData " +
"WHERE CDATE(时间) BETWEEN #{0}# AND #{1}#",
beginDT,
endDT);
if (SystemParams.Instance.T216Code != "")
operationCode = SystemParams.Instance.T216Code;
DataTable dt = GetData(sql);
XmlDocument xml = new XmlDocument();
//XmlNode node = xml.CreateXmlDeclaration("1.0", "utf-8", "");
//xml.AppendChild(node);
if (dt != null &&
dt.Rows.Count > 0)
{
WriteLogInThread(
string.Format(
"共处理 {0} 条记录;",
dt.Rows.Count));
XmlNode root = xml.SelectSingleNode("ROOT");
if (root == null)
{
root = xml.CreateElement("ROOT");
xml.AppendChild(root);
}
foreach (DataRow dr in dt.Rows)
{
root.RemoveAll();
root.AppendChild(CreateDataRow(xml, dr));
if (root.HasChildNodes)
SendToESB(xml);
}
WriteLogInThread("处理完毕......");
}
else
{
WriteLogInThread("无需处理......");
}
}
private XmlNode CreateDataRow(XmlDocument xml, DataRow dr)
{
XmlNode node = xml.CreateElement("Row");
try
{
node.Attributes.Append(
CreateAttr(
xml,
"CollectingTime",
StrDateTimeToUnitTime(dr["时间"].ToString().Trim())));
node.Attributes.Append(CreateAttr(xml, "EquipmentCode", SystemParams.Instance.DeviceCode));
node.Attributes.Append(CreateAttr(xml, "OperationCode", operationCode));
node.Attributes.Append(CreateAttr(xml, "时间", dr["时间"].ToString().Trim()));
node.Attributes.Append(CreateAttr(xml, "测试编码", dr["测试编码"].ToString().Trim()));
node.Attributes.Append(CreateAttr(xml, "测试结果", dr["测试结果"].ToString().Trim()));
node.Attributes.Append(CreateAttr(xml, "左装配位移", dr["左装配位移"].ToString().Trim()));
node.Attributes.Append(CreateAttr(xml, "右装配位移", dr["右装配位移"].ToString().Trim()));
node.Attributes.Append(CreateAttr(xml, "传感器压装位移", dr["传感器压装位移"].ToString().Trim()));
node.Attributes.Append(CreateAttr(xml, "传感器压装压力", dr["传感器压装压力"].ToString().Trim()));
node.Attributes.Append(CreateAttr(xml, "传感器电压", dr["传感器电压"].ToString().Trim()));
node.Attributes.Append(CreateAttr(xml, "拧紧枪扭矩", dr["拧紧枪扭矩"].ToString().Trim()));
node.Attributes.Append(CreateAttr(xml, "拧紧枪角度", dr["拧紧枪角度"].ToString().Trim()));
node.Attributes.Append(CreateAttr(xml, "批次", dr["批次"].ToString().Trim()));
node.Attributes.Append(CreateAttr(xml, "测试员", dr["测试员"].ToString().Trim()));
}
catch(Exception e)
{
WriteLogInThread(e.Message.ToString() + "请检查数据库文件是否选择正确");
}
return node;
}
}
}
|
using Abp.AutoMapper;
using dgPower.KMS.Sessions.Dto;
namespace dgPower.KMS.Web.Views.Shared.Components.TenantChange
{
[AutoMapFrom(typeof(GetCurrentLoginInformationsOutput))]
public class TenantChangeViewModel
{
public TenantLoginInfoDto Tenant { get; set; }
}
}
|
using System.Globalization;
using CRMSecurityProvider.Sources.Attribute;
namespace AlphaSolutions.SitecoreCms.ExtendedCRMProvider.Sources.Repository.V5.Attribute
{
internal class CrmLongAttributeAdapter : CrmValueTypeAttributeAdapter<long>, ICrmLongAttribute, ICrmAttribute<long>, ICrmAttribute
{
public CrmLongAttributeAdapter(CrmAttributeCollectionAdapter crmAttributeCollection, long internalAttribute) : base(crmAttributeCollection, internalAttribute)
{
}
public override string GetStringifiedValue()
{
return base.Adaptee.ToString(CultureInfo.InvariantCulture);
}
protected override bool TryParseValue(string value, out long result)
{
return long.TryParse(value, out result);
}
}
}
|
using System;
using System.Linq;
using Newtonsoft.Json.Linq;
namespace OpenMagic.ErrorTracker.WebApi.Infrastructure
{
public static class JObjectExtensions
{
public static bool HasProperties(this JObject value, params string[] propertyNames)
{
return propertyNames.All(propertyName => value.Properties().Any(jProperty => jProperty.Name.Equals(propertyName, StringComparison.OrdinalIgnoreCase)));
}
}
} |
using Anywhere2Go.DataAccess.Object;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
namespace Claimdi.WCF.Public
{
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "ILert" in both code and config file together.
[ServiceContract]
public interface ILert
{
[WebInvoke(Method = "POST", UriTemplate = "/add", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
BaseResult<AddLertResponse> Add(AddLertRequest addLertRequest);
}
}
|
using GodMorgon.GameSequencerSpace;
using GodMorgon.Models;
namespace GodMorgon.CardEffect
{
class SightEffect : CardEffect
{
/**
* Apply the sight effect by creating the sequence in the gameSequencer
*/
public override void ApplyEffect(CardEffectData effectData, GameContext context)
{
}
}
}
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Calculadora
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private Calculadora Calculator = new Calculadora();
private List<Calculadora> historial = new List<Calculadora>();
private void textBox1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode >= Keys.D0 && e.KeyCode <= Keys.D9)
{
if (textBox1.Text.Length < 25) textBox1.Text += (e.KeyValue - 48);
}
else if (e.KeyCode == Keys.Delete || e.KeyCode == Keys.Back)
{
if (textBox1.Text.Length > 0) textBox1.Text = textBox1.Text.Substring(0, textBox1.Text.Length - 1);
}
else if(e.KeyCode == Keys.Oemcomma)
{
if (textBox1.Text.Length < 25 && !textBox1.Text.Contains(','))
{
if (textBox1.Text.Length == 0) textBox1.Text = "0";
textBox1.Text += ",";
}
}
else if(e.KeyCode == Keys.Oemplus)
{
Operacion('+');
}
else if(e.KeyCode == Keys.OemMinus)
{
Operacion('-');
}
else if(e.KeyCode == Keys.Enter)
{
if (Calculator.Numero1 >= 0 && textBox1.Text.Length > 0)
{
Calculator.Numero2 = Convert.ToDouble(textBox1.Text);
switch (Calculator.Operador)
{
case '+':
textBox1.Text = Calculator.Suma().ToString();
break;
case '-':
textBox1.Text = Calculator.Resta().ToString();
break;
case '*':
textBox1.Text = Calculator.Multiplicacion().ToString();
break;
case '/':
if (Calculator.Numero2 != 0)
{
textBox1.Text = Calculator.Division().ToString();
}
break;
default:
break;
}
Calculator.Resultado = Convert.ToDouble(textBox1.Text);
Calculator.Hora = DateTime.Now;
historial.Add(Calculator);
listBox1.DataSource = null;
listBox1.DataSource = historial;
Calculator = new Calculadora();
}
}
}
private void button0_Click(object sender, EventArgs e)
{
if (textBox1.Text.Length < 25) textBox1.Text += "0";
}
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text.Length < 25) textBox1.Text += "1";
}
private void button2_Click(object sender, EventArgs e)
{
if (textBox1.Text.Length < 25) textBox1.Text += "2";
}
private void button3_Click(object sender, EventArgs e)
{
if (textBox1.Text.Length < 25) textBox1.Text += "3";
}
private void button4_Click(object sender, EventArgs e)
{
if (textBox1.Text.Length < 25) textBox1.Text += "4";
}
private void button5_Click(object sender, EventArgs e)
{
if (textBox1.Text.Length < 25) textBox1.Text += "5";
}
private void button6_Click(object sender, EventArgs e)
{
if (textBox1.Text.Length < 25) textBox1.Text += "6";
}
private void button7_Click(object sender, EventArgs e)
{
if (textBox1.Text.Length < 25) textBox1.Text += "7";
}
private void button8_Click(object sender, EventArgs e)
{
if (textBox1.Text.Length < 25) textBox1.Text += "8";
}
private void button9_Click(object sender, EventArgs e)
{
if (textBox1.Text.Length < 25) textBox1.Text += "9";
}
private void buttonC_Click(object sender, EventArgs e)
{
textBox1.Text = "";
}
private void buttonPlus_Click(object sender, EventArgs e)
{
Operacion('+');
}
private void buttonMinus_Click(object sender, EventArgs e)
{
Operacion('-');
}
private void buttonProd_Click(object sender, EventArgs e)
{
Operacion('*');
}
private void buttonDiv_Click(object sender, EventArgs e)
{
Operacion('/');
}
private void buttonEqual_Click(object sender, EventArgs e)
{
if(Calculator.Numero1>=0 && textBox1.Text.Length>0)
{
Calculator.Numero2 = Convert.ToDouble(textBox1.Text);
switch (Calculator.Operador)
{
case '+':
textBox1.Text = Calculator.Suma().ToString();
break;
case '-':
textBox1.Text = Calculator.Resta().ToString();
break;
case '*':
textBox1.Text = Calculator.Multiplicacion().ToString();
break;
case '/':
if (Calculator.Numero2 != 0)
{
textBox1.Text = Calculator.Division().ToString();
}
break;
default:
break;
}
Calculator.Resultado = Convert.ToDouble(textBox1.Text);
Calculator.Hora = DateTime.Now;
historial.Add(Calculator);
listBox1.DataSource = null;
listBox1.DataSource = historial;
Calculator = new Calculadora();
}
}
private void buttonDot_Click(object sender, EventArgs e)
{
if (textBox1.Text.Length < 25 && !textBox1.Text.Contains(','))
{
if (textBox1.Text.Length == 0) textBox1.Text = "0";
textBox1.Text += ",";
}
}
private void Operacion(char c)
{
if (textBox1.Text.Length > 0)
{
if (Calculator.Numero1 < 0)
{
Calculator.Numero1 = Convert.ToDouble(textBox1.Text);
textBox1.Text = "";
}
Calculator.Operador = c;
}
}
private void listBox1_MouseDoubleClick(object sender, MouseEventArgs e)
{
historial.Clear();
listBox1.DataSource = null;
}
}
}
|
using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Diagnostics;
using System.Xml.Serialization;
namespace Microsoft.Reporting.WinForms.Internal.Soap.ReportingServices2005.Execution
{
[Serializable]
[GeneratedCode("wsdl", "2.0.50727.42")]
[DebuggerStepThrough]
[DesignerCategory("code")]
[XmlType(Namespace = "http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices")]
[EditorBrowsable(EditorBrowsableState.Never)]
public class Warning
{
private string codeField;
private string severityField;
private string objectNameField;
private string objectTypeField;
private string messageField;
public string Code
{
get
{
return codeField;
}
set
{
codeField = value;
}
}
public string Severity
{
get
{
return severityField;
}
set
{
severityField = value;
}
}
public string ObjectName
{
get
{
return objectNameField;
}
set
{
objectNameField = value;
}
}
public string ObjectType
{
get
{
return objectTypeField;
}
set
{
objectTypeField = value;
}
}
public string Message
{
get
{
return messageField;
}
set
{
messageField = value;
}
}
}
}
|
using Microsoft.EntityFrameworkCore.Migrations;
namespace Inventory.Data.Migrations
{
public partial class DbVersion_328 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.UpdateData(
table: "DbVersion",
keyColumn: "Id",
keyValue: 1,
column: "Version",
value: "3.2.8");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.UpdateData(
table: "DbVersion",
keyColumn: "Id",
keyValue: 1,
column: "Version",
value: "3.2.7");
}
}
}
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
//http://www.theappguruz.com/blog/how-to-use-coroutines-in-unity
public class FadeEffect : MonoBehaviour {
public Image image;
public float fadetime;
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown(KeyCode.F))
StartCoroutine(Fade(2.5f));
}
IEnumerator Fade(float time)
{
float i = 0;
while (i <= 1)
{
image.color = new Color(0f, 0f, 0f, i);
i += 0.2f;
yield return new WaitForSeconds(time / 5);
}
}
}
|
using AutoMapper;
using LocusNew.Core.AdminViewModels;
using System.Collections.Generic;
using System.Web.Mvc;
using LocusNew.Core.Models;
using LocusNew.Core;
namespace LocusNew.Areas.Admin.Controllers
{
[Authorize]
public class BuyersAndSellersController : Controller
{
private readonly IUnitOfWork _unitOfWork;
public BuyersAndSellersController(IUnitOfWork unitOfWork)
{
_unitOfWork = unitOfWork;
}
public ActionResult Index()
{
var model = new BuyersSellersViewModel
{
BuyersList = Mapper.Map<IEnumerable<BuyersViewModel>>(_unitOfWork.PropertyBuyers.GetPropertyBuyers()),
SellersList = Mapper.Map<IEnumerable<SellersViewModel>>(_unitOfWork.PropertyOwners.GetPropertyOwners())
};
return View(model);
}
public ActionResult DeleteSeller(int id)
{
_unitOfWork.PropertyOwners.RemovePropertyOwner(id);
_unitOfWork.Complete();
return RedirectToAction("Index");
}
public ActionResult DeleteBuyer(int id)
{
_unitOfWork.PropertyBuyers.RemovePropertyBuyer(id);
_unitOfWork.Complete();
return RedirectToAction("Index");
}
public ActionResult EditBuyer(int id)
{
var model = Mapper.Map<BuyersViewModel>(_unitOfWork.PropertyBuyers.GetPropertyBuyer(id));
return View(model);
}
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult SaveEditedBuyer(BuyersViewModel buyer)
{
Mapper.Map(buyer, _unitOfWork.PropertyBuyers.GetPropertyBuyer(buyer.Id));
_unitOfWork.Complete();
return RedirectToAction("Index");
}
public ActionResult EditSeller(int id)
{
var model = Mapper.Map<SellersViewModel>(_unitOfWork.PropertyOwners.GetPropertyOwner(id));
return View(model);
}
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult SaveEditedSeller(SellersViewModel seller)
{
Mapper.Map(seller, _unitOfWork.PropertyOwners.GetPropertyOwner(seller.Id));
_unitOfWork.Complete();
return RedirectToAction("Index");
}
}
} |
using Newtonsoft.Json;
using RiverPuzzle1.JsonConverters;
using System.Collections.Generic;
namespace RiverPuzzle1.Models
{
[JsonConverter(typeof(CharacterJsonConverter))]
public class Character
{
public int ID { get; set; }
public virtual string Name { get; set; }
public Location Location { get; set; }
public int GameStateId { get; set; }
public GameState GameState { get; set; }
public string CanCoexist(object obj)
{
var otherCharacter = obj as Character;
NotCompatibleCharacters.TryGetValue(otherCharacter.Name, out string reason);
return reason;
}
public virtual IDictionary<string, string> NotCompatibleCharacters => new Dictionary<string, string>();
}
public enum Location
{
LeftBank,
Boat,
RightBank
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
namespace Динам.Сnk
{
class Program
{
static int Cnk(int n, int k, int[,] mas)
{
if (k == 0)
{ return 1; }
if (n == k)
{ return 1; }
for (int i = 0; i <=k; i++)
{
mas[i, i] = 1;
}
for (int i = 1; i <= n - k; i++)
{
mas[i, 0] = 1;
}
for (int j = 1; j <= k; j++)
{
for (int i = j + 1; i <=n - k + j; i++)
{
mas[i,j]=mas[i-1,j-1]+mas[i-1,j];
}
} return mas[n, k];
}
static void Main(string[] args)
{
//Random m = new Random();
int n=40;
int k = 20;
int [,] mas = new int[n+1,k+1];
Stopwatch sWatch = new Stopwatch();
sWatch.Start();
Cnk(10, 5, mas);
sWatch.Stop();
TimeSpan tSpan;
tSpan = sWatch.Elapsed;
Console.WriteLine(tSpan.ToString());
Console.WriteLine("n=" + n + " k=" + k + " c=" + Cnk(n, k,mas));
}
}
}
// T(n)=(n^3)
|
using Microsoft.AspNetCore.Http;
using RestApi.DataModels;
using RestApi.ErrorsList;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace RestApi.Services
{
public class InMemoryPersistanceService : PersistanceInterface
{
public InMemoryPersistanceService()
{
_lastInsertedId = 0;
_contacts = new List<Contact>();
_profilePictures = new Dictionary<int, byte[]>();
InitializeCompanies();
InitializeCountries();
}
private List<Contact> _contacts;
private int _lastInsertedId;
private List<Company> _companies;
private List<Country> _countries;
private Dictionary<int, byte[]> _profilePictures;
public ExecutionResult Load(int id)
{
var contact = _contacts.FirstOrDefault(c => c.Id == id);
return contact == null ? ErrorService.ContactNotFound : new ExecutionResult(contact);
}
public ExecutionResult GetAllBy(string state, string city)
{
if (String.IsNullOrEmpty(state) && String.IsNullOrEmpty(city))
return new ExecutionResult(new List<Contact>());
var result = _contacts;
if (!String.IsNullOrEmpty(state))
result = result.Where(c => c.Address.State == state).ToList();
if (!String.IsNullOrEmpty(city))
result = result.Where(c => c.Address.City == city).ToList();
return new ExecutionResult(result);
}
public ExecutionResult Search(string email, string phoneNumber)
{
if (String.IsNullOrEmpty(email) && String.IsNullOrEmpty(phoneNumber))
return ErrorService.ContactNotFound;
var result = _contacts;
if (!String.IsNullOrEmpty(email))
result = result.Where(c => c.Email == email).ToList();
if (!String.IsNullOrEmpty(phoneNumber))
result = result.Where(c => c.PersonalPhoneNumber == phoneNumber).ToList();
var contact = result.FirstOrDefault();
//assuming there can only be one contact for a given email or personal phone number
return contact == null ? ErrorService.ContactNotFound : new ExecutionResult(contact);
}
public ExecutionResult Save(Contact contact)
{
var status = CheckBusinessConstraints(contact);
if (BadStatus(status))
{
return status;
}
_lastInsertedId++;
Add(contact, _lastInsertedId);
return new ExecutionResult(contact);
}
public ExecutionResult Update(int id, Contact contact)
{
var contactToUpdate = GetContactById(id);
if (contactToUpdate == null)
return ErrorService.ContactNotFound;
_contacts.Remove(contactToUpdate);
var status = CheckBusinessConstraints(contact);
if (BadStatus(status))
{
_contacts.Add(contactToUpdate);
return status;
}
Add(contact, id);
return new ExecutionResult(contact);
}
public ExecutionResult Delete(int id)
{
var contactToDelete = GetContactById(id);
if (contactToDelete == null)
return ErrorService.ContactNotFound;
_profilePictures.Remove(id);
_contacts.Remove(contactToDelete);
return new ExecutionResult(contactToDelete);
}
public ExecutionResult SavePicture(int contactId, IFormFile file) {
if (GetContactById(contactId) == null)
{
return ErrorService.ContactNotFound;
}
if (file.Length > 0)
{
using (var ms = new MemoryStream())
{
file.CopyTo(ms);
var fileBytes = ms.ToArray();
_profilePictures.Add(contactId, fileBytes);
}
}
return new ExecutionResult("File uploaded for contact");
}
public ExecutionResult LoadPicture(int contactId)
{
if (GetContactById(contactId) == null)
{
return ErrorService.ContactNotFound;
}
if (!_profilePictures.ContainsKey(contactId))
{
return ErrorService.PictureWasNotLoaded;
}
return new ExecutionResult(_profilePictures[contactId]);
}
#region private methods
private void InitializeCompanies()
{
_companies = new List<Company>();
_companies.Add(new Company { Id = 1, Name = "Amazon" });
_companies.Add(new Company { Id = 2, Name = "Google" });
}
private void InitializeCountries()
{
_countries = new List<Country>();
_countries.Add(new Country { Id = 1, Name = "United States" });
_countries.Add(new Country { Id = 2, Name = "Argentina" });
}
private ExecutionResult CheckBusinessConstraints(Contact contact)
{
//TODO: this should all be transactional
var company = CompanyByContact(contact);
var country = CountryByContact(contact);
if (_contacts.Where(c => c.Email == contact.Email).Count() > 0)
return ErrorService.RepeatedEmailError;
if (_contacts.Where(c => c.PersonalPhoneNumber == contact.PersonalPhoneNumber).Count() > 0)
return ErrorService.RepeatedPersonalPhoneNumberError;
if (company == null)
return ErrorService.UnexistingCompanyError;
if (country == null)
return ErrorService.UnexistingCountryError;
return null;
}
private Company CompanyByContact(Contact contact) {
return _companies.Where(c => c.Id == contact.Company.Id).FirstOrDefault();
}
private Country CountryByContact(Contact country)
{
return _countries.Where(c => c.Id == country.Company.Id).FirstOrDefault();
}
private void Add(Contact contact, int id) {
contact.Id = id;
contact.Company = CompanyByContact(contact);
contact.Address.Country = CountryByContact(contact);
_contacts.Add(contact);
}
private bool BadStatus(ExecutionResult executionResult)
{
return executionResult != null && !executionResult.Success;
}
private Contact GetContactById(int id)
{
return _contacts.FirstOrDefault(c => c.Id == id);
}
#endregion
}
}
|
using System;
using System.Collections.Generic;
using Pathoschild.Stardew.Common.Utilities;
namespace ContentPatcher.Framework.Tokens.ValueProviders
{
/// <summary>A value provider whose values don't change after it's initialised.</summary>
internal class ImmutableValueProvider : BaseValueProvider
{
/*********
** Fields
*********/
/// <summary>The allowed root values (or <c>null</c> if any value is allowed).</summary>
private readonly InvariantHashSet AllowedRootValues;
/// <summary>The current token values.</summary>
private readonly InvariantHashSet Values;
/*********
** Public methods
*********/
/// <summary>Construct an instance.</summary>
/// <param name="name">The value provider name.</param>
/// <param name="values">Get the current token values.</param>
/// <param name="allowedValues">The allowed values (or <c>null</c> if any value is allowed).</param>
/// <param name="canHaveMultipleValues">Whether the root may contain multiple values (or <c>null</c> to set it based on the given values).</param>
public ImmutableValueProvider(string name, InvariantHashSet values, InvariantHashSet allowedValues = null, bool? canHaveMultipleValues = null)
: base(name, canHaveMultipleValuesForRoot: false)
{
this.Values = values ?? new InvariantHashSet();
this.AllowedRootValues = allowedValues;
this.CanHaveMultipleValuesForRoot = canHaveMultipleValues ?? (this.Values.Count > 1 || this.AllowedRootValues == null || this.AllowedRootValues.Count > 1);
this.EnableInputArguments(required: false, canHaveMultipleValues: false);
this.IsMutable = false;
this.IsReady = true;
}
/// <summary>Get the allowed values for an input argument (or <c>null</c> if any value is allowed).</summary>
/// <param name="input">The input argument, if applicable.</param>
/// <exception cref="InvalidOperationException">The input argument doesn't match this value provider, or does not respect <see cref="IValueProvider.AllowsInput"/> or <see cref="IValueProvider.RequiresInput"/>.</exception>
public override InvariantHashSet GetAllowedValues(string input)
{
return input != null
? InvariantHashSet.Boolean()
: this.AllowedRootValues;
}
/// <summary>Get the current values.</summary>
/// <param name="input">The input argument, if applicable.</param>
/// <exception cref="InvalidOperationException">The input argument doesn't match this value provider, or does not respect <see cref="IValueProvider.AllowsInput"/> or <see cref="IValueProvider.RequiresInput"/>.</exception>
public override IEnumerable<string> GetValues(string input)
{
this.AssertInputArgument(input);
if (input != null)
return new[] { this.Values.Contains(input).ToString() };
return this.Values;
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using Foolproof;
namespace Integer.Api.Models
{
public class UsuarioCriarSenhaModel
{
public string GrupoId { get; set; }
[Required(ErrorMessage = "Usuário não encontrado")]
public string UsuarioId { get; set; }
[Required(ErrorMessage="obrigatório")]
[EmailAddress(ErrorMessage="e-mail inválido")]
public string Email { get; set; }
[Required(ErrorMessage = "obrigatório")]
[StringLength(8, MinimumLength=6, ErrorMessage="precisa ter entre 6 e 8 caracteres")]
public string Senha { get; set; }
[Required(ErrorMessage = "obrigatório")]
[EqualTo("Senha", ErrorMessage="repita a senha")]
public string ConfirmacaoSenha { get; set; }
}
} |
using System;
using OrganizatorServer.Models;
using System.Collections.Generic;
namespace OrganizatorServer.Models {
public class User
{
public int Id { get; set; }
public string Email { get; set; }
public List<Todo> Todos { get; set; }
}
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using AddServiceASP_core21.Models;
using AddServiceASP_core21.Services.Transient;
using AddServiceASP_core21.Services.Singleton;
using AddServiceASP_core21.Services.Scoped;
namespace AddServiceASP_core21.Controllers
{
public class ProductController : Controller
{
/*Transient*/
private readonly ITransient _transient1;
private readonly ITransient _transient2;
/*SingletoService*/
private readonly ISingleton _singleton1;
private readonly ISingleton _singleton2;
/*ScopedService*/
private readonly IScoped _scoped1;
private readonly IScoped _scoped2;
public ProductController(ITransient transient1, ITransient transient2,ISingleton singleton1, ISingleton singleton2, IScoped scoped1,IScoped scoped2)
{
_transient1 = transient1;
_transient2 = transient2;
_singleton1 = singleton1;
_singleton2 = singleton2;
_scoped1 = scoped1;
_scoped2 = scoped2;
}
public IActionResult Index()
{
//Transient
ViewBag.data01 = _transient1.getProduct();
ViewBag.count01 = _transient1.countService();
ViewBag.data02 = _transient2.getProduct();
ViewBag.count02 = _transient2.countService();
//Singleto
ViewBag.data03 = _singleton1.getProduct();
ViewBag.count03 = _singleton1.countService();
ViewBag.data04 = _singleton2.getProduct();
ViewBag.count04 = _singleton2.countService();
//Scoped
ViewBag.data05 = _scoped1.getProduct();
ViewBag.count05 = _scoped1.countService();
ViewBag.data06 = _scoped2.getProduct();
ViewBag.count06 = _scoped2.countService();
return View();
}
}
} |
using System.Linq;
using System.Threading.Tasks;
using Uintra.Core.Localization;
using Uintra.Core.Member.Abstractions;
using Uintra.Core.Member.Entities;
using Uintra.Core.Member.Services;
using Uintra.Core.User;
using Uintra.Features.Notification.Configuration;
using Uintra.Features.Notification.Entities.Base;
using Uintra.Features.Notification.Models;
using Uintra.Features.Notification.Models.NotifierTemplates;
using Uintra.Features.Notification.Services;
using Uintra.Infrastructure.Helpers;
using static Uintra.Features.Notification.Constants.TokensConstants;
namespace Uintra.Features.Notification
{
public class PopupNotificationModelMapper : INotificationModelMapper<PopupNotifierTemplate, PopupNotificationMessage>
{
private const string ProfileLinkTitle = "PopupNotification.ProfileLink.Title";
private readonly IIntranetMemberService<IntranetMember> _intranetMemberService;
private readonly IIntranetLocalizationService _localizationService;
private readonly IIntranetUserContentProvider _intranetUserContentProvider;
public PopupNotificationModelMapper(
IIntranetMemberService<IntranetMember> intranetMemberService,
IIntranetLocalizationService localizationService,
IIntranetUserContentProvider intranetUserContentProvider)
{
_intranetMemberService = intranetMemberService;
_localizationService = localizationService;
_intranetUserContentProvider = intranetUserContentProvider;
}
public PopupNotificationMessage Map(INotifierDataValue notifierData, PopupNotifierTemplate template, IIntranetMember receiver)
{
var message = new PopupNotificationMessage
{
ReceiverId = receiver.Id,
NotificationType = NotificationTypeEnum.Welcome
};
(string, string)[] tokens =
{
(FullName, _intranetMemberService.Get(receiver.Id).DisplayedName),
(ProfileLink, HtmlHelper.CreateLink(_localizationService.Translate(ProfileLinkTitle), _intranetUserContentProvider.GetEditPage().Url))
};
message.Message = ReplaceTokens(template.Message, tokens);
return message;
}
public async Task<PopupNotificationMessage> MapAsync(INotifierDataValue notifierData, PopupNotifierTemplate template, IIntranetMember receiver)
{
var message = new PopupNotificationMessage
{
ReceiverId = receiver.Id,
NotificationType = NotificationTypeEnum.Welcome
};
(string, string)[] tokens =
{
//(FullName, (await _intranetMemberService.GetAsync(receiver.Id)).DisplayedName),
(FullName, (_intranetMemberService.Get(receiver.Id)).DisplayedName),
(ProfileLink, HtmlHelper.CreateLink(_localizationService.Translate(ProfileLinkTitle), _intranetUserContentProvider.GetEditPage().Url))
};
message.Message = ReplaceTokens(template.Message, tokens);
return message;
}
private string ReplaceTokens(string source, params (string token, string value)[] replacePairs) =>
replacePairs
.Aggregate(source, (acc, pair) => acc.Replace(pair.token, pair.value));
}
} |
using UnityEngine;
using System.Collections;
public class OnEscapePressed : MonoBehaviour {
public string sceneToLoad;
void Update () {
if (Input.GetKeyDown("escape"))
{
if (sceneToLoad.Equals("Quit"))
{
Application.Quit();
}
else
{
Application.LoadLevel(sceneToLoad);
}
}
}
}
|
using System.Threading.Tasks;
using OrchardCore.ContentManagement;
namespace DFC.ServiceTaxonomy.GraphSync.Orchestrators.Interfaces
{
public interface ISyncOrchestrator
{
Task<bool> SaveDraft(ContentItem contentItem);
Task<bool> Publish(ContentItem contentItem);
Task<bool> Update(ContentItem publishedContentItem, ContentItem previewContentItem);
Task<bool> DiscardDraft(ContentItem contentItem);
Task<bool> Clone(ContentItem contentItem);
Task<bool> Restore(ContentItem contentItem);
}
}
|
using iText.Kernel.Pdf;
using iText.Kernel.Pdf.Canvas.Parser;
using iText.Kernel.Pdf.Canvas.Parser.Listener;
using Parser_Console.Interfaces;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
namespace Parser_Console.Classes
{
public class DocumentCollection
{
public List<IDocument> Documents { get; set; }
public List<CorruptDocument> corruptDocuments => Documents.Where(x => x is CorruptDocument).Select(x => (CorruptDocument)x).ToList();
public List<E3> E3s => Documents.Where(x => x is E3).Select(x => (E3)x).ToList();
public List<F2> F2s => Documents.Where(x => x is F2).Select(x => (F2)x).ToList();
public List<E3> ValidE3s => Documents.Where(x => x is E3).Select(x => (E3)x).Where(x=>x.Year == 2019).ToList();
public List<Taxis> TaxisList => Documents.Where(x => x is Taxis).Select(x => (Taxis)x).ToList();
public List<Taxis> ValidTaxisList => TaxisList.Where(x=>x.Complete).ToList();
public Project Project { get; set; }
public DocumentCollection()
{
Documents = new List<IDocument>();
}
public void AddDocument(string path)
{
PdfReader reader;
PdfDocument doc;
try
{
reader = new PdfReader(path);
doc = new PdfDocument(reader);
}
catch
{
AddCorrupt(path);
return;
}
string p1 = "";
try
{
p1 = PdfTextExtractor.GetTextFromPage(doc.GetFirstPage(), new LocationTextExtractionStrategy());
}
catch
{
AddUnknown(path);
}
int e3Check = p1.IndexOf("ΚΑΤΑΣΤΑΣΗ ΟΙΚΟΝΟΜΙΚΩΝ ΣΤΟΙΧΕΙΩΝ");
int taxisCheck = p1.IndexOf("TaxisNET");
if(e3Check != -1)
{
AddE3(path);
return;
}
if(taxisCheck != -1)
{
AddTaxis(path);
return;
}
string line1 = Functions.GetLine(p1, 2);
string line2 = Functions.GetLine(p1, 3);
if(Functions.IsStringNumeric(line1) && Functions.IsStringNumeric(line2))
{
AddF2(path);
return;
}
AddUnknown(path);
}
private void AddF2(string path)
{
F2 newF2 = new F2();
newF2.FilePath = path;
Documents.Add(newF2);
try
{
newF2.Scan();
}
catch
{
newF2.ParsingErrorExternal = true;
}
}
public void AddE3(string path)
{
E3 newE3 = new E3();
newE3.FilePath = path;
Documents.Add(newE3);
try
{
newE3.ScanE3(path);
}
catch
{
newE3.ParsingErrorExternal = true;
}
}
public void AddTaxis(string path)
{
Taxis newTaxis = new Taxis();
newTaxis.FilePath = path;
Documents.Add(newTaxis);
try
{
newTaxis.Scan();
}
catch
{
newTaxis.ParsingErrorExternal = true;
}
}
public void AddUnknown(string path)
{
UnknownDocument newUnknown = new UnknownDocument();
newUnknown.FilePath = path;
Documents.Add(newUnknown);
}
private void AddCorrupt(string path)
{
CorruptDocument newCorrupt = new CorruptDocument();
newCorrupt.FilePath = path;
Documents.Add(newCorrupt);
}
}
}
|
// <copyright file="PathSegment.cs" company="WaterTrans">
// © 2020 WaterTrans
// </copyright>
namespace WaterTrans.GlyphLoader.Geometry
{
/// <summary>
/// Represents a segment of a <see cref="PathFigure"/> object.
/// </summary>
public abstract class PathSegment
{
/// <summary>
/// Gets or sets a value that indicates whether the segment is stroked.
/// </summary>
public bool IsStroked { get; set; }
/// <inheritdoc />
public abstract override string ToString();
/// <summary>
/// Returns a string that represents the current object.
/// </summary>
/// <param name="x">X coordinates offset.</param>
/// <param name="y">Y coordinates offset.</param>
/// <returns>A string that represents the current object.</returns>
public abstract string ToString(double x, double y);
/// <summary>
/// Returns a string that represents the current object.
/// </summary>
/// <param name="x">X coordinates offset.</param>
/// <param name="y">Y coordinates offset.</param>
/// <param name="roundDigits">Round by the given number of digits.</param>
/// <returns>A string that represents the current object.</returns>
public abstract string ToString(double x, double y, int roundDigits);
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CoreLib.Models
{
public class Bonus
{
public int? ID { get; set; }
public string EmpCode { get; set; }
public string Type { get; set; }
public double Money { get; set; }
public string Note { get; set; }
public string RewardType { get; set; }
public string FullName { get; set; }
}
}
|
public static class JsonHelper
{
public static List<MyApplicationService> LoadServiceData(string filename = "MyApplicationServices.json")
{
string jsonData = File.ReadAllText(filename);
return JsonConvert.DeserializeObject<List<MyApplicationService>>(jsonData);
}
public static List<MyApplicationEnvironment> LoadEnvironmentsData(string filename = "MyApplicationEnvironments.json")
{
string jsonData = File.ReadAllText(filename);
return JsonConvert.DeserializeObject<List<MyApplicationEnvironment>>(jsonData);
}
}
public static class RestHelper
{
static HttpClient client = new HttpClient();
public static string RunRestApi(string uri, string authorization = null)
{
client.DefaultRequestHeaders.Clear();
if (authorization != null)
{
var byteArray = Encoding.ASCII.GetBytes(authorization);
client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", Convert.ToBase64String(byteArray));
//client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
}
string json = null;
HttpResponseMessage response = client.GetAsync(uri).Result;
if (response.IsSuccessStatusCode)
{
json = response.Content.ReadAsStringAsync().Result;
return json;
}
else
{
string result = String.Format("******* {0} => {1}", uri, response.ReasonPhrase.ToString());
Console.WriteLine(result);
throw new Exception(result);
}
}
}
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace Microsoft.ServiceFabric.Data.Collections
{
public interface IReliableDictionary<TKey, TValue> : IReliableCollection<KeyValuePair<TKey, TValue>> where TKey : IComparable<TKey>, IEquatable<TKey>
{
Task<ConditionalValue<TValue>> TryGetValueAsync(ITransaction tx, TKey key);
Task<TValue> AddOrUpdateAsync(ITransaction transaction, TKey key, TValue addValue, Func<TKey, TValue, TValue> updateValueFactory);
Task TryRemoveAsync(ITransaction tx, TKey key);
Task<bool> ContainsKeyAsync(ITransaction tx, TKey key);
}
}
|
using System.Web.Mvc;
using MongoNotes.App.DAL;
using MongoNotes.App.Models;
namespace MongoNotes.App.Controllers
{
public class HomeController : Controller
{
private readonly Dal _dal = new Dal();
public ActionResult Index()
{
return View(_dal.GetAllNotes());
}
public ActionResult Create()
{
return View();
}
[HttpPost]
public ActionResult Create(Note note)
{
try
{
_dal.CreateNote(note);
return RedirectToAction("Index");
}
catch
{
return View();
}
}
public ActionResult About()
{
return View();
}
}
} |
using System;
using System.Collections.Generic;
using System.Text;
namespace CrudMvc.Domain.Entity
{
public class NivelEnsino
{
public int NivelEnsinoId { get; set; }
public string Descricao { get; set; }
//virtual para Lazy Loading
public virtual ICollection<Estudante> Estudantes { get; set; }
public virtual ICollection<Professor> Professores { get; set; }
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.ML.SearchSpace;
namespace Microsoft.ML.AutoML
{
/// <summary>
/// propose hyper parameter using ECI index and <see cref="CostFrugalTuner"/>.
/// ECI index is a way to measure the importance of a trainer. A higher ECI means a trainer
/// is more likely to be picked.
/// </summary>
public class EciCostFrugalTuner : ITuner
{
private readonly Dictionary<string, ITuner> _tuners;
private readonly PipelineProposer _pipelineProposer;
// this dictionary records the schema for each trial.
// the key is trial id, and value is the schema for that trial.
private readonly IMetricManager _metricManager;
public EciCostFrugalTuner(SweepablePipeline sweepablePipeline, IMetricManager metricManager, AutoMLExperiment.AutoMLExperimentSettings settings)
{
_tuners = new Dictionary<string, ITuner>();
_pipelineProposer = new PipelineProposer(sweepablePipeline, settings, metricManager);
_metricManager = metricManager;
}
public Parameter Propose(TrialSettings settings)
{
(var searchSpace, var schema) = _pipelineProposer.ProposeSearchSpace();
if (!_tuners.ContainsKey(schema))
{
var t = new CostFrugalTuner(searchSpace, searchSpace.SampleFromFeatureSpace(searchSpace.Default), !_metricManager.IsMaximize);
_tuners.Add(schema, t);
}
var tuner = _tuners[schema];
settings.Parameter[AutoMLExperiment.PipelineSearchspaceName] = tuner.Propose(settings);
return settings.Parameter;
}
public void Update(TrialResult result)
{
var schema = result.TrialSettings.Parameter[AutoMLExperiment.PipelineSearchspaceName]["_SCHEMA_"].AsType<string>();
if (_tuners.TryGetValue(schema, out var tuner))
{
tuner.Update(result);
}
_pipelineProposer.Update(result, schema);
}
}
}
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CueStick : MonoBehaviour {
//public SteamVR_TrackedObject frontController;
//public SteamVR_TrackedObject backController;
//Collider m_Collider;
//private Rigidbody cueRB;
//private Vector3 frontPos;
//private Vector3 backPos;
//private bool hittedCue;
//// Use this for initialization
//void Start () {
// cueRB = gameObject.GetComponent<Rigidbody> ();
// m_Collider = GetComponent<Collider>();
//}
//// Update is called once per frame
//void Update () {
// //frontPos = frontController.transform.position;
// //backPos = backController.transform.position;
// //cueRB.MovePosition (0.75f * backPos + 0.25f * frontPos);
// //cueRB.MoveRotation (Quaternion.LookRotation(frontPos-backPos)*Quaternion.Euler(90f,0f,0f));
//}
//public void m_disableCollider()
//{
// m_Collider.enabled = false;
//}
//public void m_enableCollider()
//{
// m_Collider.enabled = true;
//}
//private void onCollisionEnter(Collision col)
//{
// if (col.gameObject.name == "CueBall") {
// hittedCue = true;
// } else {
// hittedCue = false;
// }
//}
//public bool hittedCueBall()
//{
// return hittedCue;
//}
//private Vector3 upVector;
//private float velocity;
//private float maxVelocity;
//private Vector3 lastPosition;
//private void Start()
//{
// lastPosition = this.transform.position;
// maxVelocity = 0;
//}
//private void Update()
//{
// upVector = this.transform.up;
// velocity = (this.transform.position - lastPosition).magnitude;
// if (velocity > maxVelocity)
// {
// maxVelocity = velocity;
// }
// lastPosition = this.transform.position;
//}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
namespace IRAP.Client.GUI.MESPDC.Actions
{
public interface IUDFActionFactory
{
IUDFAction CreateAction(
XmlNode actionParams,
ExtendEventHandler extendAction,
ref object tag);
}
} |
using KartObjects;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace KartExchangeEngine
{
public class FEPriceList:FEEntity
{
[DBIgnoreAutoGenerateParam]
[DBIgnoreReadParam]
public override string FriendlyName
{
get { return "Сущность импорта прайс листа"; }
}
/// <summary>
/// Код товара
/// </summary>
public string GoodCode
{
get;
set;
}
/// <summary>
/// Код подразделения
/// </summary>
public string StoreCode
{
get;
set;
}
/// <summary>
/// Цена
/// </summary>
public decimal Price
{
get;
set;
}
}
}
|
using System.Data;
using System.Drawing;
using System.Linq;
using System.Windows;
using System.Windows.Forms;
namespace IEnumerableVisualizerDotNetStandard
{
public partial class IEnumerableVisualizerForm : Form
{
public IEnumerableVisualizerForm(DataTable dataTable)
{
InitializeComponent();
var screen = Screen.FromControl(this);
button1.TabIndex = 0;
if (dataTable != null)
{
Text = string.Format("{0} Visualizer", dataTable.Namespace);
if (dataTable.Rows.Count > 0)
{
var columnNames = dataTable.Columns.Cast<DataColumn>().Select(x => x.ColumnName).OrderBy(x => x).ToList();
for (int i = 0; i < columnNames.Count; i++)
{
dataTable.Columns[columnNames[i]].SetOrdinal(i);
}
var column = dataTable.Columns.Add(string.Empty, typeof(int));
column.SetOrdinal(0);
dataGridView1.DataSource = dataTable;
dataGridView1.Columns[0].HeaderText = string.Empty;
for (var i = 0; i < dataTable.Rows.Count; i++)
{
dataTable.Rows[i][0] = i;
}
if (dataGridView1.RowHeadersWidth * dataGridView1.Columns.Count < dataGridView1.Width)
{
dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells;
}
dataGridView1.Visible = true;
}
else
{
label1.Visible = true;
Size = MinimumSize;
}
}
else
{
label1.Visible = true;
Size = MinimumSize;
}
}
private void IEnumerableVisualizerForm_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Escape)
{
Close();
}
}
private void button1_Click(object sender, System.EventArgs e)
{
Close();
}
private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
if (e.ColumnIndex == 0)
{
e.Value = string.Format("[{0}]", e.Value);
}
}
private void IEnumerableVisualizerForm_Shown(object sender, System.EventArgs e)
{
Cursor.Current = Cursors.Arrow;
}
private void IEnumerableVisualizerForm_MouseClick(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Middle)
{
if (WindowState != FormWindowState.Maximized)
{
WindowState = FormWindowState.Maximized;
}
else
{
WindowState = FormWindowState.Normal;
}
}
}
private void dataGridView1_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
{
if (dataGridView1.Rows.Count > 0)
{
dataGridView1.Rows[0].Selected = true;
}
}
private void IEnumerableVisualizerForm_MouseWheel(object sender, MouseEventArgs e)
{
if (dataGridView1.Controls.OfType<VScrollBar>().FirstOrDefault()?.Visible != true )
{
int offset = dataGridView1.HorizontalScrollingOffset - e.Delta;
if (offset < 0)
{
offset = 0;
}
dataGridView1.HorizontalScrollingOffset = offset;
}
}
}
}
|
//
// System.Web.HttpUtility/HttpEncoder
//
// Authors:
// Patrik Torstensson (Patrik.Torstensson@labs2.com)
// Wictor Wilén (decode/encode functions) (wictor@ibizkit.se)
// Tim Coleman (tim@timcoleman.com)
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
// Marek Habersack <mhabersack@novell.com>
//
// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace ResumeEditor.Common
{
static class UriHelper
{
static readonly char [] hexChars = "0123456789abcdef".ToCharArray ();
public static string UrlEncode (byte[] bytes)
{
if (bytes == null)
throw new ArgumentNullException ("bytes");
var result = new MemoryStream (bytes.Length);
for (int i = 0; i < bytes.Length; i++)
UrlEncodeChar ((char)bytes [i], result, false);
return Encoding.ASCII.GetString (result.ToArray());
}
public static byte [] UrlDecode (string s)
{
if (null == s)
return null;
var e = Encoding.UTF8;
if (s.IndexOf ('%') == -1 && s.IndexOf ('+') == -1)
return e.GetBytes (s);
long len = s.Length;
var bytes = new List <byte> ();
int xchar;
char ch;
for (int i = 0; i < len; i++) {
ch = s [i];
if (ch == '%' && i + 2 < len && s [i + 1] != '%') {
if (s [i + 1] == 'u' && i + 5 < len) {
// unicode hex sequence
xchar = GetChar (s, i + 2, 4);
if (xchar != -1) {
WriteCharBytes (bytes, (char)xchar, e);
i += 5;
} else
WriteCharBytes (bytes, '%', e);
} else if ((xchar = GetChar (s, i + 1, 2)) != -1) {
WriteCharBytes (bytes, (char)xchar, e);
i += 2;
} else {
WriteCharBytes (bytes, '%', e);
}
continue;
}
if (ch == '+')
WriteCharBytes (bytes, ' ', e);
else
WriteCharBytes (bytes, ch, e);
}
return bytes.ToArray ();
}
static void UrlEncodeChar (char c, Stream result, bool isUnicode) {
if (c > ' ' && NotEncoded (c)) {
result.WriteByte ((byte)c);
return;
}
if (c==' ') {
result.WriteByte ((byte)'+');
return;
}
if ( (c < '0') ||
(c < 'A' && c > '9') ||
(c > 'Z' && c < 'a') ||
(c > 'z')) {
if (isUnicode && c > 127) {
result.WriteByte ((byte)'%');
result.WriteByte ((byte)'u');
result.WriteByte ((byte)'0');
result.WriteByte ((byte)'0');
}
else
result.WriteByte ((byte)'%');
int idx = ((int) c) >> 4;
result.WriteByte ((byte)hexChars [idx]);
idx = ((int) c) & 0x0F;
result.WriteByte ((byte)hexChars [idx]);
}
else {
result.WriteByte ((byte)c);
}
}
static int GetChar (string str, int offset, int length)
{
int val = 0;
int end = length + offset;
for (int i = offset; i < end; i++) {
char c = str [i];
if (c > 127)
return -1;
int current = GetInt ((byte) c);
if (current == -1)
return -1;
val = (val << 4) + current;
}
return val;
}
static int GetInt (byte b)
{
char c = (char) b;
if (c >= '0' && c <= '9')
return c - '0';
if (c >= 'a' && c <= 'f')
return c - 'a' + 10;
if (c >= 'A' && c <= 'F')
return c - 'A' + 10;
return -1;
}
static bool NotEncoded (char c)
{
return c == '!' || c == '(' || c == ')' || c == '*' || c == '-' || c == '.' || c == '_' || c == '\'';
}
static void WriteCharBytes (List<byte> buf, char ch, Encoding e)
{
if (ch > 255) {
foreach (byte b in e.GetBytes (new char[] { ch }))
buf.Add (b);
} else
buf.Add ((byte)ch);
}
}
}
|
using System;
using System.ComponentModel.DataAnnotations;
using com.Sconit.Entity.SYS;
namespace com.Sconit.Entity.SI.SAP
{
[Serializable]
public partial class SAPSDMES0002 : EntityBase
{
#region O/R Mapping Properties
public Int32 Id { get; set; }
[Export(ExportName = "SAPSDCancel", ExportSeq = 10)]
[Display(Name = "SAPSDNormal_ZMESGUID", ResourceType = typeof(Resources.SI.SAPSDNormal))]
public string ZMESGUID { get; set; }
[Export(ExportName = "SAPSDCancel", ExportSeq = 20)]
[Display(Name = "SAPSDNormal_ZMESSO", ResourceType = typeof(Resources.SI.SAPSDNormal))]
public string ZMESSO { get; set; }
[Export(ExportName = "SAPSDCancel", ExportSeq = 190)]
[Display(Name = "SAPSDNormal_ZCSRQSJ", ResourceType = typeof(Resources.SI.SAPSDNormal))]
public DateTime ZCSRQSJ { get; set; }
[Export(ExportName = "SAPSDCancel", ExportSeq = 200)]
[Display(Name = "SAPSDNormal_Status", ResourceType = typeof(Resources.SI.SAPSDNormal))]
public Int32 Status { get; set; }
[Export(ExportName = "SAPSDCancel", ExportSeq = 210)]
[Display(Name = "SAPSDNormal_BatchNo", ResourceType = typeof(Resources.SI.SAPSDNormal))]
public string BatchNo { get; set; }
[Export(ExportName = "SAPSDCancel", ExportSeq = 220)]
[Display(Name = "SAPSDNormal_UniqueCode", ResourceType = typeof(Resources.SI.SAPSDNormal))]
public string UniqueCode { get; set; }
#endregion
public override int GetHashCode()
{
if (Id != 0)
{
return Id.GetHashCode();
}
else
{
return base.GetHashCode();
}
}
public override bool Equals(object obj)
{
SAPSDMES0002 another = obj as SAPSDMES0002;
if (another == null)
{
return false;
}
else
{
return (this.Id == another.Id);
}
}
}
}
|
using DocumentFormat.OpenXml.Packaging;
using Lucene.Net.Documents;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Xml;
namespace Polaris.Models {
/// <summary>
/// .docx の Document を生成する
/// </summary>
public class DocConverterDOCX : IDocConverter {
/// <summary>
/// Doc 取得
/// </summary>
public IEnumerable<Document> GetDocs( string filePath )
#region
{
var retval = new List<Document>();
const string wordmlNamespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main";
StringBuilder textBuilder = new StringBuilder();
using( FileStream fs = new FileStream( filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite ) ) {
using( var wordDocument = WordprocessingDocument.Open( fs, false ) ) {
NameTable nt = new NameTable();
XmlNamespaceManager nsManager = new XmlNamespaceManager(nt);
nsManager.AddNamespace( "w", wordmlNamespace );
XmlDocument xdoc = new XmlDocument(nt);
xdoc.Load( wordDocument.MainDocumentPart.GetStream() );
XmlNodeList paragraphNodes = xdoc.SelectNodes("//w:p", nsManager);
foreach( XmlNode paragraphNode in paragraphNodes ) {
XmlNodeList textNodes = paragraphNode.SelectNodes(".//w:t", nsManager);
foreach( XmlNode textNode in textNodes ) {
textBuilder.Append( textNode.InnerText );
}
textBuilder.Append( Environment.NewLine );
}
}
}
// 改行文字で区切る
var innerTexts = textBuilder.ToString().Replace( "\r\n", "\n" );
var lineTexts = new List<string>(innerTexts.Split('\n'));
int rowNo = 1;
foreach( var lineText in lineTexts ) {
if( !String.IsNullOrWhiteSpace( lineText ) ) {
var fieldFileName = new StringField( "fileName", filePath, Field.Store.YES );
var fieldFileType = new StringField( "fileType", "word", Field.Store.YES );
var fieldSheet = new StringField( "sheet", "0", Field.Store.YES );
var fieldRow = new StringField( "row", rowNo.ToString(), Field.Store.YES );
var fieldColumn = new StringField( "column", "0", Field.Store.YES );
var fieldShape = new StringField( "shape", "0", Field.Store.YES );
var fieldText = new TextField( "text", lineText, Field.Store.YES );
var doc = new Document {
fieldFileName,
fieldFileType,
fieldSheet,
fieldRow,
fieldColumn,
fieldShape,
fieldText
};
retval.Add( doc );
}
++rowNo;
}
return retval;
}
#endregion
}
}
|
using Dapper;
using Model.APIModels.Result;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Comp;
namespace DAL.SmartKitchen
{
/// <summary>
/// 智慧厨房数据接口
/// </summary>
public class D_SmartKitchen
{
/// <summary>
/// 查询
/// </summary>
public List<E_EmployeeInfo> GetEmployee()
{
List<E_EmployeeInfo> list = new List<E_EmployeeInfo>();
StringBuilder SearchSql = new StringBuilder();
if (Utils.GetConfig("IsOldDB").Equals("1"))
{
SearchSql.Append($@"
select * from
(
select
TT.companyid as company_num,
TT.classid as workpoint_num,
TT.PID as [type_id],
P.Name as [type_name],
C.CName as workpoint_name,
O.CName as company_name,
TT.total
from
(
select companyid,classid,PID,count(1) as total from
(
select A.id as userid,B.AID as companyid,A.classid,A.PID from Personnel as A
left join ClassInfo as B on A.classid=B.id where A.classid is not null
) as T group by companyid,classid,PID
) as TT
left join BranchPost as P on TT.PID=P.id
left join ClassInfo as C on TT.classid=C.id
left join Company as O on TT.companyid=O.id
where TT.companyid is not null
) as T");
}
else
{
SearchSql.Append($@"
select
TT.companyid as company_num,
TT.classid as workpoint_num,
TT.PID as [type_id],
P.Name as [type_name],
C.CName as workpoint_name,
O.CName as company_name,
TT.total
from
(
select companyid,classid,PID,count(1) as total from
(
select A.userid,A.companyid,A.classid,B.PID from tb_user as A left join tb_userinfo as B on A.userid=B.userid where A.classid is not null and companyid is not null
) as T group by companyid,classid,PID
) as TT
left join BranchPost as P on TT.PID=P.id
left join ClassInfo as C on TT.classid=C.id
left join Company as O on TT.companyid=O.id
");
}
var connectingString = PubConstant.GetConnectionString();
if (Utils.GetConfig("IsOldDB").Equals("1"))
{
connectingString = PubConstant.GetOldConnectionString();
}
using (IDbConnection conn = new SqlConnection(connectingString))
{
list = conn.Query<E_EmployeeInfo>(SearchSql.ToString())?.ToList();
}
return list;
}
/// <summary>
/// 查询
/// </summary>
public List<E_ServiceTotal> ServiceRatio(E_ServiceTotal model)
{
StringBuilder strWhere = new StringBuilder();
if (model.starttime != null)
{
strWhere.AddWhere("Date>=@starttime");
}
if (model.endtime != null)
{
strWhere.AddWhere("Date<=@endtime");
}
if(model.classid>0)
{
strWhere.AddWhere("classid=@classid");
}
List<E_ServiceTotal> list = new List<E_ServiceTotal>();
StringBuilder SearchSql = new StringBuilder();
if (Utils.GetConfig("IsOldDB").Equals("1"))
{
SearchSql.Append($@"select * from(
select A.classid,
A.CName as classname,
A.Date,
A.Catering,
A.Persons,
A.QC,
C.id as companyid,
C.CName as companyname from
(
select
CName,
ClassID,
Date,
sum(Catering) as Catering, --配餐人员
Sum(persons) as Persons, --定员
sum(QC) as QC--, --其他人员
--sum(persons+QC) as Number, --就餐人员总数
--Sum(QC+Persons+Catering) as PersonCount --人员总数
from
(
SELECT c.id as ClassID,c.AreaID as GroupID,c.CName,v.Date,v.monthofdate,v.yearofdate,v.day,v.Catering,v.Charge,v.HPersons,v.persons,v.QC,v.Eat,v.Number,v.getmoney,v.id
FROM dbo.ClassInfo as c
INNER JOIN View_Dynamic as v ON c.id = v.ClassID
) as T group by CName,ClassID,Date
) as A
left join dbo.ClassInfo as B on A.ClassID=B.id
left join dbo.Company as C on B.AID=C.id
) as T {strWhere.ToString()}");
}
else
{
SearchSql.Append($@"select * from(
select A.classid,
A.CName as classname,
A.Date,
A.Catering,
A.Persons,
A.QC,
C.id as companyid,
C.CName as companyname from
(
select
CName,
ClassID,
Date,
sum(Catering) as Catering, --配餐人员
Sum(persons) as Persons, --定员
sum(QC) as QC--, --其他人员
--sum(persons+QC) as Number, --就餐人员总数
--Sum(QC+Persons+Catering) as PersonCount --人员总数
from
(
SELECT c.id as ClassID,c.AreaID as GroupID,c.CName,v.Date,v.monthofdate,v.yearofdate,v.day,v.Catering,v.Charge,v.HPersons,v.persons,v.QC,v.Eat,v.Number,v.getmoney,v.id
FROM dbo.ClassInfo as c
INNER JOIN View_Dynamic as v ON c.id = v.ClassID
) as T group by CName,ClassID,Date
) as A
left join dbo.ClassInfo as B on A.ClassID=B.id
left join dbo.Company as C on B.companyid=C.id
) as T {strWhere.ToString()}");
}
var connectingString = PubConstant.GetConnectionString();
if (Utils.GetConfig("IsOldDB").Equals("1"))
{
connectingString = PubConstant.GetOldConnectionString();
}
using (IDbConnection conn = new SqlConnection(connectingString))
{
list = conn.Query<E_ServiceTotal>(SearchSql.ToString(), model)?.ToList();
}
return list;
}
/// <summary>
/// 查询
/// </summary>
public List<E_WorkingHoursInfo> EmployeeWorkingHours(E_WorkingHoursInfo model)
{
StringBuilder strWhere = new StringBuilder();
if (model.starttime != null)
{
strWhere.AddWhere("Date>=@starttime");
}
if (model.endtime != null)
{
strWhere.AddWhere("Date<=@endtime");
}
List<E_WorkingHoursInfo> list = new List<E_WorkingHoursInfo>();
StringBuilder SearchSql = new StringBuilder();
if (Utils.GetConfig("IsOldDB").Equals("1"))
{
SearchSql.Append($@"select workpoint_num,workpoint_name,company_num,company_name,[type_id],[type_name],sum(workinghours) as total from
(
select
A.workinghours,
A.ClassID as workpoint_num,
D.CName as workpoint_name,
C.id as [type_id],
C.Name as [type_name],
E.id as company_num,
E.CName as company_name
from
(
select PID as userid,ClassID,Date,8 as workinghours from AttendanceRecord {strWhere.ToString()}
) as A inner join Personnel as B on A.userid=B.id
left join BranchPost as C on B.PID=C.id
left join dbo.ClassInfo as D on A.ClassID=D.id
left join dbo.Company as E on D.AID=E.id
) as T group by workpoint_num,workpoint_name,company_num,company_name,[type_id],[type_name]");
}
else
{
SearchSql.Append($@"select workpoint_num,workpoint_name,company_num,company_name,[type_id],[type_name],sum(workinghours) as total from
(
select
A.workinghours,
A.ClassID as workpoint_num,
D.CName as workpoint_name,
C.id as [type_id],
C.Name as [type_name],
E.id as company_num,
E.CName as company_name
from
(
select PID as userid,ClassID,Date,8 as workinghours from AttendanceRecord {strWhere.ToString()}
) as A inner join tb_userinfo as B on A.userid=B.userid
left join BranchPost as C on B.PID=C.id
left join dbo.ClassInfo as D on A.ClassID=D.id
left join dbo.Company as E on D.companyid=E.id
) as T group by workpoint_num,workpoint_name,company_num,company_name,[type_id],[type_name]");
}
var connectingString = PubConstant.GetConnectionString();
if (Utils.GetConfig("IsOldDB").Equals("1"))
{
connectingString = PubConstant.GetOldConnectionString();
}
using (IDbConnection conn = new SqlConnection(connectingString))
{
list = conn.Query<E_WorkingHoursInfo>(SearchSql.ToString(), model)?.ToList();
}
return list;
}
/// <summary>
/// 查询
/// </summary>
public List<E_EquipmentInfo> Equipment()
{
List<E_EquipmentInfo> list = new List<E_EquipmentInfo>();
StringBuilder SearchSql = new StringBuilder();
if (Utils.GetConfig("IsOldDB").Equals("1"))
{
SearchSql.Append($@"select
A.total,
B.id as workpoint_num,
B.CName as workpoint_name,
A.PAZDD as [type_name],
C.id as company_num,
C.CName as company_name
from
(
select PAZDD,ClassID,count(1) as total from DMMAccount group by PAZDD,ClassID
) as A
left join dbo.ClassInfo as B on A.ClassID=B.id
left join dbo.Company as C on B.AID=C.id
where B.id is not null");
}
else
{
SearchSql.Append($@"select
A.total,
B.id as workpoint_num,
B.CName as workpoint_name,
A.PAZDD as [type_name],
C.id as company_num,
C.CName as company_name
from
(
select PAZDD,ClassID,count(1) as total from DMMAccount group by PAZDD,ClassID
) as A
left join dbo.ClassInfo as B on A.ClassID=B.id
left join dbo.Company as C on B.companyid=C.id
where B.id is not null");
}
var connectingString = PubConstant.GetConnectionString();
if (Utils.GetConfig("IsOldDB").Equals("1"))
{
connectingString = PubConstant.GetOldConnectionString();
}
using (IDbConnection conn = new SqlConnection(connectingString))
{
list = conn.Query<E_EquipmentInfo>(SearchSql.ToString())?.ToList();
}
return list;
}
}
}
|
// Fill out your copyright notice in the Description page of Project Settings.
using UnrealBuildTool;
using System.Collections.Generic;
public class MinecartManiaTarget : TargetRules
{
public MinecartManiaTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Game;
ExtraModuleNames.AddRange( new string[] { "MinecartMania" } );
}
}
|
using System;
using System.Activities;
using System.ComponentModel;
using Phenix.Core.Data;
using Phenix.Core.Workflow;
namespace Phenix.Workflow.Activities
{
/// <summary>
/// 断点活动
/// </summary>
[Description("断点")]
public class JointActivity : NativeActivity, IJointActivity
{
#region 属性
/// <summary>
/// 插件程序集名
/// </summary>
public string PluginAssemblyName { get; set; }
/// <summary>
/// 作业角色
/// </summary>
public string WorkerRole { get; set; }
/// <summary>
/// 标签
/// </summary>
public string Caption { get; set; }
/// <summary>
/// 消息
/// </summary>
public string Message { get; set; }
/// <summary>
/// 是否急件
/// </summary>
public bool Urgent { get; set; }
/// <summary>
/// 指示活动是否会使工作流进入空闲状态
/// </summary>
protected override bool CanInduceIdle
{
get { return true; }
}
#endregion
/// <summary>
/// 运行活动的执行逻辑
/// </summary>
protected override void Execute(NativeActivityContext context)
{
string bookmarkName = String.Format("{0}.{1}", this.GetType().FullName, Sequence.Value);
WorkflowHub.DispatchWorkflowTask(context.WorkflowInstanceId, bookmarkName, this);
context.CreateBookmark(bookmarkName, new BookmarkCallback(BookmarkCallback), BookmarkOptions.None);
}
/// <summary>
/// 当通知指示要 NativeActivity 恢复时,要调用的方法
/// </summary>
protected virtual void BookmarkCallback(NativeActivityContext context, Bookmark bookmark, object obj)
{
WorkflowHub.CompleteWorkflowTask(context.WorkflowInstanceId, bookmark.Name);
}
}
/// <summary>
/// 断点活动
/// </summary>
[Description("断点")]
public abstract class JointActivity<TResult> : NativeActivity<TResult>, IJointActivity
{
#region 属性
/// <summary>
/// 插件程序集名
/// </summary>
public string PluginAssemblyName { get; set; }
/// <summary>
/// 作业角色
/// </summary>
public string WorkerRole { get; set; }
/// <summary>
/// 标签
/// </summary>
public string Caption { get; set; }
/// <summary>
/// 消息
/// </summary>
public string Message { get; set; }
/// <summary>
/// 是否急件
/// </summary>
public bool Urgent { get; set; }
/// <summary>
/// 指示活动是否会使工作流进入空闲状态
/// </summary>
protected override bool CanInduceIdle
{
get { return true; }
}
#endregion
/// <summary>
/// 运行活动的执行逻辑
/// </summary>
protected override void Execute(NativeActivityContext context)
{
string bookmarkName = String.Format("{0}.{1}", this.GetType().FullName, Sequence.Value);
WorkflowHub.DispatchWorkflowTask(context.WorkflowInstanceId, bookmarkName, this);
context.CreateBookmark(bookmarkName, new BookmarkCallback(BookmarkCallback), BookmarkOptions.None);
}
/// <summary>
/// 当通知指示要 NativeActivity 恢复时,要调用的方法
/// </summary>
protected virtual void BookmarkCallback(NativeActivityContext context, Bookmark bookmark, object obj)
{
WorkflowHub.CompleteWorkflowTask(context.WorkflowInstanceId, bookmark.Name);
context.SetValue(Result, (TResult)obj);
}
}
}
|
using Microsoft.AspNetCore.Mvc.Rendering;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using Alabo.Dynamics;
namespace Alabo.Web.ViewFeatures {
public static class SelectListItems {
/// <summary>
/// 从查询对象返回选择项列表
/// 注意会逐项延迟返回,需要一次获取所有数据请使用ToList或ToArray
/// </summary>
/// <typeparam name="TEntity"></typeparam>
/// <typeparam name="TSelected"></typeparam>
/// <param name="query">查询对象</param>
/// <param name="selector">选择文本和值数据的表达式,用于减少从数据库中获取的字段数量</param>
/// <param name="textSelector">选择文本的函数,会转换到字符串</param>
/// <param name="valueSelector">选择值的函数,会转换到字符串</param>
public static IEnumerable<SelectListItem> FromQuery<TEntity, TSelected>(
IQueryable<TEntity> query,
Expression<Func<TEntity, TSelected>> selector,
Func<TSelected, object> textSelector,
Func<TSelected, object> valueSelector) {
return FromIEnumerable(query.Select(selector).ToList(), textSelector, valueSelector);
}
public static IEnumerable<SelectListItem> FromQuery<T>(Expression<Func<T, bool>> predicate,
Func<T, object> textSelector,
Func<T, object> valueSelector) where T : class {
var list = DynamicService.ResolveList(predicate);
return FromIEnumerable(list, textSelector, valueSelector);
}
/// <summary>
/// 从对象列表返回选择项列表
/// 注意会逐项延迟返回,需要一次获取所有数据请使用ToList或ToArray
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="elements">对象列表</param>
/// <param name="textSelector">选择文本的函数,会转换到字符串</param>
/// <param name="valueSelector">选择值的函数,会转换到字符串</param>
public static IEnumerable<SelectListItem> FromIEnumerable<T>(
IEnumerable<T> elements,
Func<T, object> textSelector, Func<T, object> valueSelector) {
foreach (var element in elements) {
yield return new SelectListItem {
Text = textSelector(element)?.ToString(),
Value = valueSelector(element)?.ToString()
};
}
}
}
} |
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using SimpleTaskListSPA.Infrastructure;
namespace SimpleTaskListSPA.Data
{
//класс, определяющий создаваемую в приложении задачу
public class TaskItem : EntityBase
{
//название задачи
[Required(ErrorMessage = "Введите название")]
[StringLength(60, MinimumLength = 3, ErrorMessage = "Название должно быть от 3 до 60 символов")]
public string Name { get; set; } = string.Empty;
//дата создания задачи
public DateTime? CreationDate { get; set; }
//планируемая дата выполнения
[CorrectDate]
public DateTime? PlanningDate { get; set; }
//фактическая дата выполнения (когда задача выполнена по факту)
public DateTime? EffectiveDate { get; set; }
//установлена ли планируемая дата
public bool IsPlanningDateUsed { get; set; }
//завершена ли?
public bool IsCompleted { get; set; }
//просрочена ли?
public bool IsOverdue { get; set; }
//помечена ли задача звёздочкой
public bool IsImportant { get; set; }
//к какой категории относится задача
public Category Category { get; set; }
[Range(1, double.MaxValue, ErrorMessage = "Укажите категорию задачи")]
public long CategoryId { get; set; }
}
}
|
using System;
namespace OdborkyApp.Model
{
public enum ConfirmationType
{
Task, Challenge
}
internal class ConfirmationRequest
{
public int UserId { get; set; }
public Guid TaskProgressId { get; set; }
public Guid ChallengeProgressId { get; set; }
public int TargetId { get; set; }
public ConfirmationType Type { get; set; }
}
internal class Confirmation
{
public int SignerId { get; set; }
public string Signature { get; set; }
public ConfirmationRequest Request { get; set; }
}
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
using HASRental.Models;
using Microsoft.AspNetCore.Identity;
using Newtonsoft.Json;
using Microsoft.AspNetCore.Session;
using Microsoft.AspNetCore.Authorization;
namespace HASRental.Controllers
{
public class RezervacijaController : Controller
{
private readonly NasContext _context;
private readonly UserManager<Korisnik> _userManager;
public RezervacijaController(NasContext context,UserManager<Korisnik> userManager)
{
_context = context;
_userManager = userManager;
}
// GET: Rezervacija
public async Task<IActionResult> Index()
{
var nasContext = _context.Rezervacija.Include(r => r.Korisnik).Include(r => r.KrajnjaLokacija).Include(r => r.PocetnaLokacija).Include(r => r.VoziloKategorija);
ViewBag.Id = _userManager.GetUserId(HttpContext.User);
return View(await nasContext.ToListAsync());
}
// GET: Rezervacija/Details/5
public async Task<IActionResult> Details(int? id)
{
if (id == null)
{
return NotFound();
}
var rezervacija = await _context.Rezervacija
.Include(r => r.Korisnik)
.Include(r => r.KrajnjaLokacija)
.Include(r => r.PocetnaLokacija)
.Include(r => r.VoziloKategorija)
.FirstOrDefaultAsync(m => m.Id == id);
if (rezervacija == null)
{
return NotFound();
}
return View(rezervacija);
}
// GET: Rezervacija/Create
[Authorize(Roles = "Admin")]
[Authorize(Roles ="Klijent")]
public IActionResult Create()
{
ViewData["KorisnikId"] = new SelectList(_context.Users, "Id", "Email");
ViewData["KrajnjaLokacijaId"] = new SelectList(_context.Lokacija, "Id", "Grad");
ViewData["PocetnaLokacijaId"] = new SelectList(_context.Lokacija, "Id", "Grad");
ViewData["VoziloKategorijaId"] = new SelectList(_context.VoziloKategorija, "Id", "Ime");
return View();
}
// POST: Rezervacija/Create
// To protect from overposting attacks, enable the specific properties you want to bind to, for
// more details, see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
[Authorize(Roles="Admin")]
public async Task<IActionResult> Create([Bind("Id,PocetnaLokacijaId,KrajnjaLokacijaId,VoziloKategorijaId")] Rezervacija rezervacija)
{
if (ModelState.IsValid)
{
rezervacija.KorisnikId = int.Parse(_userManager.GetUserId(HttpContext.User));
var rez = JsonConvert.SerializeObject(rezervacija);
TempData["Rezervacija"] = rez;
TempData.Keep("Rezervacija");
/* _context.Add(rezervacija);
await _context.SaveChangesAsync();*/
}
return RedirectToAction("Create", "Renta");
/*ViewData["KorisnikId"] = new SelectList(_context.Users, "Id", "Email", rezervacija.KorisnikId);
ViewData["KrajnjaLokacijaId"] = new SelectList(_context.Lokacija, "Id", "Grad", rezervacija.KrajnjaLokacijaId);
ViewData["PocetnaLokacijaId"] = new SelectList(_context.Lokacija, "Id", "Grad", rezervacija.PocetnaLokacijaId);
ViewData["VoziloKategorijaId"] = new SelectList(_context.VoziloKategorija, "Id", "Ime", rezervacija.VoziloKategorijaId);
return View(rezervacija);*/
}
// GET: Rezervacija/Edit/5
public async Task<IActionResult> Edit(int? id)
{
if (id == null)
{
return NotFound();
}
var rezervacija = await _context.Rezervacija.FindAsync(id);
if (rezervacija == null)
{
return NotFound();
}
ViewData["KorisnikId"] = new SelectList(_context.Users, "Id", "Email", rezervacija.KorisnikId);
ViewData["KrajnjaLokacijaId"] = new SelectList(_context.Lokacija, "Id", "Grad", rezervacija.KrajnjaLokacijaId);
ViewData["PocetnaLokacijaId"] = new SelectList(_context.Lokacija, "Id", "Grad", rezervacija.PocetnaLokacijaId);
ViewData["VoziloKategorijaId"] = new SelectList(_context.VoziloKategorija, "Id", "Ime", rezervacija.VoziloKategorijaId);
return View(rezervacija);
}
// POST: Rezervacija/Edit/5
// To protect from overposting attacks, enable the specific properties you want to bind to, for
// more details, see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Edit(int id, [Bind("Id,PocetnaLokacijaId,KrajnjaLokacijaId,VoziloKategorijaId")] Rezervacija rezervacija)
{
if (id != rezervacija.Id)
{
return NotFound();
}
if (ModelState.IsValid)
{
try
{
_context.Update(rezervacija);
await _context.SaveChangesAsync();
}
catch (DbUpdateConcurrencyException)
{
if (!RezervacijaExists(rezervacija.Id))
{
return NotFound();
}
else
{
throw;
}
}
return RedirectToAction(nameof(Index));
}
ViewData["KorisnikId"] = new SelectList(_context.Users, "Id", "Email", rezervacija.KorisnikId);
ViewData["KrajnjaLokacijaId"] = new SelectList(_context.Lokacija, "Id", "Grad", rezervacija.KrajnjaLokacijaId);
ViewData["PocetnaLokacijaId"] = new SelectList(_context.Lokacija, "Id", "Grad", rezervacija.PocetnaLokacijaId);
ViewData["VoziloKategorijaId"] = new SelectList(_context.VoziloKategorija, "Id", "Ime", rezervacija.VoziloKategorijaId);
return View(rezervacija);
}
// GET: Rezervacija/Delete/5
public async Task<IActionResult> Delete(int? id)
{
if (id == null)
{
return NotFound();
}
var rezervacija = await _context.Rezervacija
.Include(r => r.Korisnik)
.Include(r => r.KrajnjaLokacija)
.Include(r => r.PocetnaLokacija)
.Include(r => r.VoziloKategorija)
.FirstOrDefaultAsync(m => m.Id == id);
if (rezervacija == null)
{
return NotFound();
}
return View(rezervacija);
}
// POST: Rezervacija/Delete/5
[HttpPost, ActionName("Delete")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> DeleteConfirmed(int id)
{
var rezervacija = await _context.Rezervacija.FindAsync(id);
_context.Rezervacija.Remove(rezervacija);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
private bool RezervacijaExists(int id)
{
return _context.Rezervacija.Any(e => e.Id == id);
}
}
}
|
using OxyPlot;
using System;
using System.Collections.Generic;
using FPGADeveloperTools.Common;
using FPGADeveloperTools.WaveformDesignerAndAnalyzer.Model;
using System.Windows.Input;
using FPGADeveloperTools.WaveformDesignerAndAnalyzer.View;
using System.Windows;
using System.ComponentModel;
namespace FPGADeveloperTools.WaveformDesignerAndAnalyzer.ViewModel
{
public class WaveformAnalyzerViewModel : WaveformProcessorViewModel, IImportable
{
private string problemToolTip;
private WaveformAnalyzerView view;
private ICommand importCommand;
private BackgroundWorker bwA;
private BackgroundWorker bwAA;
private WaveformAnalyzer model;
public override WaveformProcessor Model
{
get { return this.model; }
set { this.model = (WaveformAnalyzer)value; }
}
public string Path
{
get { return this.model.Path; }
set { this.model.Path = value; OnPropertyChanged("Path"); this.CanDosRecompute(); }
}
public int LinesIgnore
{
get { return this.model.LinesIgnore; }
set { this.model.LinesIgnore = value; OnPropertyChanged("LinesIgnore"); this.CanDosRecompute(); }
}
public double RMSEFs
{
get { return this.model.RMSEFs; }
set { this.model.RMSEFs = value; OnPropertyChanged("RMSEFs"); }
}
public double RMSElsbs
{
get { return this.model.RMSElsbs; }
set { this.model.RMSElsbs = value; OnPropertyChanged("RMSElsbs"); }
}
public double PRMSE
{
get { return this.model.PRMSE; }
set { this.model.PRMSE = value; OnPropertyChanged("PRMSE"); }
}
public double GainE
{
get { return this.model.GainE; }
set { this.model.GainE = value; OnPropertyChanged("GainE"); }
}
public double DCReal
{
get { return this.model.DCReal; }
set { this.model.DCReal = value; OnPropertyChanged("DCReal"); }
}
public double DCImag
{
get { return this.model.DCImag; }
set { this.model.DCImag = value; OnPropertyChanged("DCImag"); }
}
public string ProblemToolTip
{
get { return this.problemToolTip; }
set { this.problemToolTip = value; OnPropertyChanged("ProblemToolTip"); }
}
public bool CanImport
{
get
{
bool toRet = true;
string ptt = string.Empty;
if (this.Type == null || this.Type == String.Empty)
{
ptt += "One of waveform types must be selected.\n";
toRet = false;
}
else
{
if (this.FFTLength <= 0)
{
ptt += "FFT length cannot be negative or equal to zero.\n";
toRet = false;
}
if (this.Fs <= 0)
{
ptt += "Sampling frequency cannot be negative or equal to zero.\n";
toRet = false;
}
if (this.Bitwidth <= 0)
{
ptt += "Bitwidth cannot be negative or equal to zero.\n";
toRet = false;
}
if(this.LinesIgnore < 0)
{
ptt += "Lines to ignore cannot be negative.\n";
toRet = false;
}
if (this.Type.Contains("Sine"))
{
if (this.InputMag <= 0)
{
ptt += "Input magnitude cannot be negative or equal to zero.\n";
toRet = false;
}
}
else if(this.Type.Contains("OFDM"))
{
if(this.NSymbols <= 0)
{
ptt += "Number of symbols cannot be negative or equal to zero.\n";
toRet = false;
}
}
}
if (ptt.EndsWith("\n"))
ptt = ptt.Remove(ptt.Length - 1);
this.ProblemToolTip = ptt;
return toRet;
}
}
public bool CanImportN
{
get { return !this.CanImport; }
}
public ICommand ImportCommand
{
get { return this.importCommand; }
set { this.importCommand = value; OnPropertyChanged("ImportCommand"); }
}
public WaveformAnalyzerViewModel(WaveformAnalyzer model, WaveformAnalyzerView view)
{
this.model = model;
this.view = view;
this.IPoints = new List<DataPoint>();
this.QPoints = new List<DataPoint>();
this.FPoints = new List<DataPoint>();
this.Radixes = new List<string>()
{
"Decimal", "Hexadecimal", "Floating Point"
};
this.Delimiters = new List<string>()
{
"' '","','"
};
this.ImportCommand = new RelayCommand(new Action<object>(this.Import));
this.bwA = new BackgroundWorker();
this.bwAA = new BackgroundWorker();
this.bwA.DoWork += BwA_DoWork;
this.bwAA.DoWork += BwAA_DoWork;
this.bwA.RunWorkerCompleted += BwA_RunWorkerCompleted;
this.bwAA.RunWorkerCompleted += BwAA_RunWorkerCompleted;
OnPropertyChanged("Radixes");
OnPropertyChanged("Delimiters");
OnPropertyChanged("IPoints");
OnPropertyChanged("QPoints");
OnPropertyChanged("FPoints");
}
private void BwAA_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
this.view.splashAA.Visibility = Visibility.Hidden;
this.view.anInfoBlock.Text = DateTime.Now.ToLongTimeString() + " Waveform analyzed.";
}
private void BwAA_DoWork(object sender, DoWorkEventArgs e)
{
this.Analyze();
}
private void BwA_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
this.view.wfaI.ResetAllAxes();
this.view.wfaQ.ResetAllAxes();
this.view.wfaF.ResetAllAxes();
this.view.splashA.Visibility = Visibility.Hidden;
this.view.anInfoBlock.Text = DateTime.Now.ToLongTimeString() + " Waveform imported successfully.";
this.view.splashAA.Visibility = Visibility.Visible;
this.bwAA.RunWorkerAsync();
}
private void BwA_DoWork(object sender, DoWorkEventArgs e)
{
this.ImportFile();
}
public void Import(object obj)
{
// Create OpenFileDialog
Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
// Set filter for file extension and default file extension
dlg.DefaultExt = ".txt";
dlg.Filter = "txt Files (*.txt)|*.txt";
// Display OpenFileDialog by calling ShowDialog method
Nullable<bool> result = dlg.ShowDialog();
// Get the selected file name and display in a TextBox
if (result == true)
{
// Open document
string filename = dlg.FileName;
this.Path = filename;
this.view.splashA.Visibility = Visibility.Visible;
this.bwA.RunWorkerAsync();
}
}
public void ImportFile()
{
this.model.ReadFile();
this.IPoints = new List<DataPoint>();
this.QPoints = new List<DataPoint>();
this.FPoints = new List<DataPoint>();
for (int i = 0; i < this.Length; i++)
{
this.IPoints.Add(new DataPoint(i/this.Fs, this.I[i]));
this.QPoints.Add(new DataPoint(i/this.Fs, this.Q[i]));
}
for (int i = 0; i < this.Freqs.Length; i++)
{
this.FPoints.Add(new DataPoint((this.Fs * i / this.Freqs.Length), this.Freqs[i]));
}
OnPropertyChanged("IPoints");
OnPropertyChanged("QPoints");
OnPropertyChanged("FPoints");
}
public void Analyze()
{
this.model.AnalyzeSignal();
OnPropertyChanged("Freq");
OnPropertyChanged("Phoff");
OnPropertyChanged("RMS");
OnPropertyChanged("RMSElsbs");
OnPropertyChanged("RMSEFs");
OnPropertyChanged("PRMSE");
OnPropertyChanged("GainE");
OnPropertyChanged("DCReal");
OnPropertyChanged("DCImag");
}
}
}
|
using System.Collections.Generic;
namespace Reactive.Flowable
{
public static partial class FlowableExtensions
{
//public static T Flowable<T> amb(Iterable<? extends Publisher<? extends T>> sources)
//{
//}
//public static T Flowable<T> ambArray(Publisher<? extends T>...sources)
//{
//}
// public static <T, R> Flowable<R> combineLatest(Publisher<? extends T>[] sources, Function<? super Object[], ? extends R> combiner)
// {
// }
// public static <T, R> Flowable<R> combineLatest(Function<? super Object[], ? extends R> combiner, Publisher<? extends T>...sources)
// {
// }
// public static <T, R> Flowable<R> combineLatest(Publisher<? extends T>[] sources, Function<? super Object[], ? extends R> combiner, int bufferSize)
// {
// }
// public static <T, R> Flowable<R> combineLatest(Iterable<? extends Publisher<? extends T>> sources,
// Function<? super Object[], ? extends R> combiner)
// {
// }
// public static <T, R> Flowable<R> combineLatest(Iterable<? extends Publisher<? extends T>> sources,
// Function<? super Object[], ? extends R> combiner, int bufferSize)
// {
// }
// public static <T, R> Flowable<R> combineLatestDelayError(Publisher<? extends T>[] sources,
// Function<? super Object[], ? extends R> combiner)
// {
// }
// public static <T, R> Flowable<R> combineLatestDelayError(Function<? super Object[], ? extends R> combiner,
// Publisher<? extends T>...sources)
// {
// }
// public static <T, R> Flowable<R> combineLatestDelayError(Function<? super Object[], ? extends R> combiner,
// int bufferSize, Publisher<? extends T>...sources)
// {
// }
// public static <T, R> Flowable<R> combineLatestDelayError(Publisher<? extends T>[] sources,
// Function<? super Object[], ? extends R> combiner, int bufferSize)
// {
// }
// public static <T, R> Flowable<R> combineLatestDelayError(Iterable<? extends Publisher<? extends T>> sources,
// Function<? super Object[], ? extends R> combiner)
// {
// }
// public static <T, R> Flowable<R> combineLatestDelayError(Iterable<? extends Publisher<? extends T>> sources,
// Function<? super Object[], ? extends R> combiner, int bufferSize)
// {
// }
// public static <T1, T2, R> Flowable<R> combineLatest(
// Publisher<? extends T1> source1, Publisher<? extends T2> source2,
// BiFunction<? super T1, ? super T2, ? extends R> combiner)
// {
// }
// public static <T1, T2, T3, R> Flowable<R> combineLatest(
// Publisher<? extends T1> source1, Publisher<? extends T2> source2,
// Publisher<? extends T3> source3,
// Function3<? super T1, ? super T2, ? super T3, ? extends R> combiner)
// {
// }
// public static <T1, T2, T3, T4, R> Flowable<R> combineLatest(
// Publisher<? extends T1> source1, Publisher<? extends T2> source2,
// Publisher<? extends T3> source3, Publisher<? extends T4> source4,
// Function4<? super T1, ? super T2, ? super T3, ? super T4, ? extends R> combiner)
// {
// }
// public static <T1, T2, T3, T4, T5, R> Flowable<R> combineLatest(
// Publisher<? extends T1> source1, Publisher<? extends T2> source2,
// Publisher<? extends T3> source3, Publisher<? extends T4> source4,
// Publisher<? extends T5> source5,
// Function5<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? extends R> combiner)
// {
// }
// public static <T1, T2, T3, T4, T5, T6, R> Flowable<R> combineLatest(
// Publisher<? extends T1> source1, Publisher<? extends T2> source2,
// Publisher<? extends T3> source3, Publisher<? extends T4> source4,
// Publisher<? extends T5> source5, Publisher<? extends T6> source6,
// Function6<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? extends R> combiner)
// {
// }
// public static <T1, T2, T3, T4, T5, T6, T7, R> Flowable<R> combineLatest(
// Publisher<? extends T1> source1, Publisher<? extends T2> source2,
// Publisher<? extends T3> source3, Publisher<? extends T4> source4,
// Publisher<? extends T5> source5, Publisher<? extends T6> source6,
// Publisher<? extends T7> source7,
// Function7<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? extends R> combiner)
// {
// }
// public static <T1, T2, T3, T4, T5, T6, T7, T8, R> Flowable<R> combineLatest(
// Publisher<? extends T1> source1, Publisher<? extends T2> source2,
// Publisher<? extends T3> source3, Publisher<? extends T4> source4,
// Publisher<? extends T5> source5, Publisher<? extends T6> source6,
// Publisher<? extends T7> source7, Publisher<? extends T8> source8,
// Function8<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? extends R> combiner)
// {
// }
// public static <T1, T2, T3, T4, T5, T6, T7, T8, T9, R> Flowable<R> combineLatest(
// Publisher<? extends T1> source1, Publisher<? extends T2> source2,
// Publisher<? extends T3> source3, Publisher<? extends T4> source4,
// Publisher<? extends T5> source5, Publisher<? extends T6> source6,
// Publisher<? extends T7> source7, Publisher<? extends T8> source8,
// Publisher<? extends T9> source9,
// Function9<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? super T9, ? extends R> combiner)
// {
// }
// public static <T> Flowable<T> concat(Iterable<? extends Publisher<? extends T>> sources)
// {
// }
// public static <T> Flowable<T> concat(Publisher<? extends Publisher<? extends T>> sources)
// {
// }
// public static <T> Flowable<T> concat(Publisher<? extends Publisher<? extends T>> sources, int prefetch)
// {
// }
// public static <T> Flowable<T> concat(Publisher<? extends T> source1, Publisher<? extends T> source2)
// {
// }
// public static <T> Flowable<T> concat(
// Publisher<? extends T> source1, Publisher<? extends T> source2,
// Publisher<? extends T> source3)
// {
// }
// public static <T> Flowable<T> concat(
// Publisher<? extends T> source1, Publisher<? extends T> source2,
// Publisher<? extends T> source3, Publisher<? extends T> source4)
// {
// }
// public static <T> Flowable<T> concatArray(Publisher<? extends T>...sources)
// {
// }
// public static <T> Flowable<T> concatArrayDelayError(Publisher<? extends T>...sources)
// {
// }
// public static <T> Flowable<T> concatArrayEager(Publisher<? extends T>...sources)
// {
// }
// public static <T> Flowable<T> concatArrayEager(int maxConcurrency, int prefetch, Publisher<? extends T>...sources)
// {
// }
// public static <T> Flowable<T> concatArrayEagerDelayError(Publisher<? extends T>...sources)
// {
// }
// public static <T> Flowable<T> concatArrayEagerDelayError(int maxConcurrency, int prefetch, Publisher<? extends T>...sources)
// {
// }
// public static <T> Flowable<T> concatDelayError(Iterable<? extends Publisher<? extends T>> sources)
// {
// }
// public static <T> Flowable<T> concatDelayError(Publisher<? extends Publisher<? extends T>> sources)
// {
// }
// public static <T> Flowable<T> concatDelayError(Publisher<? extends Publisher<? extends T>> sources, int prefetch, boolean tillTheEnd)
// {
// }
// public static <T> Flowable<T> concatEager(Publisher<? extends Publisher<? extends T>> sources)
// {
// }
// public static <T> Flowable<T> concatEager(Publisher<? extends Publisher<? extends T>> sources, int maxConcurrency, int prefetch)
// {
// }
// public static <T> Flowable<T> concatEager(Iterable<? extends Publisher<? extends T>> sources)
// {
// }
// public static <T> Flowable<T> concatEager(Iterable<? extends Publisher<? extends T>> sources, int maxConcurrency, int prefetch)
// {
// }
// public static <T> Flowable<T> create(FlowableOnSubscribe<T> source, BackpressureStrategy mode)
// {
// }
// public static <T> Flowable<T> defer(Callable<? extends Publisher<? extends T>> supplier)
// {
// }
// public static <T> Flowable<T> empty()
// {
// }
// public static <T> Flowable<T> error(Callable<? extends Throwable> supplier)
// {
// }
// public static <T> Flowable<T> error(final Throwable throwable)
// {
// }
public static IFlowable<T> ToFlowable<T>(this IEnumerable<T> items)
{
return new FlowableFromEnumerable<T>(items);
}
// public static <T> Flowable<T> fromCallable(Callable<? extends T> supplier)
// {
// }
// public static <T> Flowable<T> fromFuture(Future<? extends T> future)
// {
// }
// public static <T> Flowable<T> fromFuture(Future<? extends T> future, long timeout, TimeUnit unit)
// {
// }
// public static <T> Flowable<T> fromFuture(Future<? extends T> future, long timeout, TimeUnit unit, Scheduler scheduler)
// {
// }
// public static <T> Flowable<T> fromFuture(Future<? extends T> future, Scheduler scheduler)
// {
// }
// public static <T> Flowable<T> fromIterable(Iterable<? extends T> source)
// {
// }
// public static <T> Flowable<T> fromPublisher(final Publisher<? extends T> source)
// {
// }
// public static <T> Flowable<T> generate(final Consumer<Emitter<T>> generator)
// {
// }
// public static <T, S> Flowable<T> generate(Callable<S> initialState, final BiConsumer<S, Emitter<T>> generator)
// {
// }
// public static <T, S> Flowable<T> generate(Callable<S> initialState, final BiConsumer<S, Emitter<T>> generator,
// Consumer<? super S> disposeState)
// {
// }
// public static <T, S> Flowable<T> generate(Callable<S> initialState, BiFunction<S, Emitter<T>, S> generator)
// {
// }
// public static <T, S> Flowable<T> generate(Callable<S> initialState, BiFunction<S, Emitter<T>, S> generator, Consumer<? super S> disposeState)
// {
// }
// public static Flowable<Long> interval(long initialDelay, long period, TimeUnit unit)
// {
// }
// public static Flowable<Long> interval(long initialDelay, long period, TimeUnit unit, Scheduler scheduler)
// {
// }
// public static Flowable<Long> interval(long period, TimeUnit unit)
// {
// }
// public static Flowable<Long> interval(long period, TimeUnit unit, Scheduler scheduler)
// {
// }
// public static Flowable<Long> intervalRange(long start, long count, long initialDelay, long period, TimeUnit unit)
// {
// }
// public static Flowable<Long> intervalRange(long start, long count, long initialDelay, long period, TimeUnit unit, Scheduler scheduler)
// {
// }
// public static <T> Flowable<T> just(T item)
// {
// }
// public static <T> Flowable<T> just(T item1, T item2)
// {
// }
// public static <T> Flowable<T> just(T item1, T item2, T item3)
// {
// }
// public static <T> Flowable<T> just(T item1, T item2, T item3, T item4)
// {
// }
// public static <T> Flowable<T> just(T item1, T item2, T item3, T item4, T item5)
// {
// }
// public static <T> Flowable<T> just(T item1, T item2, T item3, T item4, T item5, T item6)
// {
// }
// public static <T> Flowable<T> just(T item1, T item2, T item3, T item4, T item5, T item6, T item7)
// {
// }
// public static <T> Flowable<T> just(T item1, T item2, T item3, T item4, T item5, T item6, T item7, T item8)
// {
// }
// public static <T> Flowable<T> just(T item1, T item2, T item3, T item4, T item5, T item6, T item7, T item8, T item9)
// {
// }
// public static <T> Flowable<T> just(T item1, T item2, T item3, T item4, T item5, T item6, T item7, T item8, T item9, T item10)
// {
// }
// public static <T> Flowable<T> merge(Iterable<? extends Publisher<? extends T>> sources, int maxConcurrency, int bufferSize)
// {
// }
// public static <T> Flowable<T> mergeArray(int maxConcurrency, int bufferSize, Publisher<? extends T>...sources)
// {
// }
// public static <T> Flowable<T> merge(Iterable<? extends Publisher<? extends T>> sources)
// {
// }
// public static <T> Flowable<T> merge(Iterable<? extends Publisher<? extends T>> sources, int maxConcurrency)
// {
// }
// public static <T> Flowable<T> merge(Publisher<? extends Publisher<? extends T>> sources)
// {
// }
// public static <T> Flowable<T> merge(Publisher<? extends Publisher<? extends T>> sources, int maxConcurrency)
// {
// }
// public static <T> Flowable<T> mergeArray(Publisher<? extends T>...sources)
// {
// }
// public static <T> Flowable<T> merge(Publisher<? extends T> source1, Publisher<? extends T> source2)
// {
// }
// public static <T> Flowable<T> merge(Publisher<? extends T> source1, Publisher<? extends T> source2, Publisher<? extends T> source3)
// {
// }
// public static <T> Flowable<T> merge(
// Publisher<? extends T> source1, Publisher<? extends T> source2,
// Publisher<? extends T> source3, Publisher<? extends T> source4)
// {
// }
// public static <T> Flowable<T> mergeDelayError(Iterable<? extends Publisher<? extends T>> sources)
// {
// }
// public static <T> Flowable<T> mergeDelayError(Iterable<? extends Publisher<? extends T>> sources, int maxConcurrency, int bufferSize)
// {
// }
// public static <T> Flowable<T> mergeArrayDelayError(int maxConcurrency, int bufferSize, Publisher<? extends T>...sources)
// {
// }
// public static <T> Flowable<T> mergeDelayError(Iterable<? extends Publisher<? extends T>> sources, int maxConcurrency)
// {
// }
// public static <T> Flowable<T> mergeDelayError(Publisher<? extends Publisher<? extends T>> sources)
// {
// }
// public static <T> Flowable<T> mergeDelayError(Publisher<? extends Publisher<? extends T>> sources, int maxConcurrency)
// {
// }
// public static <T> Flowable<T> mergeArrayDelayError(Publisher<? extends T>...sources)
// {
// }
// public static <T> Flowable<T> mergeDelayError(Publisher<? extends T> source1, Publisher<? extends T> source2)
// {
// }
// public static <T> Flowable<T> mergeDelayError(Publisher<? extends T> source1, Publisher<? extends T> source2, Publisher<? extends T> source3)
// {
// }
// public static <T> Flowable<T> mergeDelayError(
// Publisher<? extends T> source1, Publisher<? extends T> source2,
// Publisher<? extends T> source3, Publisher<? extends T> source4)
// {
// }
// public static <T> Flowable<T> never()
// {
// }
// public static Flowable<Integer> range(int start, int count)
// {
// }
// public static Flowable<Long> rangeLong(long start, long count)
// {
// }
// public static <T> Single<Boolean> sequenceEqual(Publisher<? extends T> source1, Publisher<? extends T> source2)
// {
// }
// public static <T> Single<Boolean> sequenceEqual(Publisher<? extends T> source1, Publisher<? extends T> source2,
// BiPredicate<? super T, ? super T> isEqual)
// {
// }
// public static <T> Single<Boolean> sequenceEqual(Publisher<? extends T> source1, Publisher<? extends T> source2,
// BiPredicate<? super T, ? super T> isEqual, int bufferSize)
// {
// }
// public static <T> Single<Boolean> sequenceEqual(Publisher<? extends T> source1, Publisher<? extends T> source2, int bufferSize)
// {
// }
// public static <T> Flowable<T> switchOnNext(Publisher<? extends Publisher<? extends T>> sources, int bufferSize)
// {
// }
// public static <T> Flowable<T> switchOnNext(Publisher<? extends Publisher<? extends T>> sources)
// {
// }
// public static <T> Flowable<T> switchOnNextDelayError(Publisher<? extends Publisher<? extends T>> sources)
// {
// }
// public static <T> Flowable<T> switchOnNextDelayError(Publisher<? extends Publisher<? extends T>> sources, int prefetch)
// {
// }
// public static Flowable<Long> timer(long delay, TimeUnit unit)
// {
// }
// public static Flowable<Long> timer(long delay, TimeUnit unit, Scheduler scheduler)
// {
// }
// public static <T> Flowable<T> unsafeCreate(Publisher<T> onSubscribe)
// {
// }
// public static <T, D> Flowable<T> Using(Callable<? extends D> resourceSupplier,
// Function<? super D, ? extends Publisher<? extends T>> sourceSupplier, Consumer<? super D> resourceDisposer)
// {
// }
// public static <T, D> Flowable<T> Using(Callable<? extends D> resourceSupplier,
// Function<? super D, ? extends Publisher<? extends T>> sourceSupplier,
// Consumer<? super D> resourceDisposer, boolean eager)
// {
// }
// public static <T, R> Flowable<R> zip(Iterable<? extends Publisher<? extends T>> sources, Function<? super Object[], ? extends R> zipper)
// {
// }
// public static <T, R> Flowable<R> zip(Publisher<? extends Publisher<? extends T>> sources,
// final Function<? super Object[], ? extends R> zipper)
// {
// }
// public static <T1, T2, R> Flowable<R> zip(
// Publisher<? extends T1> source1, Publisher<? extends T2> source2,
// BiFunction<? super T1, ? super T2, ? extends R> zipper)
// {
// }
// public static <T1, T2, R> Flowable<R> zip(
// Publisher<? extends T1> source1, Publisher<? extends T2> source2,
// BiFunction<? super T1, ? super T2, ? extends R> zipper, boolean delayError)
// {
// }
// public static <T1, T2, R> Flowable<R> zip(
// Publisher<? extends T1> source1, Publisher<? extends T2> source2,
// BiFunction<? super T1, ? super T2, ? extends R> zipper, boolean delayError, int bufferSize)
// {
// }
// public static <T1, T2, T3, R> Flowable<R> zip(
// Publisher<? extends T1> source1, Publisher<? extends T2> source2, Publisher<? extends T3> source3,
// Function3<? super T1, ? super T2, ? super T3, ? extends R> zipper)
// {
// }
// public static <T1, T2, T3, T4, R> Flowable<R> zip(
// Publisher<? extends T1> source1, Publisher<? extends T2> source2, Publisher<? extends T3> source3,
// Publisher<? extends T4> source4,
// Function4<? super T1, ? super T2, ? super T3, ? super T4, ? extends R> zipper)
// {
// }
// public static <T1, T2, T3, T4, T5, R> Flowable<R> zip(
// Publisher<? extends T1> source1, Publisher<? extends T2> source2, Publisher<? extends T3> source3,
// Publisher<? extends T4> source4, Publisher<? extends T5> source5,
// Function5<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? extends R> zipper)
// {
// }
// public static <T1, T2, T3, T4, T5, T6, R> Flowable<R> zip(
// Publisher<? extends T1> source1, Publisher<? extends T2> source2, Publisher<? extends T3> source3,
// Publisher<? extends T4> source4, Publisher<? extends T5> source5, Publisher<? extends T6> source6,
// Function6<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? extends R> zipper)
// {
// }
// public static <T1, T2, T3, T4, T5, T6, T7, R> Flowable<R> zip(
// Publisher<? extends T1> source1, Publisher<? extends T2> source2, Publisher<? extends T3> source3,
// Publisher<? extends T4> source4, Publisher<? extends T5> source5, Publisher<? extends T6> source6,
// Publisher<? extends T7> source7,
// Function7<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? extends R> zipper)
// {
// }
// public static <T1, T2, T3, T4, T5, T6, T7, T8, R> Flowable<R> zip(
// Publisher<? extends T1> source1, Publisher<? extends T2> source2, Publisher<? extends T3> source3,
// Publisher<? extends T4> source4, Publisher<? extends T5> source5, Publisher<? extends T6> source6,
// Publisher<? extends T7> source7, Publisher<? extends T8> source8,
// Function8<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? extends R> zipper)
// {
// }
// public static <T1, T2, T3, T4, T5, T6, T7, T8, T9, R> Flowable<R> zip(
// Publisher<? extends T1> source1, Publisher<? extends T2> source2, Publisher<? extends T3> source3,
// Publisher<? extends T4> source4, Publisher<? extends T5> source5, Publisher<? extends T6> source6,
// Publisher<? extends T7> source7, Publisher<? extends T8> source8, Publisher<? extends T9> source9,
// Function9<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? super T9, ? extends R> zipper)
// {
// }
// public static <T, R> Flowable<R> zipArray(Function<? super Object[], ? extends R> zipper,
// boolean delayError, int bufferSize, Publisher<? extends T>...sources)
// {
// }
// public static <T, R> Flowable<R> zipIterable(Iterable<? extends Publisher<? extends T>> sources,
// Function<? super Object[], ? extends R> zipper, boolean delayError,
// int bufferSize)
// {
// }
}
// public static int bufferSize()
// {
// }
// //// ***************************************************************************************************
// //// Instance operators
// //// ***************************************************************************************************
// public final Single<Boolean> All(Predicate<? super T> predicate)
// {
// }
// public final Flowable<T> ambWith(Publisher<? extends T> other)
// {
// }
// public final Single<Boolean> any(Predicate<? super T> predicate)
// {
// }
// public final<R> R As(@NonNull FlowableConverter<T, ? extends R> converter)
// {
// }
// public final T blockingFirst()
// {
// }
// public final T blockingFirst(T defaultItem)
// {
// }
// public final void blockingForEach(Consumer<? super T> onNext)
// {
// }
// public final Iterable<T> blockingIterable()
// {
// }
// public final Iterable<T> blockingIterable(int bufferSize)
// {
// }
// public final T blockingLast()
// {
// }
// public final T blockingLast(T defaultItem)
// {
// }
// public final Iterable<T> blockingLatest()
// {
// }
// public final Iterable<T> blockingMostRecent(T initialItem)
// {
// }
// public final Iterable<T> blockingNext()
// {
// }
// public final T blockingSingle()
// {
// }
// public final T blockingSingle(T defaultItem)
// {
// }
// public final Future<T> toFuture()
// {
// }
// public final void blockingSubscribe()
// {
// }
// public final void blockingSubscribe(Consumer<? super T> onNext)
// {
// }
// public final void blockingSubscribe(Consumer<? super T> onNext, int bufferSize)
// {
// }
// public final void blockingSubscribe(Consumer<? super T> onNext, Consumer<? super Throwable> onError)
// {
// }
// public final void blockingSubscribe(Consumer<? super T> onNext, Consumer<? super Throwable> onError,
// int bufferSize)
// {
// }
// public final void blockingSubscribe(Consumer<? super T> onNext, Consumer<? super Throwable> onError, Action onComplete)
// {
// }
// public final void blockingSubscribe(Consumer<? super T> onNext, Consumer<? super Throwable> onError, Action onComplete,
// int bufferSize)
// {
// }
// public final void blockingSubscribe(Subscriber<? super T> subscriber)
// {
// }
// public final Flowable<List<T>> buffer(int count)
// {
// }
// public final Flowable<List<T>> buffer(int count, int skip)
// {
// }
// public final<U extends Collection<? super T>> Flowable<U> buffer(int count, int skip, Callable<U> bufferSupplier)
// {
// }
// public final<U extends Collection<? super T>> Flowable<U> buffer(int count, Callable<U> bufferSupplier)
// {
// }
// public final Flowable<List<T>> buffer(long timespan, long timeskip, TimeUnit unit)
// {
// }
// public final Flowable<List<T>> buffer(long timespan, long timeskip, TimeUnit unit, Scheduler scheduler)
// {
// }
// public final<U extends Collection<? super T>> Flowable<U> buffer(long timespan, long timeskip, TimeUnit unit,
// Scheduler scheduler, Callable<U> bufferSupplier)
// {
// }
// public final Flowable<List<T>> buffer(long timespan, TimeUnit unit)
// {
// }
// public final Flowable<List<T>> buffer(long timespan, TimeUnit unit, int count)
// {
// }
// public final Flowable<List<T>> buffer(long timespan, TimeUnit unit, Scheduler scheduler, int count)
// {
// }
// public final<U extends Collection<? super T>> Flowable<U> buffer(
// long timespan, TimeUnit unit,
// Scheduler scheduler, int count,
// Callable<U> bufferSupplier,
// boolean restartTimerOnMaxSize)
// {
// }
// public final Flowable<List<T>> buffer(long timespan, TimeUnit unit, Scheduler scheduler)
// {
// }
// public final<TOpening, TClosing> Flowable<List<T>> buffer(
// Flowable<? extends TOpening> openingIndicator,
// Function<? super TOpening, ? extends Publisher<? extends TClosing>> closingIndicator)
// {
// }
// public final<TOpening, TClosing, U extends Collection<? super T>> Flowable<U> buffer(
// Flowable<? extends TOpening> openingIndicator,
// Function<? super TOpening, ? extends Publisher<? extends TClosing>> closingIndicator,
// Callable<U> bufferSupplier)
// {
// }
// public final<B> Flowable<List<T>> buffer(Publisher<B> boundaryIndicator)
// {
// }
// public final<B> Flowable<List<T>> buffer(Publisher<B> boundaryIndicator, final int initialCapacity)
// {
// }
// public final<B, U extends Collection<? super T>> Flowable<U> buffer(Publisher<B> boundaryIndicator, Callable<U> bufferSupplier)
// {
// }
// public final<B> Flowable<List<T>> buffer(Callable<? extends Publisher<B>> boundaryIndicatorSupplier)
// {
// }
// public final<B, U extends Collection<? super T>> Flowable<U> buffer(Callable<? extends Publisher<B>> boundaryIndicatorSupplier,
// Callable<U> bufferSupplier)
// {
// }
// public final Flowable<T> cache()
// {
// }
// public final Flowable<T> cacheWithInitialCapacity(int initialCapacity)
// {
// }
// public final<U> Flowable<U> cast(final Class<U> clazz)
// {
// }
// public final<U> Single<U> collect(Callable<? extends U> initialItemSupplier, BiConsumer<? super U, ? super T> collector)
// {
// }
// public final<U> Single<U> collectInto(final U initialItem, BiConsumer<? super U, ? super T> collector)
// {
// }
// public final<R> Flowable<R> compose(FlowableTransformer<? super T, ? extends R> composer)
// {
// }
// public final<R> Flowable<R> concatMap(Function<? super T, ? extends Publisher<? extends R>> mapper)
// {
// }
// public final<R> Flowable<R> concatMap(Function<? super T, ? extends Publisher<? extends R>> mapper, int prefetch)
// {
// }
// public final Completable concatMapCompletable(Function<? super T, ? extends CompletableSource> mapper)
// {
// }
// public final Completable concatMapCompletable(Function<? super T, ? extends CompletableSource> mapper, int prefetch)
// {
// }
// public final Completable concatMapCompletableDelayError(Function<? super T, ? extends CompletableSource> mapper)
// {
// }
// public final Completable concatMapCompletableDelayError(Function<? super T, ? extends CompletableSource> mapper, boolean tillTheEnd)
// {
// }
// public final Completable concatMapCompletableDelayError(Function<? super T, ? extends CompletableSource> mapper, boolean tillTheEnd, int prefetch)
// {
// }
// public final<R> Flowable<R> concatMapDelayError(Function<? super T, ? extends Publisher<? extends R>> mapper)
// {
// }
// public final<R> Flowable<R> concatMapDelayError(Function<? super T, ? extends Publisher<? extends R>> mapper,
// int prefetch, boolean tillTheEnd)
// {
// }
// public final<R> Flowable<R> concatMapEager(Function<? super T, ? extends Publisher<? extends R>> mapper)
// {
// }
// public final<R> Flowable<R> concatMapEager(Function<? super T, ? extends Publisher<? extends R>> mapper,
// int maxConcurrency, int prefetch)
// {
// }
// public final<R> Flowable<R> concatMapEagerDelayError(Function<? super T, ? extends Publisher<? extends R>> mapper,
// boolean tillTheEnd)
// {
// }
// public final<R> Flowable<R> concatMapEagerDelayError(Function<? super T, ? extends Publisher<? extends R>> mapper,
// int maxConcurrency, int prefetch, boolean tillTheEnd)
// {
// }
// public final<U> Flowable<U> concatMapIterable(Function<? super T, ? extends Iterable<? extends U>> mapper)
// {
// }
// public final<U> Flowable<U> concatMapIterable(final Function<? super T, ? extends Iterable<? extends U>> mapper, int prefetch)
// {
// }
//public final<R> Flowable<R> concatMapMaybe(Function<? super T, ? extends MaybeSource<? extends R>> mapper)
// {
// }
//public final<R> Flowable<R> concatMapMaybe(Function<? super T, ? extends MaybeSource<? extends R>> mapper, int prefetch)
// {
// }
//public final<R> Flowable<R> concatMapMaybeDelayError(Function<? super T, ? extends MaybeSource<? extends R>> mapper)
// {
// }
//public final<R> Flowable<R> concatMapMaybeDelayError(Function<? super T, ? extends MaybeSource<? extends R>> mapper, boolean tillTheEnd)
// {
// }
//public final<R> Flowable<R> concatMapMaybeDelayError(Function<? super T, ? extends MaybeSource<? extends R>> mapper, boolean tillTheEnd, int prefetch)
// {
// }
//public final<R> Flowable<R> concatMapSingle(Function<? super T, ? extends SingleSource<? extends R>> mapper)
//{
// }
//public final<R> Flowable<R> concatMapSingle(Function<? super T, ? extends SingleSource<? extends R>> mapper, int prefetch)
//{
// }
//public final<R> Flowable<R> concatMapSingleDelayError(Function<? super T, ? extends SingleSource<? extends R>> mapper)
//{
// }
//public final<R> Flowable<R> concatMapSingleDelayError(Function<? super T, ? extends SingleSource<? extends R>> mapper, boolean tillTheEnd)
//{
// }
//public final<R> Flowable<R> concatMapSingleDelayError(Function<? super T, ? extends SingleSource<? extends R>> mapper, boolean tillTheEnd, int prefetch)
//{
//}
//public final Flowable<T> concatWith(Publisher<? extends T> other)
//{
//}
//public final Flowable<T> concatWith(@NonNull SingleSource<? extends T> other)
// {
// }
//public final Flowable<T> concatWith(@NonNull MaybeSource<? extends T> other)
// {
// }
//public final Flowable<T> concatWith(@NonNull CompletableSource other)
// {
// }
//public final Single<Boolean> contains(final Object item)
// {
// }
//public final Single<Long> count()
//{
// }
//public final<U> Flowable<T> debounce(Function<? super T, ? extends Publisher<U>> debounceIndicator)
//{
// }
//public final Flowable<T> debounce(long timeout, TimeUnit unit)
//{
// }
//public final Flowable<T> debounce(long timeout, TimeUnit unit, Scheduler scheduler)
//{
// }
//public final Flowable<T> defaultIfEmpty(T defaultItem)
//{
// }
//public final<U> Flowable<T> delay(final Function<? super T, ? extends Publisher<U>> itemDelayIndicator)
// {
// }
//public final Flowable<T> delay(long delay, TimeUnit unit)
//{
// }
//public final Flowable<T> delay(long delay, TimeUnit unit, boolean delayError)
//{
// }
//public final Flowable<T> delay(long delay, TimeUnit unit, Scheduler scheduler) {
// }
//public final Flowable<T> delay(long delay, TimeUnit unit, Scheduler scheduler, boolean delayError)
//{
// }
//public final<U, V> Flowable<T> delay(Publisher<U> subscriptionIndicator,
// Function<? super T, ? extends Publisher<V>> itemDelayIndicator)
//{
// }
//public final<U> Flowable<T> delaySubscription(Publisher<U> subscriptionIndicator)
//{
// }
//public final Flowable<T> delaySubscription(long delay, TimeUnit unit)
//{
// }
//public final Flowable<T> delaySubscription(long delay, TimeUnit unit, Scheduler scheduler) {
// }
//public final<T2> Flowable<T2> dematerialize()
//{
// }
//public final<R> Flowable<R> dematerialize(Function<? super T, Notification<R>> selector)
//{
// }
//public final Flowable<T> distinct()
//{
// }
//public final<K> Flowable<T> distinct(Function<? super T, K> keySelector) {
// }
//public final<K> Flowable<T> distinct(Function<? super T, K> keySelector,
// Callable<? extends Collection<? super K>> collectionSupplier)
//{
// }
//public final Flowable<T> distinctUntilChanged()
//{
// }
//public final<K> Flowable<T> distinctUntilChanged(Function<? super T, K> keySelector)
//{
// }
//public final Flowable<T> distinctUntilChanged(BiPredicate<? super T, ? super T> comparer)
//{
// }
//public final Flowable<T> doFinally(Action onFinally)
//{
// }
//public final Flowable<T> doAfterNext(Consumer<? super T> onAfterNext)
//{
// }
//public final Flowable<T> doAfterTerminate(Action onAfterTerminate)
//{
// }
//public final Flowable<T> doOnCancel(Action onCancel)
//{
// }
//public final Flowable<T> doOnComplete(Action onComplete)
//{
// }
//private Flowable<T> doOnEach(Consumer<? super T> onNext, Consumer<? super Throwable> onError,
// Action onComplete, Action onAfterTerminate)
// {
// }
//public final Flowable<T> doOnEach(final Consumer<? super Notification<T>> onNotification)
// {
// }
//public final Flowable<T> doOnEach(final Subscriber<? super T> subscriber)
// {
// }
//public final Flowable<T> doOnError(Consumer<? super Throwable> onError)
//{
// }
//public final Flowable<T> doOnLifecycle(final Consumer<? super Subscription> onSubscribe,
// final LongConsumer onRequest, final Action onCancel)
// {
// }
//public final Flowable<T> doOnNext(Consumer<? super T> onNext)
//{
// }
//public final Flowable<T> doOnRequest(LongConsumer onRequest)
//{
// }
//public final Flowable<T> doOnSubscribe(Consumer<? super Subscription> onSubscribe)
//{
// }
//public final Flowable<T> doOnTerminate(final Action onTerminate)
// {
// }
//public final Maybe<T> elementAt(long index)
//{
// }
//public final Single<T> elementAt(long index, T defaultItem)
//{
// }
//public final Single<T> elementAtOrError(long index)
//{
// }
//public final Flowable<T> filter(Predicate<? super T> predicate)
//{
// }
//public final Maybe<T> firstElement()
//{
// }
//public final Single<T> first(T defaultItem)
//{
// }
//public final Single<T> firstOrError()
//{
// }
//public final<R> Flowable<R> flatMap(Function<? super T, ? extends Publisher<? extends R>> mapper)
//{
// }
//public final<R> Flowable<R> flatMap(Function<? super T, ? extends Publisher<? extends R>> mapper, boolean delayErrors)
//{
// }
//public final<R> Flowable<R> flatMap(Function<? super T, ? extends Publisher<? extends R>> mapper, int maxConcurrency)
//{
// }
//public final<R> Flowable<R> flatMap(Function<? super T, ? extends Publisher<? extends R>> mapper, boolean delayErrors, int maxConcurrency)
//{
// }
//public final<R> Flowable<R> flatMap(Function<? super T, ? extends Publisher<? extends R>> mapper,
// boolean delayErrors, int maxConcurrency, int bufferSize)
//{
// }
//public final<R> Flowable<R> flatMap(
// Function<? super T, ? extends Publisher<? extends R>> onNextMapper,
// Function<? super Throwable, ? extends Publisher<? extends R>> onErrorMapper,
// Callable<? extends Publisher<? extends R>> onCompleteSupplier)
//{
// }
//public final<R> Flowable<R> flatMap(
// Function<? super T, ? extends Publisher<? extends R>> onNextMapper,
// Function<Throwable, ? extends Publisher<? extends R>> onErrorMapper,
// Callable<? extends Publisher<? extends R>> onCompleteSupplier,
// int maxConcurrency)
//{
//}
//public final<U, R> Flowable<R> flatMap(Function<? super T, ? extends Publisher<? extends U>> mapper,
// BiFunction<? super T, ? super U, ? extends R> combiner)
//{
// }
//public final<U, R> Flowable<R> flatMap(Function<? super T, ? extends Publisher<? extends U>> mapper,
// BiFunction<? super T, ? super U, ? extends R> combiner, boolean delayErrors)
//{
// }
//public final<U, R> Flowable<R> flatMap(Function<? super T, ? extends Publisher<? extends U>> mapper,
// BiFunction<? super T, ? super U, ? extends R> combiner, boolean delayErrors, int maxConcurrency)
//{
// }
//public final<U, R> Flowable<R> flatMap(final Function<? super T, ? extends Publisher<? extends U>> mapper,
// final BiFunction<? super T, ? super U, ? extends R> combiner, boolean delayErrors, int maxConcurrency, int bufferSize)
// {
// }
//public final<U, R> Flowable<R> flatMap(Function<? super T, ? extends Publisher<? extends U>> mapper,
// BiFunction<? super T, ? super U, ? extends R> combiner, int maxConcurrency)
//{
// }
//public final Completable flatMapCompletable(Function<? super T, ? extends CompletableSource> mapper)
// {
// }
//public final Completable flatMapCompletable(Function<? super T, ? extends CompletableSource> mapper, boolean delayErrors, int maxConcurrency)
// {
// }
// public final<U> Flowable<U> flatMapIterable(final Function<? super T, ? extends Iterable<? extends U>> mapper)
// {
// }
// public final<U> Flowable<U> flatMapIterable(final Function<? super T, ? extends Iterable<? extends U>> mapper, int bufferSize)
// {
// }
// public final<U, V> Flowable<V> flatMapIterable(final Function<? super T, ? extends Iterable<? extends U>> mapper,
// final BiFunction<? super T, ? super U, ? extends V> resultSelector)
// {
// }
// public final<U, V> Flowable<V> flatMapIterable(final Function<? super T, ? extends Iterable<? extends U>> mapper,
// final BiFunction<? super T, ? super U, ? extends V> resultSelector, int prefetch)
// {
// }
// public final<R> Flowable<R> flatMapMaybe(Function<? super T, ? extends MaybeSource<? extends R>> mapper) {
// return flatMapMaybe(mapper, false, Integer.MAX_VALUE);
// }
// public final<R> Flowable<R> flatMapMaybe(Function<? super T, ? extends MaybeSource<? extends R>> mapper, boolean delayErrors, int maxConcurrency)
// {
// }
// public final<R> Flowable<R> flatMapSingle(Function<? super T, ? extends SingleSource<? extends R>> mapper) {
// }
// public final<R> Flowable<R> flatMapSingle(Function<? super T, ? extends SingleSource<? extends R>> mapper, boolean delayErrors, int maxConcurrency) {
// }
// public final Disposable forEach(Consumer<? super T> onNext)
// {
// }
// public final Disposable forEachWhile(Predicate<? super T> onNext)
// {
// }
// public final Disposable forEachWhile(Predicate<? super T> onNext, Consumer<? super Throwable> onError)
// {
// }
// public final Disposable forEachWhile(final Predicate<? super T> onNext, final Consumer<? super Throwable> onError,
// final Action onComplete)
// {
// }
// public final<K> Flowable<GroupedFlowable<K, T>> groupBy(Function<? super T, ? extends K> keySelector) {
// }
// public final<K> Flowable<GroupedFlowable<K, T>> groupBy(Function<? super T, ? extends K> keySelector, boolean delayError) {
// }
// public final<K, V> Flowable<GroupedFlowable<K, V>> groupBy(Function<? super T, ? extends K> keySelector,
// Function<? super T, ? extends V> valueSelector) {
// }
// public final<K, V> Flowable<GroupedFlowable<K, V>> groupBy(Function<? super T, ? extends K> keySelector,
// Function<? super T, ? extends V> valueSelector, boolean delayError) {
// }
// public final<K, V> Flowable<GroupedFlowable<K, V>> groupBy(Function<? super T, ? extends K> keySelector,
// Function<? super T, ? extends V> valueSelector,
// boolean delayError, int bufferSize)
//{
// }
// public final<K, V> Flowable<GroupedFlowable<K, V>> groupBy(Function<? super T, ? extends K> keySelector,
// Function<? super T, ? extends V> valueSelector,
// boolean delayError, int bufferSize,
// Function<? super Consumer<Object>, ? extends Map<K, Object>> evictingMapFactory) {
// }
// public final<TRight, TLeftEnd, TRightEnd, R> Flowable<R> groupJoin(
// Publisher<? extends TRight> other,
// Function<? super T, ? extends Publisher<TLeftEnd>> leftEnd,
// Function<? super TRight, ? extends Publisher<TRightEnd>> rightEnd,
// BiFunction<? super T, ? super Flowable<TRight>, ? extends R> resultSelector) {
// }
// public final Flowable<T> hide() {
// }
// public final Completable ignoreElements()
// {
// }
// public final Single<Boolean> isEmpty() {
// }
// public final<TRight, TLeftEnd, TRightEnd, R> Flowable<R> join(
// Publisher<? extends TRight> other,
// Function<? super T, ? extends Publisher<TLeftEnd>> leftEnd,
// Function<? super TRight, ? extends Publisher<TRightEnd>> rightEnd,
// BiFunction<? super T, ? super TRight, ? extends R> resultSelector)
//{
// }
// public final Maybe<T> lastElement() {
// }
// public final Single<T> last(T defaultItem) {
// }
// public final Single<T> lastOrError() {
// return RxJavaPlugins.onAssembly(new FlowableLastSingle<T>(this, null));
// }
// public final<R> Flowable<R> lift(FlowableOperator<? extends R, ? super T> lifter) {
// }
// public final Flowable<T> limit(long count)
//{
// }
// public final<R> Flowable<R> map(Function<? super T, ? extends R> mapper) {
// }
// public final Flowable<Notification<T>> materialize() {
// }
// public final Flowable<T> mergeWith(Publisher<? extends T> other) {
// }
// public final Flowable<T> mergeWith(@NonNull SingleSource<? extends T> other)
// {
// }
// public final Flowable<T> mergeWith(@NonNull MaybeSource<? extends T> other)
// {
// }
// public final Flowable<T> mergeWith(@NonNull CompletableSource other)
// {
// }
// public final Flowable<T> observeOn(Scheduler scheduler) {
// }
// public final Flowable<T> observeOn(Scheduler scheduler, boolean delayError) {
// }
// public final Flowable<T> observeOn(Scheduler scheduler, boolean delayError, int bufferSize) {
// }
// public final<U> Flowable<U> ofType(final Class<U> clazz)
// {
// }
// public final Flowable<T> onBackpressureBuffer() {
// }
// public final Flowable<T> onBackpressureBuffer(boolean delayError) {
// }
// public final Flowable<T> onBackpressureBuffer(int capacity) {
// }
// public final Flowable<T> onBackpressureBuffer(int capacity, boolean delayError) {
// }
// public final Flowable<T> onBackpressureBuffer(int capacity, boolean delayError, boolean unbounded) {
// }
// public final Flowable<T> onBackpressureBuffer(int capacity, boolean delayError, boolean unbounded,
// Action onOverflow) {
// }
// public final Flowable<T> onBackpressureBuffer(int capacity, Action onOverflow) {
// }
// public final Flowable<T> onBackpressureBuffer(long capacity, Action onOverflow, BackpressureOverflowStrategy overflowStrategy) {
// }
// public final Flowable<T> onBackpressureDrop()
//{
// }
// public final Flowable<T> onBackpressureDrop(Consumer<? super T> onDrop)
//{
// }
// public final Flowable<T> onBackpressureLatest()
//{
// }
// public final Flowable<T> onErrorResumeNext(Function<? super Throwable, ? extends Publisher<? extends T>> resumeFunction)
//{
// }
// public final Flowable<T> onErrorResumeNext(final Publisher<? extends T> next)
// {
// }
// public final Flowable<T> onErrorReturn(Function<? super Throwable, ? extends T> valueSupplier)
//{
// }
// public final Flowable<T> onErrorReturnItem(final T item)
// {
// }
// public final Flowable<T> onExceptionResumeNext(final Publisher<? extends T> next)
// {
// }
// public final Flowable<T> onTerminateDetach()
//{
// }
// public final ParallelFlowable<T> parallel()
//{
// }
// public final ParallelFlowable<T> parallel(int parallelism)
//{
// }
// public final ParallelFlowable<T> parallel(int parallelism, int prefetch) {
// }
// public final ConnectableFlowable<T> publish() {
// }
// public final<R> Flowable<R> publish(Function<? super Flowable<T>, ? extends Publisher<R>> selector) {
// }
// public final<R> Flowable<R> publish(Function<? super Flowable<T>, ? extends Publisher<? extends R>> selector, int prefetch) {
// }
// public final ConnectableFlowable<T> publish(int bufferSize) {
// }
// public final Flowable<T> rebatchRequests(int n) {
// }
// public final Maybe<T> reduce(BiFunction<T, T, T> reducer) {
// }
// public final<R> Single<R> reduce(R seed, BiFunction<R, ? super T, R> reducer) {
// }
// public final<R> Single<R> reduceWith(Callable<R> seedSupplier, BiFunction<R, ? super T, R> reducer) {
// }
// public final Flowable<T> repeat() {
// }
// public final Flowable<T> repeat(long times)
//{
// }
// public final Flowable<T> repeatUntil(BooleanSupplier stop)
//{
// }
// public final Flowable<T> repeatWhen(final Function<? super Flowable<Object>, ? extends Publisher<?>> handler)
// {
// }
// public final ConnectableFlowable<T> replay() {
// }
// public final<R> Flowable<R> replay(Function<? super Flowable<T>, ? extends Publisher<R>> selector) {
// }
// public final<R> Flowable<R> replay(Function<? super Flowable<T>, ? extends Publisher<R>> selector, final int bufferSize)
// {
// }
// public final<R> Flowable<R> replay(Function<? super Flowable<T>, ? extends Publisher<R>> selector, int bufferSize, long time, TimeUnit unit) {
// }
// public final<R> Flowable<R> replay(Function<? super Flowable<T>, ? extends Publisher<R>> selector, final int bufferSize, final long time, final TimeUnit unit, final Scheduler scheduler)
// {
// }
// public final<R> Flowable<R> replay(final Function<? super Flowable<T>, ? extends Publisher<R>> selector, final int bufferSize, final Scheduler scheduler)
// {
// }
// public final<R> Flowable<R> replay(Function<? super Flowable<T>, ? extends Publisher<R>> selector, long time, TimeUnit unit) {
// }
// public final<R> Flowable<R> replay(Function<? super Flowable<T>, ? extends Publisher<R>> selector, final long time, final TimeUnit unit, final Scheduler scheduler)
// {
// }
// public final<R> Flowable<R> replay(final Function<? super Flowable<T>, ? extends Publisher<R>> selector, final Scheduler scheduler)
// {
// }
// public final ConnectableFlowable<T> replay(final int bufferSize)
// {
// }
// public final ConnectableFlowable<T> replay(int bufferSize, long time, TimeUnit unit) {
// }
// public final ConnectableFlowable<T> replay(final int bufferSize, final long time, final TimeUnit unit, final Scheduler scheduler)
// {
// }
// public final ConnectableFlowable<T> replay(final int bufferSize, final Scheduler scheduler)
// {
// }
// public final ConnectableFlowable<T> replay(long time, TimeUnit unit) {
// }
// public final ConnectableFlowable<T> replay(final long time, final TimeUnit unit, final Scheduler scheduler)
// {
// }
// public final ConnectableFlowable<T> replay(final Scheduler scheduler)
// {
// }
// public final Flowable<T> retry() {
// }
// public final Flowable<T> retry(BiPredicate<? super Integer, ? super Throwable> predicate) {
// }
// public final Flowable<T> retry(long count) {
// }
// public final Flowable<T> retry(long times, Predicate<? super Throwable> predicate)
//{
// }
// public final Flowable<T> retry(Predicate<? super Throwable> predicate) {
// }
// public final Flowable<T> retryUntil(final BooleanSupplier stop)
// {
// }
// public final Flowable<T> retryWhen(
// final Function<? super Flowable<Throwable>, ? extends Publisher<?>> handler)
// {
// }
// public final void safeSubscribe(Subscriber<? super T> s)
// {
// }
// public final Flowable<T> sample(long period, TimeUnit unit) {
// }
// public final Flowable<T> sample(long period, TimeUnit unit, boolean emitLast) {
// }
// public final Flowable<T> sample(long period, TimeUnit unit, Scheduler scheduler) {
// }
// public final Flowable<T> sample(long period, TimeUnit unit, Scheduler scheduler, boolean emitLast) {
// }
// public final<U> Flowable<T> sample(Publisher<U> sampler)
//{
// }
// public final<U> Flowable<T> sample(Publisher<U> sampler, boolean emitLast) {
// }
// public final Flowable<T> scan(BiFunction<T, T, T> accumulator) {
// }
// public final<R> Flowable<R> scan(final R initialValue, BiFunction<R, ? super T, R> accumulator)
// {
// }
// public final<R> Flowable<R> scanWith(Callable<R> seedSupplier, BiFunction<R, ? super T, R> accumulator)
//{
// }
// public final Flowable<T> serialize()
//{
// }
// public final Flowable<T> share() {
// }
// public final Maybe<T> singleElement() {
// }
// public final Single<T> single(T defaultItem) {
// }
// public final Single<T> singleOrError() {
// }
// public final Flowable<T> skip(long count) {
// }
// public final Flowable<T> skip(long time, TimeUnit unit) {
// }
// public final Flowable<T> skip(long time, TimeUnit unit, Scheduler scheduler) {
// }
// public final Flowable<T> skipLast(int count) {
// }
// public final Flowable<T> skipLast(long time, TimeUnit unit) {
// }
// public final Flowable<T> skipLast(long time, TimeUnit unit, boolean delayError) {
// }
// public final Flowable<T> skipLast(long time, TimeUnit unit, Scheduler scheduler) {
// }
// public final Flowable<T> skipLast(long time, TimeUnit unit, Scheduler scheduler, boolean delayError) {
// }
// public final Flowable<T> skipLast(long time, TimeUnit unit, Scheduler scheduler, boolean delayError, int bufferSize) {
// }
// public final<U> Flowable<T> skipUntil(Publisher<U> other) {
// }
// public final Flowable<T> skipWhile(Predicate<? super T> predicate) {
// }
// public final Flowable<T> sorted() {
// }
// public final Flowable<T> sorted(Comparator<? super T> sortFunction) {
// }
// public final Flowable<T> startWith(Iterable<? extends T> items) {
// }
// public final Flowable<T> startWith(Publisher<? extends T> other) {
// }
// public final Flowable<T> startWith(T value) {
// }
// public final Flowable<T> startWithArray(T...items) {
// }
// protected abstract void subscribeActual(Subscriber<? super T> s);
// public final<E extends Subscriber<? super T>> E subscribeWith(E subscriber)
// {
// }
// public final Flowable<T> subscribeOn(@NonNull Scheduler scheduler)
// {
// }
// public final Flowable<T> subscribeOn(@NonNull Scheduler scheduler, boolean requestOn)
// {
// }
// public final Flowable<T> switchIfEmpty(Publisher<? extends T> other) {
// }
// public final<R> Flowable<R> switchMap(Function<? super T, ? extends Publisher<? extends R>> mapper) {
// }
// public final<R> Flowable<R> switchMap(Function<? super T, ? extends Publisher<? extends R>> mapper, int bufferSize) {
// }
// public final Completable switchMapCompletable(@NonNull Function<? super T, ? extends CompletableSource> mapper)
// {
// }
// public final Completable switchMapCompletableDelayError(@NonNull Function<? super T, ? extends CompletableSource> mapper)
// {
// }
// public final<R> Flowable<R> switchMapDelayError(Function<? super T, ? extends Publisher<? extends R>> mapper) {
// }
// public final<R> Flowable<R> switchMapDelayError(Function<? super T, ? extends Publisher<? extends R>> mapper, int bufferSize) {
// }
//<R> Flowable<R> switchMap0(Function<? super T, ? extends Publisher<? extends R>> mapper, int bufferSize, boolean delayError)
// {
// return RxJavaPlugins.onAssembly(new FlowableSwitchMap<T, R>(this, mapper, bufferSize, delayError));
// }
// public final<R> Flowable<R> switchMapMaybe(@NonNull Function<? super T, ? extends MaybeSource<? extends R>> mapper)
// {
// }
// public final<R> Flowable<R> switchMapMaybeDelayError(@NonNull Function<? super T, ? extends MaybeSource<? extends R>> mapper)
// {
// }
// public final<R> Flowable<R> switchMapSingle(@NonNull Function<? super T, ? extends SingleSource<? extends R>> mapper)
// {
// }
// public final<R> Flowable<R> switchMapSingleDelayError(@NonNull Function<? super T, ? extends SingleSource<? extends R>> mapper)
// {
// }
// public final Flowable<T> take(long count) {
// }
// public final Flowable<T> take(long time, TimeUnit unit) {
// }
// public final Flowable<T> take(long time, TimeUnit unit, Scheduler scheduler) {
// }
// public final Flowable<T> takeLast(int count) {
// }
// public final Flowable<T> takeLast(long count, long time, TimeUnit unit) {
// }
// public final Flowable<T> takeLast(long count, long time, TimeUnit unit, Scheduler scheduler) {
// }
// public final Flowable<T> takeLast(long count, long time, TimeUnit unit, Scheduler scheduler, boolean delayError, int bufferSize) {
// }
// public final Flowable<T> takeLast(long time, TimeUnit unit) {
// }
// public final Flowable<T> takeLast(long time, TimeUnit unit, boolean delayError) {
// }
// public final Flowable<T> takeLast(long time, TimeUnit unit, Scheduler scheduler) {
// }
// public final Flowable<T> takeLast(long time, TimeUnit unit, Scheduler scheduler, boolean delayError) {
// }
// public final Flowable<T> takeLast(long time, TimeUnit unit, Scheduler scheduler, boolean delayError, int bufferSize) {
// }
// public final Flowable<T> takeUntil(Predicate<? super T> stopPredicate) {
// }
// public final<U> Flowable<T> takeUntil(Publisher<U> other) {
// }
// public final Flowable<T> takeWhile(Predicate<? super T> predicate) {
// }
// public final Flowable<T> throttleFirst(long windowDuration, TimeUnit unit) {
// }
// public final Flowable<T> throttleFirst(long skipDuration, TimeUnit unit, Scheduler scheduler) {
// }
// public final Flowable<T> throttleLast(long intervalDuration, TimeUnit unit) {
// }
// public final Flowable<T> throttleLast(long intervalDuration, TimeUnit unit, Scheduler scheduler) {
// }
// public final Flowable<T> throttleLatest(long timeout, TimeUnit unit) {
// }
// public final Flowable<T> throttleLatest(long timeout, TimeUnit unit, boolean emitLast) {
// }
// public final Flowable<T> throttleLatest(long timeout, TimeUnit unit, Scheduler scheduler) {
// }
// public final Flowable<T> throttleLatest(long timeout, TimeUnit unit, Scheduler scheduler, boolean emitLast) {
// }
// public final Flowable<T> throttleWithTimeout(long timeout, TimeUnit unit) {
// }
// public final Flowable<T> throttleWithTimeout(long timeout, TimeUnit unit, Scheduler scheduler) {
// }
// public final Flowable<Timed<T>> timeInterval() {
// }
// public final Flowable<Timed<T>> timeInterval(Scheduler scheduler) {
// }
// public final Flowable<Timed<T>> timeInterval(TimeUnit unit) {
// }
// public final Flowable<Timed<T>> timeInterval(TimeUnit unit, Scheduler scheduler) {
// }
// public final<V> Flowable<T> timeout(Function<? super T, ? extends Publisher<V>> itemTimeoutIndicator) {
// }
// public final<V> Flowable<T> timeout(Function<? super T, ? extends Publisher<V>> itemTimeoutIndicator, Flowable<? extends T> other) {
// }
// public final Flowable<T> timeout(long timeout, TimeUnit timeUnit) {
// }
// public final Flowable<T> timeout(long timeout, TimeUnit timeUnit, Publisher<? extends T> other) {
// }
// public final Flowable<T> timeout(long timeout, TimeUnit timeUnit, Scheduler scheduler, Publisher<? extends T> other) {
// }
// public final Flowable<T> timeout(long timeout, TimeUnit timeUnit, Scheduler scheduler) {
// }
// public final<U, V> Flowable<T> timeout(Publisher<U> firstTimeoutIndicator,
// Function<? super T, ? extends Publisher<V>> itemTimeoutIndicator) {
// }
// public final<U, V> Flowable<T> timeout(
// Publisher<U> firstTimeoutIndicator,
// Function<? super T, ? extends Publisher<V>> itemTimeoutIndicator,
// Publisher<? extends T> other)
//{
// }
// private Flowable<T> timeout0(long timeout, TimeUnit timeUnit, Publisher<? extends T> other,
// Scheduler scheduler)
// {
// }
// private <U, V> Flowable<T> timeout0(
// Publisher<U> firstTimeoutIndicator,
// Function<? super T, ? extends Publisher<V>> itemTimeoutIndicator,
// Publisher<? extends T> other)
// {
// }
// public final Flowable<Timed<T>> timestamp() {
// }
// public final Flowable<Timed<T>> timestamp(Scheduler scheduler) {
// }
// public final Flowable<Timed<T>> timestamp(TimeUnit unit) {
// }
// public final Flowable<Timed<T>> timestamp(final TimeUnit unit, final Scheduler scheduler)
// {
// }
// public final<R> R to(Function<? super Flowable<T>, R> converter)
// {
// }
// public final Single<List<T>> toList() {
// }
// public final Single<List<T>> toList(final int capacityHint)
// {
// }
// public final<U extends Collection<? super T>> Single<U> toList(Callable<U> collectionSupplier) {
// }
// public final<K> Single<Map<K, T>> toMap(final Function<? super T, ? extends K> keySelector)
// {
// }
// public final<K, V> Single<Map<K, V>> toMap(final Function<? super T, ? extends K> keySelector, final Function<? super T, ? extends V> valueSelector)
// {
// }
// public final<K, V> Single<Map<K, V>> toMap(final Function<? super T, ? extends K> keySelector,
// final Function<? super T, ? extends V> valueSelector,
// final Callable<? extends Map<K, V>> mapSupplier)
// {
// }
// public final<K> Single<Map<K, Collection<T>>> toMultimap(Function<? super T, ? extends K> keySelector)
//{
// }
// public final<K, V> Single<Map<K, Collection<V>>> toMultimap(Function<? super T, ? extends K> keySelector, Function<? super T, ? extends V> valueSelector) {
// Callable<Map<K, Collection<V>>> mapSupplier = HashMapSupplier.asCallable();
// Function<K, List<V>> collectionFactory = ArrayListSupplier.asFunction();
// return toMultimap(keySelector, valueSelector, mapSupplier, collectionFactory);
// }
// public final<K, V> Single<Map<K, Collection<V>>> toMultimap(
// final Function<? super T, ? extends K> keySelector,
// final Function<? super T, ? extends V> valueSelector,
// final Callable<? extends Map<K, Collection<V>>> mapSupplier,
// final Function<? super K, ? extends Collection<? super V>> collectionFactory)
// {
// }
// public final<K, V> Single<Map<K, Collection<V>>> toMultimap(
// Function<? super T, ? extends K> keySelector,
// Function<? super T, ? extends V> valueSelector,
// Callable<Map<K, Collection<V>>> mapSupplier
// ) {
// }
// public final Observable<T> toObservable() {
// }
// public final Single<List<T>> toSortedList() {
// }
// public final Single<List<T>> toSortedList(final Comparator<? super T> comparator)
// {
// }
// public final Single<List<T>> toSortedList(final Comparator<? super T> comparator, int capacityHint)
// {
// }
// public final Single<List<T>> toSortedList(int capacityHint) {
// }
// public final Flowable<T> unsubscribeOn(Scheduler scheduler) {
// }
// public final Flowable<Flowable<T>> window(long count) {
// }
// public final Flowable<Flowable<T>> window(long count, long skip) {
// }
// public final Flowable<Flowable<T>> window(long count, long skip, int bufferSize) {
// }
// public final Flowable<Flowable<T>> window(long timespan, long timeskip, TimeUnit unit) {
// }
// public final Flowable<Flowable<T>> window(long timespan, long timeskip, TimeUnit unit, Scheduler scheduler) {
// }
// public final Flowable<Flowable<T>> window(long timespan, long timeskip, TimeUnit unit, Scheduler scheduler, int bufferSize) {
// }
// public final Flowable<Flowable<T>> window(long timespan, TimeUnit unit) {
// }
// public final Flowable<Flowable<T>> window(long timespan, TimeUnit unit,
// long count) {
// }
// public final Flowable<Flowable<T>> window(long timespan, TimeUnit unit,
// long count, boolean restart) {
// }
// public final Flowable<Flowable<T>> window(long timespan, TimeUnit unit,
// Scheduler scheduler) {
// }
// public final Flowable<Flowable<T>> window(long timespan, TimeUnit unit,
// Scheduler scheduler, long count) {
// }
// public final Flowable<Flowable<T>> window(long timespan, TimeUnit unit,
// Scheduler scheduler, long count, boolean restart) {
// }
// public final Flowable<Flowable<T>> window(
// long timespan, TimeUnit unit, Scheduler scheduler,
// long count, boolean restart, int bufferSize) {
// }
// public final<B> Flowable<Flowable<T>> window(Publisher<B> boundaryIndicator) {
// }
// public final<B> Flowable<Flowable<T>> window(Publisher<B> boundaryIndicator, int bufferSize) {
// }
// public final<U, V> Flowable<Flowable<T>> window(
// Publisher<U> openingIndicator,
// Function<? super U, ? extends Publisher<V>> closingIndicator) {
// }
// public final<U, V> Flowable<Flowable<T>> window(
// Publisher<U> openingIndicator,
// Function<? super U, ? extends Publisher<V>> closingIndicator, int bufferSize) {
// }
// public final<B> Flowable<Flowable<T>> window(Callable<? extends Publisher<B>> boundaryIndicatorSupplier) {
// }
// public final<B> Flowable<Flowable<T>> window(Callable<? extends Publisher<B>> boundaryIndicatorSupplier, int bufferSize) {
// }
// public final<U, R> Flowable<R> withLatestFrom(Publisher<? extends U> other,
// BiFunction<? super T, ? super U, ? extends R> combiner) {
// }
// public final<T1, T2, R> Flowable<R> withLatestFrom(Publisher<T1> source1, Publisher<T2> source2,
// Function3<? super T, ? super T1, ? super T2, R> combiner) {
// }
// public final<T1, T2, T3, R> Flowable<R> withLatestFrom(
// Publisher<T1> source1, Publisher<T2> source2,
// Publisher<T3> source3,
// Function4<? super T, ? super T1, ? super T2, ? super T3, R> combiner) {
// }
// public final<T1, T2, T3, T4, R> Flowable<R> withLatestFrom(
// Publisher<T1> source1, Publisher<T2> source2,
// Publisher<T3> source3, Publisher<T4> source4,
// Function5<? super T, ? super T1, ? super T2, ? super T3, ? super T4, R> combiner) {
// }
// public final<R> Flowable<R> withLatestFrom(Publisher<?>[] others, Function<? super Object[], R> combiner) {
// }
// public final<R> Flowable<R> withLatestFrom(Iterable<? extends Publisher<?>> others, Function<? super Object[], R> combiner) {
// }
// public final<U, R> Flowable<R> zipWith(Iterable<U> other, BiFunction<? super T, ? super U, ? extends R> zipper) {
// }
// public final<U, R> Flowable<R> zipWith(Publisher<? extends U> other, BiFunction<? super T, ? super U, ? extends R> zipper) {
// }
// public final<U, R> Flowable<R> zipWith(Publisher<? extends U> other,
// BiFunction<? super T, ? super U, ? extends R> zipper, boolean delayError) {
// }
// public final<U, R> Flowable<R> zipWith(Publisher<? extends U> other,
// BiFunction<? super T, ? super U, ? extends R> zipper, boolean delayError, int bufferSize) {
// }
// // -------------------------------------------------------------------------
// // Fluent test support, super handy and reduces test preparation boilerplate
// // -------------------------------------------------------------------------
// public final TestSubscriber<T> test() {
// }
// public final TestSubscriber<T> test(long initialRequest) {
// }
// public final TestSubscriber<T> test(long initialRequest, boolean cancel) {
// }
}
|
using InoDrive.Domain.Contexts;
using InoDrive.Domain.Helpers;
using InoDrive.Domain.Models;
using InoDrive.Domain.Models.OutputModels;
using InoDrive.Domain.Repositories.Abstract;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace InoDrive.Domain.Repositories.Concrete
{
public class UsersRepository : IUsersRepository
{
public UsersRepository(InoDriveContext dataContext)
{
_ctx = dataContext;
}
private InoDriveContext _ctx;
public ProfileModel GetUserProfile(ShortUserModel model)
{
var user = _ctx.Users.FirstOrDefault(u => u.Id == model.UserId);
if (user != null)
{
var result = new ProfileModel
{
UserId = model.UserId,
FirstName = user.FirstName,
LastName = user.LastName,
YearOfBirth = user.YearOfBirth,
About = user.About,
Phone = user.Phone,
AvatarImage = user.AvatarImage,
AvatarImageExtension = user.AvatarImageExtension,
YearOfStage = user.YearOfStage,
Sex = user.Sex,
Car = user.Car,
CarClass = user.CarClass,
CarImage = user.CarImage,
CarImageExtension = user.CarImageExtension
};
return result;
}
else
{
throw new Exception(AppConstants.USER_NOT_FOUND);
}
}
public OutputUserSummaryModel GetUserSummary(ShortUserModel model)
{
var user = _ctx.Users.FirstOrDefault(u => u.Id == model.UserId);
if (user != null)
{
var driverTrips =
user.
Trips.
Where(t => !t.IsDeleted);
var passengerTrips =
user.
Bids.
Where(b => b.IsAccepted == true).
Select(b => b.Trip).
Where(t => !t.IsDeleted);
var rating =
(double)(user.Trips.SelectMany(lk => lk.Commnents).Select(n => n.Vote).Sum()) /
(double)(user.Trips.SelectMany(l => l.Commnents).Count() * 5) * 100;
var result = new OutputUserSummaryModel
{
Age = user.YearOfBirth == null ? null : DateTimeOffset.Now.Year - user.YearOfBirth,
Stage = user.YearOfStage == null ? null : DateTimeOffset.Now.Year - user.YearOfStage,
Initials = user.FirstName + " " + user.LastName,
Email = user.Email,
Phone = user.Phone,
Sex = user.Sex,
DriverTripsCount = driverTrips.Count(),
PassengerTripsCount = passengerTrips.Count(),
AllTripsCount = driverTrips.Count() + passengerTrips.Count(),
Rating = rating,
About = user.About,
UserId = user.Id,
AvatarImage = user.AvatarImage,
};
return result;
}
else
{
throw new Exception(AppConstants.USER_NOT_FOUND);
}
}
public void SetUserProfile(ProfileModel model)
{
var user = _ctx.Users.FirstOrDefault(u => u.Id == model.UserId);
if (user != null)
{
try
{
user.About = model.About;
user.FirstName = model.FirstName;
user.LastName = model.LastName;
user.About = model.About;
user.Phone = model.Phone;
user.YearOfBirth = model.YearOfBirth;
user.AvatarImage = model.AvatarImage;
user.AvatarImageExtension = model.AvatarImageExtension;
user.YearOfStage = model.YearOfStage;
user.Sex = model.Sex;
_ctx.SaveChanges();
}
catch
{
throw new Exception(AppConstants.PROFILE_EDIT_ERROR);
}
}
else
{
throw new Exception(AppConstants.USER_NOT_FOUND);
}
}
public void SetUserCar(CarModel model)
{
var user = _ctx.Users.FirstOrDefault(u => u.Id == model.UserId);
if (user != null)
{
try
{
user.Car = model.Car;
user.CarImage = model.CarImage;
user.CarImageExtension = model.CarImageExtension;
user.CarClass = model.CarClass;
_ctx.SaveChanges();
}
catch
{
throw new Exception(AppConstants.PROFILE_EDIT_ERROR);
}
}
else
{
throw new Exception(AppConstants.USER_NOT_FOUND);
}
}
//public ExtendProfileModel GetUserInfo(WatchingProfileModel model)
//{
// var user = _ctx.Users.FirstOrDefault(U => U.Id == model.ObservedUserId);
// if (user != null)
// {
// var result = new ExtendProfileModel
// {
// UserId = user.Id,
// FirstName = user.FirstName,
// LastName = user.LastName,
// AllowVote = false,
// BiddedTrip = false
// };
// //get count user trips
// var countTrips = user.Trips.Count(
// t => !t.IsDeleted &&
// t.LeavingDate.Date < DateTime.Now.Date &&
// t.Bids.Any(bb => bb.IsAccepted == true));
// var countBids = user.Bids.Count(b => b.IsAccepted == true && b.Trip.LeavingDate.Date < DateTime.Now.Date);
// result.CountTrips = countBids + countTrips;
// if (!String.IsNullOrEmpty(model.LoggedUserId)){
// var loggedUser = _ctx.Users.FirstOrDefault(u => u.Id == model.LoggedUserId);
// if (loggedUser != null)
// {
// var bid = loggedUser.Bids.FirstOrDefault(b => !b.Trip.IsDeleted && b.TripId == model.ObservedTripId && b.IsAccepted == true);
// if (bid != null)
// {
// result.BiddedTrip = true;//then display star bar
// if (bid.Trip.LeavingDate.Date < DateTime.Now.Date)
// {
// result.AllowVote = true;//then user has right to vote
// }
// }
// var like = loggedUser.Likes.FirstOrDefault(l => l.TripId == model.ObservedTripId);
// if (like != null)
// {
// result.ExposedRating = like.Vote;//get current vote for observed user
// }
// }else
// {
// throw new Exception("Такого пользователя не существует!");
// }
// }
// //get total rating and total count of votes
// var totalLikes = user.Trips.SelectMany(t => t.Likes).ToList<Like>();
// if (totalLikes.Count != 0)
// {
// result.TotalRating = totalLikes.Count * 5;
// result.TotalVotes = totalLikes.Select(v => v.Vote).Sum();
// }
// var userProfile = user.UserProfile;
// if (userProfile != null)
// {
// result.PublicEmail = userProfile.PublicEmail;
// result.Phone = userProfile.Phone;
// result.Info = userProfile.About;
// result.Age = userProfile.Age;
// result.AvatarImage = userProfile.AvatarImage;
// }
// return result;
// }
// else
// {
// throw new Exception("Такого пользователя не существует!");
// }
//}
}
}
|
using System.Collections;
using Newtonsoft.Json;
namespace ManaMist.Models
{
public class Cost
{
public int food { get; set; }
public int metal { get; set; }
public int mana { get; set; }
public void Increment(Cost cost)
{
food += cost.food;
metal += cost.metal;
mana += cost.mana;
}
public void Decrement(Cost cost)
{
food -= cost.food;
metal -= cost.metal;
mana -= cost.mana;
}
public override string ToString()
{
return JsonConvert.SerializeObject(
this, Formatting.Indented,
new JsonConverter[] { });
}
}
} |
/******************************************************************************
* File : pLab_KJPOC_ARNPCCanvas.cs
* Lisence : BSD 3-Clause License
* Copyright : Lapland University of Applied Sciences
* Authors : Arto Söderström
* BSD 3-Clause License
*
* Copyright (c) 2019, Lapland University of Applied Sciences
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class pLab_KJPOC_ARNPCCanvas : MonoBehaviour
{
#region Variables
[SerializeField]
private GameObject questIcon;
private Image questIconImage;
private Animator questIconAnimator;
[SerializeField]
private Sprite questAvailableSprite;
[SerializeField]
private Sprite questReturnSprite;
private const string ANIMATOR_HIGHLIGHT_PARAMETER = "HighlightEnabled";
#endregion
#region Inherited Methods
private void Awake() {
if (questIcon != null) {
questIconImage = questIcon.GetComponent<Image>();
questIconAnimator = questIcon.GetComponent<Animator>();
}
}
#endregion
#region Public Methods
/// <summary>
/// Show available quest icon
/// </summary>
/// <param name="isOn"></param>
public void ShowAvailableQuestIcon() {
if (questIcon != null) {
if (questIconImage != null) {
questIconImage.sprite = questAvailableSprite;
}
questIcon.SetActive(true);
}
}
/// <summary>
/// Show quest return icon
/// </summary>
public void ShowQuestReturnIcon() {
if (questIcon != null) {
if (questIconImage != null) {
questIconImage.sprite = questReturnSprite;
}
questIcon.SetActive(true);
}
}
/// <summary>
/// Hides quest icon
/// </summary>
public void HideQuestIcon() {
if (questIcon != null) {
questIcon.SetActive(false);
}
}
/// <summary>
/// Toggle highlight visiblity
/// </summary>
public void ToggleHighlight(bool isOn) {
if (questIcon != null) {
if (questIconAnimator != null) {
questIconAnimator.SetBool(ANIMATOR_HIGHLIGHT_PARAMETER, isOn);
}
}
}
#endregion
}
|
namespace Shipwreck.TypeScriptModels.Declarations
{
public sealed class GeneratorDeclaration
{
}
} |
using System.Collections.Generic;
namespace TasksApp.ViewModels
{
public class TaskDetailsViewModel
{
public string Id { get; set; }
public string Title { get; set; }
public string Content { get; set; }
public bool IsDone { get; set; }
public IEnumerable<TagViewModel> RelatedTags { get; set; }
public string CreationDate { get; set; }
public string LastModificationDate { get; set; }
public string ExpirationDate { get; set; }
public bool IsExpired { get; set; }
}
} |
using UnityEngine;
using Normal.Realtime;
using TMPro;
namespace Normal.Realtime.Examples
{
public class CubePlayer : MonoBehaviour
{
public RealtimeView _realtimeView;
private RealtimeTransform _realtimeTransform;
/*
Writen by Windexglow 11-13-10. Use it, edit it, steal it I don't care.
Converted to C# 27-02-13 - no credit wanted.
Simple flycam I made, since I couldn't find any others made public.
Made simple to use (drag and drop, done) for regular keyboard layout
wasd : basic movement
shift : Makes camera accelerate
space : Moves camera on X and Z axis only. So camera doesn't gain any height*/
float mainSpeed = 10.0f; //regular speed
float shiftAdd = 250.0f; //multiplied by how long shift is held. Basically running
float maxShift = 100.0f; //Maximum speed when holdin gshift
float camSens = 0.25f; //How sensitive it with mouse
private float offsetx = 0f;
private float offsety = 1.25f;
private float offsetz = -2f;
private Vector3 lastMouse = new Vector3(255, 255, 255); //kind of in the middle of the screen, rather than at the top (play)
private float totalRun = 1.0f;
public GameObject podiumCameraPosition;
GameObject m_MainCamera;
EventManager eventManager;
private void Awake()
{
_realtimeView = GetComponent<RealtimeView>();
_realtimeTransform = GetComponent<RealtimeTransform>();
}
private void Start()
{
}
void Ping()
{
//transform.Rotate(new Vector3(20f, 0f, 0f) * Time.deltaTime);
}
private bool isCameraParented = false;
private void Update()
{
// If this CubePlayer prefab is not owned by this client, bail.
if (!_realtimeView.isOwnedLocally)
return;
// Move the camera
if (!isCameraParented)
{
m_MainCamera = Camera.main.gameObject;
m_MainCamera.transform.parent = transform;
Vector3 offset = new Vector3(offsetx, offsety, offsetz);
m_MainCamera.transform.position = transform.position + offset + new Vector3(0, -1, 0);
m_MainCamera.transform.LookAt(transform);
playerCamera = m_MainCamera.transform;
camScript = playerCamera.GetComponent<ThirdPersonOrbitCamBasic> ();
camScript.AssignPlayer(transform);
SimpleMove_Awake();
SimpleMove_Start();
isCameraParented = true;
}
// Make sure we own the transform so that RealtimeTransform knows to use this client's transform to synchronize remote clients.
_realtimeTransform.RequestOwnership();
SimpleMove_Update();
}
public bool isLocallyOwned ()
{
return _realtimeView.isOwnedLocally;
}
public Transform playerCamera; // Reference to the camera that focus the player.
public float turnSmoothing = 0.06f; // Speed of turn when moving to match camera facing.
public float sprintFOV = 100f; // the FOV to use on the camera when player is sprinting.
public string sprintButton = "Sprint"; // Default sprint button input name.
//protected Animator anim; // Reference to the Animator component.
protected int speedFloat; // Speed parameter on the Animator.
//protected BasicBehaviour behaviourManager; // Reference to the basic behaviour manager.
protected int behaviourCode; // The code that identifies a behaviour.
protected bool canSprint; // Boolean to store if the behaviour allows the player to sprint.
private ThirdPersonOrbitCamBasic camScript; // Reference to the third person camera script.
private bool changedFOV; // Boolean to store when the sprint action has changed de camera FOV.
public float walkSpeed = 0.15f; // Default walk speed.
public float runSpeed = 1.0f; // Default run speed.
public float sprintSpeed = 2.0f; // Default sprint speed.
public float speedDampTime = 0.1f; // Default damp time to change the animations based on current speed.
public string jumpButton = "Jump"; // Default jump button.
public float jumpHeight = 1.5f; // Default jump height.
public float jumpIntertialForce = 10f; // Default horizontal inertial force when jumping.
private int hFloat; // Animator variable related to Horizontal Axis.
private int vFloat; // Animator variable related to Vertical Axis.
private float speed, speedSeeker; // Moving speed.
private int jumpBool; // Animator variable related to jumping.
private int groundedBool; // Animator variable related to whether or not the player is on ground.
private bool jump; // Boolean to determine whether or not the player started a jump.
private bool isColliding; // Boolean to determine if the player has collided with an obstacle.
private Vector3 colExtents; // Collider extents for ground test.
private int behaviourLocked; // Reference to temporary locked behaviour that forbids override.
private Vector3 lastDirection; // Last direction the player was moving.
private Animator anim; // Reference to the Animator component.
private float h; // Horizontal Axis.
private float v; // Vertical Axis.
private Rigidbody rBody; // Reference to the player's rigidbody.
private bool sprint; // Boolean to determine whether or not the player activated the sprint mode.
enum BehaviorTypes {Move, Fly};
private BehaviorTypes currentBehavior = BehaviorTypes.Move;
void SimpleMove_Awake()
{
anim = GetComponent<Animator> ();
rBody = GetComponent<Rigidbody> ();
hFloat = Animator.StringToHash("H");
vFloat = Animator.StringToHash("V");
// Set up the references.
speedFloat = Animator.StringToHash("Speed");
canSprint = true;
// Set the behaviour code based on the inheriting class.
behaviourCode = this.GetType().GetHashCode();
// Grounded verification variables.
groundedBool = Animator.StringToHash("Grounded");
colExtents = GetComponent<Collider>().bounds.extents;
if (playerCamera) {
camScript = playerCamera.GetComponent<ThirdPersonOrbitCamBasic> ();
}
}
// Start is always called after any Awake functions.
void SimpleMove_Start()
{
// Set up the references.
jumpBool = Animator.StringToHash("Jump");
groundedBool = Animator.StringToHash("Grounded");
anim.SetBool(groundedBool, true);
// Subscribe and register this behaviour as the default behaviour.
//behaviourManager.SubscribeBehaviour(this);
//behaviourManager.RegisterDefaultBehaviour(this.behaviourCode);
speedSeeker = runSpeed;
}
// Update is used to set features regardless the active behaviour.
void SimpleMove_Update()
{
// Store the input axes.
h = Input.GetAxis("Horizontal");
v = Input.GetAxis("Vertical");
// Get jump input.
if (!jump && Input.GetButtonDown(jumpButton) && currentBehavior == BehaviorTypes.Move)
{
jump = true;
}
//Debug.Log("V: " + v +", H: " + h);
// Set the input axes on the Animator Controller.
anim.SetFloat(hFloat, h, 0.1f, Time.deltaTime);
anim.SetFloat(vFloat, v, 0.1f, Time.deltaTime);
// Toggle sprint by input.
sprint = Input.GetButton (sprintButton);
// Set the correct camera FOV for sprint mode.
if(IsSprinting())
{
changedFOV = true;
camScript.SetFOV(sprintFOV);
}
else if(changedFOV)
{
camScript.ResetFOV();
changedFOV = false;
}
// Set the grounded test on the Animator Controller.
anim.SetBool(groundedBool, IsGrounded());
}
void FixedUpdate() {
if (!playerCamera) { return; }
LocalFixedUpdate();
}
// LocalFixedUpdate overrides the virtual function of the base class.
public void LocalFixedUpdate()
{
// Call the basic movement manager.
MovementManagement(h, v);
// Call the jump manager.
JumpManagement();
}
// Execute the idle and walk/run jump movements.
void JumpManagement()
{
// Start a new jump.
if (jump && !anim.GetBool(jumpBool) && IsGrounded())
{
// Set jump related parameters.
LockTempBehaviour(this.behaviourCode);
anim.SetBool(jumpBool, true);
// Is a locomotion jump?
if (anim.GetFloat(speedFloat) > 0.1)
{
// Temporarily change player friction to pass through obstacles.
GetComponent<CapsuleCollider>().material.dynamicFriction = 0f;
GetComponent<CapsuleCollider>().material.staticFriction = 0f;
// Remove vertical velocity to avoid "super jumps" on slope ends.
RemoveVerticalVelocity();
// Set jump vertical impulse velocity.
float velocity = 2f * Mathf.Abs(Physics.gravity.y) * jumpHeight;
velocity = Mathf.Sqrt(velocity);
rBody.AddForce(Vector3.up * velocity, ForceMode.VelocityChange);
}
}
// Is already jumping?
else if (anim.GetBool(jumpBool))
{
// Keep forward movement while in the air.
if (!IsGrounded() && !isColliding && GetTempLockStatus())
{
rBody.AddForce(transform.forward * jumpIntertialForce * Physics.gravity.magnitude * sprintSpeed, ForceMode.Acceleration);
}
// Has landed?
if ((rBody.velocity.y < 0) && IsGrounded())
{
anim.SetBool(groundedBool, true);
// Change back player friction to default.
GetComponent<CapsuleCollider>().material.dynamicFriction = 0.6f;
GetComponent<CapsuleCollider>().material.staticFriction = 0.6f;
// Set jump related parameters.
jump = false;
anim.SetBool(jumpBool, false);
UnlockTempBehaviour(this.behaviourCode);
}
}
}
// Deal with the basic player movement
void MovementManagement(float horizontal, float vertical)
{
//Debug.Log("Ver: " + vertical +", H: " + horizontal);
// On ground, obey gravity.
if (IsGrounded()) {
rBody.useGravity = true;
}
// Avoid takeoff when reached a slope end.
else if (!anim.GetBool(jumpBool) && rBody.velocity.y > 0)
{
RemoveVerticalVelocity();
}
// Call function that deals with player orientation.
Rotating(horizontal, vertical);
// Set proper speed.
Vector2 dir = new Vector2(horizontal, vertical);
speed = Vector2.ClampMagnitude(dir, 1f).magnitude;
// This is for PC only, gamepads control speed via analog stick.
speedSeeker += Input.GetAxis("Mouse ScrollWheel");
speedSeeker = Mathf.Clamp(speedSeeker, walkSpeed, runSpeed);
speed *= speedSeeker;
if (IsSprinting())
{
speed = sprintSpeed;
}
anim.SetFloat(speedFloat, speed, speedDampTime, Time.deltaTime);
}
// Remove vertical rigidbody velocity.
private void RemoveVerticalVelocity()
{
Vector3 horizontalVelocity = rBody.velocity;
horizontalVelocity.y = 0;
rBody.velocity = horizontalVelocity;
}
// Rotate the player to match correct orientation, according to camera and key pressed.
Vector3 Rotating(float horizontal, float vertical)
{
// Get camera forward direction, without vertical component.
Vector3 forward = playerCamera.TransformDirection(Vector3.forward);
// Player is moving on ground, Y component of camera facing is not relevant.
forward.y = 0.0f;
forward = forward.normalized;
// Calculate target direction based on camera forward and direction key.
Vector3 right = new Vector3(forward.z, 0, -forward.x);
Vector3 targetDirection;
targetDirection = forward * vertical + right * horizontal;
// Lerp current direction to calculated target direction.
if ((IsMoving() && targetDirection != Vector3.zero))
{
Quaternion targetRotation = Quaternion.LookRotation(targetDirection);
Quaternion newRotation = Quaternion.Slerp(rBody.rotation, targetRotation, turnSmoothing);
rBody.MoveRotation(newRotation);
SetLastDirection(targetDirection);
}
// If idle, Ignore current camera facing and consider last moving direction.
if (!(Mathf.Abs(horizontal) > 0.9 || Mathf.Abs(vertical) > 0.9))
{
Repositioning();
}
return targetDirection;
}
// Collision detection.
private void OnCollisionStay(Collision collision)
{
if (!_realtimeView.isOwnedLocally)
return;
isColliding = true;
// Slide on vertical obstacles
if (currentBehavior == BehaviorTypes.Move && collision.GetContact(0).normal.y <= 0.1f)
{
float vel = anim.velocity.magnitude;
Vector3 tangentMove = Vector3.ProjectOnPlane(transform.forward, collision.GetContact(0).normal).normalized * vel;
rBody.AddForce(tangentMove, ForceMode.VelocityChange);
}
}
private void OnCollisionExit(Collision collision)
{
if (!_realtimeView.isOwnedLocally)
return;
isColliding = false;
}
public bool IsGrounded()
{
Ray ray = new Ray(this.transform.position + Vector3.up * 2 * colExtents.x, Vector3.down);
return Physics.SphereCast(ray, colExtents.x, colExtents.x + 0.2f);
}
// Atempt to lock on a specific behaviour.
// No other behaviour can overrhide during the temporary lock.
// Use for temporary transitions like jumping, entering/exiting aiming mode, etc.
public void LockTempBehaviour(int behaviourCode)
{
if (behaviourLocked == 0)
{
behaviourLocked = behaviourCode;
}
}
// Attempt to unlock the current locked behaviour.
// Use after a temporary transition ends.
public void UnlockTempBehaviour(int behaviourCode)
{
if(behaviourLocked == behaviourCode)
{
behaviourLocked = 0;
}
}
// Check if any other behaviour is temporary locked.
public bool GetTempLockStatus(int behaviourCodeIgnoreSelf = 0)
{
return (behaviourLocked != 0 && behaviourLocked != behaviourCodeIgnoreSelf);
}
// Check if player is sprinting.
public virtual bool IsSprinting()
{
return sprint && IsMoving() && CanSprint();
}
// Check if the player is moving.
public bool IsMoving()
{
return (h != 0)|| (v != 0);
}
// Set the last player direction of facing.
public void SetLastDirection(Vector3 direction)
{
lastDirection = direction;
}
// Put the player on a standing up position based on last direction faced.
public void Repositioning()
{
if(lastDirection != Vector3.zero)
{
lastDirection.y = 0;
Quaternion targetRotation = Quaternion.LookRotation (lastDirection);
Quaternion newRotation = Quaternion.Slerp(rBody.rotation, targetRotation, turnSmoothing);
rBody.MoveRotation (newRotation);
}
}
// Check if player can sprint (all behaviours must allow).
public bool CanSprint()
{
return true;
}
}
}
|
namespace ChallengeTechAndSolve.Application.Unit.Tests.Stubs
{
using ChallengeTechAndSolve.DataAccess.Contracts.Entities;
using System;
using System.Collections.Generic;
public static class StubData
{
public static TraceabilityEntity traceability_one = new TraceabilityEntity()
{
CreationDate = DateTime.Now,
Document = "123456",
TraceabilityId = new Guid("57d11393-c5af-4d53-82f9-13797e13b5c4")
};
public static TraceabilityEntity traceability_two = new TraceabilityEntity()
{
CreationDate = DateTime.Now,
Document = "1234567",
TraceabilityId = new Guid("803cdeae-95ff-4540-8508-cdbacbb9138f")
};
public static List<TraceabilityEntity> lstTraceability = new List<TraceabilityEntity>(new TraceabilityEntity[] {
traceability_one,
traceability_two
});
}
}
|
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using PterodactylCharts;
using Xunit;
namespace UnitTestEngine
{
public class TestPointGraphEngineHelper : TheoryData<bool, string, List<double>, List<double>, string, string, Color, string, string>
{
public TestPointGraphEngineHelper()
{
Add(false, "Test title", new List<double>{0.0, 1.0}, new List<double>{0.0, 1.0}, "x", "y", Color.Black, "", "");
Add(false, "Test title", new List<double>{0.0}, new List<double>{5.0}, "x", "y", Color.Black, "", "");
Add(false, "", new List<double> { 0.0, 1.0 }, new List<double> { 0.0, 1.0 }, "x", "y", Color.Black, "", "");
Add(false, "Test title", new List<double> { 0.0, 1.0 }, new List<double> { 0.0, 1.0 }, "", "y", Color.Black, "", "");
Add(false, "Test title", new List<double> { 0.0, 1.0 }, new List<double> { 0.0, 1.0 }, "many words", "y", Color.Black, "", "");
Add(true, "Test title", new List<double> { 0.0, 1.0 }, new List<double> { 0.0, 1.0 }, "x", "y", Color.Black, "", "");
Add(false, "Test title", new List<double> { 0.0, 1.0 }, new List<double> { 0.0, 1.0 }, "x", "y", Color.Black, @"SampleFolder\Test.png",
@"");
Add(false, "Test title", new List<double> { 0.0, 1.0 }, new List<double> { 0.0, 1.0 }, "x", "y", Color.FromArgb(red:10, blue:11, green:12, alpha: 14), "", "");
}
}
public class TestPointGraphEngineExceptionHelper : TheoryData<bool, string, List<double>, List<double>, string, string, Color, string, string>
{
public TestPointGraphEngineExceptionHelper()
{
Add(false, "Test title", new List<double> { 0.0 }, new List<double> { 0.0, 1.0 }, "x", "y", Color.Black, "",
"X Values should match Y Values - check if both lists have the same number of elements.");
Add(false, "Test title", new List<double> { 0.0, 1.0 }, new List<double> { 0.0 }, "x", "y", Color.Black, "",
"X Values should match Y Values - check if both lists have the same number of elements.");
}
}
public class TestPointGraphEngine
{
[Theory]
[ClassData(typeof(TestPointGraphEngineHelper))]
public void CorrectData(bool showGraph, string title,
List<double> xValues, List<double> yValues, string xName,
string yName, Color color, string path, string expected)
{
PointGraphEngine testObject = new PointGraphEngine(showGraph, title, xValues, yValues, xName, yName, color, path);
Assert.Equal(showGraph, testObject.ShowGraph);
Assert.Equal(title, testObject.Title);
Assert.Equal(xValues, testObject.XValues);
Assert.Equal(yValues, testObject.YValues);
Assert.Equal(xName, testObject.XName);
Assert.Equal(yName, testObject.YName);
Assert.Equal(color, testObject.ColorData);
Assert.Equal(path, testObject.Path);
}
[Theory]
[ClassData(typeof(TestPointGraphEngineHelper))]
public void CheckReportCreation(bool showGraph, string title,
List<double> xValues, List<double> yValues, string xName,
string yName, Color color, string path, string expected)
{
PointGraphEngine testObject = new PointGraphEngine(showGraph, title, xValues, yValues, xName, yName, color, path);
string actual = testObject.Create();
Assert.Equal(expected, actual);
}
[Theory]
[ClassData(typeof(TestPointGraphEngineExceptionHelper))]
public void CheckExceptions(bool showGraph, string title,
List<double> xValues, List<double> yValues, string xName,
string yName, Color color, string path, string message)
{
var exception = Assert.Throws<ArgumentException>(() => new PointGraphEngine(showGraph, title, xValues, yValues, xName, yName, color, path));
Assert.Equal(message, exception.Message);
}
}
} |
namespace Assets.Scripts.Models.ResourceObjects.CraftingResources
{
public class Lead : ResourceObject
{
public Lead()
{
LocalizationName = "lead";
Description = "lead_descr";
IconName = "lead_icon";
}
}
}
|
using System;
using Framework.Core.Common;
using Tests.Pages.Van.Main.Common;
using OpenQA.Selenium;
using OpenQA.Selenium.Support.PageObjects;
namespace Tests.Pages.Van.Main.VirtualPhoneBankPages
{
public class VirtualPhoneBankRunPage : VanBasePage
{
#region Page Element Declarations
public IWebElement SubHeader { get { return _driver.FindElement(By.Id("ctl00_ContentPlaceHolderVANPage_SubHeader")); } }
public IWebElement InstructionMessage { get { return _driver.FindElement(By.XPath("//div[@class='wizard-instructions']")); } }
// Also the Finish button. Both buttons have the same id.
public IWebElement NextButton { get { return _driver.FindElement(By.Id("ctl00_ContentPlaceHolderVANPage_ButtonVirtualPhoneBankListSubmit")); } }
#endregion
public VirtualPhoneBankRunPage(Driver driver) : base(driver) { }
#region Methods
/// <summary>
/// Clicks the Next/Finish button. Both buttons have the same id.
/// </summary>
public void ClickNextButton()
{
_driver.Click(NextButton);
}
/// <summary>
/// Checks if the VirtualPhoneBank is on its last page
/// </summary>
/// <returns>True if the page contains the end of the Virtual Phone Bank message</returns>
public bool EndOfVirtualPhoneBank()
{
try
{
if (InstructionMessage.Text.Contains("Thank you. The list is complete for now. Please try again later."))
return true;
Console.WriteLine("The Instruction Message appeared, but did not contain the correct text.");
return false;
}
catch (NoSuchElementException)
{
return false;
}
}
#region Validation Methods
/// <summary>
/// Checks if the text of the SubHeader is the passed vpbName
/// </summary>
/// <param name="vpbName"></param>
/// <returns>True if the text of the SubHeader is the passed vpbName. False otherwise.</returns>
public bool ValidateCorrectPhoneBank(string vpbName)
{
return SubHeader.Text.Equals(vpbName);
}
#endregion
#endregion
}
}
|
using System.Runtime.Remoting.Messaging;
using System.Web;
namespace AbiokaScrum.Api.Authentication
{
public class ContextHolder
{
public static object GetData(string name) {
if (HttpContext.Current != null) {
return HttpContext.Current.Items[name];
} else {
return CallContext.GetData(name);
}
}
public static void SetData(string name, object data) {
if (HttpContext.Current != null) {
HttpContext.Current.Items[name] = data;
} else {
CallContext.SetData(name, data);
}
}
}
} |
using System;
using System.Collections.Generic;
using System.Text;
using Laoziwubo.Model.Attribute;
namespace Laoziwubo.Model.Content
{
[DataTable("Passionate")]
public class PassionateM
{
[Identity(true)]
[Field]
public int Id { get; set; }
[Field]
public string Title { get; set; }
[Field]
public int Days { get; set; }
[Field]
public string Keywords { get; set; }
[Field]
public string Resources { get; set; }
[Field]
public string Completion { get; set; }
[Field]
public string Who { get; set; }
[Field]
public string Message { get; set; }
[Field]
public int Status { get; set; }
[Field]
public DateTime AddTime { get; set; }
[Field]
public DateTime UpdateTime { get; set; }
public Dictionary<string, int> CompletionDict { get; set; }
public List<string> ResourcesList { get; set; }
}
}
|
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
namespace PathologicalGames
{
/// <description>
/// 这个类是用来在unity编辑界面显示一个更复杂的用户输入界面,
/// 这样我们能收集预制间相互关联的更多选项,
/// 这个类实现对象池中主要的池功能,
/// 对象池通过这些方法和设置管理对象池。
/// </description>
/// <summary>
/// 二级对象池,管理具体的对象
/// </summary>
[System.Serializable]
public class PrefabPool
{
#region 在编辑器中可用的公共属性
/// <summary>
/// 准备加载的预制体
/// </summary>
public Transform prefab;
/// <summary>
/// 保存一个预制体的引用
/// </summary>
internal GameObject referenceOfPrefab; // Hidden in inspector, but not Debug tab
/// <summary>
/// 缓存池这个Prefab的最大保存数量
/// </summary>
public int preloadAmount = 1;
/// <summary>
/// 如果勾选表示缓存池所有的gameobject可以“异步”加载
/// </summary>
public bool preloadTime = false;
/// <summary>
/// 加载所有请求的实例,需要的帧数(实际上预加载是每帧加载一个,这个参数什么用都没有)
/// </summary>
public int preloadFrames = 2;
/// <summary>
/// 延迟多久开始加载
/// </summary>
public float preloadDelay = 0;
/// <summary>
/// 是否开启对象实例化的限制功能
/// </summary>
public bool limitInstances = false;
/// <summary>
/// 限制实例化Prefab的数量,'limitInstances'为true时启用
/// </summary>
public int limitAmount = 100;
/// <summary>
/// <para>FIFO是指先进先出</para>
/// <para>当超出限定缓存池限定数量,如果不勾选它,那么就会返回null。如果勾选它,就会返回缓存池里最不常用的那个。</para>
/// </summary>
public bool limitFIFO = false; // Keep after limitAmount for auto-inspector
/// <summary>
/// 是否开启缓存池智能自动清理模式,就是当池子里面的对象setActive(false)也就是目前不用的时候,销毁对象
/// 不要用这个,除非你需要管理内存问题!
/// </summary>
public bool AutoDestroy = false;
/// <summary>
/// 缓存池自动清理,但是始终保留几个对象不清理
/// </summary>
public int DestroyExceptTheNumber = 50;
/// <summary>
/// 每过多久执行一遍自动清理,单位是秒。从上一次清理过后开始计时
/// </summary>
public int DestroyEachTime = 60;
/// <summary>
/// 每次自动清理几个游戏对象
/// </summary>
public int DestroyNumberEverytime = 5;
/// <summary>
/// 是否打印信息
/// </summary>
public bool _logMessages = false;
public bool LogMessages
{
get
{
if (DisableLogging) return false;
if (this.ObjectPool.logMessages)
return this.ObjectPool.logMessages;
else
return this._logMessages;
}
}
// 是否禁用打印信息
private bool DisableLogging = false;
/// <summary>
///此预制池所在的对象池对象
/// </summary>
public ObjectPool ObjectPool { private get; set; }
#endregion Public Properties Available in the Editor
#region 构造和自销毁
/// <description>
/// 构造函数(参数为预制体对象)
/// </description>
public PrefabPool(Transform prefab)
{
this.prefab = prefab;
this.referenceOfPrefab = prefab.gameObject;
}
/// <description>
/// 构造函数仅供序列化检视面板使用
/// </description>
public PrefabPool() { }
/// <description>
/// 面板中实例的构造方法(在面板中的实例,没有执行构造函数)
/// </description>
internal void InspectorInstanceConstructor()
{
this.referenceOfPrefab = this.prefab.gameObject;
this._active_List = new List<Transform>();
this._inactive_List = new List<Transform>();
}
/// <summary>
/// 对象池销毁时执行(销毁所有对象并清空数组)
/// </summary>
internal void SelfDestruct()
{
// Probably overkill but no harm done
this.prefab = null;
this.referenceOfPrefab = null;
this.ObjectPool = null;
// Go through both lists and destroy everything
foreach (Transform inst in this._inactive_List)
if (inst != null)
Object.Destroy(inst.gameObject);
foreach (Transform inst in this._active_List)
if (inst != null)
Object.Destroy(inst.gameObject);
this._active_List.Clear();
this._inactive_List.Clear();
}
#endregion Constructor and Self-Destruction
#region 池功能
/// <summary>
/// 开启销毁实例的开关,为true时,销毁大于规定数目的实例(此开关为了避免多次执行销毁携程)
/// </summary>
private bool _destroy_Bool = false;
/// <summary>
/// 已经显示的对象数组
/// </summary>
internal List<Transform> _active_List = new List<Transform>();
public List<Transform> ActiveList { get { return new List<Transform>(this._active_List); } }
/// <summary>
/// 隐藏对象的数组
/// </summary>
internal List<Transform> _inactive_List = new List<Transform>();
public List<Transform> InactiveList { get { return new List<Transform>(this._inactive_List); } }
/// <summary>
/// Returns the total count of instances in the PrefabPool
/// 返回缓存池内的最大数量
/// </summary>
public int totalCount
{
get
{
// Add all the items in the pool to get the total count
int count = 0;
count += this._active_List.Count;
count += this._inactive_List.Count;
return count;
}
}
/// <summary>
/// 用于开启PreloadInstances()中的一次性事件,只读
/// </summary>
private bool _preloaded = false;
internal bool Preloaded
{
get { return this._preloaded; }
private set { this._preloaded = value; }
}
/// <summary>
/// 隐藏实例
/// </summary>
/// <returns>
/// True if successfull, false if xform isn't in the spawned list
/// </returns>
internal bool InactiveInstance(Transform xform)
{
return InactiveInstance(xform, true);
}
internal bool InactiveInstance(Transform xform, bool sendEventMessage)
{
if (this.LogMessages)
{
Debug.Log(string.Format("SpawnPool {0} ({1}): Despawning '{2}'",
this.ObjectPool.poolName,
this.prefab.name,
xform.name));
}
//把实例从显示数组移到隐藏数组中
this._active_List.Remove(xform);
this._inactive_List.Add(xform);
//通知自定义代码中添加的实例的事件OnDespawned(像除自身外所有子类发消息)
if (sendEventMessage)
{
xform.gameObject.BroadcastMessage(
"OnDespawned",
this.ObjectPool,
SendMessageOptions.DontRequireReceiver
);
}
PoolManagerUtils.SetActive(xform.gameObject, false);
if (!this._destroy_Bool && // 销毁开关
this.AutoDestroy && // 自动销毁的开关
this.totalCount > this.DestroyExceptTheNumber) // 对象总数大于保留的对象数目
{
this._destroy_Bool = true;
this.ObjectPool.StartCoroutine(Destroy());
}
return true;
}
internal IEnumerator Destroy()
{
if (this.LogMessages)
{
Debug.Log(string.Format("SpawnPool {0} ({1}): 销毁对象! " +
"等待 {2}秒 开始检测销毁",
this.ObjectPool.poolName,
this.prefab.name,
this.DestroyEachTime));
}
yield return new WaitForSeconds(this.DestroyEachTime);
while (this.totalCount > this.DestroyExceptTheNumber)
{
// Attempt to delete an amount == this.cullMaxPerPass
for (int i = 0; i < this.DestroyNumberEverytime; i++)
{
if (this.totalCount <= this.DestroyExceptTheNumber)
break;
//销毁显示列表中的最后一项
if (this._inactive_List.Count > 0)
{
Transform inst = this._inactive_List[0];
this._inactive_List.RemoveAt(0);
MonoBehaviour.Destroy(inst.gameObject);
if (this.LogMessages)
{
Debug.Log(string.Format("SpawnPool {0} ({1}): " +
"要销毁至 {2} 个对象 . 现在还有 {3} 个对象.",
this.ObjectPool.poolName,
this.prefab.name,
this.DestroyExceptTheNumber,
this.totalCount));
}
}
else if (this.LogMessages)
{
Debug.Log(string.Format("SpawnPool {0} ({1}): " +
"等待 {2} 秒,开始下次销毁",
this.ObjectPool.poolName,
this.prefab.name,
this.DestroyEachTime));
break;
}
}
//等待下次执行
yield return new WaitForSeconds(this.DestroyEachTime);
}
if (this.LogMessages)
{
Debug.Log(string.Format("SpawnPool {0} ({1}): 销毁完毕",
this.ObjectPool.poolName,
this.prefab.name));
}
//复位开关
this._destroy_Bool = false;
yield return null;
}
/// <summary>
///<para>若开启了先进先出,则在没有隐藏对象的情况下,把第一个对象隐藏,再显示出来</para>
/// </summary>
/// <returns>
/// The new instance's Transform.
///
/// If the Limit option was used for the PrefabPool associated with the
/// passed prefab, then this method will return null if the limit is
/// reached.
/// </returns>
internal Transform ActiveInstance(Vector3 pos, Quaternion rot)
{
//开启了限制实例数量和先进先出,而且显示实例数量大于等于限制数量
if (this.limitInstances
&& this.limitFIFO
&&this._active_List.Count >= this.limitAmount)
{
Transform firstIn = this._active_List[0];
if (this.LogMessages)
{
Debug.Log(string.Format
(
"SpawnPool {0} ({1}): " +
"限制完成,隐藏 {2}...",
this.ObjectPool.poolName,
this.prefab.name,
firstIn
));
}
//隐藏实例
this.InactiveInstance(firstIn);
//从显示数组中移除
this.ObjectPool._active_List.Remove(firstIn);
}
Transform inst;
// 如果没有隐藏的实例,创建一个新的
if (this._inactive_List.Count == 0)
{
inst = this.ActiveNew(pos, rot);
}
else
{
//从隐藏数组移到显示数组
inst = this._inactive_List[0];
this._inactive_List.RemoveAt(0);
this._active_List.Add(inst);
if (inst == null)
{
var msg = "确保没有手动删除一个隐藏对象";
throw new MissingReferenceException(msg);
}
if (this.LogMessages)
{
Debug.Log(string.Format("SpawnPool {0} ({1}): 显示 '{2}'.",
this.ObjectPool.poolName,
this.prefab.name,
inst.name));
}
inst.position = pos;
inst.rotation = rot;
PoolManagerUtils.SetActive(inst.gameObject, true);
}
return inst;
}
/// <summary>
/// 显示一个新的实例
/// </summary>
/// <param name="pos">Vector3</param>
/// <param name="rot">Quaternion</param>
/// <returns>
/// The new instance's Transform.
///
/// If the Limit option was used for the PrefabPool associated with the
/// passed prefab, then this method will return null if the limit is
/// reached.
/// </returns>
private Transform ActiveNew() { return this.ActiveNew(Vector3.zero, Quaternion.identity); }
private Transform ActiveNew(Vector3 pos, Quaternion rot)
{
// 开启了实例限制且总数量超出限制
if (this.limitInstances && this.totalCount >= this.limitAmount)
{
if (this.LogMessages)
{
Debug.Log(string.Format
(
"SpawnPool {0} ({1}): " +
"达到限制数量,不再产生新的实例",
this.ObjectPool.poolName,
this.prefab.name
));
}
return null;
}
// 若是位置角度都是默认,就赋值池对象的参数
if (pos == Vector3.zero) pos = this.ObjectPool.CloneFather.position;
if (rot == Quaternion.identity) rot = this.ObjectPool.CloneFather.rotation;
//创建新实例,并更名
var inst = (Transform)Object.Instantiate(this.prefab, pos, rot);
this.nameInstance(inst); // Adds the number to the end
//若池对象为父物体
if (!this.ObjectPool.thisNotFather)
inst.parent = this.ObjectPool.CloneFather; // The group is the parent by default
//若开启匹配缩放,则缩放赋值为1
if (this.ObjectPool.matchPoolScale)
inst.localScale = Vector3.one;
//若开启匹配层级,则给物体及其所有子物体设置层级
if (this.ObjectPool.matchPoolLayer)
this.SetLayer(inst, this.ObjectPool.gameObject.layer);
//实例加入显示列表中
this._active_List.Add(inst);
if (this.LogMessages)
Debug.Log(string.Format("SpawnPool {0} ({1}): 创建了新实例 '{2}'.",
this.ObjectPool.poolName,
this.prefab.name,
inst.name));
return inst;
}
/// <summary>
/// 设置物体及其所有子物体的层级
/// </summary>
/// <param name="xform">The transform to process</param>
/// <param name="layer">The new layer</param>
private void SetLayer(Transform xform, int layer)
{
//设置物体层级
xform.gameObject.layer = layer;
//递归子物体
foreach (Transform child in xform)
{
SetLayer(child, layer);
}
}
/// <summary>
/// 用对象池添加一个现存的实例到预制池
/// Used by a SpawnPool to add an existing instance to this PrefabPool.
/// This is used during game start to pool objects which are not
/// instantiated at runtime
/// </summary>
/// <param name="inst">The instance to add</param>
/// <param name="inactive">True to despawn on add</param>
internal void AddInstanceNotInPool(Transform inst, bool inactive)
{
//给实例的名字加上数字
this.nameInstance(inst);
if (inactive)
{
PoolManagerUtils.SetActive(inst.gameObject, false);
this._inactive_List.Add(inst);
}
else
{
this._active_List.Add(inst);
}
}
/// <summary>
/// Preload PrefabPool.preloadAmount instances if they don't already exist. In
/// otherwords, if there are 7 and 10 should be preloaded, this only creates 3.
/// This is to allow asynchronous Spawn() usage in Awake() at game start
/// 预加载PrefabPool.preloadAmount数量的实例
/// </summary>
/// <returns></returns>
internal void PreloadInstances()
{
if (this.Preloaded)
{
Debug.Log(string.Format("SpawnPool {0} ({1}): " +
"预制体已经加载过了,如果是在代码中定义的,看看检视面板中是否有重复定义",
this.ObjectPool.poolName,
this.prefab.name));
return;
}
if (this.prefab == null)
{
Debug.LogError(string.Format("SpawnPool {0} ({1}): 预制体不能为空.",
this.ObjectPool.poolName,
this.prefab.name));
return;
}
//开启实例数量限制
if (this.limitInstances && this.preloadAmount > this.limitAmount)
{
Debug.LogWarning
(
string.Format
(
"SpawnPool {0} ({1}): " +
"开启了'Limit Instances' 并且预加载数量大于限制数量," +
"这里自动将预加载数量设置为限制数量",
this.ObjectPool.poolName,
this.prefab.name
)
);
this.preloadAmount = this.limitAmount;
}
//开启清理模式
if (this.AutoDestroy && this.preloadAmount > this.DestroyExceptTheNumber)
{
Debug.LogWarning(string.Format("SpawnPool {0} ({1}): " +
"You turned ON Culling and entered a 'Cull Above' threshold " +
"greater than the 'Preload Amount'! This will cause the " +
"culling feature to trigger immediatly, which is wrong " +
"conceptually. Only use culling for extreme situations. " +
"See the docs.",
this.ObjectPool.poolName,
this.prefab.name
));
}
//开启异步加载
if (this.preloadTime)
{
if (this.preloadFrames > this.preloadAmount)
{
Debug.LogWarning(string.Format("SpawnPool {0} ({1}): " +
"Preloading over-time is on but the frame duration is greater " +
"than the number of instances to preload. The minimum spawned " +
"per frame is 1, so the maximum time is the same as the number " +
"of instances. Changing the preloadFrames value...",
this.ObjectPool.poolName,
this.prefab.name
));
this.preloadFrames = this.preloadAmount;
}
this.ObjectPool.StartCoroutine(this.PreloadOverTime());
}
else
{
//禁用打印信息
this.DisableLogging = true;
Transform inst;
//实例数量小于预加载总数,则添加实例至符合要求
while (this.totalCount < this.preloadAmount)
{
inst = this.ActiveNew();
this.InactiveInstance(inst, false);
}
// 开关复位
this.DisableLogging = false;
}
}
//实际上预加载是每帧加载一个,preloadFrames这个参数什么用都没有,就是分了几次执行继续循环加载而已。
private IEnumerator PreloadOverTime()
{
yield return new WaitForSeconds(this.preloadDelay);
Transform inst;
// 获得要加载的数量
int amount = this.preloadAmount - this.totalCount;
if (amount <= 0)
yield break;
int remainder = amount % this.preloadFrames;
int numPerFrame = amount / this.preloadFrames;
//关闭打印信息
this.DisableLogging = true;
int numThisFrame = 0;
for (int i = 0; i < this.preloadFrames; i++)
{
if (i < this.preloadFrames - 1)
{
numThisFrame = numPerFrame;
}
else
{
numThisFrame += remainder;
}
for (int n = 0; n < numThisFrame; n++)
{
inst = this.ActiveNew();
if (inst != null)
{
this.InactiveInstance(inst, false);
}
//下帧继续执行
yield return null;
}
//如果提前加载完,退出
if (this.totalCount > this.preloadAmount)
break;
}
// 开关复位
this.DisableLogging = false;
}
#endregion Pool Functionality
#region 实用工具
/// <summary>
/// 若显示和隐藏数组中包含所给对象,返回true,否则返回false
/// </summary>
/// <param name="transform">A transform to test.</param>
/// <returns>bool</returns>
public bool Contains(Transform transform)
{
if (this.referenceOfPrefab == null)
Debug.LogError(string.Format("SpawnPool {0}: PrefabPool.prefabGO is null",
this.ObjectPool.poolName));
var contains = this.ActiveList.Contains(transform);
if (contains)
return true;
contains = this.InactiveList.Contains(transform);
if (contains)
return true;
return false;
}
/// <summary>
/// 给新建的实例名字,添加数字后缀
/// </summary>
/// <param name="instance"></param>
private void nameInstance(Transform instance)
{
instance.name += (this.totalCount + 1).ToString("#000");
}
#endregion Utilities
}
}
|
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using Assets.scripts;
public class PicController : MonoBehaviour {
// Use this for initialization
void Start () {
//GetComponent<Image>().sprite = Sprite.Create(GameSettings.user.profile_pic, new Rect(0, 0, 128, 128), new Vector2());
}
// Update is called once per frame
void Update () {
}
}
|
using System;
using System.IO;
using Microsoft.Xna.Framework;
namespace VoxelSpace.SceneGraph {
public abstract class SceneObject : IO.IBinaryReadWritable {
public string Name;
public Transform Transform { get; private set; }
public Scene Scene { get; private set; }
public SceneObject() {
Name = "new " + GetType().Name;
Transform = new Transform(this);
}
public virtual void Update() {}
public void setScene(Scene scene) {
Scene = scene;
}
public virtual void ReadBinary(BinaryReader reader) {
Name = reader.ReadString();
Transform.ReadBinary(reader);
}
public virtual void WriteBinary(BinaryWriter writer) {
writer.Write(Name);
Transform.WriteBinary(writer);
}
}
} |
using System;
using System.Collections.Generic;
using System.Threading;
using SuperSocket.SocketBase;
using SuperSocket.SocketBase.Protocol;
using SuperSocket.SocketEngine;
using CSBaseLib;
using SuperSocket.SocketBase.Config;
using SuperSocket.SocketBase.Logging;
namespace ChatServer
{
public class MainServer : AppServer<ClientSession, EFBinaryRequestInfo>
{
// Chatting Server의 CommandOption 객체와 MainLogger --> static
public static ChatServerOption ServerOption;
public static SuperSocket.SocketBase.Logging.ILog MainLogger;
// ServerConfig Interface
private SuperSocket.SocketBase.Config.IServerConfig m_Config;
PacketProcessor MainPacektProcessor = new PacketProcessor();
RoomManager RoomMgr = new RoomManager();
// MainServer 생성자 선언 및 이벤트 연결
public MainServer() : base(new DefaultReceiveFilterFactory<ReceiveFilter, EFBinaryRequestInfo>())
{
NewSessionConnected += new SessionHandler<ClientSession>(OnConnected); // 1. 접속 연결
SessionClosed += new SessionHandler<ClientSession, CloseReason>(OnClosed); // 2. 접속 해제
NewRequestReceived += new RequestHandler<ClientSession, EFBinaryRequestInfo>(OnPacketReceived); // 3. 송신
}
// 네트워크 설정(Configuration) 초기화
public void InitConfig(ChatServerOption option)
{
// 초기화 시, 매개변수로 넘겨받은 네트워크 설정을 담고있는 객체 option(ChatServerOption)을
// MainServer의 static 으로 올려져 있는 ServerOption에 복사 --> 프로세스 진행하면서 해당 객체를 호출하며 재사용
ServerOption = option;
// ServerConfig 인터페이스에 ServerConfig 객체 인스턴스
m_Config = new ServerConfig
{
// Name, Ip, Port, Mode, MaxConnectionNumber, 등등 필요한 데이터 프러퍼티 Set
Name = option.Name,
Ip = "Any",
Port = option.Port,
Mode = SocketMode.Tcp,
MaxConnectionNumber = option.MaxConnectionNumber,
MaxRequestLength = option.MaxRequestLength,
ReceiveBufferSize = option.ReceiveBufferSize,
SendBufferSize = option.SendBufferSize
};
}
// 네트워크 설정 및 서버 생성
public void CreateStartServer()
{
try
{
// RootConfig, ServerOption(m_config), logFactory 를 인자값으로 네트워크 셋팅
// logFactory: 명명된 인수, Setup함수가 가지고 있는 매개변수 중 logFactory를 무엇으로 지정해주는 것
bool bResult = Setup(new RootConfig(), m_Config, logFactory: new NLogLogFactory());
if (bResult == false)
{
Console.WriteLine("[Error] 서버 네트워크 설정 실패");
return;
}
else
{
// Main Logger 설정
MainLogger = base.Logger;
MainLogger.Info("서버 초기화 성공");
}
CreateComponent();
// SuperSocket Start --> AsyncAccept 까지,
// 요청이 완료되면, 서버 생성 성공
Start();
MainLogger.Info("서버 생성 성공");
}
catch (Exception e)
{
Console.WriteLine($"[Error] 서버 생성 실패 : {e.ToString()}");
}
}
public void StopServer()
{
// Super Socket Stop
Stop();
MainPacektProcessor.Destroy();
}
// 네트워크 요소 생성
public ERROR_CODE CreateComponent()
{
// Session Index Pool 생성 - CommandLine에서 입력한 MaxConnectionNumber를 한정으로!
// Q> MaxConnectionNumber 수를 넘어 선 채 세션을 할당한다면 어떻게 될 것인가?
// Q> Index Pool의 역할은?
// A> 새로운 Client 유저 접속 시, Pool에 있는 index를 부여해주며 메모리 재사용 관리
ClientSession.CreateIndexPool(m_Config.MaxConnectionNumber);
// Room의 NetSendFunc 델리게이트 함수 연결
// SendData : 처리를 끝내고 결과를 Client에게 Send 해주는 함수
Room.NetSendFunc = this.SendData;
// 채팅 방에 대한 설정값 만들기 (방 개수 Max, 한 방에 들어가는 유저 수, 방 번호 등)
RoomMgr.CreateRooms();
// 패킷 프로세서 인스턴스
MainPacektProcessor = new PacketProcessor();
MainPacektProcessor.CreateAndStart(RoomMgr.GetRoomsList(), this);
MainLogger.Info("CreateComponent - Success");
return ERROR_CODE.NONE;
}
// PKHCommon 개발하다가 넘어옴
// 처리를 끝내고 결과를 Client에게 Send 해주는 함수
public bool SendData(string sessionID, byte[] sendData)
{
// GetSessionByID : AppServer 기능
// Q> 궁금하니까 session을 출력해보도록 하자.. 어떤 값을 받아오는가??
// A> Client의 Session 정보를 가지고 있다. (sessionIndex 등) (TAppSession Type이라서 session은 ClientSession)
var session = GetSessionByID(sessionID);
try
{
if (session == null)
{
return false;
}
Console.WriteLine($"SendData sesionIndex : {session.SessionIndex}");
Console.WriteLine($"SendData sesionID : {sessionID}");
// 보내는 것도 SuperSocket이 해준다.
session.Send(sendData, 0, sendData.Length);
}
catch (Exception e)
{
// TimeoutException 예외 발생할 수 있음
MainServer.MainLogger.Error($"{e.ToString()}, {e.StackTrace}");
session.SendEndWhenSendingTimeOut();
session.Close();
}
return true;
}
// PKHCommon 개발하다가 넘어감
// 1. MainServer 핸들러에 등록된 '접속, 접속 해제, 요청'에 대한 패킷정보를 담고 Processor에 Insert
// (Receive 받은 대로 Processor Thread 에서 처리하는 기능)
public void Distribute(ServerPacketData requestPacket)
{
MainPacektProcessor.InsertPacket(requestPacket);
}
// '접속' 버튼 시
void OnConnected(ClientSession session)
{
// 옵션의 최대 연결 수를 넘으면 SuperSocket이 바로 접속을 짤라버린다. 즉 이 OnConnected 함수는 호출되지 않는다.
// Session Index Pool 에서 하나 Pop 하여 세션에 메모리 할당
session.AllocSessionIndex();
MainLogger.Info(string.Format("세션 번호 {0} 접속", session.SessionID));
var packet =
ServerPacketData.MakeNTFInConnectOrDisConnectClientPacket(true, session.SessionID,
session.SessionIndex);
Distribute(packet);
}
// 접속 끊기
void OnClosed(ClientSession session, CloseReason reason)
{
MainLogger.Info(string.Format("세션 번호 {0} 접속 해제 : {1}", session.SessionID, reason.ToString()));
var packet =
ServerPacketData.MakeNTFInConnectOrDisConnectClientPacket(false, session.SessionID,
session.SessionIndex);
Distribute(packet);
session.FreeSessionIndex(session.SessionIndex);
}
// '로그인', '방 입장', 'Chat', '방 나가기'
void OnPacketReceived(ClientSession session, EFBinaryRequestInfo reqInfo)
{
MainLogger.Debug(string.Format("세션 번호 {0} 받은 데이터 크기 : {1} ThreadID : {2}",
session.SessionID, reqInfo.Body.Length, Thread.CurrentThread.ManagedThreadId));
var packet = new ServerPacketData();
packet.SessionID = session.SessionID;
packet.SessionIndex = session.SessionIndex;
packet.PackSize = reqInfo.Size;
packet.PacketID = reqInfo.PacketID;
packet.Type = reqInfo.Type;
packet.BodyData = reqInfo.Body;
Distribute(packet);
}
}
class ConfigTemp
{
static public List<string> RemoteServers = new List<string>();
}
} |
namespace IMtest
{
class ConnectivityBLL
{
private clsUser _credentials;
public ConnectivityBLL(clsUser value)
{
_credentials = value;
}
public int UserLogin()
{
if (_credentials.UserName.Length == 0 || _credentials.UserName.Length > 20)
{
throw new UserException(0);
}
if (_credentials.Password.Length == 0 || _credentials.Password.Length > 30)
{
throw new UserException(1);
}
_credentials.Id = DAL.UserLogin(_credentials.UserName, _credentials.Password);
if (_credentials.Id == 0)
{
throw new UserException(2);
}
else
{
DAL.UserLoginUpdate(_credentials.Id);
return _credentials.Id;
}
//return 99;
}
}
}
|
// Copyright © 2020 Void-Intelligence All Rights Reserved.
namespace Vortex.Pooler.Utility
{
public enum EPoolerType
{
Average,
Max,
Min,
Sum
}
} |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CameraZoom : MonoBehaviour
{
Camera cam;
public float speed = 0.5f;
private void Start()
{
cam = GetComponent<Camera>();
}
void Update()
{
if (Input.GetKeyDown(KeyCode.Z) && cam.orthographicSize >= 1.5f)
{
cam.orthographicSize = cam.orthographicSize - speed;
}
if (Input.GetKeyDown(KeyCode.X) && cam.orthographicSize <= 10f)
{
cam.orthographicSize = cam.orthographicSize + speed;
}
}
}
|
using System;
using System.Linq;
using Chick.Logika;
using Chick.Models;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Chick.Tests
{
[TestClass]
public class UnitTest1
{
UzytkownikAkcje ua = new UzytkownikAkcje();
ChickDbContext db = new ChickDbContext();
Widoki w = new Widoki();
[TestMethod]
public void Szyfrowanie()
{
string zahaslowane = ua.GetMd5Hash("abc");
Assert.AreEqual(zahaslowane, "900150983cd24fb0d6963f7d28e17f72");
}
//[TestMethod]
//public void PobierzUzytkownikaLogin()
//{
// Uzytkownik u = db.Uzytkownicy.Find(1);
// Assert.AreEqual(u, ua.PobierzLogowanegoUzytkownika("misiakmariusz@interia.pl", "abc"));
//}
[TestMethod]
public void DaniaWPosilku()
{
var x = db.Dania.ToList();
var z = w.Jadlospisy.ToList();
var q = w.DaniaWPosilku.ToList();
}
}
}
|
#region << 版本注释 - v1 >>
/*
* ========================================================================
* 版本:v1
* 时间:181204
* 作者:Lith
* Q Q:755944120
* 邮箱:litsoft@126.com
*
* ========================================================================
*/
#endregion
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Net.Sockets;
using System.Threading;
using SAAS.FrameWork.Extensions;
using SAAS.FrameWork.Log;
using SAAS.FrameWork.Util.Pool;
using SAAS.FrameWork.Util.Threading;
namespace SAAS.Mq.Socket.Channel.Socket
{
/// <summary>
///
/// </summary>
public class SocketConnect : IDisposable
{
#region (x.1) 成员
public SocketConnect()
{
}
~SocketConnect()
{
Dispose();
}
#region TcpClientIsConnected
public static bool TcpClientIsConnected(TcpClient c, int microSeconds = 500)
{
return null != c && c.Client.Connected && !(c.Client.Poll(microSeconds, SelectMode.SelectRead) && (c.Client.Available == 0));
}
#endregion
#region TestIsConnectedByPoll
public bool TestIsConnectedByPoll(int microSeconds = 500)
{
TcpClient c = client;
return null != c && c.Client.Connected && !(c.Client.Poll(microSeconds, SelectMode.SelectRead) && (c.Client.Available == 0));
}
#endregion
TcpClient client;
System.Net.Sockets.Socket socket;
public bool IsConnected => (null != socket);
public Action<SocketConnect> OnDisconnected { get; set; }
#endregion
#region (x.2)Init
/// <summary>
/// 初始化并开启后台线程
/// </summary>
/// <param name="client"></param>
/// <param name="workThreadCount">后台处理消息的线程个数</param>
/// <returns></returns>
public bool Init(TcpClient client, int workThreadCount)
{
try
{
this.client = client;
socket = client.Client;
taskToReceiveMsg.action = TaskToReceiveMsg;
taskToReceiveMsg.Start();
taskToDealMsg.threadCount = workThreadCount;
taskToDealMsg.action = TaskToDealMsg;
taskToDealMsg.Start();
return true;
}
catch (Exception ex)
{
Logger.Error(ex);
return false;
}
}
#endregion
#region (x.3)Close Dispose
/// <summary>
/// 释放使用的所有资源
/// </summary>
public void Dispose()
{
Close();
}
/// <summary>
/// 释放使用的所有资源
/// </summary>
public void Close()
{
if (!IsConnected) { return; }
//(x.1)
taskToReceiveMsg.Stop();
taskToDealMsg.Stop();
#region (x.2)清理释放连接资源
if (null != socket)
{
try
{
socket.Close();
socket.Dispose();
}
catch (Exception ex)
{
Logger.Error(ex);
}
socket = null;
}
try
{
if (null != client)
{
client.Close();
client.Dispose();
client = null;
}
}
catch (Exception ex)
{
Logger.Error(ex);
}
#endregion
//(x.3)
try
{
OnDisconnected?.Invoke(this);
}
catch (Exception ex)
{
Logger.Error(ex);
}
}
#endregion
#region (x.4)收到消息 和 发送消息
public Action<ArraySegment<byte>> OnGetMsg
{
get;
set;
}
public void SendMsg(List<ArraySegment<byte>> data)
{
if (!IsConnected)
{
//TODO:
throw new Exception("[lith_190418_001]socket is closed");
}
WriteMsg(data);
}
#endregion
#region (x.5)后台消息线程
#region (x.x.1)后台处理接收到的消息线程 TaskToDealMsg
LongTaskHelp taskToDealMsg = new LongTaskHelp();
ConcurrentQueue<ArraySegment<byte>> msgToDeal = new ConcurrentQueue<ArraySegment<byte>>();
AutoResetEvent autoResetEvent_OnReveiveMsg = new AutoResetEvent(false);
void TaskToDealMsg()
{
while (true)
{
try
{
#region ThreadToDealMsg
while (true)
{
if (msgToDeal.TryDequeue(out var msg))
{
OnGetMsg(msg);
}
else
{
autoResetEvent_OnReveiveMsg.WaitOne(100);
}
}
#endregion
}
catch (Exception ex) when (!(ex is ThreadInterruptedException))
{
}
}
}
void CacheReceivedMsg(ArraySegment<byte> msg)
{
msgToDeal.Enqueue(msg);
autoResetEvent_OnReveiveMsg.Set();
}
#endregion
#region (x.x.2)后台接收消息线程 TaskToReceiveMsg
LongTaskHelp taskToReceiveMsg = new LongTaskHelp();
void TaskToReceiveMsg()
{
while (IsConnected)
{
try
{
while (IsConnected)
{
CacheReceivedMsg(ReadMsg());
}
}
catch (Exception ex) when (!(ex is ThreadInterruptedException))
{
Logger.Error(ex);
}
}
}
#endregion
#endregion
#region (x.6)第一层封装 ReadMsg WriteMsg
//线程不安全
/*
消息块格式:
第一部分(len) 数据长度,4字节 Int32类型
第二部分(data) 原始数据,长度由第二部分指定
*/
ArraySegment<byte> ReadMsg()
{
#region Method Receive
void Receive(ArraySegment<byte> data)
{
int readedCount = 0;
int curCount;
do
{
//curCount = socket.Receive(data.Slice(readedCount, data.Count - readedCount));
curCount = socket.Receive(data.Array, data.Offset + readedCount, data.Count - readedCount,SocketFlags.None);
if (curCount == 0)
{
throw new Exception("[lith_190418_002]socket is closed.");
}
readedCount += curCount;
//var t = socket.ReceiveAsync(data.Slice(readedCount, data.Count - readedCount), SocketFlags.None);
//t.Wait();
//readedCount += t.Result;
} while (readedCount < data.Count);
}
#endregion
try
{
var bLen = DataPool.ArraySegmentByteGet(4);
//(x.1)获取 第一部分(len)
Receive(bLen);
Int32 len = bLen.ArraySegmentByteToInt32();
//(x.2)获取第二部分(data)
if (len < 0)
{
throw new Exception("[lith_190505_001]socket read error.");
}
if (len==0)
{
return ArraySegmentByteExtensions.Null;
}
var data = DataPool.ArraySegmentByteGet(len);
Receive(data);
return data;
}
catch (Exception ex)
{
//连接断开
Close();
throw;
}
}
void WriteMsg(List<ArraySegment<byte>> data)
{
try
{
Int32 len = data.ByteDataCount();
data.Insert(0, len.Int32ToArraySegmentByte());
socket.SendAsync(data, SocketFlags.None);
}
catch (Exception ex)
{
//连接断开
Close();
throw;
}
}
#endregion
}
}
|
using System;
using System.Collections.Generic;
using LegacyApp.Core.Models;
namespace LegacyApp.Core.Dao
{
public class TripDao : ITripDao
{
public List<Trip> FindTripsByUser(User user)
{
return FindTripsByUserStatic(user);
}
public static List<Trip> FindTripsByUserStatic(User user)
{
// SQL query here
throw new NotImplementedException();
}
}
} |
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations;
using Pobs.Domain.Utils;
namespace Pobs.Domain.Entities
{
public class Answer : IHasWatches
{
public Answer()
{
this.Comments = new Collection<Comment>();
this.Reactions = new Collection<Reaction>();
this.Watches = new Collection<Watch>();
}
public Answer(string text, User postedByUser, DateTimeOffset postedAt) : this()
{
this.Text = text.CleanText();
this.Slug = text.ToSlug();
this.PostedByUser = postedByUser;
this.PostedAt = postedAt;
}
public int Id { get; set; }
[Required, MaxLength(280)]
public string Text { get; set; }
[Required, MaxLength(280)]
public string Slug { get; set; }
[Required]
public User PostedByUser { get; set; }
public int PostedByUserId { get; set; }
public DateTimeOffset PostedAt { get; set; }
[Required]
public virtual Question Question { get; set; }
public virtual ICollection<Comment> Comments { get; set; }
public virtual ICollection<Reaction> Reactions { get; set; }
public virtual ICollection<Notification> Notifications { get; set; }
public virtual ICollection<Watch> Watches { get; set; }
}
}
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using KartObjects;
namespace KartLib
{
[Serializable]
public class AlcoDeclRecordF2 : Entity
{
[DBIgnoreAutoGenerateParam]
[DBIgnoreReadParam]
public override string FriendlyName
{
get { return "Строка алкогольной декларации форма 2"; }
}
[DisplayName("Организация")]
public string FirmName
{
get;
set;
}
[DisplayName("Вид продукции")]
public string ProductKindF1
{
get;
set;
}
[DisplayName("Код вида продукции")]
public string ProductKindCodeF2
{
get;
set;
}
[DisplayName("Наименование производителя/импортера")]
public string NameProducerF3
{
get;
set;
}
[DisplayName("ИНН")]
public string INNProducerF4
{
get;
set;
}
[DisplayName("КПП")]
public string KPPProducerF5
{
get;
set;
}
[DisplayName("Наименованме организации")]
public string NameOrgF6
{
get;
set;
}
[DisplayName("ИНН")]
public string INNOrgF7
{
get;
set;
}
[DisplayName("КПП")]
public string KPPOrgF8
{
get;
set;
}
[DisplayName("Лицензия Серия,номер")]
public string LicNumberF9
{
get;
set;
}
[DisplayName("Лицензия Дата выдачи")]
public DateTime? LicDateBeginF10
{
get;
set;
}
[DisplayName("Лицензия Дата окончания")]
public DateTime? LicDateEndF11
{
get;
set;
}
[DisplayName("Лицензия Кем выдано")]
public string IssuedByF12
{
get;
set;
}
[DisplayName("Дата закупки")]
public DateTime PurchaseDateF13
{
get;
set;
}
[DisplayName("Номер товарно-транспортной накладной")]
public string TTNNumberF14
{
get;
set;
}
[DisplayName("Номер таможенной декларации")]
public string NCDNumberF15
{
get;
set;
}
[DisplayName("Объем закупленной продукции")]
public decimal PurchaseValueF16
{
get;
set;
}
[DisplayName("Наименование склада")]
public long IdWarehouse
{
get;
set;
}
}
}
|
using UnityEngine;
using UnityEngine.Events;
public class Conditioner : MonoBehaviour
{
public UnityEvent OnConditionChange;
public bool condition = false;
public bool Condition { get { return condition; }
set
{
condition = value;
if (OnConditionChange != null)
{
OnConditionChange.Invoke();
}
} }
}
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// Add enemies on list you can attack with the Mage Character
/// </summary>
public class MagicAttack : MonoBehaviour
{
private PlayerController _playerMagicController;
void Awake()
{
_playerMagicController = GetComponentInParent<PlayerController>();
}
void OnTriggerEnter2D(Collider2D col)
{
if (col.tag == "AI")
{
EnemyController enemy = col.gameObject.GetComponent<EnemyController>();
ChangeListEnemiesPlayer(enemy, true);
enemy.SetState(EnemyController.EnemyState.EnableToAttack);
}
}
void OnTriggerExit2D(Collider2D col)
{
if (col.tag == "AI")
{
EnemyController enemy = col.gameObject.GetComponent<EnemyController>();
ChangeListEnemiesPlayer(enemy, false);
enemy.SetState(EnemyController.EnemyState.Ready);
}
}
private void ChangeListEnemiesPlayer(EnemyController enemyController, bool add)
{
if (add)
{
if (!_playerMagicController.enemiesToAttack.Contains(enemyController))
_playerMagicController.enemiesToAttack.Add(enemyController);
}
else
{
if (_playerMagicController.enemiesToAttack.Contains(enemyController))
_playerMagicController.enemiesToAttack.Remove(enemyController);
}
}
}
|
using System;
using FluentNHibernate.Mapping;
using Sind.Model;
namespace Sind.DAL.Mappings
{
public class MovimentacaoMap : ClassMap<Movimentacao>
{
public MovimentacaoMap()
{
Table("Movimentacao");
Id(x => x.Id, "Id_Movimentacao").GeneratedBy.Identity();
References(x => x.Filial)
.Column("Id_Filial")
.Not.LazyLoad()
.Cascade.SaveUpdate();
References(x => x.Usuario)
.Column("Id_Usuario")
.Not.LazyLoad()
.Cascade.SaveUpdate();
References(x => x.Indicador)
.Column("Id_Indicador")
.Not.LazyLoad()
.Cascade.SaveUpdate();
Map(x => x.Status, "Id_StatusMovimentacao").CustomType(typeof(Int32));
Map(x => x.DataMovimentacao, "DataMovimentacao");
Map(x => x.Valor, "Valor");
Map(x => x.TipoBase, "ID_TIPO_BASE").CustomType(typeof(Int32));
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JKVideo.Core.Http
{
/// <summary>
/// 存储当前 会话Cookie 类
/// </summary>
public sealed class CookieStoreInstance
{
/// <summary>
/// 当前登录成功后的 会话Cookie
/// </summary>
public static HttpCookieType CurrentCookie;
public static string Repeat_Submit_Token;
}
}
|
using System.Collections;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Threading;
namespace HTB.Database
{
public static class DatabasePool
{
public const int ConnectToHTB = 0;
public const int ConnectionToHTBRoads = 1;
public const int ConnectionToHTBRoadsDB2 = 2;
//private static readonly ArrayList DB2RoadsConnections = new ArrayList();
private static readonly ArrayList HTBConnections = new ArrayList();
private static readonly ArrayList HTBRoadsConnections = new ArrayList();
private const int MaxConnections = 2000;
private const int MaxDB2Connections = 1000;
private static readonly string DB2RoadsConnString = System.Configuration.ConfigurationManager.AppSettings["DB2RoadsConnectionString"];
private static readonly string HTBConnString = System.Configuration.ConfigurationManager.AppSettings["HTBConnectionString"];
private static readonly string HTBRoadsConnString = System.Configuration.ConfigurationManager.AppSettings["HTBRoadsConnectionString"];
private static readonly log4net.ILog Log = log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public static DbConnection GetConnection(string cmd, int connectToDatabase, bool debugMode = false)
{
//if (connectToDatabase == ConnectionToHTBRoadsDB2)
// return GetDB2Connection(cmd, connectToDatabase);
return GetSqlServerConnection(cmd, connectToDatabase, debugMode);
}
[MethodImpl(MethodImplOptions.Synchronized)]
private static DbConnection GetSqlServerConnection(string cmd, int connectToDatabase, bool debugMode = false)
{
if (connectToDatabase == ConnectionToHTBRoads)
{
while (true)
{
int i;
for (i = 0; i < HTBRoadsConnections.Count; i++)
{
var con = (DbConnection) HTBRoadsConnections[i];
if (!con.IsInUse)
{
con.LastCommand = cmd;
con.IsInUse = true;
return con;
}
}
if (HTBRoadsConnections.Count < MaxConnections)
{
var con = new DbConnection();
con.Connection.ConnectionString = HTBRoadsConnString;
con.ID = i;
con.LastCommand = cmd;
con.ConnectionType = DbConnection.ConnectionType_SqlServer;
con.Connection.Open();
HTBRoadsConnections.Add(con);
con.IsInUse = true;
return con;
}
try
{
Thread.Sleep(100); // allow time for the connection to be put to use
}
catch
{
try
{
Thread.Sleep(100); // retry sleeping
}
catch
{
}
}
}
}
var sw = new Stopwatch();
sw.Start();
LogIfDebug(debugMode, "HTBConnections Count: "+HTBConnections.Count+" Max Connections: "+MaxConnections);
bool gotConnection = false;
DbConnection connToReturn = null;
while (!gotConnection)
{
int i;
LogIfDebug(debugMode, "HTBConnections Count: "+HTBConnections.Count);
for (i = 0; i < HTBConnections.Count; i++)
{
LogIfDebug(debugMode, "Analyzing [next] HTBConnection");
var con = (DbConnection)HTBConnections[i];
if (con.NeedsToBeDestroyed)
{
LogIfDebug(debugMode, "Destroying connection");
con.Connection.Close();
con.Connection.Dispose();
HTBConnections.Remove(con);
LogIfDebug(debugMode, "Connection destroyed");
}
if (!con.IsInUse)
{
con.LastCommand = cmd;
con.IsInUse = true;
LogIfDebug(debugMode, "Reusing Old connection");
connToReturn = con;
gotConnection = true;
}
LogIfDebug(debugMode, "Done Analyzing");
}
LogIfDebug(debugMode, "Done for loop");
if (!gotConnection && HTBConnections.Count < MaxConnections)
{
LogIfDebug(debugMode, "Creating New Connection");
var con = new DbConnection();
con.Connection.ConnectionString = HTBConnString;
con.ID = i;
con.LastCommand = cmd;
//Console.WriteLine("CONNECTION: [ID: " + con.ID + "] {NEW} "+(cmd.Length > 20 ? cmd.Substring(0,20) : cmd));
con.Connection.Open();
HTBConnections.Add(con);
con.IsInUse = true;
connToReturn = con;
gotConnection = true;
}
if(sw.Elapsed.TotalMinutes > 1)
{
Log.Error("More than a minute to get HTB Connection [SQL: "+cmd+"]");
sw.Restart();
}
try
{
Thread.Sleep(100); // allow time for the connection to be put to use
}
catch
{
try
{
Thread.Sleep(100); // retry sleeping
}
catch
{
}
}
}
return connToReturn;
}
/*
private static DbConnection GetDB2Connection(string cmd, int connectToDatabase)
{
lock (DB2RoadsConnString)
{
while (true)
{
int i;
for (i = 0; i < DB2RoadsConnections.Count; i++)
{
var con = (DbConnection)DB2RoadsConnections[i];
if (!con.IsInUse)
{
con.LastCommand = cmd;
con.IsInUse = true;
return con;
}
}
if (DB2RoadsConnections.Count < MaxDB2Connections)
{
var con = new DbConnection();
con.DB2Connection.ConnectionString = DB2RoadsConnString;
con.ID = i;
con.LastCommand = cmd;
con.ConnectionType = DbConnection.ConnectionType_DB2;
con.DB2Connection.Open();
DB2RoadsConnections.Add(con);
con.IsInUse = true;
try
{
Thread.Sleep(100); // allow time for the connection to be put to use
}
catch
{
try
{
Thread.Sleep(100); // retry sleeping
}
catch
{
}
}
return con;
}
// try to close idle connections
for (i = 0; i < DB2RoadsConnections.Count; i++)
{
var con = (DbConnection)DB2RoadsConnections[i];
if (con.GetAliveTime() > 60) // 1 minute
{
con.Connection.Close();
con.IsInUse = false;
}
}
}
}
}
*/
public static DbConnection GetHTBConnection2()
{
lock (HTBConnections)
{
while (true)
{
int i = 0;
for (i = 0; i < HTBConnections.Count; i++)
{
var con = (DbConnection)HTBConnections[i];
if (!con.IsInUse)
{
con.IsInUse = true;
return con;
}
}
if (HTBConnections.Count < MaxConnections)
{
var con = new DbConnection();
con.MySqlConnection.ConnectionString = HTBConnString;
con.MySqlConnection.Open();
HTBConnections.Add(con);
con.IsInUse = true;
return con;
}
try
{
Thread.Sleep(100); // allow time for the connection to be put to use
}
catch
{
try
{
Thread.Sleep(100); // retry sleeping
}
catch
{
}
}
}
}
}
private static void LogIfDebug(bool debug, string message)
{
if (debug)
{
Log.Info(message);
try
{
Thread.Sleep(100);
}
catch
{
}
}
}
}
}
|
/*
* Author: Generated Code
* Date Created: 02.11.2011
* Description: Represents a row in the tblRoadInfo table
*/
using System;
namespace HTB.Database
{
public class tblRoadInfo : Record
{
#region Property Declaration
[MappingAttribute(FieldType = MappingAttribute.FIELD_TYPE_ID)]
public double FromLatitude { get; set; }
[MappingAttribute(FieldType = MappingAttribute.FIELD_TYPE_ID)]
public double FromLongitude { get; set; }
[MappingAttribute(FieldType = MappingAttribute.FIELD_TYPE_ID)]
public double ToLatitude { get; set; }
[MappingAttribute(FieldType = MappingAttribute.FIELD_TYPE_ID)]
public double ToLongitude { get; set; }
public long TimeInSeconds { get; set; }
public double Distance{get; set; }
public DateTime LookupDate{get; set; }
#endregion
}
}
|
///
/// \brief contains 8 testing cases for the supporting class library
///
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Supporting;
using AllEmployees;
using System.Collections.Generic;
namespace UnitTest_EMS
{
[TestClass]
public class UnitTest_Supporting
{
FileIO fileIO = new FileIO();
Logging logger = new Logging();
const string dBaseFileName = "ems.dBase.csv"; ///< \breif the name of database file
const string dBaseFileExtension = "*.csv"; ///< \breif the name of database file extension
const string dBaseFolderName = "DBase"; ///< \breif the name of database folder
/**
\details Test identifier: FileIO_UnitTest_1
\verbatim
Description: This function tests a method from the FileIO class called fileIO.CreateFile(). It tests if the file is successfully created
Method of execution: Automatic
Test Type: Normal Test
Input data: File Name: log.txt
Folder Name: log
File Filter: *.txt
Expected outputs: the CreateFile() method returns true;
Observed outputs: the CreateFile() method returns true;
\endverbatim
*/
[TestMethod]
public void FileIO_UnitTest_1()
{
// arrange
bool expected = true;
bool actual = false;
try
{
actual = fileIO.CreateFile("log.txt", "log", "*.txt");
}
catch (Exception e)
{
actual = false;
}
// assert
Assert.AreEqual(expected, actual, "Fail to create a file.");
}
/**
\details Test identifier: FileIO_UnitTest_2
\verbatim
Description: This function tests a method from the container class called WriteDatabase(). it test if the container write to database file
Method of execution: Automatic
Test Type: Normal Test
Input data: A data container that contains a employee whose name is Bill White
Expected outputs: the WriteDatabase() method returns true;
Observed outputs: the WriteDatabase() method returns true;
\endverbatim
*/
[TestMethod]
public void FileIO_UnitTest_2()
{
// arrange
bool expected = true;
bool actual = false;
FulltimeEmployee employee = new FulltimeEmployee();
employee.SetfirstName("Bill");
employee.SetlastName("White");
employee.SetsocialInsuranceNumber("193456787");
employee.SetemployeeType(Employee.FULL_TIME);
employee.Setsalary(10000);
employee.SetdateOfHire("2014-12-01");
employee.SetdateOfBirth("1986-09-08");
Dictionary<string, Employee> employees = new Dictionary<string,Employee>();
employees.Add(employee.GetsocialInsuranceNumber(),employee);
try
{
actual = fileIO.WriteDatabase(employees);
}
catch (Exception e)
{
actual = false;
}
// assert
Assert.AreEqual(expected, actual, "Write Database failed.");
}
/**
\details Test identifier: FileIO_UnitTest_3
\verbatim
Description: This function tests a method from the FileIO class called WriteDatabase(). It tests if a null input is properly handled
Method of execution: Automatic
Test Type: Exception Test
Input data: null input
Expected outputs: the WriteDatabase() method returns false;
Observed outputs: the WriteDatabase() method returns false;
\endverbatim
*/
[TestMethod]
public void FileIO_UnitTest_3()
{
// arrange
bool expected = false;
bool actual = true;
try
{
actual = fileIO.WriteDatabase(null);
}
catch (Exception e)
{
actual = true;
}
// assert
Assert.AreEqual(expected, actual, "FileIO.WriteDatabase() failed to handle null input.");
}
/**
\details Test identifier: FileIO_UnitTest_4
\verbatim
Description: This function tests a method from the FileIO class called ReadDatabase(). It tests if an empty data container is properly handled
Method of execution: Automatic
Test Type: Normal Test
Input data: an empty data container
Expected outputs: the ReadDatabase() method returns true;
Observed outputs: the ReadDatabase() method returns true;
\endverbatim
*/
[TestMethod]
public void FileIO_UnitTest_4()
{
Dictionary<string, Employee> employees = new Dictionary<string, Employee>();
// arrange
bool expected = true;
bool actual = true;
try
{
actual = fileIO.ReadDatabase(ref employees);
}
catch (Exception e)
{
actual = false;
}
// assert
Assert.AreEqual(expected, actual, "FileIO.ReadDatabase() failed to handle data container.");
}
/**
\details Test identifier: Log_UnitTest_1
\verbatim
Description: This function tests a method from the Logging class called Log(). It tests if the log file is successfully created
Method of execution: Automatic
Test Type: Normal Test
Input data: Class Name: Employee
File Name: Validator
Event: Bill - 122334345
Event Result: true
Expected outputs: the Log() method created a log file with appropriate name
Observed outputs: a log file with appropriate name exists
\endverbatim
*/
[TestMethod]
public void Log_UnitTest_1()
{
// arrange
bool expected = true;
bool actual = false;
string date = DateTime.Now.ToString("yyyy-MM-dd");
string fileName = "ems." + date + ".log";
try
{
logger.Log("Employee", "Validator", "Bill - 122334345", true);
if (fileIO.GetStreamWriter(fileName, "log", "*.log") != null)
{
actual = true;
}
}
catch (Exception e)
{
actual = false;
}
// assert
Assert.AreEqual(expected, actual, "Fail to log an event.");
}
/**
\details Test identifier: Log_UnitTest_2
\verbatim
Description: This function tests a method from the Logging class called Log(). It tests if the log file is successfully created
Method of execution: Automatic
Test Type: Normal Test
Input data: Class Name: Employee
File Name: Validator
Event: Bill - 122334345
Event Result: false
Expected outputs: the Log() method created a log file with appropriate name
Observed outputs: a log file with appropriate name exists
\endverbatim
*/
[TestMethod]
public void Log_UnitTest_2()
{
// arrange
bool expected = true;
bool actual = false;
string fileName = "ems.2.log";
try
{
logger.Log("Employee", "Validator", "Bill - 122334345", false);
if (fileIO.GetStreamWriter(fileName, "log", "*.log") != null)
{
actual = true;
}
}
catch (Exception e)
{
actual = false;
}
// assert
Assert.AreEqual(expected, actual, "Fail to log an event.");
}
/**
\details Test identifier: Log_UnitTest_3
\verbatim
Description: TThis function tests a method from the Logging class called Log(). It tests if null strings are handled
Method of execution: Automatic
Test Type: Exception Test
Input data: Class Name: null
File Name: null
Event: null
Event Result: false
Expected outputs: the Log() method created a log file with appropriate name
Observed outputs: a log file with appropriate name exists
\endverbatim
*/
[TestMethod]
public void Log_UnitTest_3()
{
// arrange
bool expected = true;
bool actual = false;
string fileName = "ems.3.log";
try
{
logger.Log(null, null, null, false);
if (fileIO.GetStreamWriter(fileName, "log", "*.log") != null)
{
actual = true;
}
}
catch (Exception e)
{
actual = false;
}
// assert
Assert.AreEqual(expected, actual, "Fail to log an event.");
}
/**
\details Test identifier: Log_UnitTest_4
\verbatim
Description: This function tests a method from the Logging class called Log(). It tests if empty strings are handled
Method of execution: Automatic
Test Type: Exception Test
Input data: Class Name: empty
File Name: empty
Event: empty
Event Result: false
Expected outputs: the Log() method created a log file with appropriate name
Observed outputs: a log file with appropriate name exists
\endverbatim
*/
[TestMethod]
public void Log_UnitTest_4()
{
// arrange
bool expected = true;
bool actual = false;
string fileName = "ems.4.log";
try
{
logger.Log("", "", "", false);
if (fileIO.GetStreamWriter(fileName, "log", "*.log") != null)
{
actual = true;
}
}
catch (Exception e)
{
actual = false;
}
// assert
Assert.AreEqual(expected, actual, "Fail to log an event.");
}
}
}
|
// Copyright (c) Simple Injector Contributors. All rights reserved.
// Licensed under the MIT License. See LICENSE file in the project root for license information.
namespace SimpleInjector
{
using System;
using System.ComponentModel;
/// <content>Deprecated methods.</content>>
public static partial class SimpleInjectorWebApiExtensions
{
/// <summary>
/// Registers that a single instance of <typeparamref name="TConcrete"/> will be returned within the
/// Web API request. When the Web API request ends and
/// <typeparamref name="TConcrete"/> implements <see cref="IDisposable"/>, the cached instance will be
/// disposed.
/// </summary>
/// <typeparam name="TConcrete">The concrete type that will be registered.</typeparam>
/// <param name="container">The container to make the registrations in.</param>
/// <exception cref="ArgumentNullException">
/// Thrown when the <paramref name="container"/> is a null reference.</exception>
/// <exception cref="InvalidOperationException">
/// Thrown when this container instance is locked and can not be altered, or when an
/// the <typeparamref name="TConcrete"/> has already been registered.
/// </exception>
/// <exception cref="ArgumentException">Thrown when the <typeparamref name="TConcrete"/> is a type
/// that can not be created by the container.</exception>
[Obsolete("Please use Register<TConcrete>(Lifestyle.Scoped) instead. " +
"See: https://simpleinjector.org/webapi. Will be removed in version 5.0.",
error: true)]
[EditorBrowsable(EditorBrowsableState.Never)]
public static void RegisterWebApiRequest<TConcrete>(this Container container)
where TConcrete : class
{
throw new NotSupportedException(
"RegisterWebApiRequest has been deprecated. " +
"Please use Register<TConcrete>(Lifestyle.Scoped) instead. " +
"See: https://simpleinjector.org/webapi");
}
/// <summary>
/// Registers that a single instance of <typeparamref name="TImplementation"/> will be returned will
/// be returned within the Web API request. When the Web API request ends and
/// <typeparamref name="TImplementation"/> implements <see cref="IDisposable"/>, the cached instance
/// will be disposed.
/// </summary>
/// <typeparam name="TService">The interface or base type that can be used to retrieve the instances.</typeparam>
/// <typeparam name="TImplementation">The concrete type that will be registered.</typeparam>
/// <param name="container">The container to make the registrations in.</param>
/// <exception cref="ArgumentNullException">
/// Thrown when the <paramref name="container"/> is a null reference.</exception>
/// <exception cref="InvalidOperationException">
/// Thrown when this container instance is locked and can not be altered, or when an
/// the <typeparamref name="TService"/> has already been registered.</exception>
/// <exception cref="ArgumentException">Thrown when the given <typeparamref name="TImplementation"/>
/// type is not a type that can be created by the container.
/// </exception>
[Obsolete("Please use Register<TService, TImplementation>(Lifestyle.Scoped) instead. " +
"See: https://simpleinjector.org/webapi. Will be removed in version 5.0.",
error: true)]
[EditorBrowsable(EditorBrowsableState.Never)]
public static void RegisterWebApiRequest<TService, TImplementation>(
this Container container)
where TImplementation : class, TService
where TService : class
{
throw new NotSupportedException(
"RegisterWebApiRequest has been deprecated. " +
"Please use Register<TService, TImplementation>(Lifestyle.Scoped) instead. " +
"See: https://simpleinjector.org/webapi");
}
/// <summary>
/// Registers the specified delegate that allows returning instances of <typeparamref name="TService"/>,
/// and returned instances are cached during the lifetime of a Web API request. When the Web API
/// request ends, and the cached instance implements <see cref="IDisposable"/>, that cached instance
/// will be disposed.
/// </summary>
/// <typeparam name="TService">The interface or base type that can be used to retrieve instances.</typeparam>
/// <param name="container">The container to make the registrations in.</param>
/// <param name="instanceCreator">The delegate that allows building or creating new instances.</param>
/// <exception cref="ArgumentNullException">
/// Thrown when either the <paramref name="container"/>, or <paramref name="instanceCreator"/> are
/// null references.</exception>
/// <exception cref="InvalidOperationException">
/// Thrown when this container instance is locked and can not be altered, or when the
/// <typeparamref name="TService"/> has already been registered.</exception>
[Obsolete("Please use Register<TService>(Func<TService>, Lifestyle.Scoped) instead. " +
"See: https://simpleinjector.org/webapi. Will be removed in version 5.0.",
error: true)]
[EditorBrowsable(EditorBrowsableState.Never)]
public static void RegisterWebApiRequest<TService>(this Container container,
Func<TService> instanceCreator)
where TService : class
{
throw new NotSupportedException(
"RegisterWebApiRequest has been deprecated. " +
"Please use Register<TService>(Func<TService>, Lifestyle.Scoped) instead. " +
"See: https://simpleinjector.org/webapi");
}
/// <summary>
/// Registers that a single instance of <typeparamref name="TConcrete"/> will be returned for
/// each Web API request. When the Web API request ends, and <typeparamref name="TConcrete"/>
/// implements <see cref="IDisposable"/>, the cached instance will be disposed.
/// Scopes can be nested, and each scope gets its own instance.
/// </summary>
/// <typeparam name="TConcrete">The concrete type that will be registered.</typeparam>
/// <param name="container">The container to make the registrations in.</param>
/// <param name="disposeWhenScopeEnds">If set to <c>true</c> the cached instance will be
/// disposed at the end of its lifetime.</param>
/// <exception cref="ArgumentNullException">
/// Thrown when the <paramref name="container"/> is a null reference.</exception>
/// <exception cref="InvalidOperationException">
/// Thrown when this container instance is locked and can not be altered, or when an
/// the <typeparamref name="TConcrete"/> has already been registered.
/// </exception>
/// <exception cref="ArgumentException">Thrown when the <typeparamref name="TConcrete"/> is a type
/// that can not be created by the container.</exception>
[Obsolete("Please use Register<TConcrete>(Lifestyle.Scoped) instead. " +
"Will be removed in version 5.0.",
error: true)]
[EditorBrowsable(EditorBrowsableState.Never)]
public static void RegisterWebApiRequest<TConcrete>(this Container container,
bool disposeWhenScopeEnds)
where TConcrete : class, IDisposable
{
throw new NotSupportedException(
"RegisterWebApiRequest has been deprecated. " +
"Please use Register<TConcrete>(new WebApiRequesstLifestyle(false)) instead " +
"to suppress disposal.");
}
/// <summary>
/// Registers that a single instance of <typeparamref name="TImplementation"/> will be returned for
/// the duration of a single Web API request. When the Web API request ends,
/// <paramref name="disposeWhenScopeEnds"/> is set to <b>true</b>, and the cached instance
/// implements <see cref="IDisposable"/>, that cached instance will be disposed.
/// </summary>
/// <typeparam name="TService">The interface or base type that can be used to retrieve the instances.</typeparam>
/// <typeparam name="TImplementation">The concrete type that will be registered.</typeparam>
/// <param name="container">The container to make the registrations in.</param>
/// <param name="disposeWhenScopeEnds">If set to <c>true</c> the cached instance will be
/// disposed at the end of its lifetime.</param>
/// <exception cref="ArgumentNullException">
/// Thrown when the <paramref name="container"/> is a null reference.</exception>
/// <exception cref="InvalidOperationException">
/// Thrown when this container instance is locked and can not be altered, or when an
/// the <typeparamref name="TService"/> has already been registered.</exception>
/// <exception cref="ArgumentException">Thrown when the given <typeparamref name="TImplementation"/>
/// type is not a type that can be created by the container.
/// </exception>
[Obsolete("Please use Register<TService, TImplementation>(Lifestyle.Scoped) instead. " +
"Will be removed in version 5.0.",
error: true)]
[EditorBrowsable(EditorBrowsableState.Never)]
public static void RegisterWebApiRequest<TService, TImplementation>(
this Container container, bool disposeWhenScopeEnds)
where TService : class
where TImplementation : class, TService, IDisposable
{
throw new NotSupportedException(
"RegisterWebApiRequest has been deprecated. " +
"Please use Register<TService, TImplementation>(new WebApiRequesstLifestyle(false)) instead " +
"to suppress disposal.");
}
/// <summary>
/// Registers the specified delegate that allows returning instances of <typeparamref name="TService"/>,
/// and returned instances are cached during the lifetime of single Web API request. When the Web API
/// request ends, <paramref name="disposeWhenScopeEnds"/> is set to <b>true</b>, and the cached
/// instance implements <see cref="IDisposable"/>, that cached instance will be disposed.
/// </summary>
/// <typeparam name="TService">The interface or base type that can be used to retrieve instances.</typeparam>
/// <param name="container">The container to make the registrations in.</param>
/// <param name="instanceCreator">The delegate that allows building or creating new instances.</param>
/// <param name="disposeWhenScopeEnds">If set to <c>true</c> the cached instance will be
/// disposed at the end of its lifetime.</param>
/// <exception cref="ArgumentNullException">
/// Thrown when either the <paramref name="container"/>, or <paramref name="instanceCreator"/> are
/// null references.</exception>
/// <exception cref="InvalidOperationException">
/// Thrown when this container instance is locked and can not be altered, or when the
/// <typeparamref name="TService"/> has already been registered.</exception>
[Obsolete("RegisterWebApiRequest has been deprecated. " +
"Please use Register<TService>(Func<TService>, Lifestyle.Scoped) instead. " +
"Will be removed in version 5.0.",
error: true)]
[EditorBrowsable(EditorBrowsableState.Never)]
public static void RegisterWebApiRequest<TService>(
this Container container, Func<TService> instanceCreator, bool disposeWhenScopeEnds)
where TService : class
{
throw new NotSupportedException(
"RegisterWebApiRequest has been deprecated. " +
"Please use Register<TService>(Func<TService>, new WebApiRequesstLifestyle(false)) instead " +
"to suppress disposal.");
}
}
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ServiceModel;
using System.IO;
namespace MyDiskInfo
{
[ServiceContract]
public interface IMyDisk
{
[OperationContract]
string FreeSpace(string obj);
[OperationContract]
string TotalSpace(string obj);
}
public class MyDisk : IMyDisk
{
public string FreeSpace(string obj)
{
DriveInfo DI = new DriveInfo(obj);
long notUsed = DI.TotalFreeSpace;
return notUsed.ToString();
}
public string TotalSpace(string obj)
{
DriveInfo DI = new DriveInfo(obj);
long used = DI.TotalSize;
return used.ToString();
}
}
class Program
{
static void Main(string[] args)
{
ServiceHost sh = new ServiceHost(typeof(MyDisk));
sh.Open();
Console.WriteLine("Press ENTER for ending...");
Console.ReadLine();
sh.Close();
}
}
}
|
using Microsoft.EntityFrameworkCore.Migrations;
using System;
using System.Collections.Generic;
namespace JhinBot.Migrations
{
public partial class First : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "BotConfig",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
CommandColor = table.Column<string>(type: "TEXT", nullable: true),
EmbedTimeStamp = table.Column<string>(type: "TEXT", nullable: true),
ErrorColor = table.Column<string>(type: "TEXT", nullable: true),
EventColor = table.Column<string>(type: "TEXT", nullable: true),
FatalColor = table.Column<string>(type: "TEXT", nullable: true),
HelpColor = table.Column<string>(type: "TEXT", nullable: true),
InfoColor = table.Column<string>(type: "TEXT", nullable: true),
NoneColor = table.Column<string>(type: "TEXT", nullable: true),
OkColor = table.Column<string>(type: "TEXT", nullable: true),
PlayingStatus = table.Column<string>(type: "TEXT", nullable: true),
PollColor = table.Column<string>(type: "TEXT", nullable: true),
PollSeparator = table.Column<string>(type: "TEXT", nullable: true),
Prefix = table.Column<string>(type: "TEXT", nullable: true),
QuotePath = table.Column<string>(type: "TEXT", nullable: true),
ReactionColor = table.Column<string>(type: "TEXT", nullable: true),
ResxPath = table.Column<string>(type: "TEXT", nullable: true),
RoundAvatarUrl = table.Column<string>(type: "TEXT", nullable: true),
SecondAvatarURL = table.Column<string>(type: "TEXT", nullable: true),
WikiColor = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_BotConfig", x => x.Id);
});
migrationBuilder.CreateTable(
name: "GuildConfigs",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
AutoAssignRoleActive = table.Column<bool>(type: "INTEGER", nullable: false),
AutoAssignRoleId = table.Column<ulong>(type: "INTEGER", nullable: false),
AutoDeleteGreet = table.Column<bool>(type: "INTEGER", nullable: false),
AutoDeleteInfoMessage = table.Column<bool>(type: "INTEGER", nullable: false),
BotChannelId = table.Column<ulong>(type: "INTEGER", nullable: false),
EventChannelId = table.Column<ulong>(type: "INTEGER", nullable: false),
GreetMessage = table.Column<string>(type: "TEXT", nullable: true),
GreetMessageChannelId = table.Column<ulong>(type: "INTEGER", nullable: false),
GuildId = table.Column<ulong>(type: "INTEGER", nullable: false),
PermissionRole = table.Column<string>(type: "TEXT", nullable: true),
SendGreetMessageOnJoin = table.Column<bool>(type: "INTEGER", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_GuildConfigs", x => x.Id);
});
migrationBuilder.CreateTable(
name: "LoggingConfig",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
DivideByZeroColor = table.Column<string>(type: "TEXT", nullable: true),
ExceptionColor = table.Column<string>(type: "TEXT", nullable: true),
GuildId = table.Column<ulong>(type: "INTEGER", nullable: false),
IndexOutOfRangeColor = table.Column<string>(type: "TEXT", nullable: true),
NullReferenceColor = table.Column<string>(type: "TEXT", nullable: true),
StackOverflowColor = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_LoggingConfig", x => x.Id);
});
migrationBuilder.CreateTable(
name: "CommandCooldown",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
CommandName = table.Column<string>(type: "TEXT", nullable: true),
GuildConfigId = table.Column<int>(type: "INTEGER", nullable: true),
Seconds = table.Column<int>(type: "INTEGER", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CommandCooldown", x => x.Id);
table.ForeignKey(
name: "FK_CommandCooldown_GuildConfigs_GuildConfigId",
column: x => x.GuildConfigId,
principalTable: "GuildConfigs",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "Commands",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Body = table.Column<string>(type: "TEXT", nullable: true),
GuildConfigId = table.Column<int>(type: "INTEGER", nullable: true),
GuildID = table.Column<ulong>(type: "INTEGER", nullable: false),
Name = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Commands", x => x.Id);
table.ForeignKey(
name: "FK_Commands_GuildConfigs_GuildConfigId",
column: x => x.GuildConfigId,
principalTable: "GuildConfigs",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "Events",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Date = table.Column<long>(type: "INTEGER", nullable: false),
Description = table.Column<string>(type: "TEXT", nullable: true),
Duration = table.Column<long>(type: "INTEGER", nullable: false),
GuildConfigId = table.Column<int>(type: "INTEGER", nullable: true),
GuildID = table.Column<ulong>(type: "INTEGER", nullable: false),
Name = table.Column<string>(type: "TEXT", nullable: true),
TimeZone = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Events", x => x.Id);
table.ForeignKey(
name: "FK_Events_GuildConfigs_GuildConfigId",
column: x => x.GuildConfigId,
principalTable: "GuildConfigs",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "Reactions",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Body = table.Column<string>(type: "TEXT", nullable: true),
GuildConfigId = table.Column<int>(type: "INTEGER", nullable: true),
GuildID = table.Column<ulong>(type: "INTEGER", nullable: false),
Name = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Reactions", x => x.Id);
table.ForeignKey(
name: "FK_Reactions_GuildConfigs_GuildConfigId",
column: x => x.GuildConfigId,
principalTable: "GuildConfigs",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "SelfAssignedRoles",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
GuildConfigId = table.Column<int>(type: "INTEGER", nullable: true),
GuildId = table.Column<ulong>(type: "INTEGER", nullable: false),
RoleId = table.Column<ulong>(type: "INTEGER", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_SelfAssignedRoles", x => x.Id);
table.ForeignKey(
name: "FK_SelfAssignedRoles_GuildConfigs_GuildConfigId",
column: x => x.GuildConfigId,
principalTable: "GuildConfigs",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateIndex(
name: "IX_CommandCooldown_GuildConfigId",
table: "CommandCooldown",
column: "GuildConfigId");
migrationBuilder.CreateIndex(
name: "IX_Commands_GuildConfigId",
table: "Commands",
column: "GuildConfigId");
migrationBuilder.CreateIndex(
name: "IX_Events_GuildConfigId",
table: "Events",
column: "GuildConfigId");
migrationBuilder.CreateIndex(
name: "IX_Reactions_GuildConfigId",
table: "Reactions",
column: "GuildConfigId");
migrationBuilder.CreateIndex(
name: "IX_SelfAssignedRoles_GuildConfigId",
table: "SelfAssignedRoles",
column: "GuildConfigId");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "BotConfig");
migrationBuilder.DropTable(
name: "CommandCooldown");
migrationBuilder.DropTable(
name: "Commands");
migrationBuilder.DropTable(
name: "Events");
migrationBuilder.DropTable(
name: "LoggingConfig");
migrationBuilder.DropTable(
name: "Reactions");
migrationBuilder.DropTable(
name: "SelfAssignedRoles");
migrationBuilder.DropTable(
name: "GuildConfigs");
}
}
}
|
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using Microsoft.CSharp;
using StardewModdingAPI;
namespace ConsoleCode
{
public class Mod : StardewModdingAPI.Mod
{
public static Mod instance;
public override void Entry(IModHelper helper)
{
instance = this;
helper.ConsoleCommands.Add("cs", "Execute C# code.", onCommandReceived);
}
private void onCommandReceived( string cmd, string[] args )
{
string line = string.Join(" ", args);
if ( args[0] == "--script" )
{
line = File.ReadAllText(Path.Combine(Helper.DirectoryPath, args[1]));
}
Log.trace($"Input: {line}");
try
{
var func = makeFunc(line);
object result = func.Invoke(null, new object[] { });
if (result == null)
Log.info("Output: <null>");
else if (result is string)
Log.info($"Output: \"{result}\"");
else
Log.info($"Output: {result}");
}
catch (CompilationException e)
{
Log.error("Error(s) when compiling: ");
foreach ( CompilerError error in e.Results.Errors )
{
Log.error($"{error}");
}
}
catch (Exception e)
{
Log.error("Exception: " + e);
}
}
int num = 0;
private MethodInfo makeFunc(string userCode)
{
var libs = new List<string>();
foreach (var asm in AppDomain.CurrentDomain.GetAssemblies())
{
try
{
libs.Add(asm.Location);
}
catch (Exception e)
{
//Log.trace("Couldn't add assembly " + asm + ": " + e);
}
}
string code = @"
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using StardewModdingAPI;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using StardewValley;
using xTile;
namespace ConsoleCode
{
public class UserCode<ITER>
{
public static IModHelper Helper { get { return ConsoleCode.Mod.instance.Helper; } }
public static object func()
{
<USER_CODE>
return null;
}
}
}
";
code = code.Replace("<ITER>", num.ToString());
code = code.Replace("<USER_CODE>", userCode);
//Log.trace(code);
var provider = new CSharpCodeProvider();
var @params = new CompilerParameters();
@params.GenerateInMemory = true;
@params.GenerateExecutable = false;
@params.IncludeDebugInformation = true;
foreach (var lib in libs)
@params.ReferencedAssemblies.Add(lib);
CompilerResults results = provider.CompileAssemblyFromSource(@params, code);
if (results.Errors.Count > 0)
throw new CompilationException(results);
return results.CompiledAssembly.GetType($"ConsoleCode.UserCode{num++}").GetMethod("func");
}
private class CompilationException : Exception
{
public CompilerResults Results { get; }
public CompilationException( CompilerResults results )
{
Results = results;
}
}
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.