コード例 #1
0
        private void Reset()
        {
            TxtUniqueId.Visible        = false;
            CmbUniqueId.Visible        = true;
            LblBookName.Location       = new Point(6, 68);
            CmdBookName.Location       = new Point(121, 62);
            PnlButtons.Location        = new Point(6, 92);
            PnlUser.Visible            = false;
            PnlUser.Location           = new Point(9, 144);
            PnlDateTime.Visible        = false;
            PnlDateTime.Location       = new Point(6, 144);
            BtnBookReservation.Visible = true;
            BtnEnd.Visible             = false;
            BtnEnd.Enabled             = false;
            GrbBookCrud.Size           = new Size(285, 169);

            TxtPenalty.ResetText();
            TxtStartTime.ResetText();
            TxtUniqueId.ResetText();
            CmbUniqueId.ResetText();
            CmdBookName.ResetText();
            TxtName.ResetText();
            TxtPhone.ResetText();
            TxtSurname.ResetText();
            CmbSearchBook.ResetText();
            CmbSearchId.ResetText();
        }
コード例 #2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            try
            {
                base.OnCreate(savedInstanceState);

                IMethods.IApp.FullScreenApp(this);

                var view = MyContextWrapper.GetContentView(this, Settings.Lang, Resource.Layout.CreateEvent_Layout);
                if (view != null)
                {
                    SetContentView(view);
                }
                else
                {
                    SetContentView(Resource.Layout.CreateEvent_Layout);
                }

                var ToolBar = FindViewById <Toolbar>(Resource.Id.toolbar);
                if (ToolBar != null)
                {
                    ToolBar.Title = GetText(Resource.String.Lbl_Create_Events);

                    SetSupportActionBar(ToolBar);
                    SupportActionBar.SetDisplayShowCustomEnabled(true);
                    SupportActionBar.SetDisplayHomeAsUpEnabled(true);
                    SupportActionBar.SetHomeButtonEnabled(true);
                    SupportActionBar.SetDisplayShowHomeEnabled(true);
                }

                TxtEventName   = FindViewById <EditText>(Resource.Id.eventname);
                IconStartDate  = FindViewById <TextView>(Resource.Id.StartIcondate);
                TxtStartDate   = FindViewById <EditText>(Resource.Id.StartDateTextview);
                TxtStartTime   = FindViewById <EditText>(Resource.Id.StartTimeTextview);
                IconEndDate    = FindViewById <TextView>(Resource.Id.EndIcondate);
                TxtEndDate     = FindViewById <EditText>(Resource.Id.EndDateTextview);
                TxtEndTime     = FindViewById <EditText>(Resource.Id.EndTimeTextview);
                IconLocation   = FindViewById <TextView>(Resource.Id.IconLocation);
                TxtLocation    = FindViewById <EditText>(Resource.Id.LocationTextview);
                TxtDescription = FindViewById <EditText>(Resource.Id.description);

                ImageEvent = FindViewById <ImageViewAsync>(Resource.Id.EventCover);
                BtnImage   = FindViewById <Button>(Resource.Id.btn_selectimage);

                Txt_Add = FindViewById <TextView>(Resource.Id.toolbar_title);

                IMethods.Set_TextViewIcon("1", IconStartDate, IonIcons_Fonts.AndroidTime);
                IMethods.Set_TextViewIcon("1", IconEndDate, IonIcons_Fonts.AndroidTime);
                IMethods.Set_TextViewIcon("1", IconLocation, IonIcons_Fonts.Location);

                TxtStartTime.SetOnClickListener(this);
                TxtEndTime.SetOnClickListener(this);
                TxtStartDate.SetOnClickListener(this);
                TxtEndDate.SetOnClickListener(this);
            }
            catch (Exception e)
            {
                Crashes.TrackError(e);
            }
        }
コード例 #3
0
 private bool CheckValue()
 {
     if (string.IsNullOrEmpty(TxtName.Text))
     {
         ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('会议名称不能为空!');", true);
         TxtName.Focus();
         return(false);
     }
     if (string.IsNullOrEmpty(TxtTheme.Text))
     {
         ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('主题不能为空!');", true);
         TxtTheme.Focus();
         return(false);
     }
     if (string.IsNullOrEmpty(TxtStartTime.Text))
     {
         ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('开始时间不能为空!');", true);
         TxtStartTime.Focus();
         return(false);
     }
     if (string.IsNullOrEmpty(TxtEndTime.Text))
     {
         ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('结束时间不能为空!');", true);
         TxtEndTime.Focus();
         return(false);
     }
     if (string.IsNullOrEmpty(TxtCity.Text))
     {
         ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('所在城市不能为空!');", true);
         TxtCity.Focus();
         return(false);
     }
     if (string.IsNullOrEmpty(TxtStreet.Text))
     {
         ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('街道不能为空!');", true);
         TxtStreet.Focus();
         return(false);
     }
     if (string.IsNullOrEmpty(TxtNumber.Text))
     {
         ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('门牌号不能为空!');", true);
         TxtNumber.Focus();
         return(false);
     }
     if (string.IsNullOrEmpty(TxtDept.Text))
     {
         ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('所属部门不能为空!');", true);
         TxtDept.Focus();
         return(false);
     }
     return(true);
 }
