예제 #1
0
    protected void OnButtonClicked(object sender, EventArgs e)
    {
        if (sender == button1)
        {

            Gtk.FileChooserDialog dialog = new Gtk.FileChooserDialog ("Choose item...", this, FileChooserAction.Open, "Cancel",  ResponseType.Cancel, "Insert Spacer",  ResponseType.None, "Add", ResponseType.Accept);

            Gtk.Alignment align = new Alignment (1, 0, 0, 1);
            Gtk.Frame frame = new Frame ("Position");
            Gtk.HBox hbox = new HBox (false, 4);

            RadioButton rbRight;
            rbRight = new RadioButton ("Right");
            hbox.PackEnd(rbRight, false, false, 1);
            hbox.PackEnd(new RadioButton (rbRight, "Left"), false, false, 1);

            frame.Add (hbox);
            align.Add (frame);
            align.ShowAll ();
            dialog.ExtraWidget = align;

            ResponseType response = (ResponseType)dialog.Run ();
            if (response == ResponseType.Accept) {
                RunCommand ("defaults write com.apple.dock " + GetAlign(dialog.ExtraWidget) + " -array-add '<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>" + dialog.Filename + "</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>' && /bin/sleep 1 &&/usr/bin/killall Dock");
            } else if (response == ResponseType.None) {
                RunCommand ("defaults write com.apple.dock " + GetAlign(dialog.ExtraWidget) + " -array-add '{tile-data={}; tile-type=\"spacer-tile\";}' && /bin/sleep 1 &&/usr/bin/killall Dock");
            }
            dialog.Destroy ();

        }
    }
예제 #2
0
 private void VerifyRadioButton(RadioButton<FindingPage> radioButton)
 {
     VerifyValue(radioButton, "OptionC");
     radioButton.Should.BeUnchecked();
     radioButton.Check();
     radioButton.Should.BeChecked();
 }
예제 #3
0
    public void addRowToSubsDetailsSection(string subscription, string merchantsubscription)
    {
        TableRow rowOne = new TableRow();
        TableCell cellOne = new TableCell();
        cellOne.HorizontalAlign = HorizontalAlign.Right;
        cellOne.CssClass = "cell";
        cellOne.Width = Unit.Pixel(150);
        //cellOne.Text = transaction.ToString();
        RadioButton rbutton = new RadioButton();
        rbutton.Text = subscription.ToString();
        rbutton.GroupName = "SubsDetailsSection";
        rbutton.ID = subscription.ToString();
        cellOne.Controls.Add(rbutton);
        rowOne.Controls.Add(cellOne);
        TableCell CellTwo = new TableCell();
        CellTwo.CssClass = "cell";
        CellTwo.Width = Unit.Pixel(100);
        rowOne.Controls.Add(CellTwo);

        TableCell CellThree = new TableCell();
        CellThree.CssClass = "cell";
        CellThree.HorizontalAlign = HorizontalAlign.Left;
        CellThree.Width = Unit.Pixel(240);
        CellThree.Text = merchantsubscription.ToString();
        rowOne.Controls.Add(CellThree);

        TableCell CellFour = new TableCell();
        CellFour.CssClass = "cell";
        rowOne.Controls.Add(CellFour);

        subsDetailsTable.Controls.Add(rowOne);
    }
예제 #4
0
    protected void btnReport_Click(object sender, EventArgs e)
    {
        foreach (GridViewRow gvr in gdvStud.Rows)
        {
            Label lblStudId = new Label();
            RadioButton rdb = new RadioButton();
            rdb = (RadioButton)gvr.Cells[1].FindControl("rdbSelect");
            if (rdb.Checked)
            {
                lblStudId = (Label)gvr.Cells[0].FindControl("lblStudId");
                MyReportViewer.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
                MyReportViewer.ServerReport.ReportServerUrl = new Uri(ConfigurationManager.AppSettings["ReportsURI"].ToString()); // Report Server URL
                MyReportViewer.ServerReport.ReportPath = ConfigurationManager.AppSettings["ReportsFolder"].ToString() + "StudentIDReport"; // Report Name
                MyReportViewer.ShowParameterPrompts = false;
                MyReportViewer.ShowPrintButton = true;
                MyReportViewer.ShowToolBar = true;

                // Below code demonstrate the Parameter passing method. User only if you have parameters into the reports.

                Microsoft.Reporting.WebForms.ReportParameter[] reportParameterCollection = new Microsoft.Reporting.WebForms.ReportParameter[1];
                reportParameterCollection[0] = new Microsoft.Reporting.WebForms.ReportParameter("StudId", lblStudId.Text);

                MyReportViewer.ServerReport.SetParameters(reportParameterCollection);

                MyReportViewer.ServerReport.Refresh();
                break;
            }
        }
    }
        public override Dialog OnCreateDialog (Bundle savedInstanceState)
        {
            var view = LayoutInflater.From (Activity)
                       .Inflate (Resource.Layout.ChangeTimeEntryStartTimeDialogFragment, null);
            tabsRadioButton = view.FindViewById<RadioGroup> (Resource.Id.TabsRadioGroup);
            timeTabRadioButton = view.FindViewById<RadioButton> (Resource.Id.TimeTabRadioButton).SetFont (Font.Roboto);
            dateTabRadioButton = view.FindViewById<RadioButton> (Resource.Id.DateTabRadioButton).SetFont (Font.Roboto);
            timePicker = view.FindViewById<TimePicker> (Resource.Id.TimePicker);
            datePicker = view.FindViewById<DatePicker> (Resource.Id.DatePicker);

            // WORKAROUND: Without these two lines the app will crash on rotation. See #258.
            timePicker.SaveFromParentEnabled = false;
            timePicker.SaveEnabled = true;

            tabsRadioButton.CheckedChange += OnTabsRadioGroupCheckedChange;

            SetupViews ();
            Rebind ();

            var dia = new AlertDialog.Builder (Activity)
            .SetTitle (DialogTitle)
            .SetView (view)
            .SetPositiveButton (Resource.String.ChangeTimeEntryStartTimeDialogOk, OnOkButtonClicked)
            .Create ();

            return dia;
        }
예제 #6
0
 public void can_format_a_radio_button()
 {
     var html = new RadioButton("foo.Bar").Value(10).Format("{0}<br/>").ToString();
     var doc = html.ShouldRenderHtmlDocument();
     var br = doc.ShouldHaveChildNodesCount(2)[1];
     br.ShouldBeNamed("br");
 }
        protected override void OnBindDialogView(View view)
        {
            base.OnBindDialogView(view);

            var currentValue = GetPersistedInt(SettingsScreen.DefaultRadiusValue);

            if (BuildVersionCodes.Honeycomb > Build.VERSION.SdkInt)
            {
                _radioGroup = (RadioGroup)view;
                foreach (var distance in Constants.AlarmRadiusValues)
                {
                    var radioButton = new RadioButton(Context);
                    radioButton.SetText(string.Format(Context.GetString(Resource.String.settings_default_radius_sum), distance), TextView.BufferType.Normal);
                    radioButton.Checked = distance == currentValue;
                    radioButton.Id = distance;
                    _radioGroup.AddView(radioButton);
                }
            }
            else
            {
                _numberPicker = (NumberPicker)view;
                SetNumberPickerTextColor(_numberPicker, Context.Resources.GetColor(Resource.Color.dark));
                _numberPicker.DescendantFocusability = DescendantFocusability.BlockDescendants;
                _numberPicker.SetDisplayedValues(Constants.AlarmRadiusValues.Select(v => v.ToString()).ToArray());
                _numberPicker.MinValue = 0;
                _numberPicker.MaxValue = Constants.AlarmRadiusValues.Count() - 1;
                _numberPicker.WrapSelectorWheel = false;
                _numberPicker.Value = Constants.AlarmRadiusValues.IndexOf(currentValue);
            }
        }
예제 #8
0
파일: MainActivity.cs 프로젝트: adbk/spikes
        protected override void OnCreate(Bundle bundle)
        {
            if (IsDarkTheme)
            {
                SetTheme(Resource.Style.Theme_Dark);
            }
            else
            {
                SetTheme(Resource.Style.Theme_Light);
            }

            base.OnCreate(bundle);

            SetContentView(Resource.Layout.Main);

            Button button = FindViewById<Button>(Resource.Id.MyButton);
            LightButton = FindViewById<RadioButton>(Resource.Id.radio_light);
            DarkButton = FindViewById<RadioButton>(Resource.Id.radio_dark);

            LightButton.Click += radioButton_Click;
            DarkButton.Click += radioButton_Click;

            button.Click += delegate
            {
                Intent intent = new Intent(this, this.GetType());

                StartActivity(intent);
            };
        }
예제 #9
0
        public RadioButtonSample()
        {
            var b1 = new RadioButton ("Item 1");
            var b2 = new RadioButton ("Item 2 (red background)");
            b2.BackgroundColor = Xwt.Drawing.Colors.Red;
            var b3 = new RadioButton ("Item 3");
            b2.Group = b3.Group = b1.Group;
            PackStart (b1);
            PackStart (b2);
            PackStart (b3);

            var la = new Label ();
            la.Hide ();
            b1.Group.ActiveRadioButtonChanged += delegate {
                la.Show ();
                la.Text = "Active: " + b1.Group.ActiveRadioButton.Label;
            };
            PackStart (la);

            PackStart (new HSeparator ());

            var box = new VBox ();
            box.PackStart (new Label ("First Option"));
            box.PackStart (new Label ("Second line"));

            var b4 = new RadioButton (box);
            var b5 = new RadioButton ("Second Option");
            var b6 = new RadioButton ("Disabled Option") { Sensitive = false };
            PackStart (b4);
            PackStart (b5);
            PackStart (b6);
            b4.Group = b5.Group = b6.Group;
        }
		public override void OnActivityCreated (Bundle savedInstanceState)
		{
			base.OnActivityCreated (savedInstanceState);

			//radiogroup
			radio_advice_Group = View.FindViewById<RadioGroup> (Resource.Id.radio_advice_Group);
			radio_advice_Group.SetOnCheckedChangeListener (this);
			//radiobutton
			rbtn_zixun = View.FindViewById<RadioButton> (Resource.Id.rbtn_zixun);
			rbtn_zixun.Tag = ((int)AdviceType.Consult).ToString();
			//默认咨询选中
			rbtn_zixun.Checked = true;
			rbtn_jianyi = View.FindViewById<RadioButton> (Resource.Id.rbtn_jianyi);
			rbtn_jianyi.Tag =((int)AdviceType.Suggest).ToString ();
			rbtn_tousu = View.FindViewById<RadioButton> (Resource.Id.rbtn_tousu);
			rbtn_tousu.Tag = ((int)AdviceType.Complain).ToString ();
			rbtn_other = View.FindViewById<RadioButton> (Resource.Id.rbtn_other);
			rbtn_other.Tag = ((int)AdviceType.Other).ToString();

			edit_advice_title = View.FindViewById<EditText> (Resource.Id.edit_advice_title);
			edit_advice_content = View.FindViewById<EditText> (Resource.Id.edit_advice_content);
			//发表按钮
			btn_Publish = View.FindViewById<Button> (Resource.Id.btn_Publish);
			btn_Publish.Click += (sender, e) => 
			{
				PublishAdvice();
			};

			//初始化view完成
			IsPrepared = true;
			LasyloadData ();
		}
예제 #11
0
        void KeepMe()
        {
            var txt = new TextView(null);
            txt.Text = txt.Text;

            var iv = new ImageView(null);
            var obj = iv.Drawable;

            var prog = new ProgressBar(null);
            prog.Progress = prog.Progress;

            var cb = new RadioButton(null);
            cb.Checked = cb.Checked;

            var np = new NumberPicker(null);
            np.Value = np.Value;

            var rb = new RatingBar(null);
            rb.Rating = rb.Rating;

            var cv = new CalendarView(null);
            cv.Date = cv.Date;

            var th = new TabHost(null);
            th.CurrentTab = th.CurrentTab;

            var tp = new TimePicker(null);
            tp.CurrentHour = tp.CurrentHour;
            tp.CurrentMinute = tp.CurrentMinute;

            
        }
		private void InitView()
		{
			//设置标题栏
			var img_header_back = FindViewById<ImageView> (Resource.Id.img_header_back);
			img_header_back.Click += (sender, e) => 
			{
				this.Finish();
				OverridePendingTransition(Android.Resource.Animation.SlideInLeft,Android.Resource.Animation.SlideOutRight);
			};
		
			var tv_back = FindViewById<TextView> (Resource.Id.tv_back);
			tv_back.Text = "个人信息";
			var tv_desc = FindViewById<TextView> (Resource.Id.tv_desc);
			tv_desc.Text = "性别";
			rbtn_male = FindViewById<RadioButton>(Resource.Id.rbtn_male);
			rbtn_female = FindViewById<RadioButton> (Resource.Id.rbtn_female);
			//性别
			if (!string.IsNullOrEmpty (Global.MyInfo.Gender) && Global.MyInfo.Gender.Equals ("0"))
				rbtn_male.Checked = true;
			else
				rbtn_female.Checked = true;
			btn_Save = FindViewById<Button> (Resource.Id.btn_Save);
			btn_Save.Click += (sender, e) => 
			{
				Save();
			};
		}
예제 #13
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            Dialog.SetTitle("Select marker template");
            _view = inflater.Inflate(Resource.Layout.AddMarker, container, false);

            _btnCancel = _view.FindViewById<Button>(Resource.Id.addMarker_btnCancel);
            _btnCreate = _view.FindViewById<Button>(Resource.Id.addMarker_btnCreate);
            _radioVerse = _view.FindViewById<RadioButton>(Resource.Id.addMarker_radioVerse);
            _radioChorus = _view.FindViewById<RadioButton>(Resource.Id.addMarker_radioChorus);
            _radioBridge = _view.FindViewById<RadioButton>(Resource.Id.addMarker_radioBridge);
            _radioSolo = _view.FindViewById<RadioButton>(Resource.Id.addMarker_radioSolo);
            _btnCancel.Click += (sender, args) => Dismiss();
            _btnCreate.Click += (sender, args) =>
            {
                MarkerTemplateNameType template = MarkerTemplateNameType.None;
                if(_radioVerse.Checked)
                    template = MarkerTemplateNameType.Verse;
                else if (_radioChorus.Checked)
                    template = MarkerTemplateNameType.Chorus;
                else if (_radioBridge.Checked)
                    template = MarkerTemplateNameType.Bridge;
                else if (_radioSolo.Checked)
                    template = MarkerTemplateNameType.Solo;

                OnAddMarker(template);
                Dismiss();
            };
            _radioVerse.Checked = true;

            return _view;
        }
예제 #14
0
파일: MainForm.cs 프로젝트: mono/gert
	public MainForm ()
	{
		// 
		// _dataGridView
		// 
		_dataGridView = new DataGridView ();
		_dataGridView.Dock = DockStyle.Top;
		_dataGridView.Height = 100;
		Controls.Add (_dataGridView);
		// 
		// _nameTextBoxColumn
		// 
		_nameTextBoxColumn = new DataGridViewTextBoxColumn ();
		_nameTextBoxColumn.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
		_nameTextBoxColumn.HeaderText = "Name";
		_dataGridView.Columns.Add (_nameTextBoxColumn);
		// 
		// _columnHeadersHeightSizeModeGroupBox
		// 
		_columnHeadersHeightSizeModeGroupBox = new GroupBox ();
		_columnHeadersHeightSizeModeGroupBox.Dock = DockStyle.Bottom;
		_columnHeadersHeightSizeModeGroupBox.Height = 85;
		_columnHeadersHeightSizeModeGroupBox.Text = "ColumnHeadersHeightSizeMode";
		Controls.Add (_columnHeadersHeightSizeModeGroupBox);
		// 
		// _autoSizeHeightSizeMode
		// 
		_autoSizeHeightSizeMode = new RadioButton ();
		_autoSizeHeightSizeMode.Location = new Point (8, 16);
		_autoSizeHeightSizeMode.Text = "AutoSize";
		_autoSizeHeightSizeMode.CheckedChanged += new EventHandler (AutoSizeHeightSizeMode_CheckedChanged);
		_columnHeadersHeightSizeModeGroupBox.Controls.Add (_autoSizeHeightSizeMode);
		// 
		// _disableResizingHeightSizeMode
		// 
		_disableResizingHeightSizeMode = new RadioButton ();
		_disableResizingHeightSizeMode.Location = new Point (8, 36);
		_disableResizingHeightSizeMode.Text = "DisableResizing";
		_disableResizingHeightSizeMode.CheckedChanged += new EventHandler (DisableResizingHeightSizeMode_CheckedChanged);
		_columnHeadersHeightSizeModeGroupBox.Controls.Add (_disableResizingHeightSizeMode);
		// 
		// _enableResizingHeightSizeMode
		// 
		_enableResizingHeightSizeMode = new RadioButton ();
		_enableResizingHeightSizeMode.Checked = true;
		_enableResizingHeightSizeMode.Location = new Point (8, 56);
		_enableResizingHeightSizeMode.Text = "EnableResizing";
		_enableResizingHeightSizeMode.CheckedChanged += new EventHandler (EnableResizingHeightSizeMode_CheckedChanged);
		_columnHeadersHeightSizeModeGroupBox.Controls.Add (_enableResizingHeightSizeMode);
		// 
		// MainForm
		// 
		ClientSize = new Size (300, 195);
		Location = new Point (250, 100);
		StartPosition = FormStartPosition.Manual;
		Text = "bug #82221";
		Load += new EventHandler (MainForm_Load);
	}
