コード例 #1
0
ファイル: LoginPage.xaml.cs プロジェクト: PlayBlue7/SKDPublic
 private void Entry_Focused(object sender, FocusEventArgs e)
 {
     if (!entryFocused)
     {
         InputSL.TranslateTo(0, -Height / 3.5, easing: Easing.CubicInOut);
         TitleSL.FadeTo(0, easing: Easing.CubicInOut);
         entryFocused = true;
     }
 }
コード例 #2
0
ファイル: LoginPage.xaml.cs プロジェクト: PlayBlue7/SKDPublic
 private void TapGestureRecognizer_Tapped(object sender, EventArgs e)
 {
     if (animationStarted && entryFocused)
     {
         InputSL.TranslateTo(0, 0, easing: Easing.CubicInOut);
         TitleSL.FadeTo(1, easing: Easing.CubicInOut);
         entryFocused = false;
     }
 }
コード例 #3
0
ファイル: LoginPage.xaml.cs プロジェクト: PlayBlue7/SKDPublic
 private void Entry_Unfocused(object sender, FocusEventArgs e)
 {
     if (entryFocused)
     {
         Device.StartTimer(TimeSpan.FromMilliseconds(100), () =>
         {
             if (EmailEntry.IsFocused || PasswordEntry.IsFocused || PasswordConfirmationEntry.IsFocused || justSwitched)
             {
                 return(justSwitched = false);
             }
             InputSL.TranslateTo(0, 0, easing: Easing.CubicInOut);
             TitleSL.FadeTo(1, easing: Easing.CubicInOut);
             return(entryFocused = false);
         });
     }
 }
コード例 #4
0
ファイル: FormInput.cs プロジェクト: pubpub-zz/ppInk
        public FormInput(string caption, string label, string txt, bool ML, gInk.Root rt = null, Microsoft.Ink.Stroke stk = null)
        {
            InitializeComponent();

            // local
            this.btOK.Text     = rt.Local.ButtonOkText;
            this.btCancel.Text = rt.Local.ButtonCancelText;
            this.FontBtn.Text  = rt.Local.ButtonFontText;
            this.ColorBtn.Text = rt.Local.OptionsPensColor;
            boxingCb.Items.AddRange(rt.Local.TextFramingText.Split(';'));

            Text            = caption;
            captionLbl.Text = label;
            if (ML)
            {
                InputML.Visible = true;
                txt             = txt.Replace("\r\n", "\n").Replace("\n", "\r\n"); //in order to get multiline text to be correctly editable after restore
                InputML.Text    = txt;
                ActiveControl   = InputML;
            }
            else
            {
                InputSL.Visible = true;
                InputSL.Text    = txt;
                ActiveControl   = InputSL;
            }
            Root   = rt;
            stroke = stk;
            if (stroke == null)
            {
                FontBtn.Visible  = false;
                boxingCb.Visible = false;
            }
            else
            {
                FontBtn.Visible  = true;
                ColorBtn.Visible = true;
                boxingCb.Visible = true;// !stk.ExtendedProperties.Contains(Root.ISTAG_GUID);

                FontDlg.Font = new Font((string)stk.ExtendedProperties[Root.TEXTFONT_GUID].Data, (float)(double)stk.ExtendedProperties[Root.TEXTFONTSIZE_GUID].Data,
                                        (System.Drawing.FontStyle)stk.ExtendedProperties[Root.TEXTFONTSTYLE_GUID].Data);
                InputML.TextChanged += new System.EventHandler(this.InputML_TextChanged);
                int i = (stk.ExtendedProperties.Contains(Root.ISSTROKE_GUID) ? 1 : 0) +
                        (stk.ExtendedProperties.Contains(Root.ISFILLEDWHITE_GUID) ? 2 : 0) +
                        (stk.ExtendedProperties.Contains(Root.ISFILLEDBLACK_GUID) ? 4 : 0);
                boxingCb.Text = boxingCb.Items[i].ToString();

                Saved_Txt   = InputML.Text;
                Saved_Da    = stk.DrawingAttributes.Clone();
                Saved_Font  = (Font)FontDlg.Font.Clone();
                Saved_Frame = stk.ExtendedProperties.Contains(Root.ISSTROKE_GUID);
                Saved_White = stk.ExtendedProperties.Contains(Root.ISFILLEDWHITE_GUID);
                Saved_Black = stk.ExtendedProperties.Contains(Root.ISFILLEDBLACK_GUID);
                if (ML)
                {
                    InputML.SelectAll();
                }
                else
                {
                    InputSL.SelectAll();
                }
            }
        }