コード例 #4
0
        private void InitComponent()
        {
            try
            {
                TxtEventName   = FindViewById <EditText>(Resource.Id.eventname);
                IconStartDate  = FindViewById <TextView>(Resource.Id.StartIcondate);
                TxtStartDate   = FindViewById <EditText>(Resource.Id.StartDateTextview);
                TxtStartTime   = FindViewById <EditText>(Resource.Id.StartTimeTextview);
                IconEndDate    = FindViewById <TextView>(Resource.Id.EndIcondate);
                TxtEndDate     = FindViewById <EditText>(Resource.Id.EndDateTextview);
                TxtEndTime     = FindViewById <EditText>(Resource.Id.EndTimeTextview);
                IconLocation   = FindViewById <TextView>(Resource.Id.IconLocation);
                TxtLocation    = FindViewById <EditText>(Resource.Id.LocationTextview);
                TxtDescription = FindViewById <EditText>(Resource.Id.description);

                ImageEvent = FindViewById <ImageView>(Resource.Id.EventCover);
                BtnImage   = FindViewById <Button>(Resource.Id.btn_selectimage);

                TxtAdd      = FindViewById <TextView>(Resource.Id.toolbar_title);
                TxtAdd.Text = GetText(Resource.String.Lbl_Save);

                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, IconStartDate, IonIconsFonts.AndroidTime);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, IconEndDate, IonIconsFonts.AndroidTime);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, IconLocation, IonIconsFonts.Location);

                Methods.SetColorEditText(TxtEventName, AppSettings.SetTabDarkTheme ? Color.White : Color.Black);
                Methods.SetColorEditText(TxtStartDate, AppSettings.SetTabDarkTheme ? Color.White : Color.Black);
                Methods.SetColorEditText(TxtStartTime, AppSettings.SetTabDarkTheme ? Color.White : Color.Black);
                Methods.SetColorEditText(TxtEndDate, AppSettings.SetTabDarkTheme ? Color.White : Color.Black);
                Methods.SetColorEditText(TxtEndTime, AppSettings.SetTabDarkTheme ? Color.White : Color.Black);
                Methods.SetColorEditText(TxtLocation, AppSettings.SetTabDarkTheme ? Color.White : Color.Black);
                Methods.SetColorEditText(TxtDescription, AppSettings.SetTabDarkTheme ? Color.White : Color.Black);


                TxtStartTime.SetOnClickListener(this);
                TxtEndTime.SetOnClickListener(this);
                TxtStartDate.SetOnClickListener(this);
                TxtEndDate.SetOnClickListener(this);

                PublisherAdView = FindViewById <PublisherAdView>(Resource.Id.multiple_ad_sizes_view);
                AdsGoogle.InitPublisherAdView(PublisherAdView);
            }
            catch (Exception e)
            {
                Methods.DisplayReportResultTrack(e);
            }
        }
コード例 #5
0
        private void InitComponent()
        {
            try
            {
                TxtEventName   = FindViewById <EditText>(Resource.Id.eventname);
                IconStartDate  = FindViewById <TextView>(Resource.Id.StartIcondate);
                TxtStartDate   = FindViewById <EditText>(Resource.Id.StartDateTextview);
                TxtStartTime   = FindViewById <EditText>(Resource.Id.StartTimeTextview);
                IconEndDate    = FindViewById <TextView>(Resource.Id.EndIcondate);
                TxtEndDate     = FindViewById <EditText>(Resource.Id.EndDateTextview);
                TxtEndTime     = FindViewById <EditText>(Resource.Id.EndTimeTextview);
                IconLocation   = FindViewById <TextView>(Resource.Id.IconLocation);
                TxtLocation    = FindViewById <EditText>(Resource.Id.LocationTextview);
                TxtDescription = FindViewById <EditText>(Resource.Id.description);

                ImageEvent = FindViewById <ImageView>(Resource.Id.EventCover);
                BtnImage   = FindViewById <Button>(Resource.Id.btn_selectimage);

                TxtAdd = FindViewById <TextView>(Resource.Id.toolbar_title);

                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, IconStartDate, IonIconsFonts.AndroidTime);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, IconEndDate, IonIconsFonts.AndroidTime);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, IconLocation, IonIconsFonts.Location);

                Methods.SetColorEditText(TxtEventName, AppSettings.SetTabDarkTheme ? Color.White : Color.Black);
                Methods.SetColorEditText(TxtStartTime, AppSettings.SetTabDarkTheme ? Color.White : Color.Black);
                Methods.SetColorEditText(TxtStartDate, AppSettings.SetTabDarkTheme ? Color.White : Color.Black);
                Methods.SetColorEditText(TxtEndDate, AppSettings.SetTabDarkTheme ? Color.White : Color.Black);
                Methods.SetColorEditText(TxtEndTime, AppSettings.SetTabDarkTheme ? Color.White : Color.Black);
                Methods.SetColorEditText(TxtLocation, AppSettings.SetTabDarkTheme ? Color.White : Color.Black);
                Methods.SetColorEditText(TxtDescription, AppSettings.SetTabDarkTheme ? Color.White : Color.Black);

                TxtStartTime.SetOnClickListener(this);
                TxtEndTime.SetOnClickListener(this);
                TxtStartDate.SetOnClickListener(this);
                TxtEndDate.SetOnClickListener(this);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }