Beispiel #1
0
        private void InitElements(UserModel model)
        {
            int lastTabulation = 7;

            ContentPanel.CreateComboBoxWithLabel(PositionComboBox, PositionHeader, lastTabulation--, "Выберите должность");
            ContentPanel.CreateTextBoxWithLabel(ContactNumberMaskBox, ContactNumberHeader, lastTabulation--, FormBrushes.ContactNumberMask);
            ContentPanel.CreateTextBoxWithLabel(LastNameTextBox, LastNameHeader, lastTabulation--);
            ContentPanel.CreateTextBoxWithLabel(SecondNameTextBox, SecondNameHeader, lastTabulation--);
            ContentPanel.CreateTextBoxWithLabel(FirstNameTextBox, FirstNameHeader, lastTabulation--);

            //login password for new
            if (model.IsNull())
            {
                ContentPanel.CreateTextBoxWithLabel(PasswordTextBox, PasswordHeader, lastTabulation--, passwordCharEnabled: true);
                ContentPanel.CreateTextBoxWithLabel(LoginTextBox, LoginHeader, lastTabulation--);
            }
            //and for old
            else if (!model.Login.Equals("admin"))
            {
                ContentPanel.CreateButtonWithLabel(ChangePasswordButton,
                                                   ChangePasswordButtonText,
                                                   lastTabulation--,
                                                   ChangeLoginPasswordClick);
            }
        }
Beispiel #2
0
 private void ShowContent(Control content)
 {
     ContentPanel.Controls.Clear();
     content.Dock = DockStyle.Fill;
     ContentPanel.Controls.Add(content);
     ContentPanel.Focus();
 }
            private void DoLayout(IWin32Window window, Control content, StemPosition stemPosition, ref Rectangle toolTipBounds)
            {
                int bubbleSize   = Win32.SendMessage(Handle, Win32.TTM_GETBUBBLESIZE, 0, ref _toolInfo);
                int bubbleWidth  = bubbleSize & 0xFFFF;
                int bubbleHeight = bubbleSize >> 16;

                // centre our content on the bubble-area of the tooltip
                content.Left = (bubbleWidth - content.Width) / 2;

                if (StemPosition.BottomLeft == stemPosition || StemPosition.BottomCentre == stemPosition || StemPosition.BottomRight == stemPosition)
                {
                    // stem is below the bubble
                    content.Top = (bubbleHeight - content.Height) / 2;
                }
                else
                {
                    // stem is on top of the bubble
                    int bubbleOffset = toolTipBounds.Height - bubbleHeight;
                    content.Top = (bubbleHeight - content.Height) / 2 + bubbleOffset;
                }

                _contentPanel        = new ContentPanel(Handle);
                _contentPanel.Width  = toolTipBounds.Width;
                _contentPanel.Height = toolTipBounds.Height;
                _contentPanel.Controls.Add(content);

                Win32.SetWindowPos(Handle, Win32.HWND_TOPMOST, toolTipBounds.X, toolTipBounds.Y, 0, 0, Win32.SWP_NOACTIVATE | Win32.SWP_NOSIZE | Win32.SWP_NOOWNERZORDER);
            }
Beispiel #4
0
        internal void LoadPanel(PanelId?panelId)
        {
            if (IsDisposed)
            {
                return;
            }

            if (InvokeRequired)
            {
                Invoke(new LoadPanelDelegate(LoadPanel), panelId);
            }
            else
            {
                foreach (PanelId id in panelsMap.Keys)
                {
                    ContentPanel panel = panelsMap[id].Panel;

                    if (id == panelId)
                    {
                        panel.UpdateView();
                        panel.Visible = true;
                    }
                    else
                    {
                        panel.Visible = false;
                    }
                }

                Invalidate();
            }
        }
