Inheritance: ButtonBase, System.ComponentModel.IComponent, System.IDisposable, IOleControl, IOleObject, IOleInPlaceObject, IOleInPlaceActiveObject, IOleWindow, IViewObject, IViewObject2, IPersist, IPersistStreamInit, IPersistPropertyBag, IPersistStorage, IQuickActivate, ISupportOleDropSource, IDropTarget, System.ComponentModel.ISynchronizeInvoke, IWin32Window, System.Windows.Forms.Layout.IArrangedElement, IBindableComponent
コード例 #1
0
		public override void OnActivityCreated (Bundle savedInstanceState)
		{
			base.OnActivityCreated (savedInstanceState);

			View decorView = Activity.Window.DecorView;
			var parentView = (ViewGroup)Activity.Window.DecorView
				.FindViewById (Resource.Id.sample_main_layout);

			mLowProfileCheckBox = new CheckBox (Activity);
			mLowProfileCheckBox.Text = "Enable Low Profile mode.";
			parentView.AddView (mLowProfileCheckBox);

			mHideNavCheckbox = new CheckBox (Activity);
			mHideNavCheckbox.Checked = true;
			mHideNavCheckbox.Text = "Hide Navigation bar";
			parentView.AddView (mHideNavCheckbox);

			mHideStatusBarCheckBox = new CheckBox (Activity);
			mHideStatusBarCheckBox.Checked = true;
			mHideStatusBarCheckBox.Text = "Hide Status Bar";
			parentView.AddView (mHideStatusBarCheckBox);

			mImmersiveModeCheckBox = new CheckBox (Activity);
			mImmersiveModeCheckBox.Text = "Enable Immersive Mode.";
			parentView.AddView (mImmersiveModeCheckBox);

			mImmersiveModeStickyCheckBox = new CheckBox (Activity);
			mImmersiveModeStickyCheckBox.Text = "Enable Immersive Mode (Sticky)";
			parentView.AddView (mImmersiveModeStickyCheckBox);
		}
コード例 #2
0
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);
			SetContentView (Resource.Layout.Main);

			mCustomConfig = FindViewById <CheckBox> (Resource.Id.custom_app_limits);
		
			bool customChecked = 
				PreferenceManager.GetDefaultSharedPreferences (this).GetBoolean (
					CUSTOM_CONFIG_KEY, false);

			if (customChecked) mCustomConfig.Checked = true;

			mMultiEntryValue = FindViewById <TextView> (Resource.Id.multi_entry_id);
			mChoiceEntryValue = FindViewById <TextView> (Resource.Id.choice_entry_id);
			mBooleanEntryValue = FindViewById <TextView> (Resource.Id.boolean_entry_id);

			/**
    		* Saves custom app restriction to the shared preference.
    	 	*
    		* This flag is used by {@code GetRestrictionsReceiver} to determine if a custom app
    	 	* restriction activity should be used.
    	 	*
    	 	* @param view
    	 	*/
			mCustomConfig.Click += delegate (object sender, EventArgs e) {
				var editor = PreferenceManager.GetDefaultSharedPreferences (this).Edit ();
				editor.PutBoolean (CUSTOM_CONFIG_KEY, mCustomConfig.Checked).Commit ();
			};
		}
コード例 #3
0
ファイル: MainForm.cs プロジェクト: mono/gert
	public MainForm ()
	{
		_checkedListBox = new CheckedListBox ();
		_checkedListBox.Dock = DockStyle.Top;
		_checkedListBox.Font = new Font (_checkedListBox.Font.FontFamily, _checkedListBox.Font.Height + 8);
		_checkedListBox.Height = 120;
		Controls.Add (_checkedListBox);
		// 
		// _threeDCheckBox
		// 
		_threeDCheckBox = new CheckBox ();
		_threeDCheckBox.Checked = _checkedListBox.ThreeDCheckBoxes;
		_threeDCheckBox.FlatStyle = FlatStyle.Flat;
		_threeDCheckBox.Location = new Point (8, 125);
		_threeDCheckBox.Text = "3D checkboxes";
		_threeDCheckBox.CheckedChanged += new EventHandler (ThreeDCheckBox_CheckedChanged);
		Controls.Add (_threeDCheckBox);
		// 
		// MainForm
		// 
		ClientSize = new Size (300, 150);
		Location = new Point (250, 100);
		StartPosition = FormStartPosition.Manual;
		Text = "bug #82100";
		Load += new EventHandler (MainForm_Load);
	}
コード例 #4
0
ファイル: MainForm.cs プロジェクト: mono/gert
	public MainForm ()
	{
		// 
		// _normalCheckBox
		// 
		_normalCheckBox = new CheckBox ();
		_normalCheckBox.Checked = true;
		_normalCheckBox.Location = new Point (55, 8);
		_normalCheckBox.Size = new Size (60, 20);
		_normalCheckBox.Text = "Normal";
		Controls.Add (_normalCheckBox);
		// 
		// _buttonCheckBox
		// 
		_buttonCheckBox = new CheckBox ();
		_buttonCheckBox.Appearance = Appearance.Button;
		_buttonCheckBox.Checked = true;
		_buttonCheckBox.Location = new Point (170, 8);
		_buttonCheckBox.Size = new Size (60, 20);
		_buttonCheckBox.Text = "Button";
		Controls.Add (_buttonCheckBox);
		// 
		// MainForm
		// 
		ClientSize = new Size (300, 50);
		Location = new Point (250, 100);
		StartPosition = FormStartPosition.Manual;
		Text = "bug #82657";
		Load += new EventHandler (MainForm_Load);
	}
コード例 #5
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Settings);
            ActionBar.SetDisplayHomeAsUpEnabled(true);

            counter = 0;
            var prefs =
                AndroidAppPreferences.Create(Application.Context.GetSharedPreferences(KeySndrApplication.AppPreferencesId, FileCreationMode.Private));

            editIpView = FindViewById<EditText>(Resource.Id.ipEditText);
            editPortView = FindViewById<EditText>(Resource.Id.portEditText);
            useCacheView = FindViewById<CheckBox>(Resource.Id.enableCache);

            if (!string.IsNullOrEmpty(prefs.Ip))
                editIpView.Text = prefs.Ip;
            if (prefs.Port > 0)
                editPortView.Text = prefs.Port.ToString();
            useCacheView.Checked = prefs.UseCache;

            probe = new Probe("KeySndrServer");
            probe.BeaconsUpdated += Probe_BeaconsUpdated;


            t = new Timer(1000);
            t.Elapsed += TimerOnElapsed;
            if (Intent.Extras == null || !Intent.Extras.ContainsKey("search"))
                return;
        }
コード例 #6
0
ファイル: StartMenu.cs プロジェクト: jannavarro/prototypes
 private void DrawCreateToonMenu()
 {
     DarkGUI.Instance.ClearAllUI();
     var charName = new TextBox("charName", new Rect(XCentre - 50, YCentre, 100, 50));
     var isMale = new CheckBox("isMale?", new Rect(XCentre - 50, YCentre - 50, 100, 50));
     new Button("Create!", XCentre - 50, YCentre - 150).OnClick += delegate(Button sender) { _network.Send(new CreateCharacter() { Name = charName.Text, isMale = isMale.Checked }); };
 }
コード例 #7
0
ファイル: MainForm.cs プロジェクト: mono/gert
	public MainForm ()
	{
		// 
		// _richTextBox
		// 
		_richTextBox = new RichTextBox ();
		_richTextBox.Dock = DockStyle.Top;
		_richTextBox.Height = 160;
		Controls.Add (_richTextBox);
		// 
		// _wordWrapCheckBox
		// 
		_wordWrapCheckBox = new CheckBox ();
		_wordWrapCheckBox.Checked = _richTextBox.WordWrap;
		_wordWrapCheckBox.Location = new Point (8, 170);
		_wordWrapCheckBox.Text = "WordWrap";
		_wordWrapCheckBox.CheckedChanged += new EventHandler (WordWrapCheckBox_CheckedChanged);
		Controls.Add (_wordWrapCheckBox);
		// 
		// MainForm
		// 
		ClientSize = new Size (300, 200);
		Location = new Point (250, 100);
		StartPosition = FormStartPosition.Manual;
		Text = "bug #81488";
		Load += new EventHandler (MainForm_Load);
	}
コード例 #8
0
ファイル: Area.aspx.cs プロジェクト: MShah890/Eventica
    protected void btndelete_Click(object sender, EventArgs e)
    {
        CheckBox cb = new CheckBox();

        bool flag = false;

        for(int i=0;i<GridView1.Rows.Count;i++)
        {
            cb=(CheckBox)GridView1.Rows[i].FindControl("CheckBox1");

            if(cb.Checked)
            {
                objareabal.AreaId = Convert.ToInt32(GridView1.Rows[i].Cells[3].Text);

                objareadal.DeleteArea(objareabal);

                flag = true;
            }


        }

        if(flag)
        {
            Response.Write("<script>Alert('Records Deleted');</script>");
        }
        else
        {
            Response.Write("<script>alert('Please Select Record to Delete')</script>");
        }

        bindgrid();

    }
コード例 #9
0
ファイル: Menu.cs プロジェクト: RoachxD/EloBuddy
 public static void Initialize()
 {
     ClearMenu = MainMenu.AddSubMenu("Clear", "Clear");
     ClearMenu.AddGroupLabel("Clear Options");
     _q = ClearMenu.Add("Clear.Q", new CheckBox("Use Q"));
     _w = ClearMenu.Add("Clear.W", new CheckBox("Use W"));
 }
コード例 #10
0
ファイル: Roles.aspx.cs プロジェクト: queer1/Gaymer2.0
    private void rendreNewView(DataTable dt)
    {
        CheckBox cb;
        
        foreach (DataRow row in dt.Rows)
        {
            //<asp:CheckBox ID="CheckBox1" runat="server" />
            cb = new CheckBox();
            cb.ID = "pid_" + ((int)row["PermissionId"]).ToString() + "_" + RoleList.SelectedValue;
            cb.Text = (string)row["Label"] + " (" + (string)row["PermissionUniqueString"] + ")";
            if ((bool)row["enabled"])
            {
                cb.Checked = true;
            }
            else
            {
                cb.Checked = false;
            }
            panel.Controls.Add(cb);
            panel.Controls.Add(br());
        }

        Button btnSave = new Button();
        btnSave.Text = "Save";
        btnSave.Click += new EventHandler(this.Savebtn_Click);
        panel.Controls.Add(btnSave);
        panel.Controls.Add(br());
    }
コード例 #11
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource

            SetContentView(Resource.Layout.Main);

            setupParent(FindViewById<LinearLayout>(Resource.Id.mainLayout));
            listViewGoodsMain = FindViewById<ListView>(Resource.Id.listViewGoodsMain);

            goodsItemsList = new List<GoodsItem>();
            goodsItemsList.Add(new GoodsItem() { Id = 1, Quantity = 1, Name = "Пельмешки"});
            goodsItemsList.Add(new GoodsItem() { Id = 2, Quantity = 2, Name = "Сосисоны" });

            myGoodsItemsAdapter = new GoodsItemsAdapter(this, goodsItemsList);
            listViewGoodsMain.Adapter = myGoodsItemsAdapter;

            var emptyText = FindViewById<TextView>(Resource.Id.textViewGoodsListEmpty);
            listViewGoodsMain.EmptyView = emptyText;

            editTextNewProduct = FindViewById<EditText>(Resource.Id.EditTextNewProduct);
            editTextNewProduct.EditorAction += editTextNewProduct_EditorAction;
            editTextNewProduct.Click += editTextNewProduct_Click;

            checkBoxRed = FindViewById<CheckBox>(Resource.Id.checkBoxRed);
            checkBoxRed.Click += checkBoxRed_Click;
        }
コード例 #12
0
ファイル: MainForm.cs プロジェクト: mono/gert
	public MainForm ()
	{
		// 
		// _textBox
		// 
		_textBox = new TextBox ();
		_textBox.Dock = DockStyle.Top;
		_textBox.Height = 100;
		_textBox.Multiline = true;
		Controls.Add (_textBox);
		// 
		// _multilineCheckBox
		// 
		_multilineCheckBox = new CheckBox ();
		_multilineCheckBox.Checked = true;
		_multilineCheckBox.Location = new Point (8, 110);
		_multilineCheckBox.Size = new Size (100, 20);
		_multilineCheckBox.Text = "Multiline";
		_multilineCheckBox.CheckedChanged += new EventHandler (MultilineCheckBox_CheckedChanged);
		Controls.Add (_multilineCheckBox);
		// 
		// MainForm
		// 
		ClientSize = new Size (300, 135);
		Location = new Point (250, 100);
		StartPosition = FormStartPosition.Manual;
		Text = "bug #82749";
		Load += new EventHandler (MainForm_Load);
	}
コード例 #13
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (validateSelection() == false) return;

        bool saved = false;
        int i = 0;
        int questionid = 0;
        foreach (GridViewRow gr in gvwQuestionBank.Rows)
        {
            questionid = int.Parse(gvwQuestionBank.Rows[i].Cells[1].Text);
            CheckBox cb = new CheckBox();
            cb = (CheckBox)gr.Controls[0].FindControl("CheckBox1");
            if (cb.Checked)
            {
                InsertQuestionDetails(questionid);
                saved = true;
            }

            i = i + 1;

        }
        if (saved == true)
            lblMessage.Text = "saved Successfully";
        else lblMessage.Text = "no item selected";
    }
		public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			Dialog.SetTitle (GetString (Resource.String.sign_in));
			var v = inflater.Inflate (Resource.Layout.fingerprint_dialog_container, container, false);
			mCancelButton = (Button)v.FindViewById (Resource.Id.cancel_button);
			mCancelButton.Click += (object sender, EventArgs e) => Dismiss ();

			mSecondDialogButton = (Button)v.FindViewById (Resource.Id.second_dialog_button);
			mSecondDialogButton.Click += (object sender, EventArgs e) => {
				if (mStage == Stage.Fingerprint) {
					GoToBackup ();
				} else {
					VerifyPassword ();
				}
			};

			mFingerprintContent = v.FindViewById (Resource.Id.fingerprint_container);
			mBackupContent = v.FindViewById (Resource.Id.backup_container);
			mPassword = v.FindViewById<EditText> (Resource.Id.password);
			mPassword.SetOnEditorActionListener (this);
			mPasswordDescriptionTextView = v.FindViewById<TextView> (Resource.Id.password_description);
			mUseFingerprintFutureCheckBox = v.FindViewById<CheckBox> (Resource.Id.use_fingerprint_in_future_check);
			mNewFingerprintEnrolledTextView = v.FindViewById<TextView> (Resource.Id.new_fingerprint_enrolled_description);
			mFingerprintUiHelper = mFingerprintUiHelperBuilder.Build (
				(ImageView)v.FindViewById (Resource.Id.fingerprint_icon),
				(TextView)v.FindViewById (Resource.Id.fingerprint_status), this);
			UpdateStage ();

			// If fingerprint authentication is not available, switch immediately to the backup
			// (password) screen.
			if (!mFingerprintUiHelper.IsFingerprintAuthAvailable)
				GoToBackup ();

			return v;
		}
コード例 #15
0
ファイル: Config.cs プロジェクト: TopGunner/EloBuddy
 static Misc()
 {
     // Initialize the menu values
     Menu = Config.Menu.AddSubMenu("Misc");
     _drawQ = Menu.Add("drawQ", new CheckBox("Draw Q"));
     _drawW = Menu.Add("drawW", new CheckBox("Draw W"));
     _drawE = Menu.Add("drawE", new CheckBox("Draw E"));
     _drawReadySpellsOnly = Menu.Add("drawReady", new CheckBox("Draw ready spells only"));
     Menu.AddSeparator();
     _ksW = Menu.Add("ksQ", new CheckBox("KS with W"));
     _ksR = Menu.Add("ksR", new CheckBox("KS with R"));
     Menu.AddSeparator();
     _useHeal = Menu.Add("useHeal", new CheckBox("Use Heal Smart"));
     _useQSS = Menu.Add("useQSS", new CheckBox("Use QSS"));
     Menu.AddSeparator();
     for (int i = 0; i < EntityManager.Heroes.Allies.Count; i++)
     {
         _useHealOn[i] = Menu.Add("useHeal" + i, new CheckBox("Use Heal to save " + EntityManager.Heroes.Allies[i].ChampionName));
     }
     Menu.AddSeparator();
     _useEOnGapcloser = Menu.Add("useEOnGapcloser", new CheckBox("Use E on Gapcloser", false));
     _EOnImmobileEnemy = Menu.Add("EOnImmobile", new CheckBox("Use E on immobile enemy"));
     _EOnSlowedEnemy = Menu.Add("EOnSlowed", new CheckBox("Use E on slowed enemy", false));
     _useEInterrupt = Menu.Add("EToInterrupt", new CheckBox("Use E as interrupt"));
     _interruptDangerLvl = Menu.Add("InterruptDangerLvl", new Slider("Interrupt Danger Lvl", 2, 1, 3));
     Menu.AddSeparator();
     _stealDrake = Menu.Add("stealDrake", new CheckBox("Try to steal Dragon"));
     _stealBaron = Menu.Add("stealBaron", new CheckBox("Try to steal Baron"));
     Menu.AddSeparator();
     _autolevelskills = Menu.Add("autolevelskills", new CheckBox("Autolevelskills"));
     _autoBuyStartingItems = Menu.Add("autoBuyStartingItems", new CheckBox("Autobuy Starting Items (SR only)"));
     Menu.AddSeparator();
     _useSkinHack = Menu.Add("useSkinHack", new CheckBox("Use Skinhack", false));
     _skinId = Menu.Add("skinId", new Slider("Skin ID", 6, 1, 14));
 }
コード例 #16
0
ファイル: Config.cs プロジェクト: tramyeu/EloBuddy
 static DebugMenu()
 {
     MenuDebug = Config.Menu.AddSubMenu("Debug");
     MenuDebug.AddLabel("This is for debugging purposes only.");
     _debugChat = MenuDebug.Add("debugChat", new CheckBox("Show debug messages in chat", false));
     _debugConsole = MenuDebug.Add("debugConsole", new CheckBox("Show debug messages in console", false));
 }
