コード例 #1
0
        public MainOperations(Window MainWindow, DefautlVariables DVar)
        {
            this.DVar = DVar;
            MainW     = MainWindow;

            CreateContextMenuItems();
        }
コード例 #2
0
        public LD(DefautlVariables DVar)
        {
            this.DVar = DVar;
            InitializeComponent();

            Main       = new MainOperations(this, DVar);
            this.State = DVar.State;

            if (DVar.BGBrush1 == null)
            {
                DVar.BGBrush1 = new SolidColorBrush(Brushes.LightGray.Color);
            }

            this.Background         = DVar.BGBrush1;
            this.Background.Opacity = (double)DVar.Opacity / 100;

            TextBoxStake.Text = DVar.Stake.ToString();

            TextBoxBack.Text = DVar.koef1 == 0 ? "2" :DVar.koef1.ToString();
            TextBoxLay.Text  = DVar.koef2 == 0 ? "2" : DVar.koef2.ToString();
            TextBoxComm.Text = commisions.ToString();
            commisions      /= 100;

            TextBoxStake.KeyDown     += TextBoxStake_KeyDown;
            TextBoxBack.KeyDown      += TextBoxStake_KeyDown;
            TextBoxLay.KeyDown       += TextBoxStake_KeyDown;
            TextBoxStake.TextChanged += TextBox_TextChanged;
            TextBoxBack.TextChanged  += TextBox_TextChanged;
            TextBoxLay.TextChanged   += TextBox_TextChanged;
            TextBoxComm.KeyDown      += TextBoxStake_KeyDown;
            TextBoxComm.TextChanged  += TextBoxComm_TextChanged;

            TextBoxAltStake.KeyDown     += TextBoxStake_KeyDown;
            TextBoxAltStake.TextChanged += TextBox_TextChanged;

            RBBack.Checked  += RB_Checked;
            RBEquel.Checked += RB_Checked;
            RBLay.Checked   += RB_Checked;

            if (state)
            {
                RadioButtonLay.IsChecked = true;
            }
            else
            {
                RadioButtonDutch.IsChecked = true;
            }
            Recalc();
            this.Topmost = true;
        }
コード例 #3
0
        public _3Way(DefautlVariables DVar)
        {
            this.DVar = DVar;
            InitializeComponent();
            Main = new MainOperations(this, DVar);

            if (DVar.BGBrush1 == null)
            {
                DVar.BGBrush1 = new SolidColorBrush(Brushes.LightGray.Color);
            }
            this.Background         = DVar.BGBrush1;
            this.Background.Opacity = (double)DVar.Opacity / 100;

            TextBoxStake.Text = DVar.Stake.ToString();
            TextBoxBack1.Text = "2";
            TextBoxBack2.Text = "2";
            TextBoxBack3.Text = "2";

            TextBoxStake.KeyDown     += TextBox_KeyDown;
            TextBoxBack1.KeyDown     += TextBox_KeyDown;
            TextBoxBack2.KeyDown     += TextBox_KeyDown;
            TextBoxBack3.KeyDown     += TextBox_KeyDown;
            TextBoxAltStake2.KeyDown += TextBox_KeyDown;
            TextBoxAltStake3.KeyDown += TextBox_KeyDown;


            TextBoxStake.TextChanged     += TextBox_TextChanged;
            TextBoxBack1.TextChanged     += TextBox_TextChanged;
            TextBoxBack2.TextChanged     += TextBox_TextChanged;
            TextBoxBack3.TextChanged     += TextBox_TextChanged;
            TextBoxAltStake2.TextChanged += TextBox_TextChanged;
            TextBoxAltStake3.TextChanged += TextBox_TextChanged;

            RBEquel.Checked += RB_Checked;
            RBBack1.Checked += RB_Checked;
            RBBack2.Checked += RB_Checked;
            RBBack3.Checked += RB_Checked;

            Recalc();
            this.Topmost = true;
        }