Beispiel #5
0
 public override void OnChildClosed(ContentPanel childPanel)
 {
     if (childPanel.DialogResult == DialogResult.OK)
     {
         RefreshAllUpcomingPrograms();
     }
 }
        private void Rebuild()
        {
            ContentPanel.SuspendLayout();
            verticalTabs.BeginUpdate();

            try
            {
                verticalTabs.Items.Clear();

                var pvsSites = connection.Cache.PVS_sites.ToList();
                pvsSites.Sort();

                foreach (var pvsSite in pvsSites)
                {
                    NewPage(pvsSite);
                }
            }
            finally
            {
                ContentPanel.ResumeLayout();
                verticalTabs.EndUpdate();
            }

            if (verticalTabs.Items.Count > 0)
            {
                verticalTabs.SelectedIndex = 0;
            }
            ResizeVerticalTabs(verticalTabs.Items.Count);
            verticalTabs.AdjustItemTextBounds = GetItemTextBounds;
        }
Beispiel #7
0
        void Tweet_Loaded(object sender, RoutedEventArgs e)
        {
            RemoveHTML conv = new RemoveHTML();

            if (DataTransfer.DM == null)
            {
                Dispatcher.BeginInvoke(() => MessageBox.Show(Localization.Resources.ErrorLoadingTweet));
                NavigationService.GoBack();
                return;
            }


            status = DataTransfer.DM;

            RelativeDateTimeConverter dc = new RelativeDateTimeConverter();

            CreateText(status);

            Text.UpdateLayout();

            ContentPanel.DataContext = status;

            ViaDate.Margin = new Thickness(ViaDate.Margin.Left, Text.ActualHeight + Text.Margin.Top + 10,
                                           ViaDate.Margin.Right, ViaDate.Margin.Bottom);
            ViaDate.Text = (string)dc.Convert(status.CreatedDate, null, null, null);

            SName.Text = "@" + status.Author.ScreenName;
            ContentPanel.UpdateLayout();
        }
Beispiel #8
0
 public override void OnChildClosed(ContentPanel childPanel)
 {
     if (childPanel.DialogResult == DialogResult.OK)
     {
         LoadAllSchedules(false);
     }
 }
Beispiel #9
0
 private void ChangeLayout(bool MdiActive)
 {
     if (MdiActive)
     {
         this.Controls.Clear();
         this.Controls.Add(ContentPanel);
     }
     else
     {
         this.Controls.Clear();
         Border.ContentControls.Clear();
         Border.ContentControls.Add(TopPanel);
         TopPanel.SetReferenceParent(this);
         TopPanel.MinimiseVisible = false;
         Border.ContentControls.Add(ContentPanel);
         this.Controls.Add(Border);
         ContentPanel.BringToFront();
         if (this.DockHandler.Pane != null)
         {
             Border.SetReferenceParent(this.DockHandler.Pane.FloatWindow);
             this.DockHandler.Pane.FloatWindow.MaximumSize   = this.MaximumSize;
             this.DockHandler.Pane.FloatWindow.MinimumSize   = this.MinimumSize;
             this.DockHandler.Pane.FloatWindow.Size          = this.Size;
             this.DockHandler.Pane.FloatWindow.Resize       += new EventHandler(ResizeCall);
             this.DockHandler.Pane.FloatWindow.StartPosition = FormStartPosition.CenterScreen;
         }
         else
         {
             Border.SetReferenceParent(this);
         }
     }
 }
Beispiel #10
0
        protected void InitText(string message, ColorContexts colorContext)
        {
            Message = message;

            TW = new MultiLineTextWidget("message", message,
                                         new WidgetStyle(Color.Empty,
                                                         Theme.GetContextForeColor(colorContext),
                                                         Color.Empty));

            TW.Padding = new Padding(16);
            TW.VAlign  = Alignment.Center;
            TW.HAlign  = Alignment.Center;
            this.OnLayout(CTX, CTX.Bounds);

            // Layout the text
            RectangleF bounds = ContentPanel.ClientRectangle;
            SizeF      sz     = TW.PreferredSize(CTX, bounds.Size);

            if (sz.Height > bounds.Height)
            {
                ScrollableContainer container = ContentPanel.AddChild(new ScrollableContainer("scroller"));
                container.ScrollBars = ScrollBars.Vertical;
                container.AutoScroll = true;
                TW.Dock = Docking.Top;
                container.AddChild(TW);
            }
            else
            {
                ContentPanel.AddChild(TW);
            }
        }