コード例 #17
0
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);
			SetContentView(Resource.Layout.action_bar_fragment_menu);

			// Make sure the two menu fragments are created.
			var fm = SupportFragmentManager;
			var ft = fm.BeginTransaction();
			mFragment1 = (MenuFragment)fm.FindFragmentByTag("f1");
			if (mFragment1 == null) {
				mFragment1 = new MenuFragment();
				ft.Add(mFragment1, "f1");
			}
			mFragment2 = (Menu2Fragment)fm.FindFragmentByTag("f2");
			if (mFragment2 == null) {
				mFragment2 = new Menu2Fragment();
				ft.Add(mFragment2, "f2");
			}
			ft.Commit();

			// Watch check box clicks.
			mCheckBox1 = (CheckBox)FindViewById(Resource.Id.menu1);
			mCheckBox1.Click += OnClickListener_OnClick;
			mCheckBox2 = (CheckBox)FindViewById(Resource.Id.menu2);
			mCheckBox2.Click += OnClickListener_OnClick;
			mCheckBox3 = (CheckBox)FindViewById(Resource.Id.menu3);
			mCheckBox3.Click += OnClickListener_OnClick;
			mHasOptionsMenu = (CheckBox)FindViewById(Resource.Id.has_options_menu);
			mHasOptionsMenu.Click += OnClickListener_OnClick;
			mMenuVisibility = (CheckBox)FindViewById(Resource.Id.menu_visibility);
			mMenuVisibility.Click += OnClickListener_OnClick;

			// Make sure fragments start out with correct visibility.
			UpdateFragmentVisibility();
		}
コード例 #18
0
ファイル: SendMainAndSms.cs プロジェクト: cnbin/HLB
    /// <summary>
    /// 发送内部短信和手机短信
    /// </summary>
    /// <param name="MailChk">内部短信选择框</param>
    /// <param name="SmsChk">手机短信选择框</param>
    /// <param name="ContentStr">发送消息内容</param>
    /// <param name="ToUserList">接收人列表</param>
    public static void SendMessage(CheckBox MailChk,CheckBox SmsChk,string ContentStr,string ToUserList)
    {
        if (SmsChk.Checked == true)
        {
            //发送手机信息
            //Mobile.SendSMS("系统消息", ToUserList, ContentStr);
            string WrongUser = Mobile.UserToTel(ToUserList, ContentStr);    //发送人名,发送内容
        }

        string[] UserListStr = ToUserList.Split(',');
        for (int i = 0; i < UserListStr.Length; i++)
        {
            if (MailChk.Checked == true)
            {
                //发送内部信息
                ZWL.BLL.ERPLanEmail MyMail = new ZWL.BLL.ERPLanEmail();
                MyMail.EmailContent = ContentStr;
                MyMail.EmailState = "未读";
                MyMail.EmailTitle = ContentStr;
                MyMail.FromUser = "******";
                MyMail.FuJian = "";
                MyMail.TimeStr = DateTime.Now;
                MyMail.ToUser = UserListStr[i].ToString();
                MyMail.Add();
            }
        }
    }
コード例 #19
0
		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 = "银行卡信息";

			edit_cardOwnerName = FindViewById<EditText> (Resource.Id.edit_cardOwnerName);
			edit_IdCardNo = FindViewById<EditText> (Resource.Id.edit_IdCardNo);
			edit_bankopenloc = FindViewById<EditText> (Resource.Id.edit_bankopenloc);
			edit_bankbranch = FindViewById<EditText> (Resource.Id.edit_bankbranch);
			edit_bankCardNo = FindViewById<EditText> (Resource.Id.edit_bankCardNo);
			edit_prePhoneNo = FindViewById<EditText> (Resource.Id.edit_prePhoneNo);
			edit_Code = FindViewById<EditText> (Resource.Id.edit_Code);
			img_choosebank = FindViewById<ImageView> (Resource.Id.img_choosebank);

			tv_SendCodeStatusShow = FindViewById<TextView> (Resource.Id.tv_SendCodeStatusShow);

			cb_defaut_bank = FindViewById<CheckBox> (Resource.Id.cb_defaut_bank);
			btn_Send = FindViewById<Button> (Resource.Id.btn_Send);
			btn_Add = FindViewById<Button> (Resource.Id.btn_Add);

			//选择银行卡
			img_choosebank.Click += (sender, e) => 
			{
				var intent = new Intent(this,typeof(ChooseBankTypeActivity));
				var requestCode = 0;  
				StartActivityForResult(intent,requestCode);
			};
			//安全码验证
			edit_Code.TextChanged += (sender, e) => 
			{
				if(edit_Code.Text.Length>0)
					btn_Add.Enabled = true;
				else
					btn_Add.Enabled =false;
			};
			//初始化计时器,启动
			mc = new MyCount(this,60000,1000);
			//发送验证码
			btn_Send.Click += (sender, e) => 
			{
				tv_SendCodeStatusShow.Visibility = ViewStates.Invisible;
				btn_Send.Enabled = false;
				SendCode();
			};

			//添加银行卡信息
			btn_Add.Click += (sender, e) => 
			{
				AddBank();
			};
		}
コード例 #20
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);

            m_dataManager = DataManager.GetDataManager();

            m_connectionButton = FindViewById<Button>(Resource.Id.connectButton);
            m_login = FindViewById<EditText>(Resource.Id.loginField);
            m_password = FindViewById<EditText>(Resource.Id.passwordField);
            m_checkBox = FindViewById<CheckBox>(Resource.Id.rememberPass);

            // Store user data
            if (m_dataManager.RetreiveData<bool>("loginCheckBox") == true)
            {
                m_login.Text = m_dataManager.RetreiveData<string>("login");
                m_password.Text = m_dataManager.RetreiveData<string>("password");
                m_checkBox.Checked = m_dataManager.RetreiveData<bool>("loginCheckBox");
            }

            StartService(new Intent(this, typeof(NetworkService)));
            BindService(new Intent(this, typeof(NetworkService)), this, Bind.AutoCreate);

            m_connectionButton.Click += delegate {
                m_netwokService.SetLoginInfo(m_login.Text, m_password.Text);
                m_netwokService.LoginEvent += OnLogin;
                m_netwokService.Login();
            };
        }
コード例 #21
0
    protected void Page_Load(object sender, EventArgs e)
    {
        List<Event> events = Event.GetAllEvents();

        foreach (Event selectedEvent in events)
        {
            Panel pnlEvent = new Panel();
            pnlEvent.ID = selectedEvent.ID.ToString();
            pnlEvent.Attributes.Add("class", "panel");
            CheckBox chkbxEventName = new CheckBox();
            chkbxEventName.ID = "chkbx" + selectedEvent.Name;
            chkbxEventName.Text = selectedEvent.Name;
            pnlEvent.Controls.Add(chkbxEventName);
            for (int i = 0; i < selectedEvent.MaxTeamSize; i++)
            {
                TextBox txtbxTTID = new TextBox();
                txtbxTTID.ID = "TTID" + (i + 1).ToString() + selectedEvent.ID;
                txtbxTTID.Attributes.Add("placeholder", "TTID " + (i + 1).ToString());
                txtbxTTID.Attributes.Add("style", "display:none;");
                pnlEvent.Controls.Add(txtbxTTID);
                RegularExpressionValidator rev = new RegularExpressionValidator();
                rev.ControlToValidate = txtbxTTID.ClientID;
                rev.Attributes.Add("style", "display:none;");
                rev.ValidationExpression = "\\d{4}";
                rev.ErrorMessage = "*";
                pnlEvent.Controls.Add(rev);
            }
            pnlEvents.Controls.Add(pnlEvent);
        }
    }
コード例 #22
0
ファイル: Program.cs プロジェクト: alvothefirst/EloBuddy
        private static void Game_OnStart(EventArgs args)
        {
            if (Player.Instance.Hero != Champion.Shaco && Player.Instance.Hero != Champion.Leblanc)
                return;

            CloneMenu = MainMenu.AddMenu("Clone control", "yodagodEOQ");
            Chat.Print(Player.Instance.ChampionName + " clone controller loaded", Color.White);

            Control = CloneMenu.Add("Clone", new CheckBox("Control clone"));
            CloneMenu.AddGroupLabel("You can select a target with left click");
            Mode = CloneMenu.Add("Mode", new Slider("", 2, 0, 2));
            Mode.DisplayName = "If health > 40%:" + Modes[Mode.CurrentValue];
            Mode.OnValueChange += delegate
                (ValueBase<int> sender, ValueBase<int>.ValueChangeArgs Args)
            {
                sender.DisplayName = "If health > 40%:" + Modes[Args.NewValue];
            };

            Mode2 = CloneMenu.Add("Mode2", new Slider("", 0, 0, 2));
            Mode2.DisplayName = "If health < 40%:" + Modes[Mode2.CurrentValue];
            Mode2.OnValueChange += delegate
                (ValueBase<int> sender, ValueBase<int>.ValueChangeArgs Args)
            {
                sender.DisplayName = "If health < 40%:" + Modes[Args.NewValue];
            };
            Range = CloneMenu.Add("Range", new Slider("Get targets within {0} range", 2000, 1, 10000));
            

            Game.OnUpdate += ControlClone;

            GameObject.OnCreate += CreateClone;
            GameObject.OnDelete += DeleteClone;
        }
コード例 #23
0
        public override View OnCreateView(LayoutInflater Inflater, ViewGroup container,
                Bundle savedInstanceState) {
            View v = Inflater.Inflate(R.Layout.fragment_menu, container, false);

            // Make sure the two menu fragments are created.
            FragmentManager fm = GetChildFragmentManager();
            FragmentTransaction ft = fm.BeginTransaction();
            mFragment1 = fm.FindFragmentByTag("f1");
            if (mFragment1 == null) {
                mFragment1 = new FragmentMenuSupport.MenuFragment();
                ft.Add(mFragment1, "f1");
            }
            mFragment2 = fm.FindFragmentByTag("f2");
            if (mFragment2 == null) {
                mFragment2 = new FragmentMenuSupport.Menu2Fragment();
                ft.Add(mFragment2, "f2");
            }
            ft.Commit();
        
            // Watch check box clicks.
            mCheckBox1 = (CheckBox)v.FindViewById(R.Id.menu1);
            mCheckBox1.Click += (o, a) => UpdateFragmentVisibility();
            mCheckBox2 = (CheckBox)v.FindViewById(R.Id.menu2);
            mCheckBox2.Click += (o, a) => UpdateFragmentVisibility();
        
            // Make sure fragments start out with correct visibility.
            UpdateFragmentVisibility();

            return v;
        }
コード例 #24
0
ファイル: LoginActivity.cs プロジェクト: CXuesong/App2
 protected override async void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     SetContentView(Resource.Layout.Login);
     GlobalServices.XjtuSite.Account.IsLoggedInChanged += Account_IsLoggedInChanged;
     if (!await UpdateAccountStatus())
     {
         userNameView = FindViewById<EditText>(Resource.Id.accountNameEdit);
         passwordView = FindViewById<EditText>(Resource.Id.passwordEdit);
         savePasswordCheckBox = FindViewById<CheckBox>(Resource.Id.savePasswordCheckbox);
         loginButton = FindViewById<Button>(Resource.Id.loginButton);
         //ÔØÈëÉèÖá£
         using (var pref = GetPreferences(FileCreationMode.Private))
         {
             userNameView.Text = pref.GetString("userName", "");
             passwordView.Text = pref.GetString("password", "");
             savePasswordCheckBox.Checked = pref.GetBoolean("savePassword", false);
         }
         if (!string.IsNullOrWhiteSpace(userNameView.Text)) passwordView.RequestFocus();
         //ÕìÌýʼþ¡£
         EventHandler<TextChangedEventArgs> userNamePasswordChanged = (_, e) =>
         {
             loginButton.Enabled = !string.IsNullOrWhiteSpace(userNameView.Text) &&
                                   !string.IsNullOrEmpty(passwordView.Text);
         };
         userNameView.TextChanged += userNamePasswordChanged;
         passwordView.TextChanged += userNamePasswordChanged;
         savePasswordCheckBox.CheckedChange += SavePasswordCheckBox_CheckedChange;
         loginButton.Click += LoginButton_Click;
     }
 }
コード例 #25
0
ファイル: ExpenseActivity.cs プロジェクト: jv9/MyExpenses
    protected async override void OnCreate(Bundle bundle)
    {
      base.OnCreate(bundle);

      SetContentView(Resource.Layout.view_expense);

      dialog = ServiceContainer.Resolve<IMessageDialog>();

      var id = Intent.GetIntExtra("ID", -1);
      viewModel = ServiceContainer.Resolve<ExpenseViewModel>();
      await viewModel.Init(id);

      this.ActionBar.Title = viewModel.Title;
      viewModel.IsBusyChanged = (busy) =>
      {
        if (busy)
          AndHUD.Shared.Show(this, "Loading...");
        else
          AndHUD.Shared.Dismiss(this);
      };

      name = FindViewById<EditText>(Resource.Id.name);
      date = FindViewById<DatePicker>(Resource.Id.date);
      notes = FindViewById<EditText>(Resource.Id.notes);
      total = FindViewById<EditText>(Resource.Id.total);
      billable = FindViewById<CheckBox>(Resource.Id.billable);
      category = FindViewById<Spinner>(Resource.Id.category);
      category.Adapter = new ArrayAdapter<string>(this, global::Android.Resource.Layout.SimpleSpinnerDropDownItem, viewModel.Categories);
      category.SetSelection(viewModel.Categories.IndexOf(viewModel.Category));
      name.Text = viewModel.Name;
      date.DateTime = viewModel.Due;
      notes.Text = viewModel.Notes;
      total.Text = viewModel.Total;
      billable.Checked = viewModel.Billable;
    }
    protected void btnDelete_Click(object sender, EventArgs e)
    {
        CheckBox cb = new CheckBox();
        bool flag = false;

        for (int i = 0; i < GridView1.Rows.Count; i++)
        {
            cb = (CheckBox)GridView1.Rows[i].FindControl("CheckBox1");
            if (cb.Checked)
            {
                objbusinesskeywordbal.BusinessKeywordId = Convert.ToInt32(GridView1.Rows[i].Cells[3].Text);
                objbusinesskeyworddal.DeleteBusinessKeyword(objbusinesskeywordbal);
                flag = true;
            }
        }
        if (flag == true)
        {
            Response.Write("<script>alert('Records deleted');</script>");
        }
        else
        {
            Response.Write("<script>alert('Please select record to delete');</script>");
        }
        bindgrid();
    }
コード例 #27
0
        /// <summary>
        /// Called when [create].
        /// </summary>
        /// <param name="bundle">The bundle.</param>
        protected override void OnCreate(Bundle bundle)
        {
            try
            {
                base.OnCreate(bundle);
                this.RequestWindowFeature(WindowFeatures.NoTitle);
                SetContentView(Resource.Layout.Login);
                var loginButton = FindViewById<Button>(Resource.Id.btnLogin);
                loginButton.Click += loginButton_Click;
                txtUserName = FindViewById<EditText>(Resource.Id.txtUserName);
                txtPassword = FindViewById<EditText>(Resource.Id.txtPassword);
                chkRememberMe = FindViewById<CheckBox>(Resource.Id.chkRememberMe);
                ResetControl();
                txtUserName.Text = DecurtisDomain;
                txtUserName.SetSelection(txtUserName.Text.Length);
                if (ApplicationData.User != null && !string.IsNullOrEmpty(ApplicationData.User.LoginName))
                {
                    txtUserName.Text = ApplicationData.User.LoginName;
                }
            }
            catch (Exception e)
            {
                AlertMessage(GetString(Resource.String.Error), e.Message.ToString());
            }

            // Create your application here
        }
    protected void btnAssign_Click(object sender, EventArgs e)
    {
        if (ddlAdminList.SelectedIndex == 0 || ddlOrganizations.SelectedIndex == 0)
        { lblMessage.Text = "Please select organization/Admin"; return; }

        bool assignstatus = false;

        int userid = int.Parse(ddlAdminList.SelectedValue);

        dataclass.Procedure_DeletUserPermissions(userid);
        int i = 0;
        int menuid = 0;
        foreach (GridViewRow gr in gvwUserPermissions.Rows)
        {
            menuid = int.Parse(gvwUserPermissions.Rows[i].Cells[1].Text);
            CheckBox cb = new CheckBox();
            cb = (CheckBox)gr.Controls[0].FindControl("CheckBox1");
            if (cb.Checked)
            {
                assignstatus = true;
                dataclass.Procedure_UserPermissions(userid, menuid, createdby);
            }

            i = i + 1;
        } Session["admIndex_type"] = null; Session["orgIndex_type"] = null;
        if (assignstatus == true)
        {lblMessage.Text = "permission(s) saved Successfully";resetValues(0);}
        else lblMessage.Text = "no permission(s) assign for the selected organization admin";
    }
コード例 #29
0
ファイル: BuildElement.cs プロジェクト: qkwlqk/EloBuddy
        public BuildElement(BuildCreator bc, Menu menu, LoLItem item, int index, ShopActionType action)
        {
            this.action = action;
            this.bc = bc;
            this.item = item;
            p = index;

            upBox = new CheckBox("up", false);
            removeBox = new CheckBox("remove", false);
            itemName = new Label(" ");
            costSlots = new Label(" ");

            PropertyInfo property2 = typeof (CheckBox).GetProperty("Size");

            property2.GetSetMethod(true).Invoke(itemName, new object[] {new Vector2(400, 0)});
            property2.GetSetMethod(true).Invoke(costSlots, new object[] {new Vector2(400, 0)});
            property2.GetSetMethod(true).Invoke(upBox, new object[] {new Vector2(40, 20)});
            property2.GetSetMethod(true).Invoke(removeBox, new object[] {new Vector2(80, 20)});


            menu.Add(position + "nam" + RandGen.r.Next(), itemName);
            menu.Add(position + "cs" + RandGen.r.Next(), costSlots);
            menu.Add(position + "up" + RandGen.r.Next(), upBox);
            menu.Add(position + "rem" + RandGen.r.Next(), removeBox);
            updateText();

            upBox.CurrentValue = false;
            removeBox.CurrentValue = false;
            upBox.OnValueChange += upBox_OnValueChange;
            removeBox.OnValueChange += removeBox_OnValueChange;
            property = typeof (CheckBox).GetProperty("Position");
        }
コード例 #30
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
     this.chartControl1     = new Syncfusion.Windows.Forms.Chart.ChartControl();
     this.panel1            = new System.Windows.Forms.Panel();
     this.radioButton3      = new System.Windows.Forms.RadioButton();
     this.checkBox2         = new System.Windows.Forms.CheckBox();
     this.comboBox2         = new System.Windows.Forms.ComboBox();
     this.label4            = new System.Windows.Forms.Label();
     this.radioButton1      = new System.Windows.Forms.RadioButton();
     this.radioButton2      = new System.Windows.Forms.RadioButton();
     this.label22           = new System.Windows.Forms.Label();
     this.checkBox1         = new System.Windows.Forms.CheckBox();
     this.comboBoxChartType = new System.Windows.Forms.ComboBox();
     this.label2            = new System.Windows.Forms.Label();
     this.label1            = new System.Windows.Forms.Label();
     this.comboBox1         = new System.Windows.Forms.ComboBox();
     this.numericUpDown1    = new System.Windows.Forms.NumericUpDown();
     this.label3            = new System.Windows.Forms.Label();
     this.imageList1        = new System.Windows.Forms.ImageList(this.components);
     this.panel1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
     this.SuspendLayout();
     //
     // chartControl1
     //
     this.chartControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                        | System.Windows.Forms.AnchorStyles.Left)
                                                                       | System.Windows.Forms.AnchorStyles.Right)));
     this.chartControl1.BackInterior             = new Syncfusion.Drawing.BrushInfo(Syncfusion.Drawing.GradientStyle.Vertical, System.Drawing.Color.FromArgb(((int)(((byte)(223)))), ((int)(((byte)(237)))), ((int)(((byte)(254))))), System.Drawing.Color.White);
     this.chartControl1.ChartArea.BackInterior   = new Syncfusion.Drawing.BrushInfo(Syncfusion.Drawing.GradientStyle.Vertical, System.Drawing.Color.Transparent, System.Drawing.Color.Transparent);
     this.chartControl1.ChartArea.CursorLocation = new System.Drawing.Point(0, 0);
     this.chartControl1.ChartArea.CursorReDraw   = false;
     this.chartControl1.ChartAreaMargins         = new Syncfusion.Windows.Forms.Chart.ChartMargins(5, 15, 15, 5);
     this.chartControl1.ChartInterior            = new Syncfusion.Drawing.BrushInfo(Syncfusion.Drawing.GradientStyle.Vertical, System.Drawing.Color.FromArgb(((int)(((byte)(165)))), ((int)(((byte)(194)))), ((int)(((byte)(229))))), System.Drawing.Color.FromArgb(((int)(((byte)(223)))), ((int)(((byte)(236)))), ((int)(((byte)(250))))));
     this.chartControl1.DataSourceName           = "";
     this.chartControl1.ElementsSpacing          = 1;
     this.chartControl1.Font         = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.chartControl1.IsWindowLess = false;
     //
     //
     //
     this.chartControl1.Legend.BackInterior     = new Syncfusion.Drawing.BrushInfo(Syncfusion.Drawing.GradientStyle.Vertical, System.Drawing.Color.Transparent, System.Drawing.Color.Transparent);
     this.chartControl1.Legend.Border.ForeColor = System.Drawing.Color.Transparent;
     this.chartControl1.Legend.Font             = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.chartControl1.Legend.ItemsSize        = new System.Drawing.Size(15, 15);
     this.chartControl1.Legend.Location         = new System.Drawing.Point(32, 53);
     this.chartControl1.Legend.Orientation      = Syncfusion.Windows.Forms.Chart.ChartOrientation.Horizontal;
     this.chartControl1.Legend.Position         = Syncfusion.Windows.Forms.Chart.ChartDock.Top;
     this.chartControl1.Legend.ShowSymbol       = true;
     this.chartControl1.Legend.Spacing          = 3;
     this.chartControl1.Localize = null;
     this.chartControl1.Location = new System.Drawing.Point(0, 0);
     this.chartControl1.Name     = "chartControl1";
     this.chartControl1.PrimaryXAxis.Crossing = double.NaN;
     this.chartControl1.PrimaryXAxis.Font     = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.chartControl1.PrimaryXAxis.GridLineType.ForeColor = System.Drawing.Color.Silver;
     this.chartControl1.PrimaryXAxis.LineType.ForeColor     = System.Drawing.Color.DarkGray;
     this.chartControl1.PrimaryXAxis.Margin   = true;
     this.chartControl1.PrimaryYAxis.Crossing = double.NaN;
     this.chartControl1.PrimaryYAxis.Font     = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.chartControl1.PrimaryYAxis.GridLineType.ForeColor = System.Drawing.Color.Silver;
     this.chartControl1.PrimaryYAxis.LineType.ForeColor     = System.Drawing.Color.DarkGray;
     this.chartControl1.PrimaryYAxis.Margin = true;
     this.chartControl1.Rotation            = 90F;
     this.chartControl1.Size     = new System.Drawing.Size(700, 569);
     this.chartControl1.TabIndex = 0;
     this.chartControl1.Text     = "EssentialChart";
     //
     //
     //
     this.chartControl1.Title.Name = "Def_title";
     this.chartControl1.Title.Text = "EssentialChart";
     this.chartControl1.Titles.Add(this.chartControl1.Title);
     //
     // panel1
     //
     this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                | System.Windows.Forms.AnchorStyles.Right)));
     this.panel1.BackColor = System.Drawing.Color.WhiteSmoke;
     this.panel1.Controls.Add(this.radioButton3);
     this.panel1.Controls.Add(this.checkBox2);
     this.panel1.Controls.Add(this.comboBox2);
     this.panel1.Controls.Add(this.label4);
     this.panel1.Controls.Add(this.radioButton1);
     this.panel1.Controls.Add(this.radioButton2);
     this.panel1.Controls.Add(this.label22);
     this.panel1.Controls.Add(this.checkBox1);
     this.panel1.Controls.Add(this.comboBoxChartType);
     this.panel1.Controls.Add(this.label2);
     this.panel1.Controls.Add(this.label1);
     this.panel1.Controls.Add(this.comboBox1);
     this.panel1.Controls.Add(this.numericUpDown1);
     this.panel1.Controls.Add(this.label3);
     this.panel1.Font     = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.panel1.Location = new System.Drawing.Point(700, 0);
     this.panel1.Name     = "panel1";
     this.panel1.Size     = new System.Drawing.Size(260, 585);
     this.panel1.TabIndex = 3;
     //
     // radioButton3
     //
     this.radioButton3.FlatStyle       = System.Windows.Forms.FlatStyle.System;
     this.radioButton3.Font            = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.radioButton3.ForeColor       = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));
     this.radioButton3.Location        = new System.Drawing.Point(36, 198);
     this.radioButton3.Name            = "radioButton3";
     this.radioButton3.Size            = new System.Drawing.Size(112, 24);
     this.radioButton3.TabIndex        = 13;
     this.radioButton3.Text            = "France";
     this.radioButton3.CheckedChanged += new System.EventHandler(this.radioButton3_CheckedChanged);
     //
     // checkBox2
     //
     this.checkBox2.AutoSize  = true;
     this.checkBox2.Font      = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.checkBox2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));
     this.checkBox2.Location  = new System.Drawing.Point(36, 484);
     this.checkBox2.Name      = "checkBox2";
     this.checkBox2.Size      = new System.Drawing.Size(96, 24);
     this.checkBox2.TabIndex  = 12;
     this.checkBox2.Text      = "Enable 3D";
     this.checkBox2.UseVisualStyleBackColor = true;
     this.checkBox2.CheckedChanged         += new System.EventHandler(this.checkBox2_CheckedChanged);
     //
     // comboBox2
     //
     this.comboBox2.DropDownStyle         = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.comboBox2.FlatStyle             = System.Windows.Forms.FlatStyle.System;
     this.comboBox2.Font                  = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.comboBox2.ForeColor             = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));
     this.comboBox2.Location              = new System.Drawing.Point(36, 270);
     this.comboBox2.Name                  = "comboBox2";
     this.comboBox2.Size                  = new System.Drawing.Size(180, 28);
     this.comboBox2.TabIndex              = 11;
     this.comboBox2.SelectedIndexChanged += new System.EventHandler(this.comboBox2_SelectedIndexChanged);
     //
     // label4
     //
     this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                | System.Windows.Forms.AnchorStyles.Right)));
     this.label4.AutoSize  = true;
     this.label4.Font      = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));
     this.label4.Location  = new System.Drawing.Point(33, 236);
     this.label4.Name      = "label4";
     this.label4.Size      = new System.Drawing.Size(162, 20);
     this.label4.TabIndex  = 10;
     this.label4.Text      = "Legend Representation";
     //
     // radioButton1
     //
     this.radioButton1.Checked         = true;
     this.radioButton1.FlatStyle       = System.Windows.Forms.FlatStyle.System;
     this.radioButton1.Font            = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.radioButton1.ForeColor       = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));
     this.radioButton1.Location        = new System.Drawing.Point(36, 131);
     this.radioButton1.Name            = "radioButton1";
     this.radioButton1.Size            = new System.Drawing.Size(82, 28);
     this.radioButton1.TabIndex        = 0;
     this.radioButton1.TabStop         = true;
     this.radioButton1.Text            = "Italy";
     this.radioButton1.CheckedChanged += new System.EventHandler(this.radiobutton1_SeriesType_CheckedChanged);
     //
     // radioButton2
     //
     this.radioButton2.FlatStyle       = System.Windows.Forms.FlatStyle.System;
     this.radioButton2.Font            = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.radioButton2.ForeColor       = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));
     this.radioButton2.Location        = new System.Drawing.Point(36, 163);
     this.radioButton2.Name            = "radioButton2";
     this.radioButton2.Size            = new System.Drawing.Size(140, 28);
     this.radioButton2.TabIndex        = 1;
     this.radioButton2.Text            = "Spain";
     this.radioButton2.CheckedChanged += new System.EventHandler(this.radiobutton2_SeriesType_CheckedChanged);
     //
     // label22
     //
     this.label22.AutoSize  = true;
     this.label22.BackColor = System.Drawing.Color.Transparent;
     this.label22.Font      = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label22.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));
     this.label22.Location  = new System.Drawing.Point(32, 99);
     this.label22.Name      = "label22";
     this.label22.Size      = new System.Drawing.Size(87, 20);
     this.label22.TabIndex  = 8;
     this.label22.Text      = "Chart Series";
     //
     // checkBox1
     //
     this.checkBox1.Font            = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.checkBox1.ForeColor       = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));
     this.checkBox1.Location        = new System.Drawing.Point(36, 449);
     this.checkBox1.Name            = "checkBox1";
     this.checkBox1.Size            = new System.Drawing.Size(207, 29);
     this.checkBox1.TabIndex        = 7;
     this.checkBox1.Text            = "Points in different Color";
     this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
     //
     // comboBoxChartType
     //
     this.comboBoxChartType.DropDownStyle         = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.comboBoxChartType.FlatStyle             = System.Windows.Forms.FlatStyle.System;
     this.comboBoxChartType.Font                  = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.comboBoxChartType.ForeColor             = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));
     this.comboBoxChartType.Location              = new System.Drawing.Point(35, 60);
     this.comboBoxChartType.Name                  = "comboBoxChartType";
     this.comboBoxChartType.Size                  = new System.Drawing.Size(184, 28);
     this.comboBoxChartType.TabIndex              = 6;
     this.comboBoxChartType.SelectedIndexChanged += new System.EventHandler(this.comboBoxChartType_SelectedIndexChanged);
     //
     // label2
     //
     this.label2.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.label2.Font      = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));
     this.label2.Location  = new System.Drawing.Point(36, 383);
     this.label2.Name      = "label2";
     this.label2.Size      = new System.Drawing.Size(88, 30);
     this.label2.TabIndex  = 5;
     this.label2.Text      = "Width";
     //
     // label1
     //
     this.label1.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.label1.Font      = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));
     this.label1.Location  = new System.Drawing.Point(36, 312);
     this.label1.Name      = "label1";
     this.label1.Size      = new System.Drawing.Size(93, 20);
     this.label1.TabIndex  = 4;
     this.label1.Text      = "Dash Style";
     //
     // comboBox1
     //
     this.comboBox1.DropDownStyle         = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.comboBox1.FlatStyle             = System.Windows.Forms.FlatStyle.System;
     this.comboBox1.Font                  = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.comboBox1.ForeColor             = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));
     this.comboBox1.Location              = new System.Drawing.Point(36, 342);
     this.comboBox1.Name                  = "comboBox1";
     this.comboBox1.Size                  = new System.Drawing.Size(180, 28);
     this.comboBox1.TabIndex              = 3;
     this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
     //
     // numericUpDown1
     //
     this.numericUpDown1.BackColor = System.Drawing.Color.White;
     this.numericUpDown1.Font      = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.numericUpDown1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));
     this.numericUpDown1.Location  = new System.Drawing.Point(36, 414);
     this.numericUpDown1.Maximum   = new decimal(new int[] {
         5,
         0,
         0,
         0
     });
     this.numericUpDown1.Minimum = new decimal(new int[] {
         1,
         0,
         0,
         0
     });
     this.numericUpDown1.Name     = "numericUpDown1";
     this.numericUpDown1.ReadOnly = true;
     this.numericUpDown1.Size     = new System.Drawing.Size(178, 27);
     this.numericUpDown1.TabIndex = 2;
     this.numericUpDown1.Value    = new decimal(new int[] {
         2,
         0,
         0,
         0
     });
     this.numericUpDown1.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged);
     //
     // label3
     //
     this.label3.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.label3.Font      = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));
     this.label3.Location  = new System.Drawing.Point(35, 30);
     this.label3.Name      = "label3";
     this.label3.Size      = new System.Drawing.Size(100, 26);
     this.label3.TabIndex  = 5;
     this.label3.Text      = "Chart Type";
     //
     // imageList1
     //
     this.imageList1.ImageStream      = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
     this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
     this.imageList1.Images.SetKeyName(0, "server_from_client.png");
     //
     // Form1
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.BackColor         = System.Drawing.Color.White;
     this.ClientSize        = new System.Drawing.Size(954, 581);
     this.Controls.Add(this.panel1);
     this.Controls.Add(this.chartControl1);
     this.Icon          = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.MinimumSize   = new System.Drawing.Size(705, 463);
     this.Name          = "Form1";
     this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.Text          = "Line";
     this.Load         += new System.EventHandler(this.Form1_Load);
     this.panel1.ResumeLayout(false);
     this.panel1.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
     this.ResumeLayout(false);
 }
コード例 #31
0
        private void criterioSelecionado(Object sender, EventArgs e)
        {
            CheckBox          ck = (CheckBox)sender;
            List <Criterio>   lista;
            PortfolioCriterio pc = new PortfolioCriterio()
            {
                Portfolio = new Portfolio()
                {
                    ID = portfolioId
                },
                Criterio = new Criterio()
                {
                    ID = (listCriterios.Where(i => i.Item1.Descricao == ck.Text)).Select(i => i.Item1.ID).First()
                }
            };

            if (ck.Checked == true)
            {
                portfolioCriterioBLL.Adicionar(pc);
                lista = portfolioCriterioBLL.ListarPorPortfolio(portfolioId);
                foreach (Criterio c in lista)
                {
                    portfolioCriterioBLL.AdicionarRelacaoCriterioPortfolio(new RelacaoCriterio()
                    {
                        Criterio1 = new Criterio()
                        {
                            ID = pc.Criterio.ID
                        },
                        Criterio2 = new Criterio()
                        {
                            ID = c.ID
                        },
                        Nota      = pc.Criterio.ID == c.ID ? 1.0: 0.0,
                        Portfolio = new Portfolio()
                        {
                            ID = pc.Portfolio.ID
                        }
                    });
                }
                check(pc.Criterio.ID);
            }
            else
            {
                portfolioCriterioBLL.ExcluirPorCriterio(new RelacaoCriterio()
                {
                    Criterio1 = new Criterio()
                    {
                        ID = pc.Criterio.ID
                    },
                    Portfolio = new Portfolio()
                    {
                        ID = pc.Portfolio.ID
                    }
                });
                portfolioAtividadeBLL.ExcluirPorCriterio(new RelacaoAtividade()
                {
                    Criterio = new Criterio()
                    {
                        ID = pc.Criterio.ID
                    },
                    Portfolio = new Portfolio()
                    {
                        ID = pc.Portfolio.ID
                    }
                });
                portfolioCriterioBLL.Excluir(pc);
            }
        }
コード例 #32
0
        private void threadFunction(CheckBox ck)
        {
            List <Criterio>    listC = portfolioCriterioBLL.ListarPorPortfolio(portfolioId);
            List <Atividade>   listA;
            PortfolioAtividade pa = new PortfolioAtividade()
            {
                Portfolio = new Portfolio()
                {
                    ID = portfolioId
                },
                Atividade = new Atividade()
                {
                    ID = (listAtividades.Where(i => i.Item1.Descricao == ck.Text)).Select(i => i.Item1.ID).First()
                }
            };

            if (ck.Checked == true)
            {
                portfolioAtividadeBLL.Adicionar(pa);
                listA = portfolioAtividadeBLL.ListarPorPortfolio(portfolioId);
                foreach (Criterio c in listC)
                {
                    foreach (Atividade a in listA)
                    {
                        portfolioAtividadeBLL.AdicionarRelacaoAtividadePortfolio(new RelacaoAtividade()
                        {
                            Atividade1 = new Atividade()
                            {
                                ID = pa.Atividade.ID
                            },
                            Atividade2 = new Atividade()
                            {
                                ID = a.ID
                            },
                            Criterio = new Criterio()
                            {
                                ID = c.ID
                            },
                            Nota      = pa.Atividade.ID == a.ID ? 1.0 : 0.0,
                            Portfolio = new Portfolio()
                            {
                                ID = pa.Portfolio.ID
                            }
                        });
                    }
                }
            }
            else
            {
                portfolioAtividadeBLL.ExcluirPorAtividade(new RelacaoAtividade()
                {
                    Atividade1 = new Atividade()
                    {
                        ID = pa.Atividade.ID
                    },
                    Portfolio = new Portfolio()
                    {
                        ID = pa.Portfolio.ID
                    }
                });
                portfolioAtividadeBLL.Excluir(pa);
            }
        }