예제 #15
0
 public void CollapseToMediumTest()
 {
     RadioButton target = new RadioButton(); // TODO: Initialize to an appropriate value
     ButtonSize expected = new ButtonSize(); // TODO: Initialize to an appropriate value
     ButtonSize actual;
     target.CollapseToMedium = expected;
     actual = target.CollapseToMedium;
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
예제 #16
0
		public override Android.Views.View OnCreateView (Android.Views.LayoutInflater inflater, Android.Views.ViewGroup container, Bundle savedInstanceState)
		{
			var root = inflater.Inflate (Resource.Layout.fragment_welcome, container, false);
			var buttonSignup = root.FindViewById<Button> (Resource.Id.signup);
			blue = root.FindViewById<RadioButton> (Resource.Id.blue);
			buttonSignup.Click += (sender, e) => {
				Settings.AppTheme = blue.Checked ? AppTheme.Blue : AppTheme.Red;
				((WelcomeActivity)Activity).GoToGetStarted ();
			};
			return root;
		}
예제 #17
0
 protected override void OnCreate(Bundle bundle)
 {
     base.OnCreate (bundle);
     SetContentView (Resource.Layout.FinalDialog);
     bSMS = FindViewById<RadioButton> (Resource.Id.radioButtonSMS);
     bEmail = FindViewById<RadioButton> (Resource.Id.radioButtonEmail);
     group = FindViewById<RadioGroup> (Resource.Id.radioGroup1);
     group.ClearCheck ();
     bSMS.Click += new EventHandler(bSMS_Click);
     bEmail.Click += new EventHandler (bEmail_Click);
 }
		public override void OnActivityCreated (Bundle savedInstanceState)
		{
			base.OnActivityCreated (savedInstanceState);

			//radiogroup
			radio_advice_Group = View.FindViewById<RadioGroup> (Resource.Id.radio_advice_Group);
			radio_advice_Group.SetOnCheckedChangeListener (this);
			//radiobutton
			rbtn_all  = View.FindViewById<RadioButton>(Resource.Id.rbtn_all);
			rbtn_all.Tag = ((int)AdviceType.All).ToString();
			//默认咨询选中
			rbtn_all.Checked = true;
			rbtn_zixun = View.FindViewById<RadioButton> (Resource.Id.rbtn_zixun);
			rbtn_zixun.Tag = ((int)AdviceType.Consult).ToString();
			rbtn_jianyi = View.FindViewById<RadioButton> (Resource.Id.rbtn_jianyi);
			rbtn_jianyi.Tag = ((int)AdviceType.Suggest).ToString();
			rbtn_tousu = View.FindViewById<RadioButton> (Resource.Id.rbtn_tousu);
			rbtn_tousu.Tag = ((int)AdviceType.Complain).ToString();
			rbtn_other = View.FindViewById<RadioButton> (Resource.Id.rbtn_other);
			rbtn_other.Tag = ((int)AdviceType.Other).ToString();
			tv_recordNum = View.FindViewById<TextView> (Resource.Id.tv_recordNum);
			//pulltolistview
			lv_recordAdviceRefreshListView = View.FindViewById<PullToRefreshListView> (Resource.Id.lv_recordAdvice);
			actualListView = (ListView)lv_recordAdviceRefreshListView.RefreshableView;

			//设置可以上拉加载。下拉刷新
			lv_recordAdviceRefreshListView.Mode = PullToRefreshBase.PullToRefreshMode.Both;
			//下拉刷新提示文本
			lv_recordAdviceRefreshListView.GetLoadingLayoutProxy(true,false).SetPullLabel(GetString(Resource.String.pullDownLbl));
			lv_recordAdviceRefreshListView.GetLoadingLayoutProxy (true,false).SetRefreshingLabel(GetString(Resource.String.pullDownRefreshLbl));
			lv_recordAdviceRefreshListView.GetLoadingLayoutProxy (true, false).SetReleaseLabel (GetString(Resource.String.pullDownReleaseLbl));
			//上拉加载提示文本
			lv_recordAdviceRefreshListView.GetLoadingLayoutProxy(false,true).SetPullLabel(GetString(Resource.String.pullUpLbl));
			lv_recordAdviceRefreshListView.GetLoadingLayoutProxy (false, true).SetRefreshingLabel (GetString(Resource.String.pullUpRefreshLbl));
			lv_recordAdviceRefreshListView.GetLoadingLayoutProxy (false, true).SetReleaseLabel (GetString(Resource.String.pullUpReleaseLbl));
	

			//绑定监听事件
			lv_recordAdviceRefreshListView.SetOnRefreshListener (this);

			//设置adapter		
			adviceRecordListAdapter = new AdviceRecordListAdapter (Activity);
			actualListView.Adapter = adviceRecordListAdapter;
			//初始化请求参数信息
			adviceRecordInfoListParam = new AdviceRecordInfoListParam () {
				UId = Global.Guid,
				AdviceType = _adviceType
			};
			//初始化view完成
			IsPrepared = true;
			LasyloadData ();
		}
예제 #19
0
 public static MvcHtmlString UxRadioButton(this HtmlHelper htmlHelper, 
     string label, 
     string group, 
     string value = "", 
     bool selected = false, 
     LabelPosition position = null, 
     CheckColor color = CheckColor.Blue, 
     bool disabled = false, 
     string clientId = null)
 {
     var radio = new RadioButton(label, group, value, selected, position, color, disabled, clientId);
     return htmlHelper.RenderUxControl(radio);
 }
    public override void ReloadData()
    {
        int currPos = Convert.ToInt32(Math.Round(CurrentRating * MaxRating, MidpointRounding.AwayFromZero));
        plcContent.Controls.Clear();
        plcContent.Controls.Add(new LiteralControl("<table class=\"CntRatingRadioTable\"><tr>\n"));

        // Create radio buttons
        for (int i = 1; i <= MaxRating; i++)
        {
            plcContent.Controls.Add(new LiteralControl("<td>"));

            RadioButton radBtn = new RadioButton();
            radBtn.ID = "radBtn_" + Convert.ToString(i);
            radBtn.Enabled = Enabled;
            if (!Enabled)
            {
                radBtn.Checked = i == currPos;
            }
            radBtn.GroupName = ClientID;
            plcContent.Controls.Add(radBtn);

            // WAI validation
            LocalizedLabel lbl = new LocalizedLabel();
            lbl.Display = false;
            lbl.EnableViewState = false;
            lbl.ResourceString = "general.rating";
            lbl.AssociatedControlID = radBtn.ID;

            plcContent.Controls.Add(lbl);
            plcContent.Controls.Add(new LiteralControl("</td>"));
        }
        plcContent.Controls.Add(new LiteralControl("\n</tr>\n<tr>\n"));

        // Create labels
        for (int i = 1; i <= MaxRating; i++)
        {
            plcContent.Controls.Add(new LiteralControl("<td>" + i.ToString() + "</td>"));
        }
        plcContent.Controls.Add(new LiteralControl("\n</tr>\n</table>"));

        if (Enabled)
        {
            btnSubmit.Text = ResHelper.GetString("general.ok");
            btnSubmit.Click += new EventHandler(btnSubmit_Click);
        }

        // Hide button when control is disabled or external management is used
        btnSubmit.Visible = Enabled && !ExternalManagement;
    }
예제 #21
0
 public void can_get_a_radio_button_with_label_after()
 {
     var html = new RadioButton("foo.Bar").Value(10).LabelAfter("Ten").ToString();
     var radioInput = html.ShouldHaveHtmlNode("foo_Bar_10");
     radioInput.ShouldBeNamed(HtmlTag.Input);
     radioInput.ShouldBeNamed(HtmlTag.Input);
     radioInput.ShouldHaveAttribute(HtmlAttribute.Id).WithValue("foo_Bar_10");
     radioInput.ShouldHaveAttribute(HtmlAttribute.Name).WithValue("foo.Bar");
     radioInput.ShouldHaveAttribute(HtmlAttribute.Type).WithValue(HtmlInputType.Radio);
     radioInput.ShouldHaveAttribute(HtmlAttribute.Value).WithValue("10");
     radioInput.ShouldNotHaveAttribute(HtmlAttribute.Checked);
     var label = html.ShouldHaveHtmlNode("foo_Bar_10_Label");
     label.ShouldHaveAttribute(HtmlAttribute.For).WithValue("foo_Bar_10");
     label.ShouldHaveInnerTextEqual("Ten");
 }
예제 #22
0
 private void inicjalizacja_kontrolek()
 {
     myTextView = FindViewById<TextView>(Resource.Id.textView1);
     myTextView.Gravity = GravityFlags.Center;
     myProgress_1 = FindViewById<ProgressBar>(Resource.Id.progressBar1);
     myProgress_2 = FindViewById<ProgressBar>(Resource.Id.progressBar2);
     myProgress_3 = FindViewById<ProgressBar>(Resource.Id.progressBar3);
     myrbtn1 = FindViewById<RadioButton>(Resource.Id.radioButton1);
     myrbtn2 = FindViewById<RadioButton>(Resource.Id.radioButton2);
     myrbtn3 = FindViewById<RadioButton>(Resource.Id.radioButton3);
     timer1 = new System.Timers.Timer(1000);
     timer1.Enabled = true;
     client = new udp();
     tryb = client.udp_konfig("192.168.42.42", "8888", trybData);
 }
    public void registerRadioButton(RadioButton listener)
    {
        HashSet<RadioButton> tmplisteners;
        if (radiobuttons.ContainsKey(listener.radioGroup)) {
            tmplisteners = new HashSet<RadioButton>(radiobuttons[listener.radioGroup]);
        } else {
            tmplisteners = new HashSet<RadioButton>();
        }
        tmplisteners.Add(listener);
        radiobuttons[listener.radioGroup] = tmplisteners;

        foreach(RadioButton db in radiobuttons[listener.radioGroup]) {
            db.resetPosition(tmplisteners.Count);
        }
    }
예제 #24
0
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);

			// Set our view from the "main" layout resource
			SetContentView (Resource.Layout.QuizLayout);
			DbHelper db=new DbHelper(this);
			quesList=db.getAllQuestions();
			currentQ=quesList[qid];
			txtQuestion=(TextView)FindViewById(Resource.Id.textView1);
			rda=(RadioButton)FindViewById(Resource.Id.radio0);
			rdb=(RadioButton)FindViewById(Resource.Id.radio1);
			rdc=(RadioButton)FindViewById(Resource.Id.radio2);
			butNext=(Button)FindViewById(Resource.Id.button1);
			setQuestionView();
		}
예제 #25
0
		protected override async void OnCreate (Bundle savedInstanceState)
		{
			base.OnCreate (savedInstanceState);

			SetContentView (Resource.Layout.AddNew);

			_toiletsRepository = new ToiletsApi ();

			_selectedCity = Intent.GetStringExtra ("City") ?? "NA";

			var toolbar = FindViewById<Toolbar> (Resource.Id.toolbar);

			SetSupportActionBar (toolbar);

			SupportActionBar.Title = "Dodawanie toalety";

			SupportActionBar.SetDisplayHomeAsUpEnabled (true);
			SupportActionBar.SetHomeButtonEnabled (true);

			_radio_yes = FindViewById<RadioButton>(Resource.Id.radio_yes);
			_radio_no = FindViewById<RadioButton>(Resource.Id.radio_no);

			_radio_yes.Click += RadioButtonClick;
			_radio_no.Click += RadioButtonClick;

			Spinner spinner = FindViewById<Spinner> (Resource.Id.spinner);

			spinner.ItemSelected += new EventHandler<AdapterView.ItemSelectedEventArgs> (spinner_ItemSelected);
			var adapter = ArrayAdapter.CreateFromResource (
				this, Resource.Array.comment_array, Android.Resource.Layout.SimpleSpinnerItem);

			adapter.SetDropDownViewResource (Android.Resource.Layout.SimpleSpinnerDropDownItem);
			spinner.Adapter = adapter;

			_sendNewToiletButton = FindViewById<Button> (Resource.Id.btnAddToiletConfirm);
			_sendNewToiletButton.Click += async (sender, e) => _sendNewToiletButton_Click(sender, e);

			_latitude = Intent.GetStringExtra ("Latitude") ?? "NA";
			_longitude = Intent.GetStringExtra ("Longitude") ?? "NA";

			_edittext = FindViewById<EditText>(Resource.Id.txtNewToiletNameValue);
			_name = _edittext.Text;

			InitMapFragment ();
			SetUpMapIfNeeded ();
		}
예제 #26
0
    public MainWindow()
        : base(Gtk.WindowType.Toplevel)
    {
        Build ();

        Catalog.Init("gpdfsplitter", "/usr/share/locale");		//LOCALIZATION

        Title = Catalog.GetString("gPDFsplitter");

        table = new Table(4,5,false);
        table.BorderWidth = 5;
        table.Attach( new Label( Catalog.GetString("1. Select the file:") ), 0, 1, 0, 1 );
        table.Attach( new Label( Catalog.GetString("2. Select a range:") ), 0, 1, 1, 3 );
        table.Attach( new Label( Catalog.GetString("3. Output file name:") ), 0, 1, 3, 4);
        table.Attach( new Label( Catalog.GetString("4. Split:") ), 0, 1, 4, 5 );

        inputBut = new FileChooserButton("Select file", FileChooserAction.Open);
        inputBut.Filter = new FileFilter();
        inputBut.Filter.AddMimeType( "application/pdf" );
        inputBut.FileSet += OnFileSelect;
        table.Attach( inputBut, 1, 4, 0, 1);

        outputBut = new Entry( Catalog.GetString("output.pdf") );
        outputBut.MaxLength = 15;
        outputBut.TooltipText = Catalog.GetString("Directory is home or actual");
        table.Attach( outputBut, 1, 4, 3,4);

        done = new Button("done");
        done.Clicked += OnDone;
        table.Attach( done, 1,4,4,5);

        start = new SpinButton(0,1,1);
        end = new SpinButton(0,1,1);
        table.Attach( start, 2,3, 1,2);
        table.Attach( end, 3,4, 1,2);

        rb1 = new RadioButton( Catalog.GetString("interval") );
        rb2 = new RadioButton( rb1,  Catalog.GetString("chapter") );
        table.Attach( rb1 , 1, 2, 1, 2);
        table.Attach( rb2 , 1, 2, 2, 3);

        table.Attach( new Label( Catalog.GetString("Not implemented yet") ), 2,4,2,3 );

        Add( table );
        ShowAll();
    }
예제 #27
0
 public static void SetTint(RadioButton radioButton, Color color)
 {
     ColorStateList sl = new ColorStateList(new int[][]{
         new int[]{-Android.Resource.Attribute.StateChecked},
         new int[]{Android.Resource.Attribute.StateChecked}}
         , new int[]{
             DialogUtils.ResolveColor(radioButton.Context,Resource.Attribute.colorControlNormal),color});
     if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop)
     {
         radioButton.ButtonTintList = sl;
     }
     else
     {
         Drawable d = ContextCompat.GetDrawable(radioButton.Context, Resource.Drawable.abc_btn_radio_material);
         DrawableCompat.SetTintList(d, sl);
         radioButton.SetButtonDrawable(d);
     }
 }
예제 #28
0
파일: MainForm.cs 프로젝트: mono/gert
	public MainForm ()
	{
		// 
		// _checkBox1
		// 
		_checkBox1 = new CheckBox ();
		_checkBox1.Location = new Point (8, 8);
		_checkBox1.Size = new Size (100, 50);
		_checkBox1.Text = "CheckBox";
		Controls.Add (_checkBox1);
		// 
		// _checkBox2
		// 
		_checkBox2 = new CheckBox ();
		_checkBox2.Location = new Point (8, 60);
		_checkBox2.Size = new Size (100, 50);
		Controls.Add (_checkBox2);
		// 
		// _radioButton1
		// 
		_radioButton1 = new RadioButton ();
		_radioButton1.Location = new Point (8, 112);
		_radioButton1.Size = new Size (100, 50);
		_radioButton1.TabStop = true;
		_radioButton1.Text = "RadioButton";
		Controls.Add (_radioButton1);
		// 
		// _radioButton2
		// 
		_radioButton2 = new RadioButton ();
		_radioButton2.Location = new Point (8, 164);
		_radioButton2.Size = new Size (100, 50);
		_radioButton2.TabStop = true;
		Controls.Add (_radioButton2);
		// 
		// MainForm
		// 
		ClientSize = new Size (300, 220);
		Location = new Point (250, 100);
		StartPosition = FormStartPosition.Manual;
		Text = "bug #82752";
		Load += new EventHandler (MainForm_Load);
	}
예제 #29
0
		protected override void OnCreate (Bundle savedInstanceState)
		{
			base.OnCreate (savedInstanceState);
			SetContentView (Resource.Layout.NewEntry);

			bkManager = BookkeeperManager.GetInstance ();
			buttonAddEntry = FindViewById<Button> (Resource.Id.buttonAddEntry);
			radioButtonIncome = FindViewById<RadioButton> (Resource.Id.radioButtonIncome);
			radioButtonExpences = FindViewById<RadioButton> (Resource.Id.radioButtonExpences);
			spinnerType = FindViewById<Spinner> (Resource.Id.spinnerType);
			spinnerTax = FindViewById<Spinner> (Resource.Id.spinnerTax);
			spinnerAccount = FindViewById<Spinner> (Resource.Id.spinnerAccount);
			editTextDate = FindViewById<EditText> (Resource.Id.editTextDate);
			editTextDesc = FindViewById<EditText> (Resource.Id.editTextDesc);
			editTextTotal = FindViewById<EditText> (Resource.Id.editTextTotal);
			adapterSpinnerTypeIncome = new ArrayAdapter (this, Android.Resource.Layout.SimpleSpinnerItem, bkManager.getIncomeAccounts());
			adapterSpinnerTypeExpense = new ArrayAdapter (this, Android.Resource.Layout.SimpleSpinnerItem, bkManager.getExpenseAccounts ());
			adapterSpinnerTypeMoney = new ArrayAdapter (this, Android.Resource.Layout.SimpleSpinnerItem, bkManager.getMoneyAccounts ());
			adapterSpinnerTaxRates = new ArrayAdapter (this, Android.Resource.Layout.SimpleSpinnerItem, bkManager.getTaxRates());
			spinnerWillNotShowToastWhenEnteringPage = 0;
			spinnerType.Adapter = adapterSpinnerTypeIncome;
			spinnerAccount.Adapter = adapterSpinnerTypeMoney;
			spinnerTax.Adapter = adapterSpinnerTaxRates;

			buttonAddEntry.Click += delegate {
				CreateEntry ();
			};

			radioButtonIncome.Click += delegate {
				spinnerWillNotShowToastWhenEnteringPage = 2;
				PushedRadioGroup();
			};

			radioButtonExpences.Click += delegate {
				spinnerWillNotShowToastWhenEnteringPage = 2;
				PushedRadioGroup();	
			};

			spinnerTax.ItemSelected += new EventHandler <AdapterView.ItemSelectedEventArgs> (SpinnerSelected);
			spinnerType.ItemSelected += new EventHandler <AdapterView.ItemSelectedEventArgs> (SpinnerSelected);
			spinnerAccount.ItemSelected += new EventHandler <AdapterView.ItemSelectedEventArgs> (SpinnerSelected);

		}
예제 #30
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);

            Zmienne.tbw = 0;
            Zmienne.wzrost = 0;
            Zmienne.waga = 0;
            Zmienne.wiek = 0;

            buttonDalej = FindViewById<Button>(Resource.Id.buttonDalej);
            radio_kob = FindViewById<RadioButton>(Resource.Id.radioButton1);
            radio_mez = FindViewById<RadioButton>(Resource.Id.radioButton2);
            editText1 = FindViewById<EditText>(Resource.Id.editText1);
            editText2 = FindViewById<EditText>(Resource.Id.editText2);
            editText3 = FindViewById<EditText>(Resource.Id.editText3);

            buttonDalej.Click += ButtonDalej_Click;
        }
        /// <summary>
        /// Fill all GreenshotControls with the values from the configuration
        /// </summary>
        protected void FillFields()
        {
            foreach (FieldInfo field in GetCachedFields(GetType()))
            {
                Object controlObject = field.GetValue(this);
                if (controlObject == null)
                {
                    continue;
                }
                IGreenshotConfigBindable configBindable = controlObject as IGreenshotConfigBindable;
                if (configBindable == null)
                {
                    continue;
                }
                if (!string.IsNullOrEmpty(configBindable.SectionName) && !string.IsNullOrEmpty(configBindable.PropertyName))
                {
                    IniSection section = IniConfig.GetIniSection(configBindable.SectionName);
                    if (section != null)
                    {
                        IniValue iniValue = null;
                        if (!section.Values.TryGetValue(configBindable.PropertyName, out iniValue))
                        {
                            LOG.WarnFormat("Wrong property '{0}' configured for field '{1}'", configBindable.PropertyName, field.Name);
                            continue;
                        }

                        CheckBox checkBox = controlObject as CheckBox;
                        if (checkBox != null)
                        {
                            checkBox.Checked = (bool)iniValue.Value;
                            checkBox.Enabled = !iniValue.IsFixed;
                            continue;
                        }
                        RadioButton radíoButton = controlObject as RadioButton;
                        if (radíoButton != null)
                        {
                            radíoButton.Checked = (bool)iniValue.Value;
                            radíoButton.Enabled = !iniValue.IsFixed;
                            continue;
                        }

                        TextBox textBox = controlObject as TextBox;
                        if (textBox != null)
                        {
                            textBox.Text    = iniValue.ToString();
                            textBox.Enabled = !iniValue.IsFixed;
                            continue;
                        }

                        GreenshotComboBox comboxBox = controlObject as GreenshotComboBox;
                        if (comboxBox != null)
                        {
                            comboxBox.Populate(iniValue.ValueType);
                            comboxBox.SetValue((Enum)iniValue.Value);
                            comboxBox.Enabled = !iniValue.IsFixed;
                            continue;
                        }
                    }
                }
            }
            OnFieldsFilled();
        }
예제 #32
0
 /// <summary>
 /// 获取单选按钮选中状态
 /// </summary>
 /// <param name="Ctrl"></param>
 /// <returns></returns>
 public static bool GetRadioButtonChecked(RadioButton Ctrl)
 {
     return(RadioButtonInvoke.GetRadioButtonChecked(Ctrl));
 }
예제 #33
0
 private void Tree_AfterSelect(object sender, TreeViewEventArgs e)
 {
     if (e.Node.Text == "Nupp-Button")
     {
         this.Controls.Add(btn);
     }
     else if (e.Node.Text == "Silt-Button")
     {
         this.Controls.Add(lbl);
     }
     else if (e.Node.Text == "CheckBox-Button")
     {
         boxbtn          = new CheckBox();
         boxbtn.Text     = "Näita nupp";
         boxbtn.Location = new Point(200, 30);
         this.Controls.Add(boxbtn);
         boxlbl          = new CheckBox();
         boxlbl.Text     = "Näita  silt";
         boxlbl.Location = new Point(200, 60);
         this.Controls.Add(boxlbl);
         boxbtn.CheckedChanged += Boxbtn_CheckedChanged;
         boxlbl.CheckedChanged += Boxlbl_CheckedChanged;
     }
     else if (e.Node.Text == "Radio-Button")
     {
         r1          = new RadioButton();
         r1.Text     = "Nupp Vasakule";
         r1.Location = new Point(300, 30);
         r2          = new RadioButton();
         r2.Text     = "Nupp Paremale";
         r2.Location = new Point(300, 70);
         this.Controls.Add(r1);
         this.Controls.Add(r2);
         r1.CheckedChanged += new EventHandler(R1_CheckedChanged);
         r2.CheckedChanged += new EventHandler(R1_CheckedChanged);
     }
     else if (e.Node.Text == "TextBox")
     {
         string text;
         try
         {
             text = File.ReadAllText("tekst.txt");
         }
         catch (FileNotFoundException)
         {
             text = "Tekst puudub";
         }
         txtbox           = new TextBox();
         txtbox.Multiline = true;
         txtbox.Text      = text;
         txtbox.Size      = new Size(200, 100);
         txtbox.Location  = new Point(150, 300);
         this.Controls.Add(txtbox);
     }
     else if (e.Node.Text == "PictureBox")
     {
         picture             = new PictureBox();
         picture.Image       = new Bitmap("smile.jpg");
         picture.Location    = new Point(450, 250);
         picture.Size        = new Size(200, 200);
         picture.SizeMode    = PictureBoxSizeMode.Zoom;
         picture.BorderStyle = BorderStyle.Fixed3D;
         this.Controls.Add(picture);
     }
     else if (e.Node.Text == "TabControl")
     {
         tabcontrol          = new TabControl();
         tabcontrol.Location = new Point(450, 10);
         tabcontrol.Size     = new Size(200, 100);
         page1 = new TabPage("Esimene");
         page2 = new TabPage("Teine");
         page3 = new TabPage("Kolmas");
         tabcontrol.Controls.Add(page1); //0
         tabcontrol.Controls.Add(page2); //1
         tabcontrol.Controls.Add(page3); //2
         Controls.Add(tabcontrol);
         Label lbl2 = new Label()
         {
             Text = "Esimene"
         };
         page1.Controls.Add(lbl2);
         Label lbl3 = new Label()
         {
             Text = "Teine"
         };
         page2.Controls.Add(lbl3);
         Label lbl4 = new Label()
         {
             Text = "Kolmas"
         };
         page3.Controls.Add(lbl4);
     }
     else if (e.Node.Text == "MessageBox")
     {
         MessageBox.Show("MessageBox", "Kõige lihtsam aken");
         var answer = MessageBox.Show("Tahad inputBoxi näha?", "Aken koos nupudega", MessageBoxButtons.YesNo);
         if (answer == DialogResult.Yes)
         {
             string text    = Interaction.InputBox("Sisesta siia mingi tekst", "InputBox", "Mingi tekst");
             var    answer2 = MessageBox.Show("Tahad salevesta tekst?", "Teksti salvestamine", MessageBoxButtons.OKCancel);
             if (answer2 == DialogResult.OK)
             {
                 lbl.Text = text;
                 Controls.Add(lbl);
             }
         }
     }
     else if (e.Node.Text == "ListBox")
     {
         lbox = new ListBox();
         string[] C = new string[] { "Kollane", "Punane", "Sinine", "Roheline" };
         foreach (var item in C)
         {
             lbox.Items.Add(item);
         }
         lbox.Location = new Point(700, 10);
         lbox.Height   = C.Length * 15;
         lbox.Width    = C[3].Length * 10;
         Controls.Add(lbox);
     }
     else if (e.Node.Text == "DataGridView")
     {
         dataset = new DataSet("Näide");
         dataset.ReadXml("..//File//excample.xml");
         DataGridView dgv = new DataGridView();
         dgv.Location            = new Point(450, 125);
         dgv.Width               = 250;
         dgv.Height              = 250;
         dgv.AutoGenerateColumns = true;
         dgv.DataMember          = "note";
         dgv.DataSource          = dataset;
         Controls.Add(dgv);
     }
     else if (e.Node.Text == "Menu")
     {
         MainMenu menu      = new MainMenu();
         MenuItem menuitem1 = new MenuItem("File");
         MenuItem menuitem2 = new MenuItem("My");
         menuitem1.MenuItems.Add("Exit", new EventHandler(menuitem1_Exit));
         menuitem2.MenuItems.Add("Clear all", new EventHandler(menuitem2_Clear_All));
         menu.MenuItems.Add(menuitem1);
         menu.MenuItems.Add(menuitem2);
         this.Menu = menu;
     }
 }
예제 #34
0
        void FncNextQuestion()
        {
            try
            {
                cnvMain.Children.Clear();
                currentQuestion = -1;

                for (int i = 0; i < lstQuestions.Count; i++)
                {
                    if (lstQuestions[i].Header == StartQuestion)
                    {
                        currentQuestion = i;
                        break;
                    }
                }

                if (currentQuestion == -1)
                {
                    goto exit;
                }

                Label lblHeader = new Label();
                lblHeader.Content = lstQuestions[currentQuestion].Header;
                lblHeader.Height  = 30;
                lblHeader.Width   = 600;
                lblHeader.SetValue(Canvas.LeftProperty, 10.0);
                lblHeader.SetValue(Canvas.TopProperty, 10.0);

                if (lstQuestions[currentQuestion].Type == TypeOfOptions.RadioButton)
                {
                    RadioButton[] rdo    = new RadioButton[lstQuestions[currentQuestion].NoOfOptions];
                    List <string> strOpt = lstQuestions[currentQuestion].Options;
                    for (int i = 0; i < lstQuestions[currentQuestion].NoOfOptions; i++)
                    {
                        rdo[i] = new RadioButton();
                        string[] str = strOpt[i].Split(new string[] { "*****" }, StringSplitOptions.None);
                        rdo[i].Content = str[0];
                        rdo[i].Tag     = str[1];
                        rdo[i].Height  = 25;
                        rdo[i].Width   = 600;
                        rdo[i].SetValue(Canvas.LeftProperty, 80.0);
                        rdo[i].SetValue(Canvas.TopProperty, 10.0 + ((i + 1) * 30));
                        cnvMain.Children.Add(rdo[i]);
                    }
                }

                else if (lstQuestions[currentQuestion].Type == TypeOfOptions.CheckBox)
                {
                    CheckBox[]    rdo    = new CheckBox[lstQuestions[currentQuestion].NoOfOptions];
                    List <string> strOpt = lstQuestions[currentQuestion].Options;
                    for (int i = 0; i < lstQuestions[currentQuestion].NoOfOptions; i++)
                    {
                        rdo[i] = new CheckBox();
                        string[] str = strOpt[i].Split(new string[] { "*****" }, StringSplitOptions.None);
                        rdo[i].Content = str[0];
                        rdo[i].Tag     = str[1];
                        rdo[i].Height  = 25;
                        rdo[i].Width   = 600;
                        rdo[i].SetValue(Canvas.LeftProperty, 80.0);
                        rdo[i].SetValue(Canvas.TopProperty, 10.0 + ((i + 1) * 30));
                        cnvMain.Children.Add(rdo[i]);
                    }
                }

                else if (lstQuestions[currentQuestion].Type == TypeOfOptions.ListBox)
                {
                    ListBox lst = new ListBox();
                    lst.Height = 250;
                    lst.Width  = 250;
                    lst.SetValue(Canvas.LeftProperty, 80.0);
                    lst.SetValue(Canvas.TopProperty, 80.0);
                    cnvMain.Children.Add(lst);
                    ListBoxItem[] lbi    = new ListBoxItem[lstQuestions[currentQuestion].NoOfOptions];
                    List <string> strOpt = lstQuestions[currentQuestion].Options;
                    for (int i = 0; i < lstQuestions[currentQuestion].NoOfOptions; i++)
                    {
                        lbi[i] = new ListBoxItem();
                        string[] str = strOpt[i].Split(new string[] { "*****" }, StringSplitOptions.None);
                        lbi[i].Content = str[0];
                        lbi[i].Tag     = str[1];
                        lst.Items.Add(lbi[i]);
                    }
                }

                else if (lstQuestions[currentQuestion].Type == TypeOfOptions.ComboBox)
                {
                    ComboBox cmb = new ComboBox();
                    cmb.Height = 30;
                    cmb.Width  = 250;
                    cmb.SetValue(Canvas.LeftProperty, 80.0);
                    cmb.SetValue(Canvas.TopProperty, 80.0);
                    cnvMain.Children.Add(cmb);
                    ComboBoxItem[] cbi    = new ComboBoxItem[lstQuestions[currentQuestion].NoOfOptions];
                    List <string>  strOpt = lstQuestions[currentQuestion].Options;
                    for (int i = 0; i < lstQuestions[currentQuestion].NoOfOptions; i++)
                    {
                        cbi[i] = new ComboBoxItem();
                        string[] str = strOpt[i].Split(new string[] { "*****" }, StringSplitOptions.None);
                        cbi[i].Content = str[0];
                        cbi[i].Tag     = str[1];
                        cmb.Items.Add(cbi[i]);
                    }
                }

                else if (lstQuestions[currentQuestion].Type == TypeOfOptions.TextBox)
                {
                    Label[]       lbl    = new Label[lstQuestions[currentQuestion].NoOfOptions];
                    TextBox[]     txt    = new TextBox[lstQuestions[currentQuestion].NoOfOptions];
                    List <string> strOpt = lstQuestions[currentQuestion].Options;
                    for (int i = 0; i < lstQuestions[currentQuestion].NoOfOptions; i++)
                    {
                        lbl[i] = new Label();
                        string[] str = strOpt[i].Split(new string[] { "*****" }, StringSplitOptions.None);
                        lbl[i].Content = str[0];
                        lbl[i].Height  = 25;
                        lbl[i].Width   = 600;
                        lbl[i].SetValue(Canvas.LeftProperty, 80.0);
                        lbl[i].SetValue(Canvas.TopProperty, 10.0 + ((i + 1) * 30));
                        cnvMain.Children.Add(lbl[i]);

                        txt[i] = new TextBox();

                        //string[] str = strOpt[i].Split(new string[] { "*****" }, StringSplitOptions.None);
                        txt[i].Text = str[0];
                        txt[i].Tag  = str[1];

                        txt[i].Height = 25;
                        txt[i].Width  = 400;
                        txt[i].SetValue(Canvas.LeftProperty, 280.0);
                        txt[i].SetValue(Canvas.TopProperty, 10.0 + ((i + 1) * 30));
                        cnvMain.Children.Add(txt[i]);
                    }
                }


                cnvMain.Children.Add(lblHeader);
                currentQuestion++;
                exit :;
            }
            catch (Exception exp)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(exp, "FncNextQuestion()", "ctlQuestion.xaml.cs");
            }
        }
        private static GuiWidget CreateSelector(SelectedChildren childSelector, IObject3D parent, ThemeConfig theme)
        {
            GuiWidget tabContainer = new FlowLayoutWidget(FlowDirection.TopToBottom);

            void UpdateSelectColors(bool selectionChanged = false)
            {
                foreach (var child in parent.Children.ToList())
                {
                    using (child.RebuildLock())
                    {
                        if (selectionChanged)
                        {
                            child.Visible = true;
                        }
                    }
                }
            }

            tabContainer.Closed += (s, e) => UpdateSelectColors();

            var children = parent.Children.ToList();

            Dictionary <ICheckbox, IObject3D> objectChecks = new Dictionary <ICheckbox, IObject3D>();

            List <GuiWidget> radioSiblings = new List <GuiWidget>();

            for (int i = 0; i < children.Count; i++)
            {
                var itemIndex = i;
                var child     = children[itemIndex];
                FlowLayoutWidget rowContainer = new FlowLayoutWidget();

                GuiWidget selectWidget;
                if (children.Count == 2)
                {
                    var radioButton = new RadioButton(string.IsNullOrWhiteSpace(child.Name) ? $"{itemIndex}" : $"{child.Name}")
                    {
                        Checked   = childSelector.Contains(child.ID),
                        TextColor = theme.TextColor
                    };
                    radioSiblings.Add(radioButton);
                    radioButton.SiblingRadioButtonList = radioSiblings;
                    selectWidget = radioButton;
                }
                else
                {
                    selectWidget = new CheckBox(string.IsNullOrWhiteSpace(child.Name) ? $"{itemIndex}" : $"{child.Name}")
                    {
                        Checked   = childSelector.Contains(child.ID),
                        TextColor = theme.TextColor
                    };
                }

                objectChecks.Add((ICheckbox)selectWidget, child);

                rowContainer.AddChild(selectWidget);
                ICheckbox checkBox = selectWidget as ICheckbox;

                checkBox.CheckedStateChanged += (s, e) =>
                {
                    if (s is ICheckbox checkbox)
                    {
                        if (checkBox.Checked)
                        {
                            if (!childSelector.Contains(objectChecks[checkbox].ID))
                            {
                                childSelector.Add(objectChecks[checkbox].ID);
                            }
                        }
                        else
                        {
                            if (childSelector.Contains(objectChecks[checkbox].ID))
                            {
                                childSelector.Remove(objectChecks[checkbox].ID);
                            }
                        }

                        if (parent is MeshWrapperObject3D meshWrapper)
                        {
                            using (meshWrapper.RebuildLock())
                            {
                                meshWrapper.ResetMeshWrapperMeshes(Object3DPropertyFlags.All, CancellationToken.None);
                            }
                        }

                        UpdateSelectColors(true);
                    }
                };

                tabContainer.AddChild(rowContainer);
                UpdateSelectColors();
            }

            return(tabContainer);
        }
        private void _ListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            splSelectedTest.Children.Clear();
            selectedTest = _ListView.SelectedItem as Test;
            if (selectedTest != null)
            {
                using (var db = new DbModel())
                {
                    int i = 0;
                    //var query = from t in db.Tests
                    //            join q in db.Questions on t.ID equals q.TestFk
                    //            join a in db.Answers on q.ID equals a.QuestionFk
                    //            where t.ID == test.ID
                    //            select new { QuestionText = q.Name, QuestionType = q.QuestionType, Answer = a.Text };
                    foreach (var item in db.Questions.ToList())
                    {
                        if (item.TestFk == selectedTest.ID)
                        {
                            i++;
                            TextBlock txtBlock = new TextBlock();
                            txtBlock.Text = "Fråga " + i;
                            splSelectedTest.Children.Add(txtBlock);
                            TextBlock txt = new TextBlock();
                            txt.Text = item.Name;
                            if (!String.IsNullOrEmpty(item.AppData))
                            {
                                Image       imgQuestion = new Image();
                                string      imgPath     = item.AppData;
                                Uri         imgUri      = new Uri(imgPath);
                                BitmapImage imgBitMap   = new BitmapImage(imgUri);
                                imgQuestion.Source    = imgBitMap;
                                imgQuestion.MaxHeight = 200;
                                imgQuestion.MaxWidth  = 200;
                                splSelectedTest.Children.Add(imgQuestion);
                            }
                            splSelectedTest.Children.Add(txt);

                            foreach (var a in db.Answers.ToList())
                            {
                                if (a.QuestionFk == item.ID)
                                {
                                    switch (item.QuestionType)
                                    {
                                    case "envalsfråga":
                                        RadioButton ans = new RadioButton();
                                        ans.Content = a.Text;
                                        splSelectedTest.Children.Add(ans);
                                        break;

                                    case "Flervalsfråga":
                                        CheckBox ans2 = new CheckBox();
                                        ans2.Content = a.Text;
                                        splSelectedTest.Children.Add(ans2);
                                        break;

                                    case "rangordning":
                                        TextBlock ans3 = new TextBlock();
                                        ans3.Text = a.Text;
                                        splSelectedTest.Children.Add(ans3);
                                        break;

                                    default:
                                        break;
                                    }
                                }
                            }
                        }
                    }

                    Button     sendbtn            = new Button();
                    Button     sendBackbtn        = new Button();
                    StackPanel splSendTestControl = new StackPanel();
                    splSendTestControl.Orientation = Orientation.Horizontal;
                    sendbtn.Content     = "Skicka till studenter";
                    sendBackbtn.Content = "Skicka till lärare";
                    splSendTestControl.Children.Add(sendbtn);
                    splSendTestControl.Children.Add(sendBackbtn);
                    splSelectedTest.Children.Add(splSendTestControl);
                    sendbtn.Click     += Sendbtn_Click;
                    sendBackbtn.Click += SendBackbtn_Click;
                }
            }
        }
예제 #37
0
        //public MenuItem MenuAddGame { get; set; }
        /// <summary>
        /// create menu and menuitens
        /// </summary>
        public void CreatTopMenu()
        {
            Menu.Items.Clear();

            // Menu language
            MenuLanguage = new MenuItem()
            {
                Header  = ((MainWindow)Application.Current.MainWindow).Resources.MergedDictionaries[0]["L"].ToString(),
                ToolTip = ((MainWindow)Application.Current.MainWindow).Resources.MergedDictionaries[0]["MenuLanguageToolTip"].ToString()
            };
            foreach (TemplateLang i in Clanguage.Langs)
            {
                MenuItem temp = new MenuItem()
                {
                    Header = i.Lang,
                };
                MenuLanguage.Items.Add(temp);
                temp.Click += delegate { MnuItemClick(temp); };
            }
            Menu.Items.Add(MenuLanguage);

            // Menu select server
            MenuConnect = new MenuItem()
            {
                Header  = ((MainWindow)Application.Current.MainWindow).Resources.MergedDictionaries[0]["ChannelUi"].ToString(),
                ToolTip = ((MainWindow)Application.Current.MainWindow).Resources.MergedDictionaries[0]["MenuConnectToolTip"].ToString()
            };

            foreach (string i in SqliteSource.EnumServersDataBase())
            {
                // listar server e criar submenu
                RadioButton mnuChan = new RadioButton()
                {
                    Content = i.ToString()
                };
                MenuConnect.Items.Add(mnuChan);
                mnuChan.Click += delegate { MnuChanClick(i); };

                // check last channel radiobuttons
                if (i == Configuration.StConfiguration.Server)
                {
                    mnuChan.IsChecked = true;
                }
            }

            Menu.Items.Add(MenuConnect);

            // Menu channels irc listed database
            MenuChannels = new MenuItem()
            {
                Header  = ((MainWindow)Application.Current.MainWindow).Resources.MergedDictionaries[0]["MenuChannels"].ToString(),
                ToolTip = ((MainWindow)Application.Current.MainWindow).Resources.MergedDictionaries[0]["MenuChannelsToolTip"].ToString()
            };

            // list channels in database
            foreach (string i in SqliteSource.EnumChannelsDataBase())
            {
                MenuItem del = new MenuItem()
                {
                    Header = ((MainWindow)Application.Current.MainWindow).Resources.MergedDictionaries[0]["Mnuitemdelete"].ToString()
                };
                ContextMenu c = new ContextMenu();
                c.Items.Add(del);

                MenuItem temp = new MenuItem()
                {
                    Header      = i.ToString(),
                    ContextMenu = c
                };

                MenuChannels.Items.Add(temp);
                temp.Click += delegate { MnuMyChannels(i); };

                del.Click += delegate { MnudelClick(i); };
            }
            Menu.Items.Add(MenuChannels);

            // menu draw message in game
            MenuGames = new MenuItem()
            {
                Header  = ((MainWindow)Application.Current.MainWindow).Resources.MergedDictionaries[0]["MenuGames"].ToString(),
                ToolTip = ((MainWindow)Application.Current.MainWindow).Resources.MergedDictionaries[0]["MenuGamesToolTip"].ToString()
            };

            Game.EnumGamesIn();

            // list game(s) add menu
            foreach (Games i in Game.GamesAvailable)
            {
                MenuItem gdel = new MenuItem()
                {
                    Header = ((MainWindow)Application.Current.MainWindow).Resources.MergedDictionaries[0]["Mnuitemdelete"].ToString()
                };
                ContextMenu gc = new ContextMenu();
                gc.Items.Add(gdel);
                gdel.Click += delegate { MnuGameDel(i.Name); };

                CheckBox temp = new CheckBox()
                {
                    Content = i.Name,
                    //IsChecked = i.IsEnabled
                    ContextMenu = gc
                };


                _enumBoxsGames.Add(temp);
                // get last status game in database
                //foreach (Games g in SqliteSource.EnumGamesSaved())
                //{
                //    // check name and compare
                //    if (i.Name == g.Name && g.IsEnabled)
                //    {
                //        temp.IsChecked = true;
                //    }
                //}


                MenuGames.Items.Add(temp);
                temp.Click += delegate { MnuGameClick(temp); };
            }
            Menu.Items.Add(MenuGames);

            // MenuUsers
            MenuUsers = new MenuItem()
            {
                Header  = ((MainWindow)Application.Current.MainWindow).Resources.MergedDictionaries[0]["MenuUsers"].ToString(),
                ToolTip = ((MainWindow)Application.Current.MainWindow).Resources.MergedDictionaries[0]["MenuUsersToolTip"].ToString()
            };



            // get list
            foreach (TemplateMyUsersDataBase i in SqliteSource.GetListMyUsersDataBase())
            {
                MenuItem udel = new MenuItem()
                {
                    Header = ((MainWindow)Application.Current.MainWindow).Resources.MergedDictionaries[0]["Mnuitemdelete"].ToString()
                };
                ContextMenu uc = new ContextMenu();
                uc.Items.Add(udel);

                RadioButton temp = new RadioButton()
                {
                    Content     = i.User,
                    ContextMenu = uc
                };
                MenuUsers.Items.Add(temp);
                temp.Click += delegate { MenuUsersClick(temp); };
                udel.Click += delegate { MnuUserdel(i.User); };
            }

            // add in menu
            Menu.Items.Add(MenuUsers);

            MenuClose = new MenuItem()
            {
                Header     = ((MainWindow)Application.Current.MainWindow).Resources.MergedDictionaries[0]["MenuClose"].ToString(),
                ToolTip    = ((MainWindow)Application.Current.MainWindow).Resources.MergedDictionaries[0]["MenuCloseToolTip"].ToString(),
                Visibility = Visibility.Collapsed
            };
            MenuClose.Click += delegate { MenuCloseClick(); };
            Menu.Items.Add(MenuClose);

            // menuflood

            MenuFlood = new MenuItem()
            {
                Header  = ((MainWindow)Application.Current.MainWindow).Resources.MergedDictionaries[0]["MenuFlood"].ToString(),
                ToolTip = ((MainWindow)Application.Current.MainWindow).Resources.MergedDictionaries[0]["MenuFloodToolTip"].ToString(),
            };

            CheckBox mnufl = new CheckBox()
            {
                Content = ((MainWindow)Application.Current.MainWindow).Resources.MergedDictionaries[0]["MenuCheckBoxFlood"].ToString(),
            };

            mnufl.Click += delegate { mnufl_onclick(mnufl); };

            ComboBox mnuflc = new ComboBox();

            // 5 -> 10 messagens
            for (int i = 5; i < 11; i++)
            {
                mnuflc.Items.Add(i);
            }
            mnuflc.DropDownClosed += delegate { mnuflc_changed(mnuflc); };

            MenuFlood.Items.Add(mnufl);
            MenuFlood.Items.Add(mnuflc);

            Menu.Items.Add(MenuFlood);

            // Ajude Projeto Shamia
            MenuHelpShamia = new MenuItem()
            {
                Header = ((MainWindow)Application.Current.MainWindow).Resources.MergedDictionaries[0]["MenuHelpShamia"].ToString(),
            };
            MenuHelpShamia.Click += delegate { MenuHelpShamia_Click(); };

            Menu.Items.Add(MenuHelpShamia);

            //// adcionar jogo
            //MenuAddGame = new MenuItem()
            //{
            //    Header = ((MainWindow)Application.Current.MainWindow).Resources.MergedDictionaries[0]["MenuAddGame"].ToString(),
            //};
            //MenuAddGame.Click += delegate { MenuAddgame_click(); };

            //Menu.Items.Add(MenuAddGame);
        }
예제 #38
0
파일: B_3d.aspx.cs 프로젝트: nitroxyu/ypscs
    private void SaveData()
    {
        CheckInput();
        if (this.PopupMessage1.Length == 0)
        {
            YPSCS.Class.Survey sv = new YPSCS.Class.Survey();
            if (Session["svid"] != null || !String.IsNullOrEmpty(Session["svid"].ToString()))
            {
                sv.ID = Session["svid"].ToString();
            }

            DataTable dt = new DataTable();
            dt.Columns.Add("seq");
            dt.Columns.Add("ans");

            #region CheckBox

            DataRow[] drc = dtq.Select("type='C'");

            for (int x = 0; x < drc.Length; x++)
            {
                CheckBox cb = Panel_Ans.FindControl("Q" + drc[x]["seq"].ToString()) as CheckBox;
                if (cb != null && cb.Checked)
                {
                    AddItem(ref dt, drc[x]["seq"].ToString(), "1");
                }
            }


            #endregion

            #region DropDownList

            DataRow[] drd = dtq.Select("type='D'");

            for (int x = 0; x < drd.Length; x++)
            {
                DropDownList ddl = Panel_Ans.FindControl("Q" + drd[x]["seq"].ToString()) as DropDownList;
                if (ddl != null && !String.IsNullOrEmpty(ddl.SelectedValue))
                {
                    AddItem(ref dt, drd[x]["seq"].ToString(), ddl.Text);
                }
            }

            #endregion

            #region Text

            DataRow[] drt = dtq.Select("type='T'");

            for (int x = 0; x < drt.Length; x++)
            {
                TextBox tb = Panel_Ans.FindControl("Q" + drt[x]["seq"].ToString()) as TextBox;
                if (tb != null && !String.IsNullOrEmpty(tb.Text))
                {
                    AddItem(ref dt, drt[x]["seq"].ToString(), tb.Text);
                }
            }

            #endregion

            #region Radio

            DataRow[] drr = dtq.Select("type='R'");

            for (int x = 0; x < drr.Length; x++)
            {
                for (int y = 0; y < 10; y++)
                {
                    RadioButton rb = Panel_Ans.FindControl("Q" + drr[x]["seq"].ToString() + "_" + y.ToString()) as RadioButton;
                    if (rb != null && rb.Checked)
                    {
                        AddItem(ref dt, drr[x]["seq"].ToString(), y.ToString());
                        break;
                    }
                }
            }

            #endregion

            sv.SurveyData = dt;
            sv.SaveDetail(seqs, seqe);
        }
    }
예제 #39
0
파일: B_3d.aspx.cs 프로젝트: nitroxyu/ypscs
    private void LoadData()
    {
        if (Session["svid"] != null)
        {
            YPSCS.Class.Survey sv = new YPSCS.Class.Survey();
            if (sv.Load(Session["svid"].ToString(), ""))
            {
                #region Load Data

                DataRow[] drs = sv.SurveyData.Select("seq>='" + seqs.ToString() + "' AND seq<='" + seqe.ToString() + "'");
                DataRow[] drc = dtq.Select("type='C'");
                DataRow[] drd = dtq.Select("type='D'");
                DataRow[] drt = dtq.Select("type='T'");
                DataRow[] drr = dtq.Select("type='R'");

                for (int x = 0; x < drs.Length; x++)
                {
                    #region Items

                    for (int y = 0; y < drc.Length; y++)
                    {
                        if (drs[x]["seq"].ToString() == drc[y]["seq"].ToString())
                        {
                            CheckBox cb = Panel_Ans.FindControl("Q" + drc[y]["seq"].ToString()) as CheckBox;
                            if (cb != null && drs[x]["ans"].ToString() == "1")
                            {
                                cb.Checked = true;
                            }
                        }
                    }
                    for (int y = 0; y < drd.Length; y++)
                    {
                        if (drs[x]["seq"].ToString() == drd[y]["seq"].ToString())
                        {
                            DropDownList ddl = Panel_Ans.FindControl("Q" + drd[y]["seq"].ToString()) as DropDownList;
                            if (ddl != null)
                            {
                                ddl.SelectedValue = drs[x]["ans"].ToString();
                            }
                            break;
                        }
                    }
                    for (int y = 0; y < drt.Length; y++)
                    {
                        if (drs[x]["seq"].ToString() == drt[y]["seq"].ToString())
                        {
                            TextBox tb = Panel_Ans.FindControl("Q" + drt[y]["seq"].ToString()) as TextBox;
                            if (tb != null)
                            {
                                tb.Text = drs[x]["ans"].ToString();
                            }
                            break;
                        }
                    }
                    for (int y = 0; y < drr.Length; y++)
                    {
                        if (drs[x]["seq"].ToString() == drr[y]["seq"].ToString())
                        {
                            RadioButton rb = Panel_Ans.FindControl("Q" + drr[y]["seq"].ToString() + "_" + drs[x]["ans"].ToString()) as RadioButton;
                            if (rb != null)
                            {
                                rb.Checked = true;
                            }
                            break;
                        }
                    }

                    #endregion
                }

                #endregion
            }
        }
    }
예제 #40
0
파일: Punter.cs 프로젝트: sahil670/CockRace
 internal void SetPunter(object p, RadioButton AliRadioButton, Label AliBetLabel)
 {
     throw new NotImplementedException();
 }
예제 #41
0
        private void Music_Handler(object sender, RoutedEventArgs e)
        {
            RadioButton cb = (RadioButton)sender;

            Model.Music_Handler(cb.Tag, cb.IsChecked);
        }
예제 #42
0
 public static int AutoFitSystemRadioButton(RadioButton button, int minWidth, int maxWidth)
 {
     Debug.Assert(button.FlatStyle == FlatStyle.System, "AutoFitSystemRadioButton only works on radio buttons with FlatStyle.System; " + button.Name + " is " + button.FlatStyle);
     return(FitText(button, button.Text, (int)Math.Ceiling(ScaleX(22)), minWidth, maxWidth));
 }
 protected override void InitializeViews()
 {
     durationFormatTextView = ItemView.FindViewById <TextView>(Resource.Id.SelectableDurationFormatTextView);
     selectedButton         = ItemView.FindViewById <RadioButton>(Resource.Id.SelectableDurationFormatRadioButton);
 }
예제 #44
0
 void RadioButtonOnClick(object obj, EventArgs ea)
 {
     radioChecked = (RadioButton)obj;
     panelDisplay.Invalidate();
 }
예제 #45
0
        private void radioButton_CheckedChanged(object sender, EventArgs e)
        {
            RadioButton checkedRadioButton = sender as RadioButton;

            _checkedRadioButton = int.Parse(checkedRadioButton.Tag.ToString());
        }
        private void RadioButtonClick(object sender, EventArgs e)
        {
            RadioButton rb = (RadioButton)sender;

            Toast.MakeText(this, rb.Text, ToastLength.Short).Show();
        }
        private static GuiWidget CreateSourceChildSelector(SelectedChildren childSelector, OperationSourceContainerObject3D sourceCantainer, ThemeConfig theme)
        {
            GuiWidget tabContainer = new FlowLayoutWidget(FlowDirection.TopToBottom);

            var sourceChildren = sourceCantainer.SourceContainer.VisibleMeshes().ToList();

            var objectChecks = new Dictionary <ICheckbox, IObject3D>();

            var radioSiblings = new List <GuiWidget>();

            for (int i = 0; i < sourceChildren.Count; i++)
            {
                var itemIndex    = i;
                var child        = sourceChildren[itemIndex];
                var rowContainer = new FlowLayoutWidget();

                GuiWidget selectWidget;
                if (sourceChildren.Count == 2)
                {
                    var radioButton = new RadioButton(string.IsNullOrWhiteSpace(child.Name) ? $"{itemIndex}" : $"{child.Name}")
                    {
                        Checked   = childSelector.Contains(child.Name),
                        TextColor = theme.TextColor
                    };
                    radioSiblings.Add(radioButton);
                    radioButton.SiblingRadioButtonList = radioSiblings;
                    selectWidget = radioButton;
                }
                else
                {
                    selectWidget = new CheckBox(string.IsNullOrWhiteSpace(child.Name) ? $"{itemIndex}" : $"{child.Name}")
                    {
                        Checked   = childSelector.Contains(child.Name),
                        TextColor = theme.TextColor
                    };
                }

                objectChecks.Add((ICheckbox)selectWidget, child);

                rowContainer.AddChild(selectWidget);
                var checkBox = selectWidget as ICheckbox;

                checkBox.CheckedStateChanged += (s, e) =>
                {
                    if (s is ICheckbox checkbox)
                    {
                        if (checkBox.Checked)
                        {
                            if (!childSelector.Contains(objectChecks[checkbox].Name))
                            {
                                childSelector.Add(objectChecks[checkbox].Name);
                            }
                        }
                        else
                        {
                            if (childSelector.Contains(objectChecks[checkbox].Name))
                            {
                                childSelector.Remove(objectChecks[checkbox].Name);
                            }
                        }
                    }
                };

                tabContainer.AddChild(rowContainer);
            }

            return(tabContainer);
        }