Beispiel #11
0
        private void InitElements(PositionModel model)
        {
            int lastTabulation = 2;

            ContentPanel.CreateTextBoxWithLabel(DescriptionTextBox, DescriptionHeader, lastTabulation--);
            ContentPanel.CreateTextBoxWithLabel(NameTextBox, NameHeader, lastTabulation--);
        }
Beispiel #12
0
 public override void OnChildClosed(ContentPanel childPanel)
 {
     if (childPanel.DialogResult == DialogResult.OK)
     {
         RefreshSelectedGroupChannels();
     }
 }
        public void OpenPanel()
        {
            AccordionItemButton.IsPressed = true;

            ContentPanel.IsVisible = true;
            ContentPanel.Animate("ClosePanel", o => ContentPanel.Opacity = o, 0, 1, length: 250, easing: Easing.CubicIn);
        }
Beispiel #14
0
        private void navigationTree_AfterSelect(object sender, TreeViewEventArgs e)
        {
            ContentPanel replacer = (ContentPanel)navigationTree.SelectedNode.Tag;

            if (!replacer.isInitialized)
            {
                replacer.init();
                replacer.changeEvent += new UpdatedPanelEventHandler(panel_hasChanged);
            }
            else
            {
                replacer.update();
            }

            if (mainContents.Controls.Count > 0 && mainContents.Controls[0] as ContentPanel != null)
            {
                ((ContentPanel)mainContents.Controls[0]).close();
            }

            mainContents.Controls.Clear();
            mainContents.Controls.Add(replacer);
            //replacer.update();
            //Mark it
            foreach (TreeNode node in navigationTree.Nodes)
            {
                node.BackColor = System.Drawing.Color.White;
                foreach (TreeNode child in node.Nodes)
                {
                    child.BackColor = System.Drawing.Color.White;
                }
            }
            navigationTree.SelectedNode.BackColor = System.Drawing.Color.FromArgb(215, 215, 215);
        }
Beispiel #15
0
        public Default()
        {
            InitializeComponent();
            this.Loaded += new RoutedEventHandler(Default_Loaded);

            this.OrientationChanged += (s, e) =>
            {
                if (e.Orientation == PageOrientation.Landscape ||
                    e.Orientation == PageOrientation.LandscapeLeft ||
                    e.Orientation == PageOrientation.LandscapeRight)
                {
                    TitlePanel.Visibility = System.Windows.Visibility.Collapsed;
                    ContentPanel.SetValue(Grid.RowSpanProperty, 2);
                    ContentPanel.SetValue(Grid.RowProperty, 0);
                }
                else
                {
                    TitlePanel.Visibility = System.Windows.Visibility.Visible;
                    ContentPanel.SetValue(Grid.RowSpanProperty, 1);
                    ContentPanel.SetValue(Grid.RowProperty, 1);
                }
            };

            this.BackKeyPress += (s, e) =>
            {
                if (media.CurrentState == MediaElementState.Playing)
                {
                    media.Stop();
                }
            };
        }
        private void ConfigureInteractionTracker()
        {
            _tracker = InteractionTracker.Create(_compositor);

            _interactionSource = VisualInteractionSource.Create(_root);

            _interactionSource.PositionYSourceMode   = InteractionSourceMode.EnabledWithInertia;
            _interactionSource.PositionYChainingMode = InteractionChainingMode.Always;

            _tracker.InteractionSources.Add(_interactionSource);
            float refreshPanelHeight = (float)RefreshPanel.ActualHeight;

            _tracker.MaxPosition = new Vector3((float)Root.ActualWidth, 0, 0);
            _tracker.MinPosition = new Vector3(-(float)Root.ActualWidth, -refreshPanelHeight, 0);

            //The PointerPressed handler needs to be added using AddHandler method with the handledEventsToo boolean set to "true"
            //instead of the XAML element's "PointerPressed=Window_PointerPressed",
            //because the list view needs to chain PointerPressed handled events as well.
            ContentPanel.AddHandler(PointerPressedEvent, new PointerEventHandler(Window_PointerPressed), true);

            SetupPullToRefreshBehavior(refreshPanelHeight);

            //Apply spring force to pull the content back to Zero
            ConfigureRestingPoint(refreshPanelHeight);

            //
            // Use the Tracker's Position (negated) to apply to the Offset of the Image. The -{refreshPanelHeight} is to hide the refresh panel
            //
            _contentPanelVisual.StartAnimation("Offset.Y", -_tracker.GetReference().Position.Y - refreshPanelHeight);
        }
 public override void OnChildClosed(ContentPanel childPanel)
 {
     if (childPanel.DialogResult == DialogResult.OK)
     {
         RefreshUpcomingPrograms();
     }
 }