コード例 #33
0
 private void InitializeComponent()
 {
     this.panel1             = new Panel();
     this.label1             = new Label();
     this.label2             = new Label();
     this.label3             = new Label();
     this.label4             = new Label();
     this.label5             = new Label();
     this.label6             = new Label();
     this.label7             = new Label();
     this.label8             = new Label();
     this.lblSubdomain       = new Label();
     this.lblIp              = new Label();
     this.lblLine            = new Label();
     this.txtPort            = new TextBox();
     this.cmbMonitorInterval = new ComboBox();
     this.label9             = new Label();
     this.txtBakvalue        = new TextBox();
     this.chkQiehuan         = new CheckBox();
     this.btnOk              = new Button();
     this.btnCanel           = new Button();
     this.panel1.SuspendLayout();
     base.SuspendLayout();
     this.panel1.BackColor = Color.DeepSkyBlue;
     this.panel1.Controls.Add(this.label1);
     this.panel1.Dock                          = DockStyle.Top;
     this.panel1.Location                      = new Point(0, 0);
     this.panel1.Name                          = "panel1";
     this.panel1.Size                          = new Size(0x127, 40);
     this.panel1.TabIndex                      = 7;
     this.label1.AutoSize                      = true;
     this.label1.Font                          = new Font("宋体", 15.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
     this.label1.ForeColor                     = Color.White;
     this.label1.Location                      = new Point(12, 9);
     this.label1.Name                          = "label1";
     this.label1.Size                          = new Size(0x5e, 0x15);
     this.label1.TabIndex                      = 1;
     this.label1.Text                          = "监控设置";
     this.label2.AutoSize                      = true;
     this.label2.Location                      = new Point(0x10, 0x42);
     this.label2.Name                          = "label2";
     this.label2.Size                          = new Size(0x35, 12);
     this.label2.TabIndex                      = 8;
     this.label2.Text                          = "子域名:";
     this.label3.AutoSize                      = true;
     this.label3.Location                      = new Point(0x10, 0x5f);
     this.label3.Name                          = "label3";
     this.label3.Size                          = new Size(0x35, 12);
     this.label3.TabIndex                      = 9;
     this.label3.Text                          = "记录值:";
     this.label4.AutoSize                      = true;
     this.label4.Location                      = new Point(0x1c, 0x7c);
     this.label4.Name                          = "label4";
     this.label4.Size                          = new Size(0x29, 12);
     this.label4.TabIndex                      = 10;
     this.label4.Text                          = "线路:";
     this.label5.AutoSize                      = true;
     this.label5.Location                      = new Point(0x1c, 0x99);
     this.label5.Name                          = "label5";
     this.label5.Size                          = new Size(0x29, 12);
     this.label5.TabIndex                      = 11;
     this.label5.Text                          = "端口:";
     this.label6.AutoSize                      = true;
     this.label6.Location                      = new Point(4, 0xb6);
     this.label6.Name                          = "label6";
     this.label6.Size                          = new Size(0x41, 12);
     this.label6.TabIndex                      = 12;
     this.label6.Text                          = "监控间隔:";
     this.label7.AutoSize                      = true;
     this.label7.Location                      = new Point(0x10, 0xed);
     this.label7.Name                          = "label7";
     this.label7.Size                          = new Size(0x35, 12);
     this.label7.TabIndex                      = 13;
     this.label7.Text                          = "备用IP:";
     this.label8.AutoSize                      = true;
     this.label8.Location                      = new Point(4, 0xd3);
     this.label8.Name                          = "label8";
     this.label8.Size                          = new Size(0x41, 12);
     this.label8.TabIndex                      = 14;
     this.label8.Text                          = "是否切换:";
     this.lblSubdomain.AutoSize                = true;
     this.lblSubdomain.Location                = new Point(0x4b, 0x42);
     this.lblSubdomain.Name                    = "lblSubdomain";
     this.lblSubdomain.Size                    = new Size(0x4d, 12);
     this.lblSubdomain.TabIndex                = 15;
     this.lblSubdomain.Text                    = "lblSubdomain";
     this.lblIp.AutoSize                       = true;
     this.lblIp.Location                       = new Point(0x4b, 0x5f);
     this.lblIp.Name                           = "lblIp";
     this.lblIp.Size                           = new Size(0x23, 12);
     this.lblIp.TabIndex                       = 0x10;
     this.lblIp.Text                           = "lblIp";
     this.lblLine.AutoSize                     = true;
     this.lblLine.Location                     = new Point(0x4b, 0x7c);
     this.lblLine.Name                         = "lblLine";
     this.lblLine.Size                         = new Size(0x2f, 12);
     this.lblLine.TabIndex                     = 0x11;
     this.lblLine.Text                         = "lblLine";
     this.txtPort.Location                     = new Point(0x4f, 0x95);
     this.txtPort.Name                         = "txtPort";
     this.txtPort.Size                         = new Size(0x8b, 0x15);
     this.txtPort.TabIndex                     = 0x12;
     this.txtPort.Text                         = "80";
     this.cmbMonitorInterval.DropDownStyle     = ComboBoxStyle.DropDownList;
     this.cmbMonitorInterval.FormattingEnabled = true;
     this.cmbMonitorInterval.Items.AddRange(new object[] { "1", "5", "10" });
     this.cmbMonitorInterval.Location = new Point(0x4f, 0xb2);
     this.cmbMonitorInterval.Name     = "cmbMonitorInterval";
     this.cmbMonitorInterval.Size     = new Size(0x79, 20);
     this.cmbMonitorInterval.TabIndex = 0x13;
     this.label9.AutoSize             = true;
     this.label9.Location             = new Point(0xcf, 0xba);
     this.label9.Name          = "label9";
     this.label9.Size          = new Size(0x1d, 12);
     this.label9.TabIndex      = 20;
     this.label9.Text          = "分钟";
     this.txtBakvalue.Enabled  = false;
     this.txtBakvalue.Location = new Point(0x4f, 0xe9);
     this.txtBakvalue.Name     = "txtBakvalue";
     this.txtBakvalue.Size     = new Size(0x8b, 0x15);
     this.txtBakvalue.TabIndex = 0x15;
     this.chkQiehuan.AutoSize  = true;
     this.chkQiehuan.Location  = new Point(0x4f, 0xd1);
     this.chkQiehuan.Name      = "chkQiehuan";
     this.chkQiehuan.Size      = new Size(0x24, 0x10);
     this.chkQiehuan.TabIndex  = 0x16;
     this.chkQiehuan.Text      = "是";
     this.chkQiehuan.UseVisualStyleBackColor = true;
     this.chkQiehuan.CheckedChanged         += new EventHandler(this.chkQiehuan_CheckedChanged);
     this.btnOk.Location = new Point(0x7f, 0x109);
     this.btnOk.Name     = "btnOk";
     this.btnOk.Size     = new Size(0x4b, 0x17);
     this.btnOk.TabIndex = 0x17;
     this.btnOk.Text     = "确定";
     this.btnOk.UseVisualStyleBackColor = true;
     this.btnOk.Click      += new EventHandler(this.btnOk_Click);
     this.btnCanel.Location = new Point(0xd0, 0x109);
     this.btnCanel.Name     = "btnCanel";
     this.btnCanel.Size     = new Size(0x4b, 0x17);
     this.btnCanel.TabIndex = 0x18;
     this.btnCanel.Text     = "取消";
     this.btnCanel.UseVisualStyleBackColor = true;
     this.btnCanel.Click += new EventHandler(this.btnCanel_Click);
     base.ClientSize      = new Size(0x127, 0x12a);
     base.Controls.Add(this.btnCanel);
     base.Controls.Add(this.btnOk);
     base.Controls.Add(this.chkQiehuan);
     base.Controls.Add(this.txtBakvalue);
     base.Controls.Add(this.label9);
     base.Controls.Add(this.cmbMonitorInterval);
     base.Controls.Add(this.txtPort);
     base.Controls.Add(this.lblLine);
     base.Controls.Add(this.lblIp);
     base.Controls.Add(this.lblSubdomain);
     base.Controls.Add(this.label8);
     base.Controls.Add(this.label7);
     base.Controls.Add(this.label6);
     base.Controls.Add(this.label5);
     base.Controls.Add(this.label4);
     base.Controls.Add(this.label3);
     base.Controls.Add(this.label2);
     base.Controls.Add(this.panel1);
     base.FormBorderStyle = FormBorderStyle.FixedDialog;
     base.MaximizeBox     = false;
     base.MinimizeBox     = false;
     base.Name            = "FMonitorSetting";
     this.Text            = "监控设置-DNSPodClientLite";
     base.Load           += new EventHandler(this.FMonitorSetting_Load);
     this.panel1.ResumeLayout(false);
     this.panel1.PerformLayout();
     base.ResumeLayout(false);
     base.PerformLayout();
 }
コード例 #34
0
    private void DeleteTRLanguages()
    {
        lError.Text = string.Empty;
        int    nbDeletedRows    = 0;
        string languagesDeleted = string.Empty;

        if (t != null)
        {
            using (TR tr = TR.GetByKey(Convert.ToInt64(t)))
            {
                #region Retrieve TR Users
                UserList usersList = HyperCatalog.Business.User.GetTRNotificationUsers(tr.Id, SessionState.User.Id);
                #endregion
                foreach (Infragistics.WebUI.UltraWebGrid.UltraGridRow dr in dgLanguages.Rows)
                {
                    TemplatedColumn col = (TemplatedColumn)dr.Cells.FromKey("Select").Column;
                    CheckBox        cb  = (CheckBox)((CellItem)col.CellItems[dr.Index]).FindControl("g_sd");
                    if (cb.Checked)
                    {
                        languagesDeleted += dr.Cells.FromKey("Language").Value + ",";
                        if (!tr.DeleteLanguage(dr.Cells.FromKey("LanguageCode").Value.ToString(), SessionState.User.Id))
                        {
                            lError.Text     = "Error: TR [" + tr.Id.ToString() + "] Language [" + dr.Cells.FromKey("LanguageCode").Value.ToString() + "] can't be deleted<br>" + TR.LastError;
                            lError.CssClass = "hc_error";
                            lError.Visible  = true;
                            break;
                        }
                        else
                        {
                            nbDeletedRows++;
                        }
                    }
                }
                if (nbDeletedRows > 0)
                {
                    #region Send mail
                    if (usersList != null)
                    {
                        string appName             = SessionState.CacheParams["AppName"].Value.ToString();
                        string supportInfo         = SessionState.CacheParams["SupportInfo"].Value.ToString();
                        string smtpServer          = SessionState.CacheParams["TREmailSmtpServer"].Value.ToString();
                        string fromEmail           = SessionState.CacheParams["TREmailFrom"].Value.ToString();
                        string mailConfidentiality = SessionState.CacheParams["MailConfidentiality"].Value.ToString();
                        string trPath = SessionState.CacheParams["TRPhysicalPath"].Value.ToString();
                        HyperComponents.Net.SMTP.EmailUtil m = new HyperComponents.Net.SMTP.EmailUtil();
                        m.FromEmail     = fromEmail;
                        m.strBody       = (nbDeletedRows == 1 ? "The <b>" + languagesDeleted.Substring(0, languagesDeleted.Length - 1) + "</b> language for the tr [" + tr.Id + "] has been deleted by " + SessionState.User.FullName + ".\n<br>" + txtDeleteComment.Text + "\n<br>" : "The <b>" + languagesDeleted.Substring(0, languagesDeleted.Length - 1) + "</b> languages for the tr [" + tr.Id + "] have been deleted by " + SessionState.User.FullName + ".\n<br>" + txtDeleteComment.Text + "\n<br>");
                        m.SmtpServer    = smtpServer;
                        m.Subject       = "[" + appName + "] - Languages removed for the TR [" + tr.Id + "]";
                        m.strWelcome    = "Dear user,\n<br><br>\n";
                        m.strSignature  = "<br>Your " + appName + " system administrator<br>\n";
                        m.strSignature += supportInfo.Replace(@"\n", @"<br/>");
                        m.strSignature += "<hr/>\n";
                        m.strSignature += "<FONT face='arial, helvetica, sans-serif' color=#5a7173 size=1>" + mailConfidentiality.Replace("\n", "<br>") + "</font>";
                        foreach (User u in usersList)
                        {
                            try
                            {
                                m.SendEmail(u.FullName, u.Email);
                            }
                            catch (Exception e)
                            {
                            }
                        }
                    }
                    #endregion
                    lError.Text     = "Data deleted";
                    lError.CssClass = "hc_success";
                    lError.Visible  = true;
                    UpdateDataView();
                }
            }
        }
        else
        {
            lError.Text    = "[error] No TRId found !";
            lError.Visible = true;
        }
    }
コード例 #35
0
        void buildControl(bool forEdit = false)
        {
            FrameworkElement ctl = null;

            if (forEdit == false)
            {
                Binding bnd = new Binding("IsNotEditing")
                {
                    Converter = Application.Current.Resources["blnVis"] as IValueConverter
                };

                string[] parts = this.View.Split(splitter);

                switch (parts[1].ToLower())
                {
                case "textblock":
                {
                    ctl = new TextBlock();
                    ctl.SetBinding(TextBlock.TextProperty, parts[0]);
                    ctl.SetBinding(TextBlock.VisibilityProperty, bnd);
                    break;
                }
                }
            }
            else
            {
                Binding bnd = new Binding("IsEditing")
                {
                    UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged,
                    Converter           = Application.Current.Resources["blnVis"] as IValueConverter,
                    Mode = BindingMode.TwoWay
                };

                string[] parts = this.Edit.Split(splitter);

                switch (parts[1].ToLower())
                {
                case "textbox":
                {
                    ctl = new TextBox();
                    ctl.SetBinding(TextBox.TextProperty, parts[0]);
                    ctl.SetBinding(TextBox.VisibilityProperty, bnd);
                    break;
                }

                case "datepicker":
                {
                    ctl = new DatePicker();
                    ctl.SetBinding(DatePicker.SelectedDateProperty, parts[0]);
                    ctl.SetBinding(TextBox.VisibilityProperty, bnd);
                    break;
                }

                case "checkbox":
                {
                    ctl = new CheckBox();
                    ctl.SetBinding(CheckBox.IsCheckedProperty, parts[0]);
                    ctl.SetBinding(CheckBox.VisibilityProperty, bnd);
                    break;
                }

                case "combobox":
                {
                    ctl = new ComboBox();
                    ctl.SetBinding(ComboBox.SelectedItemProperty, parts[0]);
                    ctl.SetBinding(ComboBox.ItemsSourceProperty, parts[2]);
                    ctl.SetBinding(ComboBox.VisibilityProperty, bnd);
                    break;
                }
                }
            }

            if (ctl != null)
            {
                this.MainPanel.Children.Add(ctl);
            }
        }
コード例 #36
0
        /// <summary>
        /// Upon updates the Biostat table in the database based on the
        /// values used in the tracking system.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
        {
            if (Page.User.IsInRole("Super"))
            {
                GridViewRow row = GridView1.Rows[e.RowIndex];

                Label   lblId      = row.FindControl("lblId") as Label;
                TextBox txtName    = row.FindControl("txtName") as TextBox;
                TextBox txtType    = row.FindControl("txtType") as TextBox;
                TextBox txtEmail   = row.FindControl("txtEmail") as TextBox;
                TextBox txtLogonId = row.FindControl("txtLogonId") as TextBox;
                TextBox txtEndDate = row.FindControl("txtEndDate") as TextBox;

                Repeater rptUserRights = row.FindControl("rptUserRights") as Repeater;


                if (txtName != null && txtLogonId != null && txtEmail != null)
                {
                    using (ProjectTrackerContainer context = new ProjectTrackerContainer())
                    {
                        int     biostatId = Convert.ToInt32(lblId.Text);
                        BioStat biostat   = context.BioStats.First(x => x.Id == biostatId);
                        biostat.Name    = txtName.Text;
                        biostat.Type    = txtType.Text;
                        biostat.Email   = txtEmail.Text;
                        biostat.LogonId = txtLogonId.Text;
                        biostat.EndDate = DateTime.Parse(txtEndDate.Text);



                        // Update the user privileges
                        // (Replace or Add/Delete as necessary

                        //var selectedRights = rptUserRights.check

                        AspNetUser biostatUserAcct = context.AspNetUsers.FirstOrDefault(x => x.UserName == biostat.LogonId);

                        if (biostatUserAcct != null)
                        {
                            var qRightsOfCurrUser = context.AspNetUsers
                                                    .Where(x => x.UserName == txtLogonId.Text)
                                                    .Select(y => y.AspNetRoles.Select(z => z.Name)).ToList();

                            // For each of the user rights (Super, Admin, Biostat, ...),
                            // If there is a match in qRightsOfCurrentUser
                            // If there is not already in database
                            foreach (RepeaterItem item in rptUserRights.Items)
                            {
                                CheckBox checkbox = item.FindControl("chkId") as CheckBox;
                                if (checkbox != null)
                                {
                                    var  currRights   = checkbox.Text;
                                    bool markedRights = checkbox.Checked == true ? true : false;

                                    /*AspNetUser */ biostatUserAcct = context.AspNetUsers.First(x => x.UserName == biostat.LogonId);
                                    AspNetRole currAcctRole = context.AspNetRoles.First(x => x.Name == currRights);

                                    if (markedRights)
                                    {
                                        //Add Role if doesn't exist.
                                        if (biostatUserAcct.AspNetRoles.FirstOrDefault(x => x.Name == currRights) == null)
                                        {
                                            biostatUserAcct.AspNetRoles.Add(currAcctRole);
                                        }
                                    }
                                    else
                                    {
                                        // Delete Role if currently exists.
                                        if (biostatUserAcct.AspNetRoles.FirstOrDefault(x => x.Name == currRights) != null)
                                        {
                                            biostatUserAcct.AspNetRoles.Remove(currAcctRole);
                                        }
                                    }
                                }
                            }


                            // Make appropriate user rights checked.
                            foreach (RepeaterItem item in rptUserRights.Items)
                            {
                                CheckBox checkbox = item.FindControl("chkId") as CheckBox;
                                if (checkbox != null)
                                {
                                    // Checks checkbox if the current checkbox exist in rights of current user.
                                    var currRights = checkbox.Text;

                                    bool doesBiostathaveRights = (currRights != null && qRightsOfCurrUser.Where(x => x.Contains(currRights)).FirstOrDefault() != null)
                                                                    ? true : false;

                                    if (qRightsOfCurrUser.Count > 0 && doesBiostathaveRights == true)
                                    {
                                        checkbox.Checked = true;
                                    }
                                }
                            }
                            /****/
                        }

                        WriteInvest(context, biostat);

                        GridView1.EditIndex = -1;
                        BindGrid();
                    }
                }
            }
        }
コード例 #37
0
        //-Init---------------------//
        public override void Initialize()
        {
            Log.DrawHorizontalLine();
            Log.WritePixelMagic("Welcome to TWonderchild's Shadow Priest", Color.Black);
            Log.DrawHorizontalLine();
            Log.WritePixelMagic("Please use the following Talents: 1211111", Color.Black);
            Log.WritePixelMagic("Surrender to Madness is not supported.", Color.Black);
            Log.WritePixelMagic("Check the ToDo-List before reporting bugs/requesting features", Color.Black);
            Log.WritePixelMagic("Cooldown Hotkey: F7", Color.Black);

            SettingsForm = new Form {
                Text = "Shadow Priest Settings", StartPosition = FormStartPosition.CenterScreen, Height = 420, Width = 360
            };
            var labelCooldowns = new Label {
                Text = "Cooldown Usage", Size = new Size(180, 20), Left = 8, Top = 10
            };

            SettingsForm.Controls.Add(labelCooldowns);
            PIBloodlustBox = new CheckBox {
                Checked = chkPIBloodlust, TabIndex = 1, Size = new Size(380, 20), Left = 25, Top = 30, Text = "Use Power Infusion with Bloodlust (Ignores other Conditions)"
            };
            PIBloodlustBox.CheckedChanged += chkPIBloodlust_Click;
            SettingsForm.Controls.Add(PIBloodlustBox);
            PIStacksBox = new CheckBox {
                Checked = chkPIStacks, TabIndex = 1, Size = new Size(380, 20), Left = 25, Top = 50, Text = "Use Power Infusion at 20 Voidform Stacks"
            };
            PIStacksBox.CheckedChanged += chkPIStacks_Click;
            SettingsForm.Controls.Add(PIStacksBox);
            PIWaitBox = new CheckBox {
                Checked = chkPIWait, TabIndex = 1, Size = new Size(275, 20), Left = 25, Top = 70, Text = "Use PI and ignore Stacks if Shadow Fiend CD > "
            };
            PIWaitBox.CheckedChanged += chkPIWait_Click;
            SettingsForm.Controls.Add(PIWaitBox);
            PIWaitText = new TextBox {
                Size = new Size(30, 20), Left = 300, Top = 70, Text = txtPIWait.ToString()
            };
            PIWaitText.TextChanged += txtPIWait_TextChanged;
            SettingsForm.Controls.Add(PIWaitText);
            SFPIBox = new CheckBox {
                Checked = chkSFPI, TabIndex = 1, Size = new Size(380, 20), Left = 25, Top = 90, Text = "Use Shadow Fiend at 12 Sec Bloodlust/Power Infusion"
            };
            SFPIBox.CheckedChanged += chkSFPI_Click;
            SettingsForm.Controls.Add(SFPIBox);
            SFWaitBox = new CheckBox {
                Checked = chkSFWait, TabIndex = 1, Size = new Size(275, 20), Left = 25, Top = 110, Text = "Use Shadow Fiend if Power Infusion CD > "
            };
            SFWaitBox.CheckedChanged += chkSFWait_Click;
            SettingsForm.Controls.Add(SFWaitBox);
            SFWaitText = new TextBox {
                Size = new Size(30, 20), Left = 300, Top = 110, Text = txtSFWait.ToString()
            };
            SFWaitText.TextChanged += txtSFWait_TextChanged;
            SettingsForm.Controls.Add(SFWaitText);
            VoidTorrentBox = new CheckBox {
                Checked = chkVoidTorrent, TabIndex = 1, Size = new Size(275, 20), Left = 25, Top = 130, Text = "Use Void Torrent"
            };
            VoidTorrentBox.CheckedChanged += chkVoidTorrent_Click;
            SettingsForm.Controls.Add(VoidTorrentBox);
            var labelRotation = new Label {
                Text = "Rotation", Size = new Size(180, 20), Left = 8, Top = 150
            };

            SettingsForm.Controls.Add(labelRotation);
            var labelSWD = new Label {
                Text = "Use 2nd SWD Stack if Insanity drops below ", Size = new Size(225, 20), Left = 8, Top = 170
            };

            SettingsForm.Controls.Add(labelSWD);
            SWDText = new TextBox {
                Size = new Size(30, 20), Left = 300, Top = 170, Text = txtSWD.ToString()
            };
            SWDText.TextChanged += txtSWD_TextChanged;
            SettingsForm.Controls.Add(SWDText);
            var labelOthers = new Label {
                Text = "Other spells", Size = new Size(180, 20), Left = 8, Top = 190
            };

            SettingsForm.Controls.Add(labelOthers);
            var labelPWS = new Label {
                Text = "Use PWS at X% Health ", Size = new Size(225, 20), Left = 8, Top = 210
            };

            SettingsForm.Controls.Add(labelPWS);
            PWSText = new TextBox {
                Size = new Size(30, 20), Left = 300, Top = 210, Text = txtPWS.ToString()
            };
            PWSText.TextChanged += txtPWS_TextChanged;
            SettingsForm.Controls.Add(PWSText);
            var labelVE = new Label {
                Text = "Use Vampiric Embrace at X% Health ", Size = new Size(225, 20), Left = 8, Top = 230
            };

            SettingsForm.Controls.Add(labelVE);
            VEText = new TextBox {
                Size = new Size(30, 20), Left = 300, Top = 230, Text = txtVE.ToString()
            };
            VEText.TextChanged += txtVE_TextChanged;
            SettingsForm.Controls.Add(VEText);
            SilenceBox = new CheckBox {
                Checked = chkSilence, TabIndex = 1, Size = new Size(380, 20), Left = 10, Top = 250, Text = "Auto Silence"
            };
            SilenceBox.CheckedChanged += chkSilence_Click;
            SettingsForm.Controls.Add(SilenceBox);
            VoidTorrentRadio1 = new RadioButton {
                Checked = radVoidTorrent1, TabIndex = 1, Size = new Size(200, 20), Left = 10, Top = 270, Text = "Use VT as CD",
            };
            VoidTorrentRadio1.CheckedChanged += radVoidTorrent1_Click;
            SettingsForm.Controls.Add(VoidTorrentRadio1);
            VoidTorrentRadio2 = new RadioButton {
                Checked = radVoidTorrent2, TabIndex = 1, Size = new Size(200, 20), Left = 210, Top = 270, Text = "Use VT in Rota"
            };
            VoidTorrentRadio2.CheckedChanged += radVoidTorrent2_Click;
            SettingsForm.Controls.Add(VoidTorrentRadio2);
            var labelItems = new Label {
                Text = "Items", Size = new Size(180, 20), Left = 8, Top = 290
            };

            SettingsForm.Controls.Add(labelItems);
            LegTrinketBox = new CheckBox {
                Checked = chkLegTrinket, TabIndex = 1, Size = new Size(275, 20), Left = 25, Top = 310, Text = "Use Kil'jaeden's Burning Wish"
            };
            LegTrinketBox.CheckedChanged += chkLegTrinket_Click;
            SettingsForm.Controls.Add(LegTrinketBox);
            var labelTalentsLink = new LinkLabel {
                Text = "Talents", Size = new Size(300, 20), Left = 8, Top = 330
            };

            labelTalentsLink.Links.Add(0, 7, "http://eu.battle.net/wow/en/tool/talent-calculator#Xba!0100000");
            labelTalentsLink.LinkClicked += labelTalentsLink_LinkClicked;
            SettingsForm.Controls.Add(labelTalentsLink);
            var labelDonationLink = new LinkLabel {
                Text = "Appreciated but NOT necessary: Donate via Bitcoin", Size = new Size(300, 20), Left = 8, Top = 350
            };

            labelDonationLink.Links.Add(31, 18, "https://github.com/TWonderchild/TWonderchild.github.io");
            labelDonationLink.LinkClicked += labelDonationLink_LinkClicked;
            SettingsForm.Controls.Add(labelDonationLink);
        }
コード例 #38
0
    //选择教材确定
    protected void Choose_Click(object sender, EventArgs e)
    {
        try
        {
            //得到订单相关信息
            string order_id = "", order_date = "", operate_person = "", date_year = "", semester = "", supply_person = "", supplier_phone = "";// book_id = "";
            order_id       = TextBox1.Text;
            order_date     = TextBox2.Text;
            operate_person = TextBox3.Text;
            date_year      = DropDownList1.SelectedValue;
            semester       = DropDownList2.SelectedValue;
            supply_person  = DropDownList3.SelectedValue;
            supplier_phone = TextBox8.Text;

            //将提供商选中的教材等相关信息  保存到 form_order 表中。。。。。。
            for (int i = 0; i <= GridView2.Rows.Count - 1; i++)
            {
                CheckBox cbox = (CheckBox)GridView2.Rows[i].FindControl("CheckBox1");
                if (cbox.Checked)
                {
                    SqlDataReader reader1 = SQLHelper.ExecuteReader("select * from book_demand where id='" + GridView2.DataKeys[i].Value.ToString() + "'");
                    string        id = "", book_id = "", book_name = "", book_editor = "", book_price = "", campus = "", press_name = "", press_time = "", plan_num = "";
                    while (reader1.Read())
                    {
                        id          = reader1["id"].ToString();
                        book_id     = reader1["book_id"].ToString();
                        book_name   = reader1["book_name"].ToString();
                        book_editor = reader1["book_editor"].ToString();
                        book_price  = reader1["book_price"].ToString();
                        campus      = reader1["campus"].ToString();
                        press_name  = reader1["press_name"].ToString();
                        press_time  = reader1["press_time"].ToString();
                        plan_num    = reader1["book_number"].ToString();
                        double total_price = (Convert.ToDouble(book_price)) * (Convert.ToDouble(plan_num));

                        string sql = "insert into form_order (order_id,order_date,operate_person,date_year,semester,supply_person,supplier_phone,book_id,book_name,book_editor,book_price,press_name,press_time,plan_num,auto_num,total_num,total_price,campus,demand_id)";
                        sql += "values('" + order_id + "','" + order_date + "','" + operate_person + "','" + date_year + "','" + semester + "','" + supply_person + "','" + supplier_phone + "','" + book_id + "','" + book_name + "','" + book_editor + "','" + book_price + "','" + press_name + "','" + press_time + "','" + plan_num + "','0','" + plan_num + "','" + total_price + "','" + campus + "','" + id + "')";
                        SQLHelper.ExecuteNonQuery(sql);

                        string sql1 = "update book_demand set state_id='1' where id=" + id;
                        SQLHelper.ExecuteNonQuery(sql1);
                    }
                }
            }

            string    sql2 = "select id,book_id,book_name,plan_num,auto_num,total_num,total_price,book_price,press_time,press_name,campus from form_order where order_id='" + TextBox1.Text + "' and supply_person='" + DropDownList3.SelectedValue + "'";
            DataTable dt   = SQLHelper.GetDataTable(sql2);
            GridView1.DataSource   = dt;
            GridView1.DataKeyNames = new string[] { "id" };
            GridView1.DataBind();

            SqlDataReader readtp     = SQLHelper.ExecuteReader(sql2);
            double        totalprice = 0;
            while (readtp.Read())
            {
                totalprice += Convert.ToDouble(readtp["total_price"].ToString());
            }
            TotalPrice.Text = totalprice.ToString();
            Search_Click(sender, e);
        }
        catch (Exception ex)
        {
            WebMessageBox.Show(ex.Message);
        }
    }
コード例 #39
0
        /// <summary>
        /// Prepares row data (only need user rights checkboxes for now).
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            using (ProjectTrackerContainer context = new ProjectTrackerContainer())
            {
                /// Populates "User Rights" checkbox grid in Admin/StaffForm page.
                var qUserRights = context.AspNetRoles.OrderBy(x => ((x.Name == "Super") ? 1 :
                                                                    ((x.Name == "Admin") ? 2 :
                                                                     ((x.Name == "Biostat") ? 3 : 4)))).ToList();


                Repeater rptUserRights = (Repeater)e.Row.FindControl("rptUserRights");
                if (e.Row.RowType == DataControlRowType.DataRow && rptUserRights != null)
                {
                    rptUserRights.DataSource = qUserRights;
                    rptUserRights.DataBind();

                    Label   lblUserName = (Label)e.Row.FindControl("lblLogonId");
                    TextBox txtUserName = (TextBox)e.Row.FindControl("txtLogonId");
                    string  userName    = lblUserName != null ? lblUserName.Text : txtUserName != null ? txtUserName.Text : "";


                    // Check if Biostat is registered user.
                    var  listRgstdUsers      = context.AspNetUsers.Select(x => x.UserName).ToList();
                    bool isBiostatRegistered = false;

                    if (userName != "")
                    {
                        isBiostatRegistered = (listRgstdUsers.Where(x => x.Contains(userName)).FirstOrDefault() != null) ? true : false;

                        List <IEnumerable <string> > qRightsOfCurrUser = null;

                        if (isBiostatRegistered == true)
                        {
                            // Obtains list of user roles for row QHS faculty/staff.
                            qRightsOfCurrUser = context.AspNetUsers
                                                .Where(x => x.UserName == userName)
                                                .Select(y => y.AspNetRoles.Select(z => z.Name)).ToList();

                            // Make appropriate user rights checked.
                            foreach (RepeaterItem item in rptUserRights.Items)
                            {
                                CheckBox checkbox = item.FindControl("chkId") as CheckBox;
                                if (checkbox != null)
                                {
                                    // Disables checkbox in intial page load.
                                    // checkbox.Enabled = false; (now handled on front end)

                                    // Checks checkbox if the current checkbox exist in rights of current user.
                                    var currRights = checkbox.Text;

                                    bool doesBiostathaveRights = (currRights != null && qRightsOfCurrUser.Where(x => x.Contains(currRights)).FirstOrDefault() != null)
                                                                    ? true : false;

                                    if (qRightsOfCurrUser.Count > 0 && doesBiostathaveRights == true)
                                    {
                                        checkbox.Checked = true;
                                    }
                                }
                            }
                        }
                        else
                        {
                            // Hides checkboxes if there is no registered account for the faculty/staff member.
                            rptUserRights.Visible = false;
                        }
                    }
                    else
                    {
                        e.Row.Cells[7].BackColor = Color.IndianRed;
                    }
                }
            }
        }