예제 #48
0
 public void Include(RadioButton radioButton)
 {
     radioButton.CheckedChange += (sender, args) => radioButton.Checked = !radioButton.Checked;
 }
예제 #49
0
파일: JumperApp.cs 프로젝트: Tossynn/CSharp
    private void InitializeComponents()
    {
        this.SuspendLayout();

        this.maintextLabel           = new Label();
        this.maintextLabel.Text      = "Choose The Type  of MessageBox You Would Like to Display";
        this.maintextLabel.Location  = new Point(20, 10);
        this.maintextLabel.Size      = new Size(900, 50);
        this.maintextLabel.ForeColor = System.Drawing.SystemColors.HotTrack;
        this.maintextLabel.Font      = new System.Drawing.Font("Calibri", 19.39F, FontStyle.Bold);

        this.radioButton1           = new RadioButton();
        this.radioButton1.Text      = "OK";
        this.radioButton1.Location  = new Point(15, 40);
        this.radioButton1.Size      = new Size(49, 20);
        this.radioButton1.ForeColor = System.Drawing.SystemColors.GrayText;
        this.radioButton1.Font      = new System.Drawing.Font("Microsoft Sans Serif", 10.21F);
        this.radioButton1.Click    += new System.EventHandler(this.OkButton_Click);
        this.radioButton1.Click    += new System.EventHandler(this.buttonTypeCheckedChange);

        this.radioButton2           = new RadioButton();
        this.radioButton2.Text      = "OkCancel";
        this.radioButton2.Location  = new Point(15, 80);
        this.radioButton2.Size      = new Size(90, 20);
        this.radioButton2.ForeColor = System.Drawing.SystemColors.GrayText;
        this.radioButton2.Font      = new System.Drawing.Font("Microsoft Sans Serif", 10.56F);
        this.radioButton2.Click    += new System.EventHandler(this.OkCancelButton_Click);
        this.radioButton2.Click    += new System.EventHandler(this.buttonTypeCheckedChange);

        this.radioButton3           = new RadioButton();
        this.radioButton3.Text      = "AbortRetryIgnore";
        this.radioButton3.Location  = new Point(15, 120);
        this.radioButton3.Size      = new Size(150, 20);
        this.radioButton3.ForeColor = System.Drawing.SystemColors.GrayText;
        this.radioButton3.Font      = new System.Drawing.Font("Microsoft Sans Serif", 10.56F);
        this.radioButton3.Click    += new System.EventHandler(this.AbortRetryIgnoreButton_Click);
        this.radioButton3.Click    += new System.EventHandler(this.buttonTypeCheckedChange);

        this.radioButton4           = new RadioButton();
        this.radioButton4.Text      = "YesNoCancel";
        this.radioButton4.Location  = new Point(15, 160);
        this.radioButton4.Size      = new Size(140, 20);
        this.radioButton4.ForeColor = System.Drawing.SystemColors.GrayText;
        this.radioButton4.Font      = new System.Drawing.Font("Microsoft Sans Serif", 10.56F);
        this.radioButton4.Click    += new System.EventHandler(this.YesNoCancelButton_Click);
        this.radioButton4.Click    += new System.EventHandler(this.buttonTypeCheckedChange);

        this.radioButton5           = new RadioButton();
        this.radioButton5.Text      = "YesNo";
        this.radioButton5.Location  = new Point(15, 200);
        this.radioButton5.Size      = new Size(90, 20);
        this.radioButton5.ForeColor = System.Drawing.SystemColors.GrayText;
        this.radioButton5.Font      = new System.Drawing.Font("Microsoft Sans Serif", 10.56F);
        this.radioButton5.Click    += new System.EventHandler(this.YesNoButton_Click);
        this.radioButton5.Click    += new System.EventHandler(this.buttonTypeCheckedChange);

        this.radioButton6           = new RadioButton();
        this.radioButton6.Text      = "RetryCancel";
        this.radioButton6.Location  = new Point(15, 240);
        this.radioButton6.Size      = new Size(105, 20);
        this.radioButton6.ForeColor = System.Drawing.SystemColors.GrayText;
        this.radioButton6.Font      = new System.Drawing.Font("Microsoft Sans Serif", 10.56F);
        this.radioButton6.Click    += new System.EventHandler(this.RetryCancelButton_Click);
        this.radioButton6.Click    += new System.EventHandler(this.buttonTypeCheckedChange);

        this.buttontypeGroupBox          = new GroupBox();
        this.buttontypeGroupBox.Text     = "Button Types";
        this.buttontypeGroupBox.Location = new Point(15, 70);
        this.buttontypeGroupBox.Size     = new Size(280, 300);
        this.buttontypeGroupBox.Font     = new System.Drawing.Font("Microsoft Sans Serif", 11F);
        this.buttontypeGroupBox.Controls.AddRange(new Control[] { this.radioButton1, this.radioButton2, this.radioButton3, this.radioButton4, this.radioButton5, this.radioButton6 });

        this.radioButton11           = new RadioButton();
        this.radioButton11.Text      = "Error";
        this.radioButton11.Location  = new Point(15, 40);
        this.radioButton11.Size      = new Size(70, 20);
        this.radioButton11.ForeColor = System.Drawing.Color.Sienna;
        this.radioButton11.Font      = new System.Drawing.Font("Microsoft Sans Serif", 10.56F);
        this.radioButton11.Click    += new System.EventHandler(this.iconTypeCheckedChange);

        this.radioButton12           = new RadioButton();
        this.radioButton12.Text      = "Exclamation";
        this.radioButton12.Location  = new Point(15, 80);
        this.radioButton12.Size      = new Size(110, 20);
        this.radioButton12.ForeColor = System.Drawing.Color.Sienna;
        this.radioButton12.Font      = new System.Drawing.Font("Microsoft Sans Serif", 10.56F);
        this.radioButton12.Click    += new System.EventHandler(this.iconTypeCheckedChange);

        this.radioButton13           = new RadioButton();
        this.radioButton13.Text      = "Question";
        this.radioButton13.Location  = new Point(15, 120);
        this.radioButton13.Size      = new Size(100, 20);
        this.radioButton13.ForeColor = System.Drawing.Color.Sienna;
        this.radioButton13.Font      = new System.Drawing.Font("Microsoft Sans Serif", 10.56F);
        this.radioButton13.Click    += new System.EventHandler(this.iconTypeCheckedChange);

        this.radioButton14           = new RadioButton();
        this.radioButton14.Text      = "Information";
        this.radioButton14.Location  = new Point(15, 160);
        this.radioButton14.Size      = new Size(120, 20);
        this.radioButton14.ForeColor = System.Drawing.Color.Sienna;
        this.radioButton14.Font      = new System.Drawing.Font("Microsoft Sans Serif", 10.56F);
        this.radioButton14.Click    += new System.EventHandler(this.iconTypeCheckedChange);

        this.iconGroupBox          = new GroupBox();
        this.iconGroupBox.Text     = "Icon";
        this.iconGroupBox.Location = new Point(345, 70);
        this.iconGroupBox.Size     = new Size(280, 220);
        this.iconGroupBox.Font     = new System.Drawing.Font("Microsoft Sans Serif", 11F);
        this.iconGroupBox.Controls.AddRange(new Control[] { this.radioButton11, this.radioButton12, this.radioButton13, this.radioButton14 });

        this.displayButton          = new Button();
        this.displayButton.Text     = "Display";
        this.displayButton.Location = new Point(10, 10);
        this.displayButton.Size     = new Size(260, 40);
        this.displayButton.Font     = new System.Drawing.Font("Lucida Console", 12F, FontStyle.Bold);
        this.displayButton.Click   += new System.EventHandler(this.displayButton_Click);

        this.subtextLabel = new Label();
        //this.subtextLabel.Text = "Button Clicked";
        this.subtextLabel.Location  = new Point(0, 55);
        this.subtextLabel.Size      = new Size(286, 40);
        this.subtextLabel.Font      = new System.Drawing.Font("Candara", 13F);
        this.subtextLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;

        this.displayPanel             = new Panel();
        this.displayPanel.Location    = new Point(345, 310);
        this.displayPanel.Size        = new Size(280, 90);
        this.displayPanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
        this.displayPanel.Controls.AddRange(new Control[] { this.displayButton, this.subtextLabel });

        this.Text       = "Sorcery101";
        this.ClientSize = new System.Drawing.Size(700, 450);
        this.Controls.Add(this.buttontypeGroupBox);
        //this.Controls.Add(this.radioButton1);
        //this.Controls.Add(this.radioButton2);
        //this.Controls.Add(this.radioButton3);
        //this.Controls.Add(this.radioButton4);
        //this.Controls.Add(this.radioButton5);
        //this.Controls.Add(this.radioButton6);
        //this.Controls.Add(this.radioButton11);
        //this.Controls.Add(this.radioButton12);
        //this.Controls.Add(this.radioButton13);
        //this.Controls.Add(this.radioButton14);
        this.Controls.Add(this.maintextLabel);
        this.Controls.Add(this.iconGroupBox);
        //this.Controls.Add(this.displayButton);
        //this.Controls.Add(this.subtextLabel);
        this.Controls.Add(this.displayPanel);
        this.ResumeLayout(false);
    }
예제 #50
0
            private void InitializeComponent()
            {
                ComponentResourceManager resources = new ComponentResourceManager(typeof(BinaryEditor));

                _byteViewer   = new ByteViewer();
                _buttonOK     = new Button();
                _buttonSave   = new Button();
                _groupBoxMode = new GroupBox();
                _radioButtonsTableLayoutPanel = new TableLayoutPanel();
                _radioUnicode                = new RadioButton();
                _radioAuto                   = new RadioButton();
                _radioAnsi                   = new RadioButton();
                _radioHex                    = new RadioButton();
                _okSaveTableLayoutPanel      = new TableLayoutPanel();
                _overarchingTableLayoutPanel = new TableLayoutPanel();
                _byteViewer.SuspendLayout();
                _groupBoxMode.SuspendLayout();
                _radioButtonsTableLayoutPanel.SuspendLayout();
                _okSaveTableLayoutPanel.SuspendLayout();
                _overarchingTableLayoutPanel.SuspendLayout();
                SuspendLayout();

                //
                // byteViewer
                //
                resources.ApplyResources(_byteViewer, "byteViewer");
                _byteViewer.SetDisplayMode(DisplayMode.Auto);
                _byteViewer.Name   = "byteViewer";
                _byteViewer.Margin = Padding.Empty;
                _byteViewer.Dock   = DockStyle.Fill;
                //
                // buttonOK
                //
                resources.ApplyResources(_buttonOK, "buttonOK");
                _buttonOK.AutoSizeMode = AutoSizeMode.GrowAndShrink;
                _buttonOK.DialogResult = DialogResult.OK;
                _buttonOK.Margin       = new Padding(0, 0, 3, 0);
                _buttonOK.MinimumSize  = new Size(75, 23);
                _buttonOK.Name         = "buttonOK";
                _buttonOK.Padding      = new Padding(10, 0, 10, 0);
                _buttonOK.Click       += new EventHandler(ButtonOK_click);
                //
                // buttonSave
                //
                resources.ApplyResources(_buttonSave, "buttonSave");
                _buttonSave.AutoSizeMode = AutoSizeMode.GrowAndShrink;
                _buttonSave.Margin       = new Padding(3, 0, 0, 0);
                _buttonSave.MinimumSize  = new Size(75, 23);
                _buttonSave.Name         = "buttonSave";
                _buttonSave.Padding      = new Padding(10, 0, 10, 0);
                _buttonSave.Click       += new EventHandler(ButtonSave_click);
                //
                // groupBoxMode
                //
                resources.ApplyResources(_groupBoxMode, "groupBoxMode");
                _groupBoxMode.AutoSizeMode = AutoSizeMode.GrowAndShrink;
                _groupBoxMode.Controls.Add(_radioButtonsTableLayoutPanel);
                _groupBoxMode.Margin  = new Padding(0, 3, 0, 3);
                _groupBoxMode.Name    = "groupBoxMode";
                _groupBoxMode.Padding = new Padding(0);
                _groupBoxMode.TabStop = false;
                //
                // radioButtonsTableLayoutPanel
                //
                resources.ApplyResources(_radioButtonsTableLayoutPanel, "radioButtonsTableLayoutPanel");
                _radioButtonsTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
                _radioButtonsTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
                _radioButtonsTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
                _radioButtonsTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
                _radioButtonsTableLayoutPanel.Controls.Add(_radioUnicode, 3, 0);
                _radioButtonsTableLayoutPanel.Controls.Add(_radioAuto, 0, 0);
                _radioButtonsTableLayoutPanel.Controls.Add(_radioAnsi, 2, 0);
                _radioButtonsTableLayoutPanel.Controls.Add(_radioHex, 1, 0);
                _radioButtonsTableLayoutPanel.Margin = new Padding(9);
                _radioButtonsTableLayoutPanel.Name   = "radioButtonsTableLayoutPanel";
                _radioButtonsTableLayoutPanel.RowStyles.Add(new RowStyle());
                //
                // radioUnicode
                //
                resources.ApplyResources(_radioUnicode, "radioUnicode");
                _radioUnicode.Margin          = new Padding(3, 0, 0, 0);
                _radioUnicode.Name            = "radioUnicode";
                _radioUnicode.CheckedChanged += new EventHandler(RadioUnicode_checkedChanged);
                //
                // radioAuto
                //
                resources.ApplyResources(_radioAuto, "radioAuto");
                _radioAuto.Checked         = true;
                _radioAuto.Margin          = new Padding(0, 0, 3, 0);
                _radioAuto.Name            = "radioAuto";
                _radioAuto.CheckedChanged += new EventHandler(RadioAuto_checkedChanged);
                //
                // radioAnsi
                //
                resources.ApplyResources(_radioAnsi, "radioAnsi");
                _radioAnsi.Margin          = new Padding(3, 0, 3, 0);
                _radioAnsi.Name            = "radioAnsi";
                _radioAnsi.CheckedChanged += new EventHandler(RadioAnsi_checkedChanged);
                //
                // radioHex
                //
                resources.ApplyResources(_radioHex, "radioHex");
                _radioHex.Margin          = new Padding(3, 0, 3, 0);
                _radioHex.Name            = "radioHex";
                _radioHex.CheckedChanged += new EventHandler(RadioHex_checkedChanged);
                //
                // okSaveTableLayoutPanel
                //
                resources.ApplyResources(_okSaveTableLayoutPanel, "okSaveTableLayoutPanel");
                _okSaveTableLayoutPanel.AutoSizeMode = AutoSizeMode.GrowAndShrink;
                _okSaveTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
                _okSaveTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
                _okSaveTableLayoutPanel.Controls.Add(_buttonOK, 0, 0);
                _okSaveTableLayoutPanel.Controls.Add(_buttonSave, 1, 0);
                _okSaveTableLayoutPanel.Margin = new Padding(0, 9, 0, 0);
                _okSaveTableLayoutPanel.Name   = "okSaveTableLayoutPanel";
                _okSaveTableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
                //
                // overarchingTableLayoutPanel
                //
                resources.ApplyResources(_overarchingTableLayoutPanel, "overarchingTableLayoutPanel");
                _overarchingTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
                _overarchingTableLayoutPanel.Controls.Add(_byteViewer, 0, 0);
                _overarchingTableLayoutPanel.Controls.Add(_groupBoxMode, 0, 1);
                _overarchingTableLayoutPanel.Controls.Add(_okSaveTableLayoutPanel, 0, 2);
                _overarchingTableLayoutPanel.Name = "overarchingTableLayoutPanel";
                _overarchingTableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
                _overarchingTableLayoutPanel.RowStyles.Add(new RowStyle());
                _overarchingTableLayoutPanel.RowStyles.Add(new RowStyle());

                //
                // BinaryUI
                //
                AcceptButton = _buttonOK;
                resources.ApplyResources(this, "$this");
                AutoScaleMode = AutoScaleMode.Font;
                CancelButton  = _buttonOK;
                Controls.Add(_overarchingTableLayoutPanel);
                FormBorderStyle    = FormBorderStyle.FixedDialog;
                HelpButton         = true;
                MaximizeBox        = false;
                MinimizeBox        = false;
                Name               = "BinaryUI";
                ShowIcon           = false;
                ShowInTaskbar      = false;
                HelpRequested     += new HelpEventHandler(Form_HelpRequested);
                HelpButtonClicked += new CancelEventHandler(Form_HelpButtonClicked);
                _byteViewer.ResumeLayout(false);
                _byteViewer.PerformLayout();
                _groupBoxMode.ResumeLayout(false);
                _groupBoxMode.PerformLayout();
                _radioButtonsTableLayoutPanel.ResumeLayout(false);
                _radioButtonsTableLayoutPanel.PerformLayout();
                _okSaveTableLayoutPanel.ResumeLayout(false);
                _okSaveTableLayoutPanel.PerformLayout();
                _overarchingTableLayoutPanel.ResumeLayout(false);
                _overarchingTableLayoutPanel.PerformLayout();
                ResumeLayout(false);
            }
    protected void SetUpAllFields()
    {
        WebControls = new List <WebControlLanguage>();

        string  page    = Path.GetFileName(Page.AppRelativeVirtualPath);
        Utility utility = new Utility();

        WebControls = utility.pronadjiSvaPoljaNaStranici(page);

        foreach (var control in WebControls)
        {
            if (Constants.CONTROL_ТYPE_LABEL.ToLower() == control.ControlType.ToLower())
            {
                try
                {
                    Label labela = (Label)FindControlRecursive(Page, control.Controlid);
                    labela.Text    = control.ControlTittle;
                    labela.Visible = control.IsVisible;
                }
                catch (Exception ex)
                {
                    log.Info("Error while setting control's " + control.Controlid + " text: " + ex.Message);
                }
            }

            if (Constants.CONTROL_ТYPE_BUTTON.ToLower() == control.ControlType.ToLower())
            {
                try
                {
                    Button dugme = (Button)FindControlRecursive(Page, control.Controlid);
                    dugme.Text = control.ControlTittle;

                    dugme.Enabled = control.IsEnabled;
                    dugme.Visible = control.IsVisible;
                }
                catch (Exception ex)
                {
                    log.Info("Error while setting control's " + control.Controlid + " text: " + ex.Message);
                }
            }

            try
            {
                if (control.ControlTittle.Equals("*"))
                {
                    if (!control.IsVisible)
                    {
                        Label labela = (Label)FindControlRecursive(Page, control.Controlid);
                        labela.Text = "&nbsp;";
                    }
                }
                else
                {
                    FindControlRecursive(Page, control.Controlid).Visible = control.IsVisible;
                }
            }
            catch (Exception ex)
            {
                log.Info("Error while setting control's " + control.Controlid + " visibility: " + ex.Message);
            }

            if (Constants.CONTROL_TYPE_TEXTBOX.ToLower() == control.ControlType.ToLower())
            {
                try
                {
                    TextBox tekstualnopolje = (TextBox)FindControlRecursive(Page, control.Controlid);
                    //tekstualnopolje.Text = control.ControlTittle;

                    //tekstualnopolje.Enabled = control.IsEnabled;
                    //tekstualnopolje.Visible = control.IsVisible;
                }
                catch (Exception ex)
                {
                    log.Info("Error while setting control's " + control.Controlid + "  " + ex.Message);
                }
            }

            if (Constants.CONTROL_TYPE_DROPDOWNLIST.ToLower() == control.ControlType.ToLower())
            {
                try
                {
                    DropDownList padajucalista = (DropDownList)FindControlRecursive(Page, control.Controlid);
                    //tekstualnopolje.Text = control.ControlTittle;
                    padajucalista.Enabled = control.IsEnabled;
                    padajucalista.Visible = control.IsVisible;
                }
                catch (Exception ex)
                {
                    log.Info("Error while setting control's " + control.Controlid + "  " + ex.Message);
                }
            }

            if (Constants.CONTROL_TYPE_RADIOBUTTON.ToLower() == control.ControlType.ToLower())
            {
                try
                {
                    RadioButton radiodugme = (RadioButton)FindControlRecursive(Page, control.Controlid);
                    //tekstualnopolje.Text = control.ControlTittle;
                    radiodugme.Text    = control.ControlTittle;
                    radiodugme.Enabled = control.IsEnabled;
                    radiodugme.Visible = control.IsVisible;
                }
                catch (Exception ex)
                {
                    log.Info("Error while setting control's " + control.Controlid + "  " + ex.Message);
                }
            }

            if (Constants.CONTROL_TYPE_HYPERLINK.ToLower() == control.ControlType.ToLower())
            {
                try
                {
                    HyperLink hiperlink = (HyperLink)FindControlRecursive(Page, control.Controlid);
                    //tekstualnopolje.Text = control.ControlTittle;
                    hiperlink.Text    = control.ControlTittle;
                    hiperlink.Enabled = control.IsEnabled;
                    hiperlink.Visible = control.IsVisible;
                }
                catch (Exception ex)
                {
                    log.Info("Error while setting control's " + control.Controlid + " text: " + ex.Message);
                }
            }
        }
    }