Beispiel #18
0
 public override void OnChildClosed(ContentPanel childPanel)
 {
     if (childPanel.DialogResult == DialogResult.OK)
     {
         _controller.RefreshUpcomingPrograms();
         RefreshEpg(false);
     }
 }
Beispiel #19
0
        private bool SetStyle(RulePanel rulePanel)
        {
            var style = NodeMarkupTool.GetStyle(RegularLineStyle.RegularLineType.Dashed);

            rulePanel.Style.SelectedObject = style != Style.StyleType.EmptyLine ? style : (Style.StyleType)(int) RegularLineStyle.RegularLineType.Dashed;
            ContentPanel.ScrollToBottom();
            return(true);
        }
Beispiel #20
0
 protected virtual void InitIconImage(char icon, ColorContexts colorContext)
 {
     IconText           = new TextWidget("icon", Docking.Top, new EmptyWidgetStyle(), null, null);
     IconText.IconFont  = CTX.FontManager.FontByTag(CommonFontTags.LargeIcons);
     IconText.Icon      = icon;
     IconText.ForeColor = Color.White;
     ContentPanel.AddChild(IconText);
 }
Beispiel #21
0
 void Start()
 {
     cont = ContentPanel.GetComponent <RectTransform>();
     setButtonScale();
     Player = new Player();
     Player.AddPlayerToScoreBoard();
     MenuGoldDisplay.text = Player.Gold.ToString();
     RefreshDisplay();
 }
Beispiel #22
0
        private void EditToggle(object sender, RoutedEventArgs e)
        {
            string name;
            Button be = sender as Button;

            if (be == null)
            {
                name = (sender as TextBlock).Name + "Edit";
                be   = ContentPanel.FindName(name) as Button;
            }
            else
            {
                name = be.Name;
            }

            DatePicker dp = ContentPanel.FindName(name + "Text") as DatePicker;
            TextBox    tb = ContentPanel.FindName(name + "Text") as TextBox;
            CheckBox   cb = ContentPanel.FindName(name + "Text") as CheckBox;
            Button     bk = ContentPanel.FindName(name + "Kaydet") as Button;

            if (be.Content.ToString() == " > ")
            {
                be.Content = " < ";
                if (dp != null)
                {
                    dp.Visibility = Visibility.Visible;
                }
                else if (tb != null)
                {
                    tb.Visibility = Visibility.Visible;
                    tb.Width      = 120;
                }
                else
                {
                    cb.Visibility = Visibility.Visible;
                }
                bk.Visibility = Visibility.Visible;
            }
            else
            {
                be.Content = " > ";
                if (dp != null)
                {
                    dp.Visibility = Visibility.Hidden;
                }
                else if (tb != null)
                {
                    tb.Visibility = Visibility.Hidden;
                    tb.Width      = 0;
                }
                else
                {
                    cb.Visibility = Visibility.Hidden;
                }
                bk.Visibility = Visibility.Hidden;
            }
        }
Beispiel #23
0
        private void DPKaydetClick(object sender, RoutedEventArgs e)
        {
            Button kaydet = sender as Button;                                         // Tıklanan buton

            string     name = kaydet.Tag.ToString();                                  // Butonun tag'i sayesinde
            DatePicker dp   = ContentPanel.FindName(name + "EditText") as DatePicker; // DatePicker bulundu

            string value = dp.Text;                                                   // DatePicker'a girilen değer alındı.

            int index = buttons.IndexOf(tiklanan);

            switch (name)
            {
            case "kayit":
                if (value == basvurus[index].Kayit)
                {
                    changeTextAsync("Başvuru aynı.");
                    return;
                }
                basvurus[index].Kayit = value;
                break;

            case "son":
                if (value == basvurus[index].Son)
                {
                    changeTextAsync("Son başvuru aynı.");
                    return;
                }
                basvurus[index].Son = value;
                break;

            case "sonuc":
                if (value == basvurus[index].Sonuc)
                {
                    changeTextAsync("Sonuç aynı.");
                    return;
                }
                basvurus[index].Sonuc = value;
                break;
                //default:
                // code block if no match
                //return;
            }

            string id = basvurus[index].Id.ToString();                  // Veritabanı için Id bilgisi alındı

            Database.TableEtkinlik.UpdateRow(value, name, id);          // Veritabanına kaydedildi.

            TextBlock tb = ContentPanel.FindName(name) as TextBlock;    // Güncellenecek TextBlock

            tb.Text = value;                                            // Güncellendi

            degisimGuncelle(index);

            changeTextAsync("Değiştirildi.");
        }
Beispiel #24
0
        protected override void OnObjectSelect(MarkupLine editObject)
        {
            ContentPanel.StopLayout();
            GetRuleEdges(editObject);

            AddLineProperties(EditObject);
            AddRulePanels(editObject);
            AddAddButton();
            ContentPanel.StartLayout();
        }
Beispiel #25
0
        public static void UpdateStrokeShape(this ContentPanel platformView, IBorderStroke border)
        {
            var shape = border.Shape;

            if (shape == null)
            {
                return;
            }

            platformView.UpdateBorderShape(shape);
        }
Beispiel #26
0
 private void ApplyAntiAliasingSettings()
 {
     if (ClientSettings.Current.EnableAntiAliasing)
     {
         ContentPanel.ClearValue(RenderOptions.EdgeModeProperty);
     }
     else
     {
         RenderOptions.SetEdgeMode(ContentPanel, EdgeMode.Aliased);
     }
 }
Beispiel #27
0
        public static void UpdateStrokeDashPattern(this ContentPanel platformView, IBorderStroke border)
        {
            var strokeDashPattern = border.StrokeDashPattern;

            if (strokeDashPattern == null)
            {
                return;
            }

            platformView.BorderPath?.UpdateStrokeDashPattern(strokeDashPattern);
        }
Beispiel #28
0
        public static void UpdateStroke(this ContentPanel platformView, IBorderStroke border)
        {
            var stroke = border.Stroke;

            if (stroke == null)
            {
                return;
            }

            platformView.BorderPath?.UpdateStroke(stroke);
        }
 protected override void SelectContentPage(string tag)
 {
     switch (tag)
     {
     case "home":
     case "overview":
     case "technology":
     case "contact":
         ContentPanel.SelectPage(tag);
         break;
     }
 }
Beispiel #30
0
        public override void OnLayout(IGUIContext ctx, RectangleF bounds)
        {
            base.OnLayout(ctx, bounds);

            float preferredHeight = ContentPanel.PreferredSize(ctx, bounds.Size).Height;

            preferredHeight = Math.Min(preferredHeight, bounds.Height);
            float marginHeight = ((bounds.Height - preferredHeight) / 2);

            ContentPanel.Margin  = new Padding(0, marginHeight, 0, marginHeight);
            ContentPanel.Padding = new Padding(16);
        }
Beispiel #31
0
        private void initData()
        {
            var classlist =
                (from s in DB.Ke
                 select s).ToList();

            foreach (var item in classlist)
            {
                var tb = ContentPanel.FindName(item.Tbname) as TextBlock;
                tb.DataContext = item;
            }
        }
 public override void OnChildClosed(ContentPanel childPanel)
 {
     if (childPanel.DialogResult == DialogResult.OK)
     {
         RefreshSelectedGroupChannels();
     }
 }
Beispiel #33
0
 public override void OnChildClosed(ContentPanel childPanel)
 {
     if (childPanel.DialogResult == DialogResult.OK)
     {
         LoadAllSchedules(false);
     }
 }
Beispiel #34
0
 public override void OnChildClosed(ContentPanel childPanel)
 {
     if (childPanel.DialogResult == DialogResult.OK)
     {
         _controller.RefreshUpcomingPrograms();
         RefreshEpg(false);
     }
 }