コード例 #40
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DropDownActionItem"/> class.
 /// </summary>
 public DropDownActionItem()
 {
     CheckBox sdf = new CheckBox();
 }
コード例 #41
0
        /// <summary>
        /// Allows row to be edited upon clicking edit button.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
        {
            GridView1.EditIndex = e.NewEditIndex;


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

            using (ProjectTrackerContainer context = new ProjectTrackerContainer())
            {
                /// Populates "User Rights" checkbox grid in Admin/StaffForm page.
                var qUserRights = context.AspNetRoles.OrderBy(x => ((x.Name == "Super") ? 1 :
                                                                    ((x.Name == "Admin") ? 2 :
                                                                     ((x.Name == "Biostat") ? 3 : 4)))).ToList();



                Repeater rptUserRights = (Repeater)GridView1.Rows[e.NewEditIndex].FindControl("rptUserRights");
                if (rptUserRights != null)
                {
                    rptUserRights.DataSource = qUserRights;
                    rptUserRights.DataBind();

                    Label lblUserName = (Label)GridView1.Rows[e.NewEditIndex].FindControl("lblLogonId");


                    string userName = lblUserName.Text;

                    // Check if Biostat is registered user.
                    var  listRgstdUsers      = context.AspNetUsers.Select(x => x.UserName).ToList();
                    bool isBiostatRegistered = false;

                    isBiostatRegistered = (listRgstdUsers.Where(x => x.Contains(userName)).FirstOrDefault() != null) ? true : false;

                    List <IEnumerable <string> > qRightsOfCurrUser = null;

                    if (isBiostatRegistered == true)
                    {
                        // Obtains list of user roles for row QHS faculty/staff.
                        qRightsOfCurrUser = context.AspNetUsers
                                            .Where(x => x.UserName == userName)
                                            .Select(y => y.AspNetRoles.Select(z => z.Name)).ToList();

                        //Make appropriate user rights checked.
                        foreach (RepeaterItem item in rptUserRights.Items)
                        {
                            CheckBox checkbox = item.FindControl("chkId") as CheckBox;
                            if (checkbox != null)
                            {
                                // Checks checkbox if the current checkbox exist in rights of current user.
                                var currRights = checkbox.Text;

                                bool doesBiostathaveRights = (currRights != null && qRightsOfCurrUser.Where(x => x.Contains(currRights)).FirstOrDefault() != null)
                                                                ? true : false;

                                if (qRightsOfCurrUser.Count > 0 && doesBiostathaveRights == true)
                                {
                                    checkbox.Checked = true;
                                }
                            }
                        }
                    }
                }
            }

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

            BindGrid();
        }