예제 #52
0
        public void ReadImages()
        {
            string[] filenames = File.ReadAllLines(folder + "Images.txt");
            int      n         = filenames.Length;

            probLabels = new Label[n];
            int xpos = 5;
            int ypos = 5;

            for (int i = 0; i < n; i++)
            {
                Panel panel = new Panel();
                panel.AutoSize = false;
                panel.Size     = new Size(200, 200 + 150);
                panel.Name     = "panel" + i;
                panel.Location = new Point(xpos, ypos);

                Label image = new Label();
                image.AutoSize  = false;
                image.Name      = "image" + i;
                image.Image     = new Bitmap(folder + filenames[i]);
                image.Size      = new Size(image.Image.Width, image.Image.Height);
                image.ForeColor = Color.DodgerBlue;
                image.Location  = new Point(0, 0);
                panel.Controls.Add(image);

                Panel radioPanel = new Panel();
                panel.Controls.Add(radioPanel);
                radioPanel.Location = new Point(0, 205);
                RadioButton PosButton = new RadioButton();
                PosButton.AutoSize        = true;
                PosButton.Name            = "Pos" + i;
                PosButton.Text            = "Positive";
                PosButton.Location        = new Point(0, 0);
                PosButton.TabIndex        = 0;
                PosButton.TabStop         = true;
                PosButton.CheckedChanged += radioButton_CheckedChanged;
                radioPanel.Controls.Add(PosButton);
                RadioButton NegButton = new RadioButton();
                NegButton.AutoSize        = true;
                NegButton.Name            = "Neg" + i;
                NegButton.Text            = "Negative";
                NegButton.Location        = new Point(0, 30);
                NegButton.TabIndex        = 1;
                NegButton.TabStop         = true;
                NegButton.CheckedChanged += radioButton_CheckedChanged;
                radioPanel.Controls.Add(NegButton);
                RadioButton NoneButton = new RadioButton();
                NoneButton.Name            = "Non" + i;
                NoneButton.Text            = "No label";
                NoneButton.Location        = new Point(0, 60);
                NoneButton.CheckedChanged += radioButton_CheckedChanged;
                NoneButton.TabIndex        = 2;
                NoneButton.TabStop         = true;
                radioPanel.Controls.Add(NoneButton);

                Label prob = new Label();
                prob.AutoSize  = true;
                prob.Name      = "prob" + i;
                prob.Dock      = DockStyle.Bottom;
                prob.Text      = prob.Name;
                prob.TextAlign = ContentAlignment.BottomCenter;
                probLabels[i]  = prob;
                radioPanel.Controls.Add(prob);

                this.Controls.Add(panel);
                xpos += panel.Width + 5;
                if (xpos > 1500)
                {
                    ypos += panel.Height + 5;
                    xpos  = 5;
                }
            }
        }
        /// <summary>
        /// Store all GreenshotControl values to the configuration
        /// </summary>
        protected void StoreFields()
        {
            bool iniDirty = false;

            foreach (FieldInfo field in GetCachedFields(GetType()))
            {
                Object controlObject = field.GetValue(this);
                if (controlObject == null)
                {
                    continue;
                }
                IGreenshotConfigBindable configBindable = controlObject as IGreenshotConfigBindable;
                if (configBindable == null)
                {
                    continue;
                }

                if (!string.IsNullOrEmpty(configBindable.SectionName) && !string.IsNullOrEmpty(configBindable.PropertyName))
                {
                    IniSection section = IniConfig.GetIniSection(configBindable.SectionName);
                    if (section != null)
                    {
                        IniValue iniValue = null;
                        if (!section.Values.TryGetValue(configBindable.PropertyName, out iniValue))
                        {
                            continue;
                        }
                        CheckBox checkBox = controlObject as CheckBox;
                        if (checkBox != null)
                        {
                            iniValue.Value = checkBox.Checked;
                            iniDirty       = true;
                            continue;
                        }
                        RadioButton radioButton = controlObject as RadioButton;
                        if (radioButton != null)
                        {
                            iniValue.Value = radioButton.Checked;
                            iniDirty       = true;
                            continue;
                        }
                        TextBox textBox = controlObject as TextBox;
                        if (textBox != null)
                        {
                            iniValue.UseValueOrDefault(textBox.Text);
                            iniDirty = true;
                            continue;
                        }
                        GreenshotComboBox comboxBox = controlObject as GreenshotComboBox;
                        if (comboxBox != null)
                        {
                            iniValue.Value = comboxBox.GetSelectedEnum();
                            iniDirty       = true;
                            continue;
                        }
                    }
                }
            }
            if (iniDirty)
            {
                //IniConfig.Save();
            }
        }