コード例 #42
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (this.StopProcessing)
        {
            return;
        }

        if ((CMSContext.CurrentUser == null) || (CMSContext.CurrentUser.IsPublic()))
        {
            this.StopProcessing = true;
            this.Visible        = false;
            return;
        }

        if (this.NotificationGateways.Count == 0)
        {
            this.StopProcessing       = true;
            this.pnlSubscribe.Visible = false;
            this.lblError.Text        = GetString("notifications.nogateway");
            this.lblError.Visible     = true;
            return;
        }

        // Register show/hide JS
        string script = "function showHide(panelId, checkboxId) { " +
                        "    var panel = document.getElementById(panelId);" +
                        "    var chkBox = document.getElementById(checkboxId);" +
                        "    if ((panel != null) && (chkBox != null)) {" +
                        "        if (chkBox.checked) {" +
                        "            panel.style.display = 'block'" +
                        "        } else {" +
                        "            panel.style.display = 'none'" +
                        "        }" +
                        "    }" +
                        "}";

        ScriptHelper.RegisterClientScriptBlock(this, typeof(string), "NotificationSubscriptionShowHide", ScriptHelper.GetScript(script));

        this.btnSubscribe.Text   = GetString("notifications.subscribe");
        this.lblDescription.Text = HTMLHelper.HTMLEncode(this.EventDescription);

        // Load dynamically notification gateways forms
        controls = new object[this.NotificationGateways.Count, 3];
        for (int i = 0; i < this.NotificationGateways.Count; i++)
        {
            CMSNotificationGateway g = this.NotificationGateways[i];
            if ((g.NotificationGatewayObj != null) && (g.NotificationGatewayForm != null))
            {
                // Checkbox
                Panel pnlCheckbox = new Panel();
                pnlCheckbox.ID       = g.NotificationGatewayObj.GatewayName + "_chkboxpanel";
                pnlCheckbox.CssClass = "NotificationSubscriptionCheckbox";
                CheckBox chkSubscribe = new CheckBox();
                if (this.NotificationGateways.Count == 1)
                {
                    chkSubscribe.Checked = true;
                }
                chkSubscribe.ID   = g.NotificationGatewayObj.GatewayName;
                chkSubscribe.Text = HTMLHelper.HTMLEncode(g.NotificationGatewayObj.GatewayDisplayName);
                pnlCheckbox.Controls.Add(chkSubscribe);
                this.pnlGateways.Controls.Add(pnlCheckbox);

                // Notification form
                Panel pnlForm = new Panel();
                pnlForm.ID = g.NotificationGatewayObj.GatewayName + "_formpanel";
                pnlForm.Controls.Add(g.NotificationGatewayForm);
                this.pnlGateways.Controls.Add(pnlForm);

                // Add JS for show/hide functionality
                chkSubscribe.Attributes.Add("onclick", "showHide('" + pnlForm.ClientID + "','" + chkSubscribe.ClientID + "');");

                // Store references in array (we need to set display attribute after the ViewState is loaded into checkboxes)
                controls[i, 0] = chkSubscribe;
                controls[i, 1] = pnlForm;
                controls[i, 2] = g;
            }
        }
    }
コード例 #43
0
    protected void gvImportResults_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e == null)
        {
            throw new ArgumentNullException(nameof(e));
        }
        GridViewRow grow = (GridViewRow)((WebControl)e.CommandSource).NamingContainer;
        int         iRow = grow.RowIndex;

        airportImportCandidate aic = ImportedAirportCandidates[iRow];

        AirportImportRowCommand airc = (AirportImportRowCommand)Enum.Parse(typeof(AirportImportRowCommand), e.CommandName);

        CheckBox ckUseMap = (CheckBox)grow.FindControl("ckUseMap");

        if (ckUseMap.Checked)
        {
            aic.LatLong.Latitude  = Convert.ToDouble(txtLat.Text, System.Globalization.CultureInfo.InvariantCulture);
            aic.LatLong.Longitude = Convert.ToDouble(txtLong.Text, System.Globalization.CultureInfo.InvariantCulture);
        }

        airport ap = null;

        switch (e.CommandArgument.ToString())
        {
        case "FAA":
            ap = aic.FAAMatch;
            break;

        case "ICAO":
            ap = aic.ICAOMatch;
            break;

        case "IATA":
            ap = aic.IATAMatch;
            break;
        }

        switch (airc)
        {
        case AirportImportRowCommand.FixLocation:
            ap.LatLong = aic.LatLong;
            ap.FCommit(true, false);
            break;

        case AirportImportRowCommand.FixType:
            ap.FDelete(true);       // delete the existing one before we update - otherwise REPLACE INTO will not succeed (because we are changing the REPLACE INTO primary key, which includes Type)
            ap.FacilityTypeCode = aic.FacilityTypeCode;
            ap.FCommit(true, true); // force this to be treated as a new airport
            break;

        case AirportImportRowCommand.Overwrite:
        case AirportImportRowCommand.AddAirport:
            if (airc == AirportImportRowCommand.Overwrite)
            {
                ap.FDelete(true);       // delete the existing airport
            }
            switch (e.CommandArgument.ToString())
            {
            case "FAA":
                aic.Code = aic.FAA;
                break;

            case "ICAO":
                aic.Code = aic.ICAO;
                break;

            case "IATA":
                aic.Code = aic.IATA;
                break;
            }
            aic.Code = Regex.Replace(aic.Code, "[^a-zA-Z0-9]", string.Empty);
            aic.FCommit(true, true);
            break;
        }

        UpdateImportData();
    }
コード例 #44
0
        public Grid createAchivementElementList(Achievement achievement)
        {
            String name       = achievement.Name;
            String achivement = achievement.Required ? "Required" : "Optional";
            Grid   grid       = new Grid();

            grid.HorizontalAlignment = HorizontalAlignment.Stretch;
            grid.VerticalAlignment   = VerticalAlignment.Top;
            grid.Height = 60;
            grid.MouseLeftButtonDown += Grid_MouseLeftButtonDown;
            grid.Name = name;
            grid.MouseLeftButtonDown += Grid_MouseLeftButtonDown;

            Label label = new Label();

            label.Width = 180;
            label.HorizontalAlignment = HorizontalAlignment.Left;
            label.Content             = name;
            label.Name     = "dateName";
            label.Style    = myResourceDictionary["LabelStyle"] as Style;
            label.FontSize = 20;
            label.Margin   = new Thickness(0, 10, 0, 0);
            grid.Children.Add(label);

            if (achievement.type == ReminderType.BOOLEAN)
            {
                CheckBox checkBox = new CheckBox();
                checkBox.HorizontalAlignment = HorizontalAlignment.Right;
                checkBox.Content             = achivement;
                checkBox.IsChecked           = achievement.Achived;
                checkBox.Style    = myResourceDictionary["CheckBoxStyle"] as Style;
                checkBox.FontSize = 20;
                checkBox.Margin   = new Thickness(0, 10, 0, 0);
                checkBox.Name     = "booleanCheckBox";
                checkBox.Click   += checkBox_MouseLeftButtonDown;

                grid.Children.Add(checkBox);
            }
            if (achievement.type == ReminderType.INTEGER)
            {
                TextBox textbox = new TextBox();
                textbox.HorizontalAlignment = HorizontalAlignment.Right;
                //checkBox.Style = myResourceDictionary["LabelStyle"] as Style;
                textbox.FontSize          = 20;
                textbox.Margin            = new Thickness(0, 2, 10, 0);
                textbox.Name              = "integerTextBox";
                textbox.PreviewTextInput += NumberValidationTextBox;
                textbox.TextChanged      += textBox_TextChanged;
                textbox.Width             = 150;
                textbox.Height            = 50;
                grid.Children.Add(textbox);
                textbox.Text = achievement.achivedInt.ToString();
            }

            SolidColorBrush myBrush;

            if (achievement.Achived || achievement.achivedInt > 0)
            {
                myBrush = new SolidColorBrush(Colors.Green);
            }
            else
            {
                if (achievement.Required)
                {
                    myBrush = new SolidColorBrush(Colors.Red);
                }
                else
                {
                    myBrush = new SolidColorBrush(Colors.Yellow);
                }
            }
            myBrush.Opacity = 0.1;
            grid.Background = myBrush;

            return(grid);
        }
コード例 #45
0
        public CustomLvlSeq(Menu m, AIHeroClient champ, string dir, string seq = "", int maxlvl = 18)
        {
            locked   = new bool[] { true };
            this.dir = dir;
            se       = seq;
            Menu     menuSettings = m.AddSubMenu("Skill LvlUp", "AB_SL_SETTINGS");
            CheckBox enabled      = new CheckBox("Enabled", true);

            menuSettings.AddGroupLabel("General");
            menuSettings.Add(champ + "enabled", enabled);
            menuSettings.AddSeparator(10);
            menuSettings.AddGroupLabel("Current profile");
            profile1 = new CheckBox("Profile 1", true);
            profile2 = new CheckBox("Profile 2", false);
            menuSettings.Add(champ.ChampionName + Game.MapId + "p1", profile1);
            menuSettings.Add(champ.ChampionName + Game.MapId + "p2", profile2);

            updater = new CheckBox("Update default sequences");
            clear   = new CheckBox("Clear current profile", false);
            menuSettings.Add("clear", clear);
            defau = new CheckBox("Set current profile to default");
            menuSettings.Add("defaults", defau);
            menuSettings.AddSeparator(10);

            menuSettings.AddGroupLabel("Humanizer");
            humanMin = new Slider("Minimum time after level up to upgrade an ability(miliseconds)", 300, 0, 2000);
            humanMax = new Slider("Maximum time after level up to upgrade an ability(miliseconds)", 500, 0, 2000);
            menuSettings.Add("xhm", humanMin);
            menuSettings.Add("xhmx", humanMax);
            humanMin.OnValueChange += humanMin_OnValueChange;
            humanMax.OnValueChange += humanMax_OnValueChange;
            menuSettings.AddSeparator(10);
            menuSettings.AddGroupLabel("Updater");
            menuSettings.Add("updateSkills", updater);
            updater.CurrentValue    = false;
            locked[0]               = false;
            updater.OnValueChange  += updater_OnValueChange;
            clear.CurrentValue      = false;
            clear.OnValueChange    += clear_OnValueChange;
            defau.CurrentValue      = false;
            defau.OnValueChange    += defau_OnValueChange;
            profile1.OnValueChange += profile1_OnValueChange;
            profile2.OnValueChange += profile2_OnValueChange;

            profile = profile1.CurrentValue ? 1 : 2;
            lvlFile = Path.Combine(dir + "\\" + "Skills-" + champ.ChampionName + "-" + Game.MapId + "-P" + profile + ".txt");

            this.champ = champ;
            def        = new DefautSequences(dir + "\\" + "Skills-DEFAULT.txt");
            maxLvl     = maxlvl;
            Menu menu = m.AddSubMenu("Skill sequence: " + champ.ChampionName);

            sliders = new LvlSlider[maxlvl];
            skills  = new SkillToLvl[maxlvl];
            for (int i = 0; i < maxLvl; i++)
            {
                sliders[i] = new LvlSlider(menu, i, this);
            }
            load(seq);
            lvlUp = new SkillLevelUp(skills, enabled)
            {
                maxTime = humanMax.CurrentValue,
                minTime = humanMin.CurrentValue
            };
        }
コード例 #46
0
 public void Include(CheckBox checkBox)
 {
     checkBox.CheckedChange += (sender, args) => checkBox.Checked = !checkBox.Checked;
 }
コード例 #47
0
    /// <summary>
    /// Calls Validate() method, if validation fails returns error message,
    /// otherwise creates subscriptions and returns empty string.
    /// </summary>
    public override string Subscribe()
    {
        // Validate inputs
        string errorMessage = this.Validate();

        if (!String.IsNullOrEmpty(errorMessage))
        {
            return(errorMessage);
        }

        // Get correct user ID
        int userId = 0;

        if (this.EventUserID > 0)
        {
            userId = this.EventUserID;
        }
        else
        {
            if (CMSContext.CurrentUser != null)
            {
                userId = CMSContext.CurrentUser.UserID;
            }
        }

        // Parse the notification template site and name
        NotificationTemplateInfo nti = null;
        string templateName          = this.NotificationTemplateName;

        if (this.NotificationTemplateName != null)
        {
            string[] temp = this.NotificationTemplateName.Split(new char[] { '.' });
            if (temp.Length == 2)
            {
                SiteInfo tempSite = SiteInfoProvider.GetSiteInfo(temp[0]);
                if (tempSite != null)
                {
                    templateName = temp[1];
                    nti          = NotificationTemplateInfoProvider.GetNotificationTemplateInfo(templateName, tempSite.SiteID);
                }
            }
            else
            {
                nti = NotificationTemplateInfoProvider.GetNotificationTemplateInfo(templateName, 0);
            }
        }

        bool hasSubscription = false;

        // Inputs are valid now, create the subscriptions
        for (int i = 0; i < this.NotificationGateways.Count; i++)
        {
            CheckBox chk             = controls[i, 0] as CheckBox;
            Panel    pnl             = controls[i, 1] as Panel;
            CMSNotificationGateway g = controls[i, 2] as CMSNotificationGateway;
            if ((pnl != null) && (chk != null) && (g != null) && (chk.Checked))
            {
                // Register the subscriptions
                if (g.NotificationGatewayObj != null)
                {
                    if (g.NotificationGatewayForm != null)
                    {
                        // Stores NotificationSubscriptionInfo objects
                        List <NotificationSubscriptionInfo> infos = new List <NotificationSubscriptionInfo>();
                        bool uniquenessFailed = false;
                        bool templateFailed   = false;

                        foreach (NotificationSubscriptionInfo nsiTemplate in this.Subscriptions)
                        {
                            // Create new subscription and initialize it with default values
                            NotificationSubscriptionInfo nsi = new NotificationSubscriptionInfo();
                            nsi.SubscriptionEventDisplayName = this.EventDisplayName;
                            nsi.SubscriptionTarget           = Convert.ToString(g.NotificationGatewayForm.Value);
                            nsi.SubscriptionEventCode        = this.EventCode;
                            nsi.SubscriptionEventObjectID    = this.EventObjectID;
                            nsi.SubscriptionEventSource      = this.EventSource;
                            nsi.SubscriptionGatewayID        = g.NotificationGatewayObj.GatewayID;
                            nsi.SubscriptionTime             = DateTime.Now;
                            nsi.SubscriptionUserID           = userId;
                            nsi.SubscriptionEventData1       = this.EventData1;
                            nsi.SubscriptionEventData2       = this.EventData2;
                            nsi.SubscriptionUseHTML          = this.SubscriptionUseHTML;
                            nsi.SubscriptionSiteID           = this.SubscriptionSiteID;
                            if (nti != null)
                            {
                                nsi.SubscriptionTemplateID = nti.TemplateID;
                            }

                            // Overwrite default values if these are specified in template subscription
                            if (!String.IsNullOrEmpty(nsiTemplate.SubscriptionEventDisplayName))
                            {
                                nsi.SubscriptionEventDisplayName = nsiTemplate.SubscriptionEventDisplayName;
                            }
                            if (!String.IsNullOrEmpty(nsiTemplate.SubscriptionEventCode))
                            {
                                nsi.SubscriptionEventCode = nsiTemplate.SubscriptionEventCode;
                            }
                            if (!String.IsNullOrEmpty(nsiTemplate.SubscriptionEventSource))
                            {
                                nsi.SubscriptionEventSource = nsiTemplate.SubscriptionEventSource;
                            }
                            if (!String.IsNullOrEmpty(nsiTemplate.SubscriptionEventData1))
                            {
                                nsi.SubscriptionEventData1 = nsiTemplate.SubscriptionEventData1;
                            }
                            if (!String.IsNullOrEmpty(nsiTemplate.SubscriptionEventData2))
                            {
                                nsi.SubscriptionEventData2 = nsiTemplate.SubscriptionEventData2;
                            }
                            if (nsiTemplate.SubscriptionEventObjectID > 0)
                            {
                                nsi.SubscriptionEventObjectID = nsiTemplate.SubscriptionEventObjectID;
                            }
                            if (nsiTemplate.SubscriptionUserID > 0)
                            {
                                nsi.SubscriptionEventObjectID = nsiTemplate.SubscriptionUserID;
                            }
                            if (nsiTemplate.SubscriptionSiteID > 0)
                            {
                                nsi.SubscriptionSiteID = nsiTemplate.SubscriptionSiteID;
                            }
                            if (nsiTemplate.SubscriptionTemplateID > 0)
                            {
                                nsi.SubscriptionTemplateID = nsiTemplate.SubscriptionTemplateID;
                            }

                            // Check uniqueness (create only unique subsciptions)
                            string where = "SubscriptionEventSource = '" + SqlHelperClass.GetSafeQueryString(nsi.SubscriptionEventSource, false) + "' AND " +
                                           "SubscriptionEventCode = '" + SqlHelperClass.GetSafeQueryString(nsi.SubscriptionEventCode, false) + "' AND " +
                                           "SubscriptionTarget = '" + SqlHelperClass.GetSafeQueryString(nsi.SubscriptionTarget, false) + "' AND " +
                                           "SubscriptionEventObjectID = " + nsi.SubscriptionEventObjectID + " AND " +
                                           "SubscriptionGatewayID = " + nsi.SubscriptionGatewayID + " AND " +
                                           "SubscriptionEventData1 LIKE '" + SqlHelperClass.GetSafeQueryString(nsi.SubscriptionEventData1, false) + "' AND " +
                                           "SubscriptionEventData2 LIKE '" + SqlHelperClass.GetSafeQueryString(nsi.SubscriptionEventData2, false) + "' AND ";

                            if (nsi.SubscriptionSiteID > 0)
                            {
                                where += "SubscriptionSiteID = " + nsi.SubscriptionSiteID;
                            }
                            else
                            {
                                where += "SubscriptionSiteID IS NULL";
                            }

                            // Only if subscription is unique and if the template is set, put it into the list
                            if (!DataHelper.DataSourceIsEmpty(NotificationSubscriptionInfoProvider.GetSubscriptions(where, null)))
                            {
                                uniquenessFailed = true;
                                break;
                            }
                            else if (nsi.SubscriptionTemplateID <= 0)
                            {
                                templateFailed = true;
                                break;
                            }
                            else
                            {
                                infos.Add(nsi);
                            }
                        }

                        if (uniquenessFailed)
                        {
                            return(GetString("notifications.subscription.notunique"));
                        }
                        else if (templateFailed)
                        {
                            return(GetString("notifications.subscription.templatemissing"));
                        }
                        else
                        {
                            // Save vaild subscriptions into the DB
                            foreach (NotificationSubscriptionInfo nsi in infos)
                            {
                                NotificationSubscriptionInfoProvider.SetNotificationSubscriptionInfo(nsi);
                            }
                        }

                        // Clear the form after successful registration
                        g.NotificationGatewayForm.ClearForm();

                        hasSubscription = true;
                    }
                }
            }
        }

        if (hasSubscription)
        {
            if (this.NotificationGateways.Count > 1)
            {
                // Reset the state of the gateways
                for (int i = 0; i < this.NotificationGateways.Count; i++)
                {
                    CheckBox chk = controls[i, 0] as CheckBox;
                    Panel    pnl = controls[i, 1] as Panel;
                    if ((chk != null) && (pnl != null))
                    {
                        chk.Checked = false;
                        pnl.Attributes.Add("style", "display: none;");
                    }
                }
            }

            return(String.Empty);
        }
        else
        {
            return(GetString("notifications.subscription.selectgateway"));
        }
    }
コード例 #48
0
ファイル: AreaCityControl.xaml.cs プロジェクト: jjg0519/OA
        void tb_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            string    temp   = string.Empty;
            TextBlock tbtemp = sender as TextBlock;

            // tbtemp.Foreground = new SolidColorBrush(Colors.Red);
            wpCity.Children.Clear();
            //wpCity.Height = wpheight;
            if (this._selectmulti == false)
            {
                SelectedCities.Visibility = Visibility.Collapsed;
                display.Visibility        = Visibility.Collapsed;
            }
            if (tbtemp.Tag != null)
            {
                temp = tbtemp.Tag.ToString();
                var ents = from a in Application.Current.Resources["SYS_DICTIONARY"] as List <T_SYS_DICTIONARY>
                           where a.DICTIONCATEGORY == "CITY" && a.T_SYS_DICTIONARY2 != null && a.T_SYS_DICTIONARY2.DICTIONARYID == temp
                           orderby a.ORDERNUMBER
                           select new
                {
                    DICTIONARYID    = a.DICTIONARYID,
                    DICTIONARYNAME  = a.DICTIONARYNAME,
                    DICTIONARYVALUE = a.DICTIONARYVALUE
                };

                if (ents.Count() > 0)
                {
                    foreach (var ent in ents)
                    {
                        if (this._selectmulti)
                        {
                            CheckBox cbx = new CheckBox();
                            cbx.Style = Application.Current.Resources["CheckBoxStyle"] as Style;
                            if (!string.IsNullOrEmpty(display.Text) && display.Text.IndexOf(ent.DICTIONARYNAME) != -1)
                            {
                                cbx.IsChecked = true;
                            }
                            else
                            {
                                cbx.IsChecked = false;
                            }
                            cbx.Content = ent.DICTIONARYNAME;
                            cbx.Tag     = ent.DICTIONARYVALUE;
                            cbx.Click  += new RoutedEventHandler(cbx_Checked);
                            cbx.Margin  = new Thickness(2);
                            //cb.Height = 80;
                            cbx.Width = 80;
                            wpCity.Children.Add(cbx);
                        }
                        else
                        {
                            RadioButton rd = new RadioButton();
                            rd.Style = Application.Current.Resources["RadioButtonStyle"] as Style;
                            if (!string.IsNullOrEmpty(display.Text) && display.Text.IndexOf(ent.DICTIONARYNAME) != -1)
                            {
                                rd.IsChecked = true;
                            }
                            else
                            {
                                rd.IsChecked = false;
                            }
                            rd.Content = ent.DICTIONARYNAME;
                            rd.Tag     = ent.DICTIONARYVALUE;
                            rd.Click  += new RoutedEventHandler(rb_Checked);
                            rd.Margin  = new Thickness(2);
                            //cb.Height = 80;
                            rd.Width = 80;
                            wpCity.Children.Add(rd);
                        }
                    }
                }
            }
            else
            {
                return;
            }
        }
コード例 #49
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="writer"></param>
        /// <author>
        /// Created by Iulian Iuga; 30 December, 2002
        /// </author>
        protected void RenderContents(HtmlTextWriter writer)
        {
            TableRow  _tr = new TableRow();
            TableCell _td = new TableCell();

            _tr.RenderBeginTag(writer);

            // apply CssClass for current element
            if (_element.TreeWeb.DefaultElementCssClass.Length > 0)
            {
                _td.CssClass = _element.TreeWeb.DefaultElementCssClass;
            }
            if (_element.CssClass.Length > 0)
            {
                _td.CssClass = _element.CssClass;
            }

            //_td.Style.Add( "display", "none" );
            _td.Attributes.Add("nowrap", "yes");
            _td.RenderBeginTag(writer);

            // render a &nbsp; at the begining of each element
            writer.Write("&nbsp;");

            // render element indentation based on element level
            string _indentation = "";

            for (int index = 0; index < _element.Level; index++)
            {
                _indentation += _indentationStep;
            }
            writer.Write(_indentation);

            // render the expand/collapse link if the element has child elements
            if (_element.HasElements)
            {
                HyperLink _link  = new HyperLink();
                Image     _image = new Image();

                if (_element.IsExpanded)
                {
                    _link.Text = _expcol[1];
                    if (_element.TreeWeb.ExpandedElementImage.Length > 0)
                    {
                        _image.ImageUrl = _element.TreeWeb.ExpandedElementImage;
                    }
                }
                else
                {
                    _link.Text = _expcol[0];
                    if (_element.TreeWeb.CollapsedElementImage.Length > 0)
                    {
                        _image.ImageUrl = _element.TreeWeb.CollapsedElementImage;
                    }
                }

                string scriptCode = "javascript:";
                scriptCode       += _element.TreeWeb.Page.GetPostBackEventReference(_element.TreeWeb, _element.ID);
                _link.NavigateUrl = scriptCode;

                if (_image.ImageUrl.Length > 0)
                {
                    _link.RenderBeginTag(writer);
                    _image.RenderControl(writer);
                    _link.RenderEndTag(writer);
                }
                else
                {
                    _link.RenderControl(writer);
                }

                _image = null;
                _link  = null;
                writer.Write("&nbsp;");
            }

            // render checkbox
            if (_element.TreeWeb.CheckBoxes || _element.CheckBox)
            {
                CheckBox _checkbox = new CheckBox();

                _checkbox.ID = _element.ID + TreeElement._separator + TreeElement._checkboxIDSufix;
                _checkbox.RenderControl(writer);

                _checkbox = null;

                // write a non-breaking space before the element text
                writer.Write("&nbsp;");
            }

            // render element's image if it has one
            if (_element.ImageIndex > -1)
            {
                ElementImage _elementImage = _element.TreeWeb.ImageList[_element.ImageIndex];
                if (_elementImage != null)
                {
                    Image _image = new Image();

                    _image.ImageUrl = _elementImage.ImageUrl;
                    _image.RenderControl(writer);

                    _image = null;

                    // write a non-breaking space before the element text
                    writer.Write("&nbsp;");
                }
            }

            // render element text as a link if NavigateUrl is present or otherwise as normal text
            if (_element.NavigateUrl.Length > 0)
            {
                HyperLink _linkNavigateUrl = new HyperLink();

                _linkNavigateUrl.Text        = _element.Text;
                _linkNavigateUrl.NavigateUrl = _element.NavigateUrl;
                if (_element.TreeWeb.Target.Length > 0)
                {
                    _linkNavigateUrl.Target = _element.TreeWeb.Target;
                }
                if (_element.Target.Length > 0)
                {
                    _linkNavigateUrl.Target = _element.Target;
                }
                if (_element.ToolTip.Length > 0)
                {
                    _linkNavigateUrl.ToolTip = _element.ToolTip;
                }
                _linkNavigateUrl.RenderControl(writer);

                _linkNavigateUrl = null;
            }
            else
            {
                Label _label = new Label();

                _label.Text = _element.Text;
                if (_element.ToolTip.Length > 0)
                {
                    _label.ToolTip = _element.ToolTip;
                }
                _label.RenderControl(writer);

                _label = null;
            }

            _td.RenderEndTag(writer);
            _tr.RenderEndTag(writer);
        }
コード例 #50
0
 Control AllowSelection()
 {
     return(allowSelection = new CheckBox {
         Text = "Allow Selection", Checked = new PrintDialog().AllowSelection
     });
 }
コード例 #51
0
    protected void Broadcast_Click(object sender, EventArgs e)
    {
        CommandIniUpdate objReq = new CommandIniUpdate();

        if (tempList.SelectedValue.ToLower() == "logs")
        {
            objReq.CommandCount = "4";
            objReq.Command      = "collectlogs" + "#";
            objReq.Command     += list1.SelectedValue.ToLower() + "#";

            string Datevalue   = Request.Form["BroadcastdateTime"].ToString().Replace("/", "_");
            string strFromDate = Datevalue.Substring(0, 10);
            string strToDate   = Datevalue.Substring(13);
            objReq.Command += strFromDate + "#";
            objReq.Command += strToDate + "#";
        }
        else if (tempList.SelectedValue.ToLower() == "images")
        {
            objReq.CommandCount = "2";
            objReq.Command      = "securityupdate#images#" + list1.SelectedValue.ToLower();
        }



        objReq.KioskIP     = new string[0];
        objReq.MachineSrNo = new string[0];
        int  newSize = 0;
        bool okey    = false;

        for (int i = 0; i < GV_Kiosk_Details.Rows.Count; i++)
        {
            CheckBox cb = (CheckBox)GV_Kiosk_Details.Rows[i].Cells[0].FindControl("cbSelect");//Gets the

            if (cb.Checked == true)
            {
                Array.Resize(ref objReq.KioskIP, newSize + 1);
                Array.Resize(ref objReq.MachineSrNo, newSize + 1);
                // how to get those select values and how store those values in array
                objReq.KioskIP[newSize]     = GV_Kiosk_Details.Rows[i].Cells[2].Text;
                objReq.MachineSrNo[newSize] = GV_Kiosk_Details.Rows[i].Cells[5].Text;
                newSize++;
                okey = true;
            }
            else
            { //Do something here when CheckBox is UnChecked }
            }
        }
        if (okey == false)
        {
            Response.Write("<script type='text/javascript'>alert( 'Select Atleast one option' )</script>");
            return;
        }

        try
        {
            if (objds == null)
            {
                objds = new DataSet();
            }

            Reply objRes = new Reply();

            // send request
            using (WebClient client = new WebClient())
            {
                client.Headers[HttpRequestHeader.ContentType] = "text/json";

                string     JsonString    = JsonConvert.SerializeObject(objReq);
                EncRequest objEncRequest = new EncRequest();
                objEncRequest.RequestData = AesGcm256.Encrypt(JsonString);
                string dataEncrypted = JsonConvert.SerializeObject(objEncRequest);

                string result = client.UploadString(URL + "/CommandIniUpdate", "POST", dataEncrypted);

                EncResponse objResponse = JsonConvert.DeserializeObject <EncResponse>(result);
                objResponse.ResponseData = AesGcm256.Decrypt(objResponse.ResponseData);
                Newtonsoft.Json.JsonSerializer json = new Newtonsoft.Json.JsonSerializer();
                json.NullValueHandling = NullValueHandling.Ignore;
                StringReader sr = new StringReader(objResponse.ResponseData);
                Newtonsoft.Json.JsonTextReader reader = new JsonTextReader(sr);
                result = json.Deserialize <string>(reader);

                if (result.ToLower().Contains("true"))
                {
                    //Data Source
                    Response.Write("<script type='text/javascript'>alert('Ini Updated Succesfully')</script>");
                    bindKioskDetails();
                }
                else
                {
                    Response.Write("<script type='text/javascript'>alert('" + objRes.strError + "')</script>");
                }
            }
        }
        catch (Exception excp)
        {
            Response.Write("<script type='text/javascript'>alert( 'catch error : '" + excp.Message + "' )</script>");
        }
    }
        /// <summary>
        /// Generates the templated column with the
        /// selection mode
        /// </summary>
        private void ColsDataGrid_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
        {
            DataGridItem gridItem = (DataGridItem)e.Item;

            if (gridItem.ItemType != ListItemType.Footer && gridItem.ItemType != ListItemType.Header)
            {
                DropDownList answerTypesDropDownList =
                    (DropDownList)gridItem.Cells[1].Controls[1];
                answerTypesDropDownList.DataSource     = _answerTypes;
                answerTypesDropDownList.DataMember     = "AnswerTypes";
                answerTypesDropDownList.DataTextField  = "Description";
                answerTypesDropDownList.DataValueField = "AnswerTypeID";
                answerTypesDropDownList.DataBind();
                TranslateListControl(answerTypesDropDownList);

                answerTypesDropDownList.Enabled = false;

                if (AnswerTypeDropDownList.Items.FindByValue(_answers.Answers[gridItem.DataSetIndex].AnswerTypeId.ToString()) != null)
                {
                    answerTypesDropDownList.SelectedValue =
                        _answers.Answers[gridItem.DataSetIndex].AnswerTypeId.ToString();
                }
                else
                {
                    answerTypesDropDownList.SelectedValue = "1";
                }

                int      typeMode           = int.Parse(DataBinder.Eval(e.Item.DataItem, "TypeMode").ToString());
                bool     ratePart           = (bool)DataBinder.Eval(gridItem.DataItem, "RatePart");
                CheckBox ratingPartCheckBox = (CheckBox)gridItem.FindControl("RatingPartCheckBox");

                // Can this answer be rated ?
                if ((((AnswerTypeMode)typeMode & AnswerTypeMode.Selection) > 0))
                {
                    ratingPartCheckBox.Visible = true;
                    if (ratePart)
                    {
                        ((Label)gridItem.FindControl("RatingLabel")).Text = _currentRating.ToString();
                        ratingPartCheckBox.Checked = true;
                        _currentRating++;
                    }
                    else
                    {
                        ((Label)gridItem.FindControl("RatingLabel")).Text = "0";
                    }
                }
                else
                {
                    ratingPartCheckBox.Visible = false;
                    ratingPartCheckBox.Checked = false;
                }

                CheckBox mandatoryCheckBox = (CheckBox)gridItem.FindControl("MandatoryCheckBox");
                // Can this answer be mandatory  ?
                if ((((AnswerTypeMode)typeMode & AnswerTypeMode.Mandatory) > 0))
                {
                    mandatoryCheckBox.Visible = true;
                    mandatoryCheckBox.Checked = (bool)DataBinder.Eval(gridItem.DataItem, "Mandatory");;
                }
                else
                {
                    mandatoryCheckBox.Visible = false;
                    mandatoryCheckBox.Checked = false;
                }
            }
        }