예제 #54
0
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditOrderUI));
     this.m_lbl_edit_order         = new System.Windows.Forms.Label();
     this.m_radio_pending          = new System.Windows.Forms.RadioButton();
     this.m_radio_immediate_order  = new System.Windows.Forms.RadioButton();
     this.m_cb_percent_of_balance  = new System.Windows.Forms.ComboBox();
     this.m_lbl_percentage_balance = new System.Windows.Forms.Label();
     this.m_btn_make_order         = new System.Windows.Forms.Button();
     this.m_chkgrp_stop_loss       = new pr.gui.CheckedGroupBox();
     this.m_chkgrp_stop_loss.SuspendLayout();
     this.SuspendLayout();
     //
     // m_lbl_edit_order
     //
     this.m_lbl_edit_order.AutoSize  = true;
     this.m_lbl_edit_order.Font      = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.m_lbl_edit_order.ForeColor = System.Drawing.Color.DarkRed;
     this.m_lbl_edit_order.Location  = new System.Drawing.Point(12, 9);
     this.m_lbl_edit_order.Name      = "m_lbl_edit_order";
     this.m_lbl_edit_order.Size      = new System.Drawing.Size(178, 74);
     this.m_lbl_edit_order.TabIndex  = 1;
     this.m_lbl_edit_order.Text      = "Edit Market\r\nOrder";
     //
     // m_radio_pending
     //
     this.m_radio_pending.Appearance = System.Windows.Forms.Appearance.Button;
     this.m_radio_pending.Font       = new System.Drawing.Font("Tahoma", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.m_radio_pending.Location   = new System.Drawing.Point(359, 12);
     this.m_radio_pending.Name       = "m_radio_pending";
     this.m_radio_pending.Size       = new System.Drawing.Size(157, 61);
     this.m_radio_pending.TabIndex   = 2;
     this.m_radio_pending.TabStop    = true;
     this.m_radio_pending.Text       = "Pending Order";
     this.m_radio_pending.TextAlign  = System.Drawing.ContentAlignment.MiddleCenter;
     this.m_radio_pending.UseVisualStyleBackColor = true;
     //
     // m_radio_immediate_order
     //
     this.m_radio_immediate_order.Appearance = System.Windows.Forms.Appearance.Button;
     this.m_radio_immediate_order.Font       = new System.Drawing.Font("Tahoma", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.m_radio_immediate_order.Location   = new System.Drawing.Point(196, 12);
     this.m_radio_immediate_order.Name       = "m_radio_immediate_order";
     this.m_radio_immediate_order.Size       = new System.Drawing.Size(157, 61);
     this.m_radio_immediate_order.TabIndex   = 3;
     this.m_radio_immediate_order.TabStop    = true;
     this.m_radio_immediate_order.Text       = "Immediate Order";
     this.m_radio_immediate_order.TextAlign  = System.Drawing.ContentAlignment.MiddleCenter;
     this.m_radio_immediate_order.UseVisualStyleBackColor = true;
     //
     // m_cb_percent_of_balance
     //
     this.m_cb_percent_of_balance.FormattingEnabled = true;
     this.m_cb_percent_of_balance.Location          = new System.Drawing.Point(123, 26);
     this.m_cb_percent_of_balance.Name     = "m_cb_percent_of_balance";
     this.m_cb_percent_of_balance.Size     = new System.Drawing.Size(121, 21);
     this.m_cb_percent_of_balance.TabIndex = 4;
     //
     // m_lbl_percentage_balance
     //
     this.m_lbl_percentage_balance.AutoSize = true;
     this.m_lbl_percentage_balance.Location = new System.Drawing.Point(6, 29);
     this.m_lbl_percentage_balance.Name     = "m_lbl_percentage_balance";
     this.m_lbl_percentage_balance.Size     = new System.Drawing.Size(101, 13);
     this.m_lbl_percentage_balance.TabIndex = 5;
     this.m_lbl_percentage_balance.Text     = "Percent of Balance:";
     //
     // m_btn_make_order
     //
     this.m_btn_make_order.Location = new System.Drawing.Point(389, 382);
     this.m_btn_make_order.Name     = "m_btn_make_order";
     this.m_btn_make_order.Size     = new System.Drawing.Size(127, 36);
     this.m_btn_make_order.TabIndex = 6;
     this.m_btn_make_order.Text     = "Make Order";
     this.m_btn_make_order.UseVisualStyleBackColor = true;
     //
     // m_chkgrp_stop_loss
     //
     this.m_chkgrp_stop_loss.Controls.Add(this.m_lbl_percentage_balance);
     this.m_chkgrp_stop_loss.Controls.Add(this.m_cb_percent_of_balance);
     this.m_chkgrp_stop_loss.Enabled  = false;
     this.m_chkgrp_stop_loss.Location = new System.Drawing.Point(12, 86);
     this.m_chkgrp_stop_loss.Name     = "m_chkgrp_stop_loss";
     this.m_chkgrp_stop_loss.Size     = new System.Drawing.Size(276, 122);
     this.m_chkgrp_stop_loss.TabIndex = 8;
     this.m_chkgrp_stop_loss.TabStop  = false;
     this.m_chkgrp_stop_loss.Text     = "Stop Loss";
     //
     // EditOrderUI
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize          = new System.Drawing.Size(538, 430);
     this.Controls.Add(this.m_chkgrp_stop_loss);
     this.Controls.Add(this.m_btn_make_order);
     this.Controls.Add(this.m_radio_immediate_order);
     this.Controls.Add(this.m_radio_pending);
     this.Controls.Add(this.m_lbl_edit_order);
     this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.Name = "EditOrderUI";
     this.Text = "Edit Order";
     this.m_chkgrp_stop_loss.ResumeLayout(false);
     this.m_chkgrp_stop_loss.PerformLayout();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
예제 #55
0
 public OperationHao(Dictionary <string, TreeView> dicTreeView, Dictionary <string, ComboBox> dicComboBox, TextBox txtState, TextBox txtSave, Label lblTo, ProgressBar pgb, RadioButton rbnSingle) : base(dicTreeView, dicComboBox, txtState, txtSave, lblTo, pgb, rbnSingle)
 {
 }
예제 #56
0
 /// <summary>
 /// 设置单选按钮选中状态
 /// </summary>
 /// <param name="Ctrl"></param>
 /// <param name="Checked"></param>
 public static void SetRadioButtonChecked(RadioButton Ctrl, bool Checked)
 {
     RadioButtonInvoke.SetRadioButtonChecked(Ctrl, Checked);
 }
예제 #57
0
 private void InitializeComponent()
 {
     groupVehicles       = new System.Windows.Forms.GroupBox();
     btnDeleteVehicle    = new System.Windows.Forms.Button();
     btnNewVehicle       = new System.Windows.Forms.Button();
     listVehicles        = new System.Windows.Forms.ListBox();
     groupProfile        = new System.Windows.Forms.GroupBox();
     groupBox1           = new System.Windows.Forms.GroupBox();
     btnCalcSpeedo       = new System.Windows.Forms.Button();
     txtSpeedoFactor     = new System.Windows.Forms.TextBox();
     groupTimeout        = new System.Windows.Forms.GroupBox();
     lblTimeoutUnits     = new System.Windows.Forms.Label();
     numTimeout          = new System.Windows.Forms.NumericUpDown();
     lblTimeout          = new System.Windows.Forms.Label();
     btnSave             = new System.Windows.Forms.Button();
     btnDiscard          = new System.Windows.Forms.Button();
     groupNotes          = new System.Windows.Forms.GroupBox();
     txtNotes            = new System.Windows.Forms.TextBox();
     groupMisc           = new System.Windows.Forms.GroupBox();
     txtDragCoeff        = new System.Windows.Forms.TextBox();
     label1              = new System.Windows.Forms.Label();
     lblPounds           = new System.Windows.Forms.Label();
     txtWeight           = new System.Windows.Forms.TextBox();
     lblWeight           = new System.Windows.Forms.Label();
     groupWheels         = new System.Windows.Forms.GroupBox();
     lblRimDiameterUnits = new System.Windows.Forms.Label();
     lblTireAspectUnits  = new System.Windows.Forms.Label();
     lblTireWidthUnits   = new System.Windows.Forms.Label();
     lblExampleEnd       = new System.Windows.Forms.Label();
     lblExampleDiameter  = new System.Windows.Forms.Label();
     lblExampleAspect    = new System.Windows.Forms.Label();
     lblExampleSlash     = new System.Windows.Forms.Label();
     lblExampleDash      = new System.Windows.Forms.Label();
     lblExampleWidth     = new System.Windows.Forms.Label();
     lblExample          = new System.Windows.Forms.Label();
     txtRimDiameter      = new System.Windows.Forms.TextBox();
     lblRimDiameter      = new System.Windows.Forms.Label();
     txtAspectRatio      = new System.Windows.Forms.TextBox();
     lblTireAspectRatio  = new System.Windows.Forms.Label();
     txtTireWidth        = new System.Windows.Forms.TextBox();
     lblTireWidth        = new System.Windows.Forms.Label();
     groupDrivetrain     = new System.Windows.Forms.GroupBox();
     radioManual         = new System.Windows.Forms.RadioButton();
     radioAutomatic      = new System.Windows.Forms.RadioButton();
     txtName             = new System.Windows.Forms.TextBox();
     lblName             = new System.Windows.Forms.Label();
     btnExit             = new System.Windows.Forms.Button();
     groupVehicles.SuspendLayout();
     groupProfile.SuspendLayout();
     groupBox1.SuspendLayout();
     groupTimeout.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(numTimeout)).BeginInit();
     groupNotes.SuspendLayout();
     groupMisc.SuspendLayout();
     groupWheels.SuspendLayout();
     groupDrivetrain.SuspendLayout();
     SuspendLayout();
     //
     // groupVehicles
     //
     groupVehicles.Controls.Add(btnDeleteVehicle);
     groupVehicles.Controls.Add(btnNewVehicle);
     groupVehicles.Controls.Add(listVehicles);
     groupVehicles.Location = new System.Drawing.Point(5, 9);
     groupVehicles.Name     = "groupVehicles";
     groupVehicles.Size     = new System.Drawing.Size(150, 364);
     groupVehicles.TabIndex = 0;
     groupVehicles.TabStop  = false;
     groupVehicles.Text     = "Vehicles";
     //
     // btnDeleteVehicle
     //
     btnDeleteVehicle.Location = new System.Drawing.Point(77, 330);
     btnDeleteVehicle.Name     = "btnDeleteVehicle";
     btnDeleteVehicle.Size     = new System.Drawing.Size(63, 25);
     btnDeleteVehicle.TabIndex = 2;
     btnDeleteVehicle.Text     = "&Delete";
     btnDeleteVehicle.Click   += new System.EventHandler(btnDeleteVehicle_Click);
     //
     // btnNewVehicle
     //
     btnNewVehicle.Location = new System.Drawing.Point(10, 330);
     btnNewVehicle.Name     = "btnNewVehicle";
     btnNewVehicle.Size     = new System.Drawing.Size(62, 25);
     btnNewVehicle.TabIndex = 1;
     btnNewVehicle.Text     = "&New";
     btnNewVehicle.Click   += new System.EventHandler(btnNewVehicle_Click);
     //
     // listVehicles
     //
     listVehicles.Location              = new System.Drawing.Point(10, 20);
     listVehicles.Name                  = "listVehicles";
     listVehicles.Size                  = new System.Drawing.Size(130, 303);
     listVehicles.TabIndex              = 0;
     listVehicles.SelectedIndexChanged += new System.EventHandler(listVehicles_SelectedIndexChanged);
     //
     // groupProfile
     //
     groupProfile.Controls.Add(groupBox1);
     groupProfile.Controls.Add(groupTimeout);
     groupProfile.Controls.Add(btnSave);
     groupProfile.Controls.Add(btnDiscard);
     groupProfile.Controls.Add(groupNotes);
     groupProfile.Controls.Add(groupMisc);
     groupProfile.Controls.Add(groupWheels);
     groupProfile.Controls.Add(groupDrivetrain);
     groupProfile.Controls.Add(txtName);
     groupProfile.Controls.Add(lblName);
     groupProfile.Location = new System.Drawing.Point(160, 9);
     groupProfile.Name     = "groupProfile";
     groupProfile.Size     = new System.Drawing.Size(424, 364);
     groupProfile.TabIndex = 1;
     groupProfile.TabStop  = false;
     groupProfile.Text     = "Selected vehicle profile";
     //
     // groupBox1
     //
     groupBox1.Controls.Add(btnCalcSpeedo);
     groupBox1.Controls.Add(txtSpeedoFactor);
     groupBox1.Location = new System.Drawing.Point(11, 177);
     groupBox1.Name     = "groupBox1";
     groupBox1.Size     = new System.Drawing.Size(205, 65);
     groupBox1.TabIndex = 4;
     groupBox1.TabStop  = false;
     groupBox1.Text     = "Speedometer Calibration Factor";
     //
     // btnCalcSpeedo
     //
     btnCalcSpeedo.Location = new System.Drawing.Point(105, 27);
     btnCalcSpeedo.Name     = "btnCalcSpeedo";
     btnCalcSpeedo.Size     = new System.Drawing.Size(82, 23);
     btnCalcSpeedo.TabIndex = 1;
     btnCalcSpeedo.Text     = "&Calculate";
     btnCalcSpeedo.Click   += new System.EventHandler(btnCalcSpeedo_Click);
     //
     // txtSpeedoFactor
     //
     txtSpeedoFactor.Location  = new System.Drawing.Point(18, 28);
     txtSpeedoFactor.Name      = "txtSpeedoFactor";
     txtSpeedoFactor.Size      = new System.Drawing.Size(72, 20);
     txtSpeedoFactor.TabIndex  = 0;
     txtSpeedoFactor.Text      = "1.000";
     txtSpeedoFactor.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
     //
     // groupTimeout
     //
     groupTimeout.Controls.Add(lblTimeoutUnits);
     groupTimeout.Controls.Add(numTimeout);
     groupTimeout.Controls.Add(lblTimeout);
     groupTimeout.Location = new System.Drawing.Point(10, 48);
     groupTimeout.Name     = "groupTimeout";
     groupTimeout.Size     = new System.Drawing.Size(205, 58);
     groupTimeout.TabIndex = 2;
     groupTimeout.TabStop  = false;
     groupTimeout.Text     = "OBD-II Timing";
     //
     // lblTimeoutUnits
     //
     lblTimeoutUnits.Location  = new System.Drawing.Point(165, 20);
     lblTimeoutUnits.Name      = "lblTimeoutUnits";
     lblTimeoutUnits.Size      = new System.Drawing.Size(22, 20);
     lblTimeoutUnits.TabIndex  = 2;
     lblTimeoutUnits.Text      = "ms";
     lblTimeoutUnits.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // numTimeout
     //
     numTimeout.Increment = new decimal(new int[] {
         4,
         0,
         0,
         0
     });
     numTimeout.Location = new System.Drawing.Point(93, 20);
     numTimeout.Maximum  = new decimal(new int[] {
         1020,
         0,
         0,
         0
     });
     numTimeout.Minimum = new decimal(new int[] {
         32,
         0,
         0,
         0
     });
     numTimeout.Name     = "numTimeout";
     numTimeout.Size     = new System.Drawing.Size(61, 20);
     numTimeout.TabIndex = 1;
     numTimeout.Value    = new decimal(new int[] {
         200,
         0,
         0,
         0
     });
     numTimeout.ValueChanged += new System.EventHandler(numTimeout_ValueChanged);
     //
     // lblTimeout
     //
     lblTimeout.Location  = new System.Drawing.Point(13, 20);
     lblTimeout.Name      = "lblTimeout";
     lblTimeout.Size      = new System.Drawing.Size(75, 20);
     lblTimeout.TabIndex  = 0;
     lblTimeout.Text      = "ELM &Timeout:";
     lblTimeout.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // btnSave
     //
     btnSave.Location = new System.Drawing.Point(255, 330);
     btnSave.Name     = "btnSave";
     btnSave.Size     = new System.Drawing.Size(75, 25);
     btnSave.TabIndex = 8;
     btnSave.Text     = "&Save";
     btnSave.Click   += new System.EventHandler(btnSave_Click);
     //
     // btnDiscard
     //
     btnDiscard.Location = new System.Drawing.Point(335, 330);
     btnDiscard.Name     = "btnDiscard";
     btnDiscard.Size     = new System.Drawing.Size(75, 25);
     btnDiscard.TabIndex = 9;
     btnDiscard.Text     = "D&iscard";
     btnDiscard.Click   += new System.EventHandler(btnDiscard_Click);
     //
     // groupNotes
     //
     groupNotes.Controls.Add(txtNotes);
     groupNotes.Location = new System.Drawing.Point(225, 177);
     groupNotes.Name     = "groupNotes";
     groupNotes.Size     = new System.Drawing.Size(185, 148);
     groupNotes.TabIndex = 7;
     groupNotes.TabStop  = false;
     groupNotes.Text     = "Notes";
     //
     // txtNotes
     //
     txtNotes.Location     = new System.Drawing.Point(10, 20);
     txtNotes.Multiline    = true;
     txtNotes.Name         = "txtNotes";
     txtNotes.ScrollBars   = System.Windows.Forms.ScrollBars.Vertical;
     txtNotes.Size         = new System.Drawing.Size(165, 119);
     txtNotes.TabIndex     = 0;
     txtNotes.TextChanged += new System.EventHandler(ValueChanged);
     //
     // groupMisc
     //
     groupMisc.Controls.Add(txtDragCoeff);
     groupMisc.Controls.Add(label1);
     groupMisc.Controls.Add(lblPounds);
     groupMisc.Controls.Add(txtWeight);
     groupMisc.Controls.Add(lblWeight);
     groupMisc.Location = new System.Drawing.Point(10, 250);
     groupMisc.Name     = "groupMisc";
     groupMisc.Size     = new System.Drawing.Size(205, 75);
     groupMisc.TabIndex = 5;
     groupMisc.TabStop  = false;
     groupMisc.Text     = "Miscellaneous";
     //
     // txtDragCoeff
     //
     txtDragCoeff.Location     = new System.Drawing.Point(90, 45);
     txtDragCoeff.Name         = "txtDragCoeff";
     txtDragCoeff.Size         = new System.Drawing.Size(50, 20);
     txtDragCoeff.TabIndex     = 4;
     txtDragCoeff.TextChanged += new System.EventHandler(ValueChanged);
     //
     // label1
     //
     label1.Location  = new System.Drawing.Point(15, 45);
     label1.Name      = "label1";
     label1.Size      = new System.Drawing.Size(70, 20);
     label1.TabIndex  = 3;
     label1.Text      = "&Drag coeff.:";
     label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // lblPounds
     //
     lblPounds.Location  = new System.Drawing.Point(145, 20);
     lblPounds.Name      = "lblPounds";
     lblPounds.Size      = new System.Drawing.Size(50, 20);
     lblPounds.TabIndex  = 2;
     lblPounds.Text      = "lbs";
     lblPounds.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // txtWeight
     //
     txtWeight.Location     = new System.Drawing.Point(90, 20);
     txtWeight.Name         = "txtWeight";
     txtWeight.Size         = new System.Drawing.Size(50, 20);
     txtWeight.TabIndex     = 1;
     txtWeight.TextChanged += new System.EventHandler(ValueChanged);
     //
     // lblWeight
     //
     lblWeight.Location  = new System.Drawing.Point(15, 20);
     lblWeight.Name      = "lblWeight";
     lblWeight.Size      = new System.Drawing.Size(70, 20);
     lblWeight.TabIndex  = 0;
     lblWeight.Text      = "W&eight:";
     lblWeight.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // groupWheels
     //
     groupWheels.Controls.Add(lblRimDiameterUnits);
     groupWheels.Controls.Add(lblTireAspectUnits);
     groupWheels.Controls.Add(lblTireWidthUnits);
     groupWheels.Controls.Add(lblExampleEnd);
     groupWheels.Controls.Add(lblExampleDiameter);
     groupWheels.Controls.Add(lblExampleAspect);
     groupWheels.Controls.Add(lblExampleSlash);
     groupWheels.Controls.Add(lblExampleDash);
     groupWheels.Controls.Add(lblExampleWidth);
     groupWheels.Controls.Add(lblExample);
     groupWheels.Controls.Add(txtRimDiameter);
     groupWheels.Controls.Add(lblRimDiameter);
     groupWheels.Controls.Add(txtAspectRatio);
     groupWheels.Controls.Add(lblTireAspectRatio);
     groupWheels.Controls.Add(txtTireWidth);
     groupWheels.Controls.Add(lblTireWidth);
     groupWheels.Location = new System.Drawing.Point(225, 48);
     groupWheels.Name     = "groupWheels";
     groupWheels.Size     = new System.Drawing.Size(185, 122);
     groupWheels.TabIndex = 6;
     groupWheels.TabStop  = false;
     groupWheels.Text     = "Wheels";
     //
     // lblRimDiameterUnits
     //
     lblRimDiameterUnits.Location  = new System.Drawing.Point(145, 92);
     lblRimDiameterUnits.Name      = "lblRimDiameterUnits";
     lblRimDiameterUnits.Size      = new System.Drawing.Size(30, 20);
     lblRimDiameterUnits.TabIndex  = 15;
     lblRimDiameterUnits.Text      = "in";
     lblRimDiameterUnits.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // lblTireAspectUnits
     //
     lblTireAspectUnits.Location  = new System.Drawing.Point(145, 67);
     lblTireAspectUnits.Name      = "lblTireAspectUnits";
     lblTireAspectUnits.Size      = new System.Drawing.Size(30, 20);
     lblTireAspectUnits.TabIndex  = 12;
     lblTireAspectUnits.Text      = "%";
     lblTireAspectUnits.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // lblTireWidthUnits
     //
     lblTireWidthUnits.Location  = new System.Drawing.Point(145, 42);
     lblTireWidthUnits.Name      = "lblTireWidthUnits";
     lblTireWidthUnits.Size      = new System.Drawing.Size(30, 20);
     lblTireWidthUnits.TabIndex  = 9;
     lblTireWidthUnits.Text      = "mm";
     lblTireWidthUnits.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // lblExampleEnd
     //
     lblExampleEnd.Location  = new System.Drawing.Point(170, 20);
     lblExampleEnd.Name      = "lblExampleEnd";
     lblExampleEnd.Size      = new System.Drawing.Size(5, 20);
     lblExampleEnd.TabIndex  = 6;
     lblExampleEnd.Text      = ")";
     lblExampleEnd.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // lblExampleDiameter
     //
     lblExampleDiameter.Font      = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     lblExampleDiameter.ForeColor = System.Drawing.SystemColors.ControlText;
     lblExampleDiameter.Location  = new System.Drawing.Point(145, 20);
     lblExampleDiameter.Name      = "lblExampleDiameter";
     lblExampleDiameter.Size      = new System.Drawing.Size(25, 20);
     lblExampleDiameter.TabIndex  = 5;
     lblExampleDiameter.Text      = "17";
     lblExampleDiameter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // lblExampleAspect
     //
     lblExampleAspect.Font      = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     lblExampleAspect.ForeColor = System.Drawing.SystemColors.ControlText;
     lblExampleAspect.Location  = new System.Drawing.Point(105, 20);
     lblExampleAspect.Name      = "lblExampleAspect";
     lblExampleAspect.Size      = new System.Drawing.Size(30, 20);
     lblExampleAspect.TabIndex  = 3;
     lblExampleAspect.Text      = "40";
     lblExampleAspect.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // lblExampleSlash
     //
     lblExampleSlash.Location  = new System.Drawing.Point(95, 20);
     lblExampleSlash.Name      = "lblExampleSlash";
     lblExampleSlash.Size      = new System.Drawing.Size(10, 20);
     lblExampleSlash.TabIndex  = 2;
     lblExampleSlash.Text      = "/";
     lblExampleSlash.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // lblExampleDash
     //
     lblExampleDash.Font      = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     lblExampleDash.ForeColor = System.Drawing.SystemColors.ControlText;
     lblExampleDash.Location  = new System.Drawing.Point(135, 20);
     lblExampleDash.Name      = "lblExampleDash";
     lblExampleDash.Size      = new System.Drawing.Size(10, 20);
     lblExampleDash.TabIndex  = 4;
     lblExampleDash.Text      = "-";
     lblExampleDash.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // lblExampleWidth
     //
     lblExampleWidth.Font      = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     lblExampleWidth.ForeColor = System.Drawing.SystemColors.ControlText;
     lblExampleWidth.Location  = new System.Drawing.Point(65, 20);
     lblExampleWidth.Name      = "lblExampleWidth";
     lblExampleWidth.Size      = new System.Drawing.Size(30, 20);
     lblExampleWidth.TabIndex  = 1;
     lblExampleWidth.Text      = "275";
     lblExampleWidth.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // lblExample
     //
     lblExample.Location  = new System.Drawing.Point(5, 20);
     lblExample.Name      = "lblExample";
     lblExample.Size      = new System.Drawing.Size(55, 20);
     lblExample.TabIndex  = 0;
     lblExample.Text      = "(Example:";
     lblExample.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // txtRimDiameter
     //
     txtRimDiameter.Location     = new System.Drawing.Point(90, 92);
     txtRimDiameter.Name         = "txtRimDiameter";
     txtRimDiameter.Size         = new System.Drawing.Size(50, 20);
     txtRimDiameter.TabIndex     = 14;
     txtRimDiameter.TextChanged += new System.EventHandler(ValueChanged);
     txtRimDiameter.Enter       += new System.EventHandler(txtRimDiameter_Enter);
     txtRimDiameter.Leave       += new System.EventHandler(txtRimDiameter_Leave);
     //
     // lblRimDiameter
     //
     lblRimDiameter.Location  = new System.Drawing.Point(10, 92);
     lblRimDiameter.Name      = "lblRimDiameter";
     lblRimDiameter.Size      = new System.Drawing.Size(75, 20);
     lblRimDiameter.TabIndex  = 13;
     lblRimDiameter.Text      = "Rim &diameter:";
     lblRimDiameter.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // txtAspectRatio
     //
     txtAspectRatio.Location     = new System.Drawing.Point(90, 67);
     txtAspectRatio.Name         = "txtAspectRatio";
     txtAspectRatio.Size         = new System.Drawing.Size(50, 20);
     txtAspectRatio.TabIndex     = 11;
     txtAspectRatio.TextChanged += new System.EventHandler(ValueChanged);
     txtAspectRatio.Enter       += new System.EventHandler(txtAspectRatio_Enter);
     txtAspectRatio.Leave       += new System.EventHandler(txtAspectRatio_Leave);
     //
     // lblTireAspectRatio
     //
     lblTireAspectRatio.Location  = new System.Drawing.Point(10, 67);
     lblTireAspectRatio.Name      = "lblTireAspectRatio";
     lblTireAspectRatio.Size      = new System.Drawing.Size(75, 20);
     lblTireAspectRatio.TabIndex  = 10;
     lblTireAspectRatio.Text      = "Tire &aspect:";
     lblTireAspectRatio.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // txtTireWidth
     //
     txtTireWidth.Location     = new System.Drawing.Point(90, 42);
     txtTireWidth.Name         = "txtTireWidth";
     txtTireWidth.Size         = new System.Drawing.Size(50, 20);
     txtTireWidth.TabIndex     = 8;
     txtTireWidth.TextChanged += new System.EventHandler(ValueChanged);
     txtTireWidth.Enter       += new System.EventHandler(txtTireWidth_Enter);
     txtTireWidth.Leave       += new System.EventHandler(txtTireWidth_Leave);
     //
     // lblTireWidth
     //
     lblTireWidth.Location  = new System.Drawing.Point(10, 42);
     lblTireWidth.Name      = "lblTireWidth";
     lblTireWidth.Size      = new System.Drawing.Size(75, 20);
     lblTireWidth.TabIndex  = 7;
     lblTireWidth.Text      = "Tire &width:";
     lblTireWidth.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // groupDrivetrain
     //
     groupDrivetrain.Controls.Add(radioManual);
     groupDrivetrain.Controls.Add(radioAutomatic);
     groupDrivetrain.Location = new System.Drawing.Point(10, 114);
     groupDrivetrain.Name     = "groupDrivetrain";
     groupDrivetrain.Size     = new System.Drawing.Size(205, 56);
     groupDrivetrain.TabIndex = 3;
     groupDrivetrain.TabStop  = false;
     groupDrivetrain.Text     = "Transmission";
     //
     // radioManual
     //
     radioManual.Checked         = true;
     radioManual.Location        = new System.Drawing.Point(116, 20);
     radioManual.Name            = "radioManual";
     radioManual.Size            = new System.Drawing.Size(75, 20);
     radioManual.TabIndex        = 1;
     radioManual.TabStop         = true;
     radioManual.Text            = "&Manual";
     radioManual.CheckedChanged += new System.EventHandler(ValueChanged);
     //
     // radioAutomatic
     //
     radioAutomatic.Location        = new System.Drawing.Point(15, 20);
     radioAutomatic.Name            = "radioAutomatic";
     radioAutomatic.Size            = new System.Drawing.Size(75, 20);
     radioAutomatic.TabIndex        = 0;
     radioAutomatic.Text            = "&Automatic";
     radioAutomatic.CheckedChanged += new System.EventHandler(ValueChanged);
     //
     // txtName
     //
     txtName.Location     = new System.Drawing.Point(60, 20);
     txtName.MaxLength    = 20;
     txtName.Name         = "txtName";
     txtName.Size         = new System.Drawing.Size(350, 20);
     txtName.TabIndex     = 1;
     txtName.TextChanged += new System.EventHandler(ValueChanged);
     //
     // lblName
     //
     lblName.Location  = new System.Drawing.Point(5, 20);
     lblName.Name      = "lblName";
     lblName.Size      = new System.Drawing.Size(50, 20);
     lblName.TabIndex  = 0;
     lblName.Text      = "Name:";
     lblName.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // btnExit
     //
     btnExit.Location = new System.Drawing.Point(496, 384);
     btnExit.Name     = "btnExit";
     btnExit.Size     = new System.Drawing.Size(75, 25);
     btnExit.TabIndex = 2;
     btnExit.Text     = "D&one";
     btnExit.Click   += new System.EventHandler(btnExit_Click);
     //
     // VehicleForm
     //
     AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     ClientSize        = new System.Drawing.Size(586, 416);
     Controls.Add(groupProfile);
     Controls.Add(groupVehicles);
     Controls.Add(btnExit);
     FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
     MaximizeBox     = false;
     MinimizeBox     = false;
     Name            = "VehicleForm";
     StartPosition   = System.Windows.Forms.FormStartPosition.CenterParent;
     Text            = "Vehicle Profile Manager";
     Closing        += new System.ComponentModel.CancelEventHandler(VehicleForm_Closing);
     Load           += new System.EventHandler(VehicleForm_Load);
     groupVehicles.ResumeLayout(false);
     groupProfile.ResumeLayout(false);
     groupProfile.PerformLayout();
     groupBox1.ResumeLayout(false);
     groupBox1.PerformLayout();
     groupTimeout.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(numTimeout)).EndInit();
     groupNotes.ResumeLayout(false);
     groupNotes.PerformLayout();
     groupMisc.ResumeLayout(false);
     groupMisc.PerformLayout();
     groupWheels.ResumeLayout(false);
     groupWheels.PerformLayout();
     groupDrivetrain.ResumeLayout(false);
     ResumeLayout(false);
 }