コード例 #53
0
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PantallaBuscarPedido));
     this.pictureBox1      = new System.Windows.Forms.PictureBox();
     this.label1           = new System.Windows.Forms.Label();
     this.btnLimpiar       = new System.Windows.Forms.Button();
     this.btnBuscar        = new System.Windows.Forms.Button();
     this.dtpFechaA        = new System.Windows.Forms.DateTimePicker();
     this.txtNumeroPedido  = new System.Windows.Forms.TextBox();
     this.txtNombreCliente = new System.Windows.Forms.TextBox();
     this.label6           = new System.Windows.Forms.Label();
     this.label5           = new System.Windows.Forms.Label();
     this.label12          = new System.Windows.Forms.Label();
     this.label3           = new System.Windows.Forms.Label();
     this.label4           = new System.Windows.Forms.Label();
     this.label2           = new System.Windows.Forms.Label();
     this.label7           = new System.Windows.Forms.Label();
     this.dgvTabla         = new System.Windows.Forms.DataGridView();
     this.cid            = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.cnombrecliente = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.cdescripcion   = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.cfecha         = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.label8         = new System.Windows.Forms.Label();
     this.btnCancelar    = new System.Windows.Forms.Button();
     this.btnAceptar     = new System.Windows.Forms.Button();
     this.label14        = new System.Windows.Forms.Label();
     this.label13        = new System.Windows.Forms.Label();
     this.dtpFechaB      = new System.Windows.Forms.DateTimePicker();
     this.label9         = new System.Windows.Forms.Label();
     this.chkActivar     = new System.Windows.Forms.CheckBox();
     this.Encabezado.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.dgvTabla)).BeginInit();
     this.SuspendLayout();
     //
     // Encabezado
     //
     this.Encabezado.Controls.Add(this.label1);
     this.Encabezado.Controls.Add(this.pictureBox1);
     this.Encabezado.Size = new System.Drawing.Size(615, 93);
     //
     // pictureBox1
     //
     this.pictureBox1.BackColor             = System.Drawing.Color.Transparent;
     this.pictureBox1.BackgroundImage       = ((System.Drawing.Image)(resources.GetObject("pictureBox1.BackgroundImage")));
     this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
     this.pictureBox1.Location = new System.Drawing.Point(12, 12);
     this.pictureBox1.Name     = "pictureBox1";
     this.pictureBox1.Size     = new System.Drawing.Size(75, 75);
     this.pictureBox1.TabIndex = 9;
     this.pictureBox1.TabStop  = false;
     //
     // label1
     //
     this.label1.AutoSize  = true;
     this.label1.BackColor = System.Drawing.Color.Transparent;
     this.label1.Font      = new System.Drawing.Font("Arial Rounded MT Bold", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label1.ForeColor = System.Drawing.Color.MidnightBlue;
     this.label1.Location  = new System.Drawing.Point(93, 37);
     this.label1.Name      = "label1";
     this.label1.Size      = new System.Drawing.Size(157, 24);
     this.label1.TabIndex  = 9;
     this.label1.Text      = "Buscar pedido";
     //
     // btnLimpiar
     //
     this.btnLimpiar.BackgroundImage           = ((System.Drawing.Image)(resources.GetObject("btnLimpiar.BackgroundImage")));
     this.btnLimpiar.BackgroundImageLayout     = System.Windows.Forms.ImageLayout.Stretch;
     this.btnLimpiar.FlatAppearance.BorderSize = 0;
     this.btnLimpiar.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
     this.btnLimpiar.Location  = new System.Drawing.Point(517, 181);
     this.btnLimpiar.Margin    = new System.Windows.Forms.Padding(3, 2, 3, 2);
     this.btnLimpiar.Name      = "btnLimpiar";
     this.btnLimpiar.Size      = new System.Drawing.Size(60, 60);
     this.btnLimpiar.TabIndex  = 26;
     this.btnLimpiar.TabStop   = false;
     this.btnLimpiar.UseVisualStyleBackColor = true;
     this.btnLimpiar.Click += new System.EventHandler(this.btnLimpiar_Click);
     //
     // btnBuscar
     //
     this.btnBuscar.BackgroundImage           = ((System.Drawing.Image)(resources.GetObject("btnBuscar.BackgroundImage")));
     this.btnBuscar.BackgroundImageLayout     = System.Windows.Forms.ImageLayout.Stretch;
     this.btnBuscar.FlatAppearance.BorderSize = 0;
     this.btnBuscar.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
     this.btnBuscar.Location  = new System.Drawing.Point(409, 181);
     this.btnBuscar.Margin    = new System.Windows.Forms.Padding(3, 2, 3, 2);
     this.btnBuscar.Name      = "btnBuscar";
     this.btnBuscar.Size      = new System.Drawing.Size(60, 60);
     this.btnBuscar.TabIndex  = 27;
     this.btnBuscar.TabStop   = false;
     this.btnBuscar.UseVisualStyleBackColor = true;
     this.btnBuscar.Click += new System.EventHandler(this.btnBuscar_Click);
     //
     // dtpFechaA
     //
     this.dtpFechaA.Format        = System.Windows.Forms.DateTimePickerFormat.Short;
     this.dtpFechaA.Location      = new System.Drawing.Point(43, 263);
     this.dtpFechaA.Margin        = new System.Windows.Forms.Padding(3, 4, 3, 4);
     this.dtpFechaA.Name          = "dtpFechaA";
     this.dtpFechaA.Size          = new System.Drawing.Size(93, 21);
     this.dtpFechaA.TabIndex      = 24;
     this.dtpFechaA.Value         = new System.DateTime(2017, 3, 30, 20, 51, 0, 0);
     this.dtpFechaA.ValueChanged += new System.EventHandler(this.dtpFechaA_ValueChanged);
     //
     // txtNumeroPedido
     //
     this.txtNumeroPedido.Location  = new System.Drawing.Point(40, 208);
     this.txtNumeroPedido.Margin    = new System.Windows.Forms.Padding(3, 4, 3, 4);
     this.txtNumeroPedido.MaxLength = 6;
     this.txtNumeroPedido.Name      = "txtNumeroPedido";
     this.txtNumeroPedido.Size      = new System.Drawing.Size(304, 21);
     this.txtNumeroPedido.TabIndex  = 22;
     this.txtNumeroPedido.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtNumeroPedido_KeyPress);
     //
     // txtNombreCliente
     //
     this.txtNombreCliente.Location = new System.Drawing.Point(40, 163);
     this.txtNombreCliente.Margin   = new System.Windows.Forms.Padding(3, 4, 3, 4);
     this.txtNombreCliente.Name     = "txtNombreCliente";
     this.txtNombreCliente.Size     = new System.Drawing.Size(304, 21);
     this.txtNombreCliente.TabIndex = 23;
     //
     // label6
     //
     this.label6.AutoSize = true;
     this.label6.Font     = new System.Drawing.Font("Century Gothic", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label6.Location = new System.Drawing.Point(517, 243);
     this.label6.Name     = "label6";
     this.label6.Size     = new System.Drawing.Size(60, 20);
     this.label6.TabIndex = 15;
     this.label6.Text     = "Limpiar";
     //
     // label5
     //
     this.label5.AutoSize = true;
     this.label5.Font     = new System.Drawing.Font("Century Gothic", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label5.Location = new System.Drawing.Point(410, 243);
     this.label5.Name     = "label5";
     this.label5.Size     = new System.Drawing.Size(58, 20);
     this.label5.TabIndex = 16;
     this.label5.Text     = "Buscar";
     //
     // label12
     //
     this.label12.AutoSize = true;
     this.label12.Font     = new System.Drawing.Font("Arial Rounded MT Bold", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label12.Location = new System.Drawing.Point(37, 110);
     this.label12.Name     = "label12";
     this.label12.Size     = new System.Drawing.Size(525, 17);
     this.label12.TabIndex = 17;
     this.label12.Text     = "Para realizar una consulta se deben ingresar los criterios de busqueda";
     //
     // label3
     //
     this.label3.AutoSize = true;
     this.label3.Font     = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label3.Location = new System.Drawing.Point(40, 265);
     this.label3.Name     = "label3";
     this.label3.Size     = new System.Drawing.Size(12, 16);
     this.label3.TabIndex = 18;
     this.label3.Text     = "-";
     //
     // label4
     //
     this.label4.AutoSize = true;
     this.label4.Font     = new System.Drawing.Font("Century Gothic", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label4.Location = new System.Drawing.Point(40, 188);
     this.label4.Name     = "label4";
     this.label4.Size     = new System.Drawing.Size(132, 17);
     this.label4.TabIndex = 19;
     this.label4.Text     = "Numero de pedido";
     //
     // label2
     //
     this.label2.AutoSize = true;
     this.label2.Font     = new System.Drawing.Font("Century Gothic", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label2.Location = new System.Drawing.Point(40, 238);
     this.label2.Name     = "label2";
     this.label2.Size     = new System.Drawing.Size(141, 17);
     this.label2.TabIndex = 20;
     this.label2.Text     = "Intervalo de tiempo:";
     //
     // label7
     //
     this.label7.AutoSize = true;
     this.label7.Font     = new System.Drawing.Font("Century Gothic", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label7.Location = new System.Drawing.Point(40, 139);
     this.label7.Name     = "label7";
     this.label7.Size     = new System.Drawing.Size(136, 17);
     this.label7.TabIndex = 21;
     this.label7.Text     = "Nombre del cliente:";
     //
     // dgvTabla
     //
     this.dgvTabla.AllowUserToAddRows          = false;
     this.dgvTabla.AllowUserToDeleteRows       = false;
     this.dgvTabla.AllowUserToResizeColumns    = false;
     this.dgvTabla.AllowUserToResizeRows       = false;
     this.dgvTabla.AutoSizeColumnsMode         = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
     this.dgvTabla.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
     this.dgvTabla.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
         this.cid,
         this.cnombrecliente,
         this.cdescripcion,
         this.cfecha
     });
     this.dgvTabla.Location          = new System.Drawing.Point(43, 316);
     this.dgvTabla.MultiSelect       = false;
     this.dgvTabla.Name              = "dgvTabla";
     this.dgvTabla.ReadOnly          = true;
     this.dgvTabla.RowHeadersVisible = false;
     this.dgvTabla.SelectionMode     = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
     this.dgvTabla.Size              = new System.Drawing.Size(560, 150);
     this.dgvTabla.TabIndex          = 28;
     //
     // cid
     //
     this.cid.FillWeight = 30F;
     this.cid.HeaderText = "ID";
     this.cid.Name       = "cid";
     this.cid.ReadOnly   = true;
     //
     // cnombrecliente
     //
     this.cnombrecliente.HeaderText = "Nombre del cliente";
     this.cnombrecliente.Name       = "cnombrecliente";
     this.cnombrecliente.ReadOnly   = true;
     //
     // cdescripcion
     //
     this.cdescripcion.HeaderText = "Descripcion";
     this.cdescripcion.Name       = "cdescripcion";
     this.cdescripcion.ReadOnly   = true;
     //
     // cfecha
     //
     this.cfecha.FillWeight = 50F;
     this.cfecha.HeaderText = "Fecha";
     this.cfecha.Name       = "cfecha";
     this.cfecha.ReadOnly   = true;
     //
     // label8
     //
     this.label8.AutoSize = true;
     this.label8.Font     = new System.Drawing.Font("Arial Rounded MT Bold", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label8.Location = new System.Drawing.Point(40, 296);
     this.label8.Name     = "label8";
     this.label8.Size     = new System.Drawing.Size(186, 17);
     this.label8.TabIndex = 17;
     this.label8.Text     = "Resultados de búsqueda";
     //
     // btnCancelar
     //
     this.btnCancelar.BackgroundImage           = global::Presentacion.Properties.Resources.IconoCancelar;
     this.btnCancelar.BackgroundImageLayout     = System.Windows.Forms.ImageLayout.Stretch;
     this.btnCancelar.FlatAppearance.BorderSize = 0;
     this.btnCancelar.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
     this.btnCancelar.Location  = new System.Drawing.Point(344, 482);
     this.btnCancelar.Margin    = new System.Windows.Forms.Padding(3, 4, 3, 4);
     this.btnCancelar.Name      = "btnCancelar";
     this.btnCancelar.Size      = new System.Drawing.Size(60, 60);
     this.btnCancelar.TabIndex  = 31;
     this.btnCancelar.UseVisualStyleBackColor = true;
     this.btnCancelar.Click += new System.EventHandler(this.btnCancelar_Click);
     //
     // btnAceptar
     //
     this.btnAceptar.BackgroundImage           = global::Presentacion.Properties.Resources.IconoAceptar;
     this.btnAceptar.BackgroundImageLayout     = System.Windows.Forms.ImageLayout.Stretch;
     this.btnAceptar.FlatAppearance.BorderSize = 0;
     this.btnAceptar.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
     this.btnAceptar.Location  = new System.Drawing.Point(234, 482);
     this.btnAceptar.Margin    = new System.Windows.Forms.Padding(3, 4, 3, 4);
     this.btnAceptar.Name      = "btnAceptar";
     this.btnAceptar.Size      = new System.Drawing.Size(60, 60);
     this.btnAceptar.TabIndex  = 32;
     this.btnAceptar.UseVisualStyleBackColor = true;
     this.btnAceptar.Click += new System.EventHandler(this.btnAceptar_Click);
     //
     // label14
     //
     this.label14.AutoSize = true;
     this.label14.Font     = new System.Drawing.Font("Century Gothic", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label14.Location = new System.Drawing.Point(340, 546);
     this.label14.Name     = "label14";
     this.label14.Size     = new System.Drawing.Size(68, 17);
     this.label14.TabIndex = 29;
     this.label14.Text     = "Cancelar";
     //
     // label13
     //
     this.label13.AutoSize = true;
     this.label13.Font     = new System.Drawing.Font("Century Gothic", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label13.Location = new System.Drawing.Point(234, 546);
     this.label13.Name     = "label13";
     this.label13.Size     = new System.Drawing.Size(60, 17);
     this.label13.TabIndex = 30;
     this.label13.Text     = "Aceptar";
     //
     // dtpFechaB
     //
     this.dtpFechaB.Format        = System.Windows.Forms.DateTimePickerFormat.Short;
     this.dtpFechaB.Location      = new System.Drawing.Point(191, 263);
     this.dtpFechaB.Margin        = new System.Windows.Forms.Padding(3, 4, 3, 4);
     this.dtpFechaB.Name          = "dtpFechaB";
     this.dtpFechaB.Size          = new System.Drawing.Size(93, 21);
     this.dtpFechaB.TabIndex      = 24;
     this.dtpFechaB.Value         = new System.DateTime(2017, 4, 30, 20, 51, 0, 0);
     this.dtpFechaB.ValueChanged += new System.EventHandler(this.dtpFechaB_ValueChanged);
     //
     // label9
     //
     this.label9.AutoSize = true;
     this.label9.Font     = new System.Drawing.Font("Century Gothic", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label9.Location = new System.Drawing.Point(146, 248);
     this.label9.Name     = "label9";
     this.label9.Size     = new System.Drawing.Size(30, 42);
     this.label9.TabIndex = 33;
     this.label9.Text     = "-";
     //
     // chkActivar
     //
     this.chkActivar.AutoSize = true;
     this.chkActivar.Location = new System.Drawing.Point(290, 263);
     this.chkActivar.Name     = "chkActivar";
     this.chkActivar.Size     = new System.Drawing.Size(66, 20);
     this.chkActivar.TabIndex = 34;
     this.chkActivar.Text     = "Activar";
     this.chkActivar.UseVisualStyleBackColor = true;
     this.chkActivar.CheckedChanged         += new System.EventHandler(this.chkActivar_CheckedChanged);
     //
     // PantallaBuscarPedido
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 16F);
     this.ClientSize          = new System.Drawing.Size(615, 581);
     this.Controls.Add(this.chkActivar);
     this.Controls.Add(this.txtNumeroPedido);
     this.Controls.Add(this.btnCancelar);
     this.Controls.Add(this.label4);
     this.Controls.Add(this.btnAceptar);
     this.Controls.Add(this.label14);
     this.Controls.Add(this.label13);
     this.Controls.Add(this.dgvTabla);
     this.Controls.Add(this.btnLimpiar);
     this.Controls.Add(this.btnBuscar);
     this.Controls.Add(this.dtpFechaB);
     this.Controls.Add(this.dtpFechaA);
     this.Controls.Add(this.txtNombreCliente);
     this.Controls.Add(this.label6);
     this.Controls.Add(this.label5);
     this.Controls.Add(this.label8);
     this.Controls.Add(this.label12);
     this.Controls.Add(this.label3);
     this.Controls.Add(this.label2);
     this.Controls.Add(this.label7);
     this.Controls.Add(this.label9);
     this.Name = "PantallaBuscarPedido";
     this.Text = "Buscar pedido";
     this.Controls.SetChildIndex(this.label9, 0);
     this.Controls.SetChildIndex(this.label7, 0);
     this.Controls.SetChildIndex(this.label2, 0);
     this.Controls.SetChildIndex(this.label3, 0);
     this.Controls.SetChildIndex(this.label12, 0);
     this.Controls.SetChildIndex(this.label8, 0);
     this.Controls.SetChildIndex(this.label5, 0);
     this.Controls.SetChildIndex(this.label6, 0);
     this.Controls.SetChildIndex(this.txtNombreCliente, 0);
     this.Controls.SetChildIndex(this.dtpFechaA, 0);
     this.Controls.SetChildIndex(this.dtpFechaB, 0);
     this.Controls.SetChildIndex(this.btnBuscar, 0);
     this.Controls.SetChildIndex(this.btnLimpiar, 0);
     this.Controls.SetChildIndex(this.dgvTabla, 0);
     this.Controls.SetChildIndex(this.label13, 0);
     this.Controls.SetChildIndex(this.label14, 0);
     this.Controls.SetChildIndex(this.btnAceptar, 0);
     this.Controls.SetChildIndex(this.label4, 0);
     this.Controls.SetChildIndex(this.btnCancelar, 0);
     this.Controls.SetChildIndex(this.txtNumeroPedido, 0);
     this.Controls.SetChildIndex(this.chkActivar, 0);
     this.Controls.SetChildIndex(this.Encabezado, 0);
     this.Encabezado.ResumeLayout(false);
     this.Encabezado.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.dgvTabla)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
コード例 #54
0
        private void load_shift()
        {
            _oboats = new Dictionary <string, List <Boatcrew> >();

            foreach (DataRow row in _ds_sched.Tables[0].Rows)
            {
                //string bc = row["BoatName"].ToString();

                //if (_boats.ContainsKey(bc))
                //{
                //    modify_boatcrew(_boats[bc], row);
                //}
                //else
                //{
                //    _boats.Add(bc, make_boatcrew(row));
                //    flpVessels.Controls.Add(ckb_make_vessel(bc));
                //}

                //string bn = row["BoatName"].ToString();
                string bc      = row["BoatCode"].ToString();
                string bn      = row["BoatName"].ToString();
                int    shiftid = Convert.ToInt32(row["ShiftID"]);

                //Boat b = _nboats.Add(bc, row);
                _nboats.Add(bc, bn, shiftid, row);
            }

            foreach (var key in _nboats._boats)
            {
                Boat b = _nboats.Get(key.Key);

                flpVessels.Controls.Add(ckb_make_vessel(b.boatname, b.boatcode));

                //List<Boatcrew> lb;
                //if (_oboats.ContainsKey(bn))
                //{
                //    lb = _oboats[bn];
                //    lb.Add(make_boatcrew(row));
                //    //_boats.Add(bn, lb);
                //}
                //else
                //{
                //    lb = new List<Boatcrew>();
                //    lb.Add(make_boatcrew(row));
                //    _oboats.Add(bn, lb);

                //    //flpVessels.Controls.Add(ckb_make_vessel(bn));
                //    flpVessels.Controls.Add(ckb_make_vessel(b.boatname));
                //}
                //ucVessel uc = new ucVessel(RefWeek, _ds_vessels, lb[lb.Count - 1], b);

                //ucVessel uc = new ucVessel(RefWeek, _ds_vessels, b);
                //tlpVessel.Controls.Add(uc);
            }

            //ucVessel uc = new ucVessel(RefWeek, _ds_vessels, _boats);
            //tlpVessel.Controls.Add(uc);
            //uc = new ucVessel(RefWeek, _ds_vessels, _boats);
            //tlpVessel.Controls.Add(uc);

            if (flpVessels.Controls.Count != 0)
            {
                flpVessels.Show();

                CheckBox ckb = (CheckBox)(flpVessels.Controls[0]);
                ckb.Checked = true;
                ckb_Click(ckb, null);
            }
        }
コード例 #55
0
 Control AllowPageRange()
 {
     return(allowPageRange = new CheckBox {
         Text = "Allow Page Range", Checked = new PrintDialog().AllowPageRange
     });
 }