예제 #58
0
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(VideoFromJPEGsOrBitmaps));
            this.grbVideoFromJPEGsorBitmaps = new System.Windows.Forms.GroupBox();
            this.btnStopPreview             = new System.Windows.Forms.Button();
            this.btnStartPreview            = new System.Windows.Forms.Button();
            this.chkLoopIndefinitely        = new System.Windows.Forms.CheckBox();
            this.btnBrowseFolders           = new System.Windows.Forms.Button();
            this.edtSourceFolder            = new System.Windows.Forms.TextBox();
            this.Label1                       = new System.Windows.Forms.Label();
            this.PictureBox4                  = new System.Windows.Forms.PictureBox();
            this.PictureBox3                  = new System.Windows.Forms.PictureBox();
            this.PictureBox2                  = new System.Windows.Forms.PictureBox();
            this.PictureBox1                  = new System.Windows.Forms.PictureBox();
            this.rbFromBMPorJPEGfiles         = new System.Windows.Forms.RadioButton();
            this.rbFromPictureBox             = new System.Windows.Forms.RadioButton();
            this.lblFirstSelectJPEGsOrBitmaps = new System.Windows.Forms.Label();
            this.Label2                       = new System.Windows.Forms.Label();
            this.edtVideoFromJPEGsorBitmaps   = new System.Windows.Forms.TextBox();
            this.grbVideoFromJPEGsorBitmaps.SuspendLayout();
#if (!VS2003)
            ((System.ComponentModel.ISupportInitialize)(this.PictureBox4)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.PictureBox3)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.PictureBox2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).BeginInit();
#endif
            this.SuspendLayout();
            //
            // grbVideoFromJPEGsorBitmaps
            //
            this.grbVideoFromJPEGsorBitmaps.Controls.Add(this.btnStopPreview);
            this.grbVideoFromJPEGsorBitmaps.Controls.Add(this.btnStartPreview);
            this.grbVideoFromJPEGsorBitmaps.Controls.Add(this.chkLoopIndefinitely);
            this.grbVideoFromJPEGsorBitmaps.Controls.Add(this.btnBrowseFolders);
            this.grbVideoFromJPEGsorBitmaps.Controls.Add(this.edtSourceFolder);
            this.grbVideoFromJPEGsorBitmaps.Controls.Add(this.Label1);
            this.grbVideoFromJPEGsorBitmaps.Controls.Add(this.PictureBox4);
            this.grbVideoFromJPEGsorBitmaps.Controls.Add(this.PictureBox3);
            this.grbVideoFromJPEGsorBitmaps.Controls.Add(this.PictureBox2);
            this.grbVideoFromJPEGsorBitmaps.Controls.Add(this.PictureBox1);
            this.grbVideoFromJPEGsorBitmaps.Controls.Add(this.rbFromBMPorJPEGfiles);
            this.grbVideoFromJPEGsorBitmaps.Controls.Add(this.rbFromPictureBox);
            this.grbVideoFromJPEGsorBitmaps.Controls.Add(this.lblFirstSelectJPEGsOrBitmaps);
            this.grbVideoFromJPEGsorBitmaps.Controls.Add(this.Label2);
            this.grbVideoFromJPEGsorBitmaps.Font     = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.grbVideoFromJPEGsorBitmaps.Location = new System.Drawing.Point(4, 0);
            this.grbVideoFromJPEGsorBitmaps.Name     = "grbVideoFromJPEGsorBitmaps";
            this.grbVideoFromJPEGsorBitmaps.Size     = new System.Drawing.Size(585, 176);
            this.grbVideoFromJPEGsorBitmaps.TabIndex = 64;
            this.grbVideoFromJPEGsorBitmaps.TabStop  = false;
            this.grbVideoFromJPEGsorBitmaps.Text     = "Video from JPEGs or Bitmaps";
            //
            // btnStopPreview
            //
            this.btnStopPreview.Font     = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.btnStopPreview.Location = new System.Drawing.Point(456, 69);
            this.btnStopPreview.Name     = "btnStopPreview";
            this.btnStopPreview.Size     = new System.Drawing.Size(88, 24);
            this.btnStopPreview.TabIndex = 59;
            this.btnStopPreview.Text     = "Stop preview";
            this.btnStopPreview.Click   += new System.EventHandler(this.btnStopPreview_Click);
            //
            // btnStartPreview
            //
            this.btnStartPreview.Font     = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.btnStartPreview.Location = new System.Drawing.Point(362, 69);
            this.btnStartPreview.Name     = "btnStartPreview";
            this.btnStartPreview.Size     = new System.Drawing.Size(88, 24);
            this.btnStartPreview.TabIndex = 37;
            this.btnStartPreview.Text     = "Start preview";
            this.btnStartPreview.Click   += new System.EventHandler(this.btnStartPreview_Click);
            //
            // chkLoopIndefinitely
            //
#if (!VS2003)
            this.chkLoopIndefinitely.AutoSize = true;
#endif
            this.chkLoopIndefinitely.Checked    = true;
            this.chkLoopIndefinitely.CheckState = System.Windows.Forms.CheckState.Checked;
            this.chkLoopIndefinitely.Enabled    = false;
            this.chkLoopIndefinitely.Font       = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.chkLoopIndefinitely.Location   = new System.Drawing.Point(222, 121);
            this.chkLoopIndefinitely.Name       = "chkLoopIndefinitely";
            this.chkLoopIndefinitely.Size       = new System.Drawing.Size(98, 17);
            this.chkLoopIndefinitely.TabIndex   = 72;
            this.chkLoopIndefinitely.Text       = "loop indefinitely";
            //
            // btnBrowseFolders
            //
            this.btnBrowseFolders.Font     = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.btnBrowseFolders.Location = new System.Drawing.Point(545, 141);
            this.btnBrowseFolders.Name     = "btnBrowseFolders";
            this.btnBrowseFolders.Size     = new System.Drawing.Size(27, 22);
            this.btnBrowseFolders.TabIndex = 71;
            this.btnBrowseFolders.Text     = "...";
            this.btnBrowseFolders.Click   += new System.EventHandler(this.btnBrowseFolders_Click);
            //
            // edtSourceFolder
            //
            this.edtSourceFolder.Location = new System.Drawing.Point(222, 141);
            this.edtSourceFolder.Name     = "edtSourceFolder";
            this.edtSourceFolder.Size     = new System.Drawing.Size(327, 20);
            this.edtSourceFolder.TabIndex = 70;
            //
            // Label1
            //
            this.Label1.AutoSize  = true;
            this.Label1.Font      = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Label1.Location  = new System.Drawing.Point(29, 141);
            this.Label1.Name      = "Label1";
            this.Label1.Size      = new System.Drawing.Size(190, 13);
            this.Label1.TabIndex  = 69;
            this.Label1.Text      = "source folder of the BMP or JPEG files:";
            this.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            //
            // PictureBox4
            //
            this.PictureBox4.Image    = ((System.Drawing.Image)(resources.GetObject("PictureBox4.Image")));
            this.PictureBox4.Location = new System.Drawing.Point(194, 59);
            this.PictureBox4.Name     = "PictureBox4";
            this.PictureBox4.Size     = new System.Drawing.Size(50, 50);
            this.PictureBox4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
            this.PictureBox4.TabIndex = 68;
            this.PictureBox4.TabStop  = false;
            //
            // PictureBox3
            //
            this.PictureBox3.Image    = ((System.Drawing.Image)(resources.GetObject("PictureBox3.Image")));
            this.PictureBox3.Location = new System.Drawing.Point(138, 59);
            this.PictureBox3.Name     = "PictureBox3";
            this.PictureBox3.Size     = new System.Drawing.Size(50, 50);
            this.PictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
            this.PictureBox3.TabIndex = 67;
            this.PictureBox3.TabStop  = false;
            //
            // PictureBox2
            //
            this.PictureBox2.Image    = ((System.Drawing.Image)(resources.GetObject("PictureBox2.Image")));
            this.PictureBox2.Location = new System.Drawing.Point(82, 59);
            this.PictureBox2.Name     = "PictureBox2";
            this.PictureBox2.Size     = new System.Drawing.Size(50, 50);
            this.PictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
            this.PictureBox2.TabIndex = 66;
            this.PictureBox2.TabStop  = false;
            //
            // PictureBox1
            //
            this.PictureBox1.Image    = ((System.Drawing.Image)(resources.GetObject("PictureBox1.Image")));
            this.PictureBox1.Location = new System.Drawing.Point(26, 59);
            this.PictureBox1.Name     = "PictureBox1";
            this.PictureBox1.Size     = new System.Drawing.Size(50, 50);
            this.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
            this.PictureBox1.TabIndex = 65;
            this.PictureBox1.TabStop  = false;
            //
            // rbFromBMPorJPEGfiles
            //
            this.rbFromBMPorJPEGfiles.Font            = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.rbFromBMPorJPEGfiles.Location        = new System.Drawing.Point(15, 121);
            this.rbFromBMPorJPEGfiles.Name            = "rbFromBMPorJPEGfiles";
            this.rbFromBMPorJPEGfiles.Size            = new System.Drawing.Size(152, 21);
            this.rbFromBMPorJPEGfiles.TabIndex        = 64;
            this.rbFromBMPorJPEGfiles.Text            = "from BMP or JPEG files:";
            this.rbFromBMPorJPEGfiles.CheckedChanged += new System.EventHandler(this.rbFromBMPorJPEGfiles_CheckedChanged);
            //
            // rbFromPictureBox
            //
            this.rbFromPictureBox.Checked         = true;
            this.rbFromPictureBox.Font            = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.rbFromPictureBox.Location        = new System.Drawing.Point(15, 35);
            this.rbFromPictureBox.Name            = "rbFromPictureBox";
            this.rbFromPictureBox.Size            = new System.Drawing.Size(192, 24);
            this.rbFromPictureBox.TabIndex        = 63;
            this.rbFromPictureBox.TabStop         = true;
            this.rbFromPictureBox.Text            = "from PictureBox images, e.g.:";
            this.rbFromPictureBox.CheckedChanged += new System.EventHandler(this.rbFromPictureBox_CheckedChanged);
            //
            // lblFirstSelectJPEGsOrBitmaps
            //
            this.lblFirstSelectJPEGsOrBitmaps.AutoSize  = true;
            this.lblFirstSelectJPEGsOrBitmaps.Font      = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lblFirstSelectJPEGsOrBitmaps.ForeColor = System.Drawing.Color.Red;
            this.lblFirstSelectJPEGsOrBitmaps.Location  = new System.Drawing.Point(8, 17);
            this.lblFirstSelectJPEGsOrBitmaps.Name      = "lblFirstSelectJPEGsOrBitmaps";
            this.lblFirstSelectJPEGsOrBitmaps.Size      = new System.Drawing.Size(565, 13);
            this.lblFirstSelectJPEGsOrBitmaps.TabIndex  = 62;
            this.lblFirstSelectJPEGsOrBitmaps.Text      = "first select VideoSource = vs_JPEGsOrBitmaps in the Video Sources list of the  \"v" +
                                                          "ideo source\" tab";
            //
            // Label2
            //
            this.Label2.AutoSize = true;
            this.Label2.Font     = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Label2.Location = new System.Drawing.Point(359, 53);
            this.Label2.Name     = "Label2";
            this.Label2.Size     = new System.Drawing.Size(103, 13);
            this.Label2.TabIndex = 73;
            this.Label2.Text     = "Start / Stop Preview";
            //
            // edtVideoFromJPEGsorBitmaps
            //
            this.edtVideoFromJPEGsorBitmaps.BackColor = System.Drawing.Color.Silver;
            this.edtVideoFromJPEGsorBitmaps.Location  = new System.Drawing.Point(595, 6);
            this.edtVideoFromJPEGsorBitmaps.Multiline = true;
            this.edtVideoFromJPEGsorBitmaps.Name      = "edtVideoFromJPEGsorBitmaps";
            this.edtVideoFromJPEGsorBitmaps.ReadOnly  = true;
            this.edtVideoFromJPEGsorBitmaps.Size      = new System.Drawing.Size(315, 170);
            this.edtVideoFromJPEGsorBitmaps.TabIndex  = 63;
            this.edtVideoFromJPEGsorBitmaps.Text      = resources.GetString("edtVideoFromJPEGsorBitmaps.Text");
            //
            // VideoFromJPEGsOrBitmaps
            //
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
            this.ClientSize        = new System.Drawing.Size(1053, 290);
            this.ControlBox        = false;
            this.Controls.Add(this.grbVideoFromJPEGsorBitmaps);
            this.Controls.Add(this.edtVideoFromJPEGsorBitmaps);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            this.MaximizeBox     = false;
            this.MinimizeBox     = false;
            this.Name            = "VideoFromJPEGsOrBitmaps";
            this.ShowInTaskbar   = false;
            this.VisibleChanged += new System.EventHandler(this.VideoFromJPEGsOrBitmaps_VisibleChanged);
            this.grbVideoFromJPEGsorBitmaps.ResumeLayout(false);
            this.grbVideoFromJPEGsorBitmaps.PerformLayout();
#if (!VS2003)
            ((System.ComponentModel.ISupportInitialize)(this.PictureBox4)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.PictureBox3)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.PictureBox2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).EndInit();
#endif
            this.ResumeLayout(false);
            this.PerformLayout();
        }
예제 #59
0
파일: Punter.cs 프로젝트: sahil670/CockRace
 public abstract void SetPunter(CockBet c**k, int cash, RadioButton radioButton, Label label);
        private void SpawnQuestion()
        {
            List <int>    liAnswers = new List <int>();
            List <Answer> lxAnswer;

            txtBlockQuestions.Text = m_lxQuestions[m_iIndex].Name;
            m_iTempID = m_lxQuestions[m_iIndex].ID;
            lxAnswer  = m_xRepository.GetAnwsers(m_iTempID);
            int iCount = m_iIndex + 1;

            txtBlockQuestionNumber.Text = iCount.ToString() + "/" + m_iAmountOfQuestions.ToString();
            if (imageImage.Source != null)
            {
                imageImage.Source = null;
            }
            if (!string.IsNullOrEmpty(m_lxQuestions[m_iIndex].AppData))
            {
                ImageSourceConverter xImageSourceConverter = new ImageSourceConverter();
                imageImage.MaxHeight = 200;
                imageImage.MaxWidth  = 200;
                imageImage.Source    = (ImageSource)xImageSourceConverter.ConvertFromString(m_lxQuestions[m_iIndex].AppData);

                Console.WriteLine("THERE SHOULD BE A FINE PICUTEREAS");
            }
            foreach (var item in lxAnswer)
            {
                m_liIndexes.Add(item.ID);
            }
            for (int i = 0; i < lxAnswer.Count; i++)
            {
                Thickness xThickness = new Thickness();
                xThickness.Top = 10;
                TextBlock xTextBlock = new TextBlock();
                xTextBlock.Text   = lxAnswer[i].Text;
                xTextBlock.Margin = xThickness;
                lbAnswer.Items.Add(xTextBlock);

                switch (m_lxQuestions[m_iIndex].QuestionType)
                {
                case "envalsfråga":
                    RadioButton xRadio = new RadioButton();
                    foreach (var item in m_lxStudentAnswer)
                    {
                        if (item.Answer == lxAnswer[i].ID)
                        {
                            xRadio.IsChecked = true;
                        }
                    }
                    lbAnswer.Items.Add(xRadio);
                    break;

                case "Flervalsfråga":
                    CheckBox xCheck = new CheckBox();
                    foreach (var item in m_lxStudentAnswer)
                    {
                        if (item.Answer == lxAnswer[i].ID)
                        {
                            xCheck.IsChecked = true;
                        }
                    }
                    lbAnswer.Items.Add(xCheck);
                    break;

                case "rangordning":
                    ComboBox xCombo = new ComboBox();
                    for (int j = 0; j < lxAnswer.Count; j++)
                    {
                        xCombo.Items.Add(j + 1);
                    }
                    foreach (var item in m_lxStudentAnswer)
                    {
                        if (item.Answer == lxAnswer[i].ID)
                        {
                            xCombo.SelectedIndex = item.OrderPostition.Value;
                        }
                    }
                    lbAnswer.Items.Add(xCombo);
                    break;

                default:
                    break;
                }
            }
        }