コード例 #1
1
ファイル: Game.cs プロジェクト: hilts-vaughan/Farseer-Physics
        public Game(UserControl userControl, Canvas drawingCanvas, Canvas debugCanvas, TextBlock txtDebug)
        {
            //Initialize
            IsActive = true;
            IsFixedTimeStep = true;
            TargetElapsedTime = new TimeSpan(0, 0, 0, 0, 16);
            Components = new List<DrawableGameComponent>();
            World = new World(new Vector2(0, 0));
            _gameTime = new GameTime();
            _gameTime.GameStartTime = DateTime.Now;
            _gameTime.FrameStartTime = DateTime.Now;
            _gameTime.ElapsedGameTime = TimeSpan.Zero;
            _gameTime.TotalGameTime = TimeSpan.Zero;

            //Setup Canvas
            DrawingCanvas = drawingCanvas;
            DebugCanvas = debugCanvas;
            TxtDebug = txtDebug;
            UserControl = userControl;

            //Setup GameLoop
            _gameLoop = new Storyboard();
            _gameLoop.Completed += GameLoop;
            _gameLoop.Duration = TargetElapsedTime;
            DrawingCanvas.Resources.Add("gameloop", _gameLoop);
        }
コード例 #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.AllCanvas = ((System.Windows.Controls.Canvas)(target));
                return;

            case 2:
                this.testImageBrush = ((System.Windows.Media.ImageBrush)(target));
                return;

            case 3:
                this.StackPanel1 = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 4:
                this.userControl = ((System.Windows.Controls.UserControl)(target));
                return;

            case 5:
                this.listBoxCars = ((System.Windows.Controls.ListBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #3
0
        private void ListViewMenu_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            GridMain.Children.Clear();

            System.Windows.Controls.UserControl usc = null;
            switch (((ListViewItem)((ListView)sender).SelectedItem).Name)
            {
            case "Parameter":
                usc = new UCParameterHR();
                GridMain.Children.Add(usc);
                break;

            case "CreateOvertime":
                usc = new UCCreateOvertimeHR();
                GridMain.Children.Add(usc);
                break;

            case "ListSubmissionOvertime":
                usc = new UCDashboardHR();
                GridMain.Children.Add(usc);
                break;

            case "ListApproveOvertimeForm":
                usc = new UCListApproveOvertimeForm();
                GridMain.Children.Add(usc);
                break;

            default:
                break;
            }
        }
コード例 #4
0
 /// <summary>
 /// Кнопка перехода в окно настроек
 /// </summary>
 /// <param name="sender">Объект по которому проиошел клик</param>
 /// <param name="e">Событие</param>
 private void ButtonSettings_Click(object sender, RoutedEventArgs e)
 {
     System.Windows.Controls.UserControl usc = null;
     GridMain.Children.Clear();
     usc = new UserControlSettings();
     GridMain.Children.Add(usc);
 }
コード例 #5
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.UCModule = ((System.Windows.Controls.UserControl)(target));
                return;

            case 2:
                this.UCDozierende = ((System.Windows.Controls.UserControl)(target));
                return;

            case 3:
                this.UCStudierende = ((System.Windows.Controls.UserControl)(target));
                return;

            case 4:
                this.UCKommentare = ((System.Windows.Controls.UserControl)(target));
                return;

            case 5:
                this.UCSpecialQueries = ((System.Windows.Controls.UserControl)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #6
0
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/BuscaRutaParalelo;component/MainPage.xaml", System.UriKind.Relative));
     this.uc = ((System.Windows.Controls.UserControl)(this.FindName("uc")));
     this.g1 = ((System.Windows.Controls.Grid)(this.FindName("g1")));
     this.button1 = ((System.Windows.Controls.Button)(this.FindName("button1")));
     this.checkBox1 = ((System.Windows.Controls.CheckBox)(this.FindName("checkBox1")));
     this.textBox1 = ((System.Windows.Controls.TextBox)(this.FindName("textBox1")));
     this.textBox2 = ((System.Windows.Controls.TextBox)(this.FindName("textBox2")));
     this.label3 = ((System.Windows.Controls.Label)(this.FindName("label3")));
     this.label4 = ((System.Windows.Controls.Label)(this.FindName("label4")));
     this.textBlock1 = ((System.Windows.Controls.TextBlock)(this.FindName("textBlock1")));
     this.label5 = ((System.Windows.Controls.Label)(this.FindName("label5")));
     this.label6 = ((System.Windows.Controls.Label)(this.FindName("label6")));
     this.button2 = ((System.Windows.Controls.Button)(this.FindName("button2")));
     this.radioButton1 = ((System.Windows.Controls.RadioButton)(this.FindName("radioButton1")));
     this.radioButton2 = ((System.Windows.Controls.RadioButton)(this.FindName("radioButton2")));
     this.textBox3 = ((System.Windows.Controls.TextBox)(this.FindName("textBox3")));
     this.scrollViewer1 = ((System.Windows.Controls.ScrollViewer)(this.FindName("scrollViewer1")));
     this.canvas1 = ((System.Windows.Controls.Canvas)(this.FindName("canvas1")));
     this.radioButton3 = ((System.Windows.Controls.RadioButton)(this.FindName("radioButton3")));
 }
コード例 #7
0
ファイル: Setting.xaml.cs プロジェクト: yandongquan123/BPMSV1
        void lstboxLeftMenu_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            MenuInfo menuInfo = e.AddedItems[0] as MenuInfo;

            System.Windows.Controls.UserControl control = (System.Windows.Controls.UserControl)Assembly.Load("BPMS.Views.Default").CreateInstance("BPMS.Views.Default." + menuInfo.FormName);
            ccContent.Content = control;
        }
コード例 #8
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/%E5%A5%A5%E6%9E%AB%E7%87%83%E6%B0%94%E8%90%A5%E6%94%B6%E7%B3%BB%E7%BB%9FV3;compo" +
                                                                   "nent/MainPage.xaml", System.UriKind.Relative));
     this.mainpage = ((System.Windows.Controls.UserControl)(this.FindName("mainpage")));
     this.MainCanvasStoryboardIn       = ((System.Windows.Media.Animation.Storyboard)(this.FindName("MainCanvasStoryboardIn")));
     this.MainCanvasStoryboardOut      = ((System.Windows.Media.Animation.Storyboard)(this.FindName("MainCanvasStoryboardOut")));
     this.MainCanvasrightStoryboardIn  = ((System.Windows.Media.Animation.Storyboard)(this.FindName("MainCanvasrightStoryboardIn")));
     this.MainCanvasrightStoryboardOut = ((System.Windows.Media.Animation.Storyboard)(this.FindName("MainCanvasrightStoryboardOut")));
     this.CanvasBottomStoryboard       = ((System.Windows.Media.Animation.Storyboard)(this.FindName("CanvasBottomStoryboard")));
     this.da            = ((System.Windows.Media.Animation.DoubleAnimation)(this.FindName("da")));
     this.LayoutRoot    = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.openchild     = ((Com.Aote.ObjectTools.ChildWindowObj)(this.FindName("openchild")));
     this.selects       = ((Com.Aote.ObjectTools.ObjectList)(this.FindName("selects")));
     this.canvasleft    = ((System.Windows.Controls.Canvas)(this.FindName("canvasleft")));
     this.canvasbottom  = ((System.Windows.Controls.Canvas)(this.FindName("canvasbottom")));
     this.frame         = ((System.Windows.Controls.Grid)(this.FindName("frame")));
     this.menus         = ((Microsoft.Expression.Controls.PathListBox)(this.FindName("menus")));
     this.plblp         = ((Microsoft.Expression.Controls.LayoutPath)(this.FindName("plblp")));
     this.path          = ((System.Windows.Shapes.Path)(this.FindName("path")));
     this.loginUserInfo = ((System.Windows.Controls.Canvas)(this.FindName("loginUserInfo")));
 }
コード例 #9
0
        /// <summary>
        /// Helps to enable or disable particular control in a container
        /// </summary>
        /// <typeparam name="T">Type of control like button, textbox....</typeparam>
        /// <param name="container">Type of container like window, usercontrol, grid,panel...</param>
        /// <param name="isEnabled">True - Enable, False -Disable</param>
        /// <param name="exceptControls">Enable or disable all control in a container except this</param>
        private static void EnableOrDisableAllControl <T>(System.Windows.Controls.UserControl container, bool isEnabled, params T[] exceptControls) where T : System.Windows.DependencyObject
        {
            if (container == null)
            {
                return;
            }
            foreach (T control in FindVisualChildren <T>(container))
            {
                if (control as Control != null)
                {
                    (control as Control).IsEnabled = isEnabled;
                }
            }

            if (exceptControls != null && exceptControls.Length > 0)
            {
                foreach (T control in exceptControls)
                {
                    if (control as Control != null)
                    {
                        (control as Control).IsEnabled = !isEnabled;
                    }
                }
            }
        }
コード例 #10
0
        /// <summary>
        /// Helps to Lock or Unlock particular control in a container
        /// </summary>
        /// <typeparam name="T">Type of control like button, textbox....</typeparam>
        /// <param name="container">Type of container like window, usercontrol, grid,panel...</param>
        /// <param name="isEnabled">True - Lock, False - Unlock</param>
        /// <param name="exceptControls">Lock or Unlock all control in a container except this</param>
        private static void LockOrUnlockAllControl <T>(this System.Windows.Controls.UserControl container, bool isReadOnly, params T[] exceptControls) where T : System.Windows.DependencyObject
        {
            if (container == null)
            {
                return;
            }
            foreach (T control in FindVisualChildren <T>(container))
            {
                if (control as Control != null)
                {
                    LockOrUnlockControl(control, isReadOnly);
                }
            }

            if (exceptControls != null && exceptControls.Length > 0)
            {
                foreach (T control in exceptControls)
                {
                    if (control as Control != null)
                    {
                        LockOrUnlockControl(control, !isReadOnly);
                    }
                }
            }
        }
コード例 #11
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Window = ((back.MainWindow)(target));
                return;

            case 2:
                this.Home = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.FlightPlaning = ((System.Windows.Controls.Button)(target));

            #line 41 "..\..\MainWindow.xaml"
                this.FlightPlaning.Click += new System.Windows.RoutedEventHandler(this.FlightPlaning_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.view = ((System.Windows.Controls.UserControl)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #12
0
        public void WhenCalledConvert_RegistersNonSharedView()
        {
            //Arrange
            var converter = new TopLevelViewConverter();

            var mockRouter = Mock.Create<IViewModelRouter>();
            const string viewModelTag = "testViewModel";
            const string viewTag = "testView";

            Mock.Arrange(() => mockRouter.GetViewTagsForViewModel(Arg.IsAny<string>())).Returns(new[] { viewTag });
            var view = new UserControl();
            Mock.Arrange(() => mockRouter.GetNonSharedView(Arg.IsAny<string>(), Arg.IsAny<object>())).Returns(view);

            var mockWindow = Mock.Create<ITopLevelWindow>();
            Mock.Arrange(() => mockWindow.GetExportAsViewModelAttribute()).Returns(new ExportAsViewModelAttribute(viewModelTag));
            converter.Router = new Lazy<IViewModelRouter>(() => mockRouter);
            converter.Views = new[] { new Lazy<UserControl, IExportAsViewMetadata>(() => view, new ExportAsViewAttribute(viewTag)), };
            Mock.Arrange(() => TopLevelViewConverter.ComposedConverter).Returns(new TopLevelViewConverter());

            // Act
            converter.Convert(mockWindow, new TypeDelegator(typeof(object)), null, null);

            // Assert
            Assert.IsTrue(converter.IsRegistered(mockWindow));
        }
コード例 #13
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/WPCandle;component/IndividualCandleControl.xaml", System.UriKind.Relative));
     this.userControl           = ((System.Windows.Controls.UserControl)(this.FindName("userControl")));
     this.SlowFlickerStoryboard = ((System.Windows.Media.Animation.Storyboard)(this.FindName("SlowFlickerStoryboard")));
     this.BurningStoryboard     = ((System.Windows.Media.Animation.Storyboard)(this.FindName("BurningStoryboard")));
     this.SideBobStoryboard     = ((System.Windows.Media.Animation.Storyboard)(this.FindName("SideBobStoryboard")));
     this.SideBobStoryboard2    = ((System.Windows.Media.Animation.Storyboard)(this.FindName("SideBobStoryboard2")));
     this.LayoutRoot            = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.VisualStateGroup      = ((System.Windows.VisualStateGroup)(this.FindName("VisualStateGroup")));
     this.WhiteVisualState      = ((System.Windows.VisualState)(this.FindName("WhiteVisualState")));
     this.BlueVisualState       = ((System.Windows.VisualState)(this.FindName("BlueVisualState")));
     this.FuchsiaVisualState    = ((System.Windows.VisualState)(this.FindName("FuchsiaVisualState")));
     this.OrangeVisualState     = ((System.Windows.VisualState)(this.FindName("OrangeVisualState")));
     this.GreenVisualState      = ((System.Windows.VisualState)(this.FindName("GreenVisualState")));
     this.PurpleVisualState     = ((System.Windows.VisualState)(this.FindName("PurpleVisualState")));
     this.BlackVisualState      = ((System.Windows.VisualState)(this.FindName("BlackVisualState")));
     this.RedVisualState        = ((System.Windows.VisualState)(this.FindName("RedVisualState")));
     this.ContentPanel          = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.Candle = ((System.Windows.Controls.Grid)(this.FindName("Candle")));
     this.FlameContainerRotation = ((System.Windows.Controls.Grid)(this.FindName("FlameContainerRotation")));
     this.FlameRotationCT        = ((System.Windows.Media.CompositeTransform)(this.FindName("FlameRotationCT")));
     this.HalosGridRotation      = ((System.Windows.Controls.Grid)(this.FindName("HalosGridRotation")));
     this.grid             = ((System.Windows.Controls.Grid)(this.FindName("grid")));
     this.HaloGeneral      = ((System.Windows.Shapes.Ellipse)(this.FindName("HaloGeneral")));
     this.Halo             = ((System.Windows.Shapes.Ellipse)(this.FindName("Halo")));
     this.FlameGrid        = ((System.Windows.Controls.Grid)(this.FindName("FlameGrid")));
     this.BitmapFlame      = ((System.Windows.Controls.Grid)(this.FindName("BitmapFlame")));
     this.ellipse          = ((System.Windows.Shapes.Ellipse)(this.FindName("ellipse")));
     this.BottomShadowGrid = ((System.Windows.Controls.Grid)(this.FindName("BottomShadowGrid")));
     this.BottomShadow     = ((System.Windows.Shapes.Ellipse)(this.FindName("BottomShadow")));
     this.BottomGrid       = ((System.Windows.Controls.Grid)(this.FindName("BottomGrid")));
     this.Bottom           = ((System.Windows.Shapes.Ellipse)(this.FindName("Bottom")));
     this.BodyGrid         = ((System.Windows.Controls.Grid)(this.FindName("BodyGrid")));
     this.Body             = ((System.Windows.Shapes.Rectangle)(this.FindName("Body")));
     this.GlowsGrid        = ((System.Windows.Controls.Grid)(this.FindName("GlowsGrid")));
     this.CandleHaloGrid   = ((System.Windows.Controls.Grid)(this.FindName("CandleHaloGrid")));
     this.CandleHaloGlow   = ((System.Windows.Shapes.Rectangle)(this.FindName("CandleHaloGlow")));
     this.CandleWickZone   = ((System.Windows.Shapes.Ellipse)(this.FindName("CandleWickZone")));
     this.MecheGrid        = ((System.Windows.Controls.Grid)(this.FindName("MecheGrid")));
     this.OrnamentsGrid    = ((System.Windows.Controls.Grid)(this.FindName("OrnamentsGrid")));
     this.Ornaments        = ((System.Windows.Controls.Grid)(this.FindName("Ornaments")));
     this.path             = ((System.Windows.Shapes.Path)(this.FindName("path")));
     this.path1            = ((System.Windows.Shapes.Path)(this.FindName("path1")));
     this.path2            = ((System.Windows.Shapes.Path)(this.FindName("path2")));
     this.path3            = ((System.Windows.Shapes.Path)(this.FindName("path3")));
     this.path4            = ((System.Windows.Shapes.Path)(this.FindName("path4")));
     this.path5            = ((System.Windows.Shapes.Path)(this.FindName("path5")));
     this.path6            = ((System.Windows.Shapes.Path)(this.FindName("path6")));
     this.path7            = ((System.Windows.Shapes.Path)(this.FindName("path7")));
     this.path8            = ((System.Windows.Shapes.Path)(this.FindName("path8")));
     this.path9            = ((System.Windows.Shapes.Path)(this.FindName("path9")));
     this.path10           = ((System.Windows.Shapes.Path)(this.FindName("path10")));
     this.path11           = ((System.Windows.Shapes.Path)(this.FindName("path11")));
 }
コード例 #14
0
ファイル: ModuleObject.cs プロジェクト: alaincao/CommonLibs
 public ModuleObject(string displayName, UserControl contentControl, IValueHelper<bool> canSaveHelper)
 {
     DisplayName = displayName;
     ContentControl = contentControl;
     IsAvailableHelper = new ValueHelper<bool>() { Value = true/*Starts available by default*/ };
     CanSaveHelper = canSaveHelper;
 }
コード例 #15
0
        public void Add(UserControl layer) {
            LayersList.Children.Add(layer);
            ((ILayer)layer).Closing += layer_Closing;
            this.Height += layer.Height;

            ((ILayerContainer)Window.GetWindow(this)).AdjustHeight(layer.Height);
        }
コード例 #16
0
        public FarseerPhysicsGame(UserControl userControl, Canvas drawingCanvas, Canvas debugCanvas, TextBlock txtFPS, TextBlock txtDebug)
            : base(userControl, drawingCanvas, debugCanvas, txtDebug)
        {
            TargetElapsedTime = new TimeSpan(0, 0, 0, 0, 16);
            IsFixedTimeStep = true;

            //new-up components and add to Game.Components
            ScreenManager = new ScreenManager(this);
            Components.Add(ScreenManager);

            if (txtFPS != null)
            {
                FrameRateCounter frameRateCounter = new FrameRateCounter(ScreenManager, txtFPS);
                Components.Add(frameRateCounter);
            }

            Demo1Screen demo1 = new Demo1Screen();
            Demo2Screen demo2 = new Demo2Screen();
            Demo3Screen demo3 = new Demo3Screen();
            Demo4Screen demo4 = new Demo4Screen();
            Demo5Screen demo5 = new Demo5Screen();
            Demo6Screen demo6 = new Demo6Screen();
            Demo7Screen demo7 = new Demo7Screen();
            ScreenManager.MainMenuScreen.AddMainMenuItem(demo1.GetTitle(), demo1);
            ScreenManager.MainMenuScreen.AddMainMenuItem(demo2.GetTitle(), demo2);
            ScreenManager.MainMenuScreen.AddMainMenuItem(demo3.GetTitle(), demo3);
            ScreenManager.MainMenuScreen.AddMainMenuItem(demo4.GetTitle(), demo4);
            ScreenManager.MainMenuScreen.AddMainMenuItem(demo5.GetTitle(), demo5);
            ScreenManager.MainMenuScreen.AddMainMenuItem(demo6.GetTitle(), demo6);
            ScreenManager.MainMenuScreen.AddMainMenuItem(demo7.GetTitle(), demo7);

            ScreenManager.GoToMainMenu();
        }
コード例 #17
0
        public DialogViewModel(UserControl content, DialogButtonModel button1, DialogButtonModel button2 = null, DialogButtonModel button3 = null)
        {
            DialogContent = content;
            Button1Command = button1.ButtonCommand;
            Button1Content = button1.Content;
            IsButton1Default = button1.IsDefault;
            IsButton1Cancel = button1.IsCancel;

            if(button2 != null)
            {
                Button2Command = button2.ButtonCommand;
                Button2Content = button2.Content;
                IsButton2Default = button2.IsDefault;
                IsButton2Cancel = button2.IsCancel;
            }
            else
            {
                IsButton2Visible = false;
            }

            if (button3 != null)
            {
                Button3Command = button3.ButtonCommand;
                Button3Content = button3.Content;
                IsButton3Default = button3.IsDefault;
                IsButton3Cancel = button3.IsCancel;
            }
            else
            {
                IsButton3Visible = false;
            }
        }
コード例 #18
0
ファイル: SumaryView.xaml.cs プロジェクト: hanigamal/rb-vms
        private void LoadControl()
        {
            UserControl[] userCtrls1 = new UserControl[_numItemsArr[0]];
            LoadGroup1(userCtrls1);

            for (int i = 0; i < _numGroups; i++)
            {
                _gridSizeArr[i] = GetGridSize(i);
                InitGrid(i);
                _targetsArr[i] = new ArrayList();
                _hostsArr[i] = new ArrayList();
                _flagArr[i] = false;
            }

            LoadControl(0, userCtrls1);

            for (int i = 0; i < _numGroups; i++)
            {
                for (int j = 0; j < 2; j++)
                {
                    MainGrid.Children.Add(_gridChildrenArr[i, j]);
                }
                MainGrid.Children.Add(_canvasArr[i]);
            }

            _gridChildrenArr[0, 0].Visibility = Visibility.Visible;
            _gridChildrenArr[0, 1].Visibility = Visibility.Visible;
            _canvasArr[0].Visibility = Visibility.Visible;
        }
コード例 #19
0
        private static void setDisplacement(UserControl equi,Point disPoint) {
            Point dp = new Point();
            dp.X = -disPoint.X + equi.Margin.Left;
            dp.Y = disPoint.Y + equi.Margin.Top;
            equi.Margin = new Thickness(dp.X,0,0,0);

        }
コード例 #20
0
        /// <summary>
        /// Helps to clear or unclear particular control in a container
        /// </summary>
        /// <typeparam name="T">Type of control like button, textbox....</typeparam>
        /// <param name="container">Type of container like window, usercontrol, grid,panel...</param>
        /// <param name="isClear">True - Clear, False - Unclear</param>
        /// <param name="exceptControls">Clear or Unclear all control in a container except this</param>
        private static void ClearOrUnClearAllControl <T>(System.Windows.Controls.UserControl container, bool isClear, params T[] exceptControls) where T : System.Windows.DependencyObject
        {
            if (container == null)
            {
                return;
            }
            foreach (T control in FindVisualChildren <T>(container))
            {
                if (control as Control != null)
                {
                    ClearOrUnClearControl(control, isClear);
                }
            }

            if (exceptControls != null && exceptControls.Length > 0)
            {
                foreach (T control in exceptControls)
                {
                    if (control as Control != null)
                    {
                        ClearOrUnClearControl(control, !isClear);
                    }
                }
            }
        }
コード例 #21
0
        public void actAddTab(request request, UserControl view)
        {
            Tab tab = new Tab(request.creation_date.ToString(), view , request, null);

            requestTabs.Add(tab);
            this.selectedTab = tab;
        }
コード例 #22
0
ファイル: WipeTransition.cs プロジェクト: kuki89/IP_Lab
        public override void PerformTranstition(UserControl newPage, UserControl oldPage)
        {
            this.newPage = newPage;
            this.oldPage = oldPage;

            Duration duration = new Duration(TimeSpan.FromSeconds(1));

            DoubleAnimation animation = new DoubleAnimation();
            animation.Duration = duration;
            switch (direction)
            {
                case WipeDirection.LeftToRight:
                    animation.To = oldPage.ActualWidth;
                    break;
                case WipeDirection.RightToLeft:
                    animation.To = -oldPage.ActualWidth;
                    break;
            }

            Storyboard sb = new Storyboard();
            sb.Duration = duration;
            sb.Children.Add(animation);
            sb.Completed += sb_Completed;

            TranslateTransform sc = new TranslateTransform();
            oldPage.RenderTransform = sc;

            Storyboard.SetTarget(animation, sc);
            Storyboard.SetTargetProperty(animation, new PropertyPath("X"));

            //oldPage.Resources.Add(sb);

            sb.Begin();
        }
コード例 #23
0
        public void PopLastScreen()
        {
            // If user does not want to delete current working card just do nothing.
            if (CurrentActivity is CtrlCard)
            {
                CtrlCard card = ((CtrlCard)CurrentActivity);
                if (card.ExternalAskToDiscardIsInProcess == true)
                {
                    card.ExternalAskToDiscard();
                    if (card.AllowClose == false)
                    {
                        return;
                    }
                }
                else
                {
                    if (card.SaveIsPressed == true)
                    {
                    }
                    else // Discard is pressed
                    {
                    }
                }
            }

            if (this.ActivityStack.Count > 0)
            {
                CurrentActivity            = this.ActivityStack.Pop();
                this.ContentHolder.Content = CurrentActivity;
            }
        }
コード例 #24
0
ファイル: Tab.cs プロジェクト: rtherisod/EducomManager
 public Tab(String header, UserControl content, Object entity, String icon)
 {
     this.header = header;
     this.content = content;
     this.entity = entity;
     this.icon = icon;
 }
コード例 #25
0
 private static UserControl FormatDropDown(UserControl control)
 {
     control.HorizontalAlignment = HorizontalAlignment.Left;
     control.Width = 300;
     control.Margin = new Thickness(5);
     return control;
 }
コード例 #26
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 2:
                this.uc = ((System.Windows.Controls.UserControl)(target));
                return;

            case 3:

            #line 42 "..\..\..\Template4.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.axis_ls = ((System.Windows.Controls.ListBox)(target));

            #line 44 "..\..\..\Template4.xaml"
                this.axis_ls.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.TextBlock_MouseDown);

            #line default
            #line hidden
                return;

            case 5:
                this.lisView = ((System.Windows.Controls.ListView)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #27
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/gAMS_Sacombank;component/UploadControl/FileUploadMain.xaml", System.UriKind.Relative));
     this.RootItem      = ((System.Windows.Controls.UserControl)(this.FindName("RootItem")));
     this.LayoutRoot    = ((System.Windows.Controls.Border)(this.FindName("LayoutRoot")));
     this.StatusGroup   = ((System.Windows.VisualStateGroup)(this.FindName("StatusGroup")));
     this.Pending       = ((System.Windows.VisualState)(this.FindName("Pending")));
     this.Resizing      = ((System.Windows.VisualState)(this.FindName("Resizing")));
     this.Error         = ((System.Windows.VisualState)(this.FindName("Error")));
     this.Complete      = ((System.Windows.VisualState)(this.FindName("Complete")));
     this.Removed       = ((System.Windows.VisualState)(this.FindName("Removed")));
     this.Uploading     = ((System.Windows.VisualState)(this.FindName("Uploading")));
     this.gridUpload    = ((System.Windows.Controls.Grid)(this.FindName("gridUpload")));
     this.imagePreview  = ((System.Windows.Controls.Image)(this.FindName("imagePreview")));
     this.progressBar   = ((System.Windows.Controls.ProgressBar)(this.FindName("progressBar")));
     this.errorImage    = ((System.Windows.Controls.Image)(this.FindName("errorImage")));
     this.resizeImage   = ((System.Windows.Controls.Image)(this.FindName("resizeImage")));
     this.completeImage = ((System.Windows.Controls.Image)(this.FindName("completeImage")));
     this.pendingImage  = ((System.Windows.Controls.Image)(this.FindName("pendingImage")));
     this.removeButton  = ((System.Windows.Controls.Button)(this.FindName("removeButton")));
 }
コード例 #28
0
        private void Diagnostic(object parameter)
        {
            System.Windows.Controls.UserControl ctrl = parameter as System.Windows.Controls.UserControl;
            IMasterDisplayWindow displayWin          = Window.GetWindow(ctrl) as IMasterDisplayWindow;

            SettingManager.Instance.Diagnostic(displayWin);
        }
コード例 #29
0
 public void InitializeComponent()
 {
     if (!this._contentLoaded)
     {
         this._contentLoaded = true;
         Application.LoadComponent(this, new Uri("/TWC.OVP;component/Views/CaptionSettingsView.xaml", UriKind.Relative));
         this.userControl = (UserControl) base.FindName("userControl");
         this.LayoutRoot = (Grid) base.FindName("LayoutRoot");
         this.DialogBorder = (Border) base.FindName("DialogBorder");
         this.BackgroundRectangle = (Border) base.FindName("BackgroundRectangle");
         this.Gradient = (Rectangle) base.FindName("Gradient");
         this.HeaderGrid = (Grid) base.FindName("HeaderGrid");
         this.GlyphCanvas = (Canvas) base.FindName("GlyphCanvas");
         this.BoxPath = (Path) base.FindName("BoxPath");
         this.CPath1 = (Path) base.FindName("CPath1");
         this.CPath2 = (Path) base.FindName("CPath2");
         this.CheckedBoxPath = (Path) base.FindName("CheckedBoxPath");
         this.CheckedCPath1 = (Path) base.FindName("CheckedCPath1");
         this.CheckedCPath2 = (Path) base.FindName("CheckedCPath2");
         this.CaptionSettingsLayoutRoot = (Grid) base.FindName("CaptionSettingsLayoutRoot");
         this.MetaDataBackground = (Rectangle) base.FindName("MetaDataBackground");
         this.CharacterSettingsLayoutRoot = (Grid) base.FindName("CharacterSettingsLayoutRoot");
         this.FooterGrid = (Grid) base.FindName("FooterGrid");
         this.DefaultsButton = (Button) base.FindName("DefaultsButton");
         this.CloseButton = (Button) base.FindName("CloseButton");
     }
 }
コード例 #30
0
        /// <summary>
        /// Переход между пунктами меню
        /// </summary>
        /// <param name="sender">Объект по которому проиошел клик</param>
        /// <param name="e">Событие</param>
        public void ListViewMenu_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            System.Windows.Controls.UserControl usc = null;
            GridMain.Children.Clear();

            switch (((System.Windows.Controls.ListViewItem)((System.Windows.Controls.ListView)sender).SelectedItem).Name)
            {
            case "ItemList":
                usc = new UserControlList();
                GridMain.Children.Add(usc);
                break;

            case "ItemCreate":
                usc = new UserControlCreate();
                GridMain.Children.Add(usc);
                break;

            case "ItemSettings":
                usc = new UserControlSettings();
                GridMain.Children.Add(usc);
                break;

            default:
                break;
            }
        }
コード例 #31
0
        protected override void Initialize()
        {
            base.Initialize();
            control = new PendingChangesView();

            // This is the user control hosted by the tool window; Note that, even if this class implements IDisposable,
            // we are not calling Dispose on this object. This is because ToolWindowPane calls Dispose on
            // the object returned by the Content property.
            base.Content = control;

            OleMenuCommandService mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;

            var cmd = new CommandID(GuidList.guidSccProviderCmdSet, CommandId.icmdPendingChangesCommit);
            var menu = new MenuCommand(new EventHandler(OnCommitCommand), cmd);
            mcs.AddCommand(menu);

            cmd = new CommandID(GuidList.guidSccProviderCmdSet, CommandId.icmdPendingChangesAmend);
            menu = new MenuCommand(new EventHandler(OnAmendCommitCommand), cmd);
            mcs.AddCommand(menu);

            cmd = new CommandID(GuidList.guidSccProviderCmdSet, CommandId.icmdPendingChangesRefresh);
            menu = new MenuCommand(new EventHandler(OnRefreshCommand), cmd);
            mcs.AddCommand(menu);

            sccProviderService = BasicSccProvider.GetServiceEx<SccProviderService>();

            Refresh(sccProviderService.CurrentTracker, true); // refresh when the tool window becomes visible
        }
コード例 #32
0
ファイル: InputState.cs プロジェクト: danzel/FarseerPhysics
 public void Detach(UserControl target)
 {
     target.KeyDown -= target_KeyDown;
     target.KeyUp -= target_KeyUp;
     target.LostFocus -= target_LostFocus;
     CurrentKeyboardState.ClearKeyPresses();
 }
コード例 #33
0
ファイル: XAMLHandling.cs プロジェクト: heinzsack/DEV
	public Grid CreateVideoBackgroundGrid (UserControl RootPage, String BackgroundPictureFileName,
								int [] ColumnWidths, int [] RowHeights)
		{
		Grid [] Grids = GetVideoFramedGrid (ColumnWidths, RowHeights);
		RootPage.Content = Grids [0];
		BrushConverter BRConverter = new BrushConverter ();
		RootPage.Background = (Brush) BRConverter.ConvertFromString ("Black");
		Image BackGroundImage = new Image ();
		Grids [0].Children.Insert (0, BackGroundImage);
		Grid.SetColumnSpan (BackGroundImage, 3);
		Grid.SetRowSpan (BackGroundImage, 3);
		BitmapImage BackGroundBitmap = new BitmapImage ();
		BackGroundBitmap.CacheOption = BitmapCacheOption.OnLoad;

		if ((BackgroundPictureFileName != null)
			&& (File.Exists (BackgroundPictureFileName)))
			{
			BackGroundBitmap.BeginInit ();
			BackGroundBitmap.UriSource = new Uri (BackgroundPictureFileName);
//			BackGroundBitmap.DecodePixelHeight = m_CVM.VideoHeight;
			BackGroundBitmap.DecodePixelWidth = m_CVM.VideoWidth;
			BackGroundBitmap.EndInit ();
			BackGroundImage.Source = BackGroundBitmap;
			BackGroundImage.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
			//BackGroundImage.VerticalAlignment = System.Windows.VerticalAlignment.Stretch;
			InsertDisposeableElement (BackGroundImage);
			}
		return Grids [1];
		}
コード例 #34
0
 /// <summary>
 /// handler for menuItemEditPatient click, 
 /// set current page content to edit patient form
 /// </summary>
 private void menuItemEditPatient_Click(object sender, RoutedEventArgs e)
 {
     gridPacientPage.Children.Remove(_patientCurrentPage);
     _patientCurrentPage = new EditPatientForm();
     Grid.SetRow(_patientCurrentPage, 1);
     gridPacientPage.Children.Add(_patientCurrentPage);
 }
コード例 #35
0
        public static void setPopup(UserControl control)
        {
            popupControls.Push(control);
            popupContentControl.Content = control;

            FadeInControl(popupContentControl, 7);
        }
コード例 #36
0
        public Keyboard()
        {
            InitializeComponent();
            int index = 0;

            foreach (UIElement ui in sp1.Children)
            {
                if (sp1.Children[index].GetType().ToString().IndexOf("One") == -1)
                {
                    continue;
                }
                One o = ui as One;
                selectors.Add(o);
                o.Visibility = Visibility.Hidden;
            }

            foreach (UIElement ui in wp.Children)
            {
                System.Windows.Controls.UserControl uc = ui as System.Windows.Controls.UserControl;
                string tag = uc.Tag.ToString();
                if (tag == "Key")
                {
                    KeyButton cb = uc as KeyButton;
                    if (cb.Text.Length == 1)
                    {
                        kbs.Add(uc as KeyButton);
                    }
                }
                else if (tag == "Character")
                {
                    cbs.Add(uc as CharacterButton);
                }
            }
        }
コード例 #37
0
 public void InsertImage(System.Windows.Controls.Image image)
 {
     image.Stretch = Stretch.None;
     System.Windows.Controls.UserControl imageControl = UIControlUtil.Instance.CreateImageControl(image, this.sessionService.ChatViewMsgBoxWidth);
     new InlineUIContainer(imageControl, this.ChatComponent.inputMsgBox.Selection.End);
     this.ChatComponent.inputMsgBox.Focus();
 }
コード例 #38
0
 public IndigeneEditFormControl(IParentFormInteraction parentWindow,
     UserControl parentControl) {
     this.parentWindow = parentWindow;
     this.parentControl = parentControl;
     parentWindow.SetBackButtonPressedListener(this);
     InitializeComponent();
 }
コード例 #39
0
ファイル: Eggs.g.i.cs プロジェクト: RicardoLans/KraakJeRot
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/ResourceFramework;component/UserControls/Weapons/Eggs.xaml", System.UriKind.Relative));
     this.uc_Egg             = ((System.Windows.Controls.UserControl)(this.FindName("uc_Egg")));
     this.LayoutRoot         = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.weaponOrigin       = ((System.Windows.Controls.Canvas)(this.FindName("weaponOrigin")));
     this.weaponBulletOrigin = ((System.Windows.Controls.Canvas)(this.FindName("weaponBulletOrigin")));
     this.Egg1   = ((System.Windows.Controls.Viewbox)(this.FindName("Egg1")));
     this.Path   = ((System.Windows.Shapes.Path)(this.FindName("Path")));
     this.Path_0 = ((System.Windows.Shapes.Path)(this.FindName("Path_0")));
     this.Path_1 = ((System.Windows.Shapes.Path)(this.FindName("Path_1")));
     this.Egg2   = ((System.Windows.Controls.Viewbox)(this.FindName("Egg2")));
     this.Path_2 = ((System.Windows.Shapes.Path)(this.FindName("Path_2")));
     this.Path_3 = ((System.Windows.Shapes.Path)(this.FindName("Path_3")));
     this.Path_4 = ((System.Windows.Shapes.Path)(this.FindName("Path_4")));
     this.Egg3   = ((System.Windows.Controls.Viewbox)(this.FindName("Egg3")));
     this.Path_5 = ((System.Windows.Shapes.Path)(this.FindName("Path_5")));
     this.Path_6 = ((System.Windows.Shapes.Path)(this.FindName("Path_6")));
     this.Path_7 = ((System.Windows.Shapes.Path)(this.FindName("Path_7")));
 }
コード例 #40
0
 /// <summary>
 /// handler for menuItemChangeCredentials click, 
 /// set current page content to change credentials form
 /// </summary>
 private void menuItemChangeCredentials_Click(object sender, RoutedEventArgs e)
 {
     gridPacientPage.Children.Remove(_patientCurrentPage);
     _patientCurrentPage = new ChangeCredentialsForm();
     Grid.SetRow(_patientCurrentPage, 1);
     gridPacientPage.Children.Add(_patientCurrentPage);
 }
コード例 #41
0
        public void ActivateDim(UserControl control, Boolean playAnimation = true)
        {
            dimMessageControl = control ?? dimMessageControl;
            gridDim.Visibility = Visibility.Visible;

            if (playAnimation) BeginStoryboard((Storyboard)FindResource("DimControlActivationStoryboard"));
        }
コード例 #42
0
        public LoginWindowViewModel(UserControl view)
        {
            this.view = view as LoginView;

            UseSession = Settings.UserSettings.ContainsKey("UseSessionID") ? bool.Parse(Settings.UserSettings["UseSessionID"]) : false;

            Email = Settings.UserSettings["AccountLogin"];
            this.formChanged = string.IsNullOrEmpty(Settings.UserSettings["AccountPassword"]);

            if (!this.formChanged)
                this.view.txtPassword.Password = string.Empty.PadLeft(8); //For the visuals

            this.view.txtPassword.PasswordChanged += new System.Windows.RoutedEventHandler(txtPassword_PasswordChanged);

            statusController = new StatusController(this.view.StatusBox);

            ApplicationState.Model.Authenticating += model_Authenticating;
            ApplicationState.Model.Throttled += model_Throttled;
            ApplicationState.InitializeFont(Properties.Resources.fontin_regular_webfont);
            ApplicationState.InitializeFont(Properties.Resources.fontin_smallcaps_webfont);

            statusController.DisplayMessage(ApplicationState.Version + " Initialized.\r");

            VersionChecker.CheckForUpdates();
        }
コード例 #43
0
 /// <summary>
 /// handler for  menuItemAppointmentHistory click, 
 /// set current page content to appointment history page
 /// </summary>
 private void menuItemAppointmentHistory_Click(object sender, RoutedEventArgs e)
 {
     gridPacientPage.Children.Remove(_patientCurrentPage);
     _patientCurrentPage = new AppointmentHistoryPage();
     Grid.SetRow(_patientCurrentPage, 1);
     gridPacientPage.Children.Add(_patientCurrentPage);
 }
コード例 #44
0
 private void ZeigeReportingExecute(object obj)
 {
     mReporting = new ReportingController().Initialize(getActionBar(), mDatabaseName);
     mViewModel.Content = mReporting;
     //mView.DataContext = mViewModel;
     //((MainWindowViewModel)mView.DataContext).Content = mReporting;
 }
コード例 #45
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/cars;component/MainPage.xaml", System.UriKind.Relative));
     this.userControl           = ((System.Windows.Controls.UserControl)(this.FindName("userControl")));
     this.bottom_car_storyboard = ((System.Windows.Media.Animation.Storyboard)(this.FindName("bottom_car_storyboard")));
     this.left_car_storyboard   = ((System.Windows.Media.Animation.Storyboard)(this.FindName("left_car_storyboard")));
     this.top_car_storyboard    = ((System.Windows.Media.Animation.Storyboard)(this.FindName("top_car_storyboard")));
     this.right_car_storyboard  = ((System.Windows.Media.Animation.Storyboard)(this.FindName("right_car_storyboard")));
     this.LayoutRoot            = ((System.Windows.Controls.Canvas)(this.FindName("LayoutRoot")));
     this.Grass_object          = ((System.Windows.Controls.Canvas)(this.FindName("Grass_object")));
     this.Grass_object_Copy     = ((System.Windows.Controls.Canvas)(this.FindName("Grass_object_Copy")));
     this.Grass_object_Copy2    = ((System.Windows.Controls.Canvas)(this.FindName("Grass_object_Copy2")));
     this.bottom_car            = ((System.Windows.Controls.Image)(this.FindName("bottom_car")));
     this.top_car           = ((System.Windows.Controls.Image)(this.FindName("top_car")));
     this.right_car         = ((System.Windows.Controls.Image)(this.FindName("right_car")));
     this.left_car          = ((System.Windows.Controls.Image)(this.FindName("left_car")));
     this.button_start_game = ((System.Windows.Controls.Button)(this.FindName("button_start_game")));
     this.score_current     = ((System.Windows.Controls.TextBlock)(this.FindName("score_current")));
     this.score_max         = ((System.Windows.Controls.TextBlock)(this.FindName("score_max")));
     this.logtextblock      = ((System.Windows.Controls.TextBlock)(this.FindName("logtextblock")));
 }
コード例 #46
0
ファイル: RunPowerPoint.xaml.cs プロジェクト: heinzsack/DEV
		public bool CheckParameter ()
			{
			if (!SetParameter ())
				return false;
			m_CreatedControl = this;
			return true;
			}
コード例 #47
0
 public void ShowMessageWindow(System.Windows.Controls.UserControl msgWnd)
 {
     this.disableExit = true;
     this.messagePanel.Children.Clear();
     this.messagePanel.Children.Add(msgWnd);
     this.messagePanel.Visibility = System.Windows.Visibility.Visible;
 }
コード例 #48
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this._btnConfig = ((System.Windows.Controls.Primitives.ToggleButton)(target));

            #line 13 "..\..\..\..\ClockConfiguratorGUI\FinalWin.xaml"
                this._btnConfig.Click += new System.Windows.RoutedEventHandler(this._btnConfig_Click);

            #line default
            #line hidden
                return;

            case 2:
                this._tbConf = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 3:
                this._tbPb = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 4:
                this._ucPb = ((System.Windows.Controls.UserControl)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #49
0
ファイル: MainWindow.xaml.cs プロジェクト: ZeroCry/EDDI
        private void LoadResponders(EDDIConfiguration eddiConfiguration)
        {
            foreach (EDDIResponder responder in EDDI.Instance.responders)
            {
                Logging.Debug("Adding configuration tab for " + responder.ResponderName());

                PluginSkeleton skeleton = new PluginSkeleton(responder.ResponderName());
                skeleton.plugindescription.Text = responder.ResponderDescription();

                if (eddiConfiguration.Plugins.TryGetValue(responder.ResponderName(), out bool enabled))
                {
                    skeleton.pluginenabled.IsChecked = enabled;
                }
                else
                {
                    // Default to enabled
                    skeleton.pluginenabled.IsChecked = true;
                    eddiConfiguration.ToFile();
                }

                // Add responder-specific configuration items
                System.Windows.Controls.UserControl monitorConfiguration = responder.ConfigurationTabItem();
                if (monitorConfiguration != null)
                {
                    monitorConfiguration.Margin = new Thickness(10);
                    skeleton.panel.Children.Add(monitorConfiguration);
                }

                TabItem item = new TabItem {
                    Header = responder.LocalizedResponderName()
                };
                item.Content = skeleton;
                tabControl.Items.Add(item);
            }
        }
        public void visit(NonterminalHeadV nonterminalHeadV)
        {
            // visit rule
            nonterminalHeadV.Rule.accept(this);

            drawnItem = new NonterminalExpanded(nonterminalHeadV, drawnItem);
        }
コード例 #51
0
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/%E5%A5%A5%E6%9E%AB%E7%87%83%E6%B0%94%E8%90%A5%E6%94%B6%E7%B3%BB%E7%BB%9FV3;compo" +
                 "nent/MainPage.xaml", System.UriKind.Relative));
     this.mainpage = ((System.Windows.Controls.UserControl)(this.FindName("mainpage")));
     this.MainCanvasStoryboardIn = ((System.Windows.Media.Animation.Storyboard)(this.FindName("MainCanvasStoryboardIn")));
     this.MainCanvasStoryboardOut = ((System.Windows.Media.Animation.Storyboard)(this.FindName("MainCanvasStoryboardOut")));
     this.MainCanvasrightStoryboardIn = ((System.Windows.Media.Animation.Storyboard)(this.FindName("MainCanvasrightStoryboardIn")));
     this.MainCanvasrightStoryboardOut = ((System.Windows.Media.Animation.Storyboard)(this.FindName("MainCanvasrightStoryboardOut")));
     this.CanvasBottomStoryboard = ((System.Windows.Media.Animation.Storyboard)(this.FindName("CanvasBottomStoryboard")));
     this.da = ((System.Windows.Media.Animation.DoubleAnimation)(this.FindName("da")));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.openchild = ((Com.Aote.ObjectTools.ChildWindowObj)(this.FindName("openchild")));
     this.selects = ((Com.Aote.ObjectTools.ObjectList)(this.FindName("selects")));
     this.canvasleft = ((System.Windows.Controls.Canvas)(this.FindName("canvasleft")));
     this.canvasbottom = ((System.Windows.Controls.Canvas)(this.FindName("canvasbottom")));
     this.frame = ((System.Windows.Controls.Grid)(this.FindName("frame")));
     this.menus = ((Microsoft.Expression.Controls.PathListBox)(this.FindName("menus")));
     this.plblp = ((Microsoft.Expression.Controls.LayoutPath)(this.FindName("plblp")));
     this.path = ((System.Windows.Shapes.Path)(this.FindName("path")));
     this.loginUserInfo = ((System.Windows.Controls.Canvas)(this.FindName("loginUserInfo")));
 }
コード例 #52
0
        public string Validate(UserControl form)
        {
            //  _Resource = VSDApp.com.rta.vsd.hh.localisation.Resources.GetInstance();
            vsd.hh.ui.ucDefectAndViolationDetails validateForm = (vsd.hh.ui.ucDefectAndViolationDetails)form;
            string Valid = "";
            bool validity = true;
            //implement Validation Checks here

            if (validateForm.txtDriverLiscenseNumber.Text == "")
            {
                validity = false;
                Valid += "يرجى إدخال رقم رخصة القيادة" + "\n";
                // Valid += _Resource.GetString("Driver License not entered") + "\n";
                validateForm.txtDriverLiscenseNumber.Focus();
            }
            if ((string)validateForm.cmboxCountry.Text == null || (string)validateForm.cmboxCountry.Text == "")
            {

                Valid += "يرجى إدخال " + "\n";
                // Valid += _Resource.GetString("Driver License not entered") + "\n";
                if (validity)
                    validateForm.cmboxCountry.Focus();
                validity = false;
            }
            if (validity)
                Valid = "Valid";
            return Valid;
        }
コード例 #53
0
ファイル: MainWindow.xaml.cs プロジェクト: huucp/tuneRobo
        public void ChangeScreen(UserControl screen)
        {
            //foreach (var element in MainDock.Children)
            //{
            //    if (element.GetType().Name == "LoadingScreen")
            //    {
            //        MainDock.Children.Remove((UIElement) element);
            //    }
            //}

            if (screen.GetType().Name == "RemoteControlScreen")
            {
                OnRemoteCategory();
            }
            else
            {
                OnStoreCategory();
            }
            var lastElement = MainDock.Children[MainDock.Children.Count - 1];
            //if (lastElement.GetType() == screen.GetType())
            //{
            //    return;
            //}
            MainDock.Children.Remove(lastElement);
            MainDock.Children.Add(screen);

            //GC.Collect();
            //GC.WaitForPendingFinalizers();
        }
コード例 #54
0
        public void AddCustomTab(TabControl parentTabControl, string name, UserControl userControl, bool useViewBox = true)
        {
            if (useViewBox)
            {
                Viewbox viewBox = new Viewbox();
                viewBox.Child = userControl;
                viewBox.Width = double.NaN;
                viewBox.Height = double.NaN;

                TabItem tabItem = new TabItem();
                tabItem.Header = name;
                tabItem.Content = viewBox;
                CopyFontData(tabItem1, tabItem);
                parentTabControl.Items.Add(tabItem);
            }
            else
            {
                userControl.Width = double.NaN;
                userControl.Height = double.NaN;
                userControl.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
                userControl.VerticalAlignment = System.Windows.VerticalAlignment.Stretch;

                Grid grid = new Grid();
                grid.Width = double.NaN;
                grid.Height = double.NaN;
                grid.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
                grid.VerticalAlignment = System.Windows.VerticalAlignment.Stretch;

                grid.Children.Add(userControl);
                Grid.SetColumn(userControl, 0);
                Grid.SetRow(userControl, 0);

                AddCustomTab(parentTabControl, name, grid);
            }
        }
コード例 #55
0
 public static void ShowMessageWindow(System.Windows.Controls.UserControl msgWnd)
 {
     if (Application.Current.MainWindow is IMessageControl)
     {
         IMessageControl messageCtrl = Application.Current.MainWindow as IMessageControl;
         messageCtrl.ShowMessageWindow(msgWnd);
     }
 }
コード例 #56
0
 public LoginViewModel(WizardModel wizardModel, object view) : base(view)
 {
     _isValid               = false;
     _view                  = (UserControl)view;
     _wizardModel           = wizardModel;
     _textMessageVisibility = "Collapsed";
     _passwordBoxVisibility = "Visible";
 }
コード例 #57
0
 internal void SwitchScreen(UserControl userControl)
 {
     if (userControl != null)
     {
         TelaExibida.Children.Clear();
         TelaExibida.Children.Add(userControl);
     }
 }
コード例 #58
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/ResourceFramework;component/UserControls/Weapons/WaterBalloon.xaml", System.UriKind.Relative));
     this.uc_WaterBalloon    = ((System.Windows.Controls.UserControl)(this.FindName("uc_WaterBalloon")));
     this.LayoutRoot         = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.weaponOrigin       = ((System.Windows.Controls.Canvas)(this.FindName("weaponOrigin")));
     this.weaponBulletOrigin = ((System.Windows.Controls.Canvas)(this.FindName("weaponBulletOrigin")));
     this.WaterBalloon1      = ((System.Windows.Controls.Viewbox)(this.FindName("WaterBalloon1")));
     this.Path_32            = ((System.Windows.Shapes.Path)(this.FindName("Path_32")));
     this.Path_33            = ((System.Windows.Shapes.Path)(this.FindName("Path_33")));
     this.Path_34            = ((System.Windows.Shapes.Path)(this.FindName("Path_34")));
     this.Path_35            = ((System.Windows.Shapes.Path)(this.FindName("Path_35")));
     this.WaterBalloon2      = ((System.Windows.Controls.Viewbox)(this.FindName("WaterBalloon2")));
     this.Path_28            = ((System.Windows.Shapes.Path)(this.FindName("Path_28")));
     this.Path_29            = ((System.Windows.Shapes.Path)(this.FindName("Path_29")));
     this.Path_30            = ((System.Windows.Shapes.Path)(this.FindName("Path_30")));
     this.Path_31            = ((System.Windows.Shapes.Path)(this.FindName("Path_31")));
     this.WaterBalloon3      = ((System.Windows.Controls.Viewbox)(this.FindName("WaterBalloon3")));
     this.Path_24            = ((System.Windows.Shapes.Path)(this.FindName("Path_24")));
     this.Path_25            = ((System.Windows.Shapes.Path)(this.FindName("Path_25")));
     this.Path_26            = ((System.Windows.Shapes.Path)(this.FindName("Path_26")));
     this.Path_27            = ((System.Windows.Shapes.Path)(this.FindName("Path_27")));
     this.WaterBalloon4      = ((System.Windows.Controls.Viewbox)(this.FindName("WaterBalloon4")));
     this.Path_20            = ((System.Windows.Shapes.Path)(this.FindName("Path_20")));
     this.Path_21            = ((System.Windows.Shapes.Path)(this.FindName("Path_21")));
     this.Path_22            = ((System.Windows.Shapes.Path)(this.FindName("Path_22")));
     this.Path_23            = ((System.Windows.Shapes.Path)(this.FindName("Path_23")));
     this.WaterBalloon5      = ((System.Windows.Controls.Viewbox)(this.FindName("WaterBalloon5")));
     this.Path_16            = ((System.Windows.Shapes.Path)(this.FindName("Path_16")));
     this.Path_17            = ((System.Windows.Shapes.Path)(this.FindName("Path_17")));
     this.Path_18            = ((System.Windows.Shapes.Path)(this.FindName("Path_18")));
     this.Path_19            = ((System.Windows.Shapes.Path)(this.FindName("Path_19")));
     this.WaterBalloon6      = ((System.Windows.Controls.Viewbox)(this.FindName("WaterBalloon6")));
     this.Path_12            = ((System.Windows.Shapes.Path)(this.FindName("Path_12")));
     this.Path_13            = ((System.Windows.Shapes.Path)(this.FindName("Path_13")));
     this.Path_14            = ((System.Windows.Shapes.Path)(this.FindName("Path_14")));
     this.Path_15            = ((System.Windows.Shapes.Path)(this.FindName("Path_15")));
     this.WaterBalloon7      = ((System.Windows.Controls.Viewbox)(this.FindName("WaterBalloon7")));
     this.Path_08            = ((System.Windows.Shapes.Path)(this.FindName("Path_08")));
     this.Path_09            = ((System.Windows.Shapes.Path)(this.FindName("Path_09")));
     this.Path_10            = ((System.Windows.Shapes.Path)(this.FindName("Path_10")));
     this.Path_11            = ((System.Windows.Shapes.Path)(this.FindName("Path_11")));
     this.WaterBalloon8      = ((System.Windows.Controls.Viewbox)(this.FindName("WaterBalloon8")));
     this.Path_04            = ((System.Windows.Shapes.Path)(this.FindName("Path_04")));
     this.Path_05            = ((System.Windows.Shapes.Path)(this.FindName("Path_05")));
     this.Path_06            = ((System.Windows.Shapes.Path)(this.FindName("Path_06")));
     this.Path_07            = ((System.Windows.Shapes.Path)(this.FindName("Path_07")));
     this.WaterBalloon9      = ((System.Windows.Controls.Viewbox)(this.FindName("WaterBalloon9")));
     this.Path_00            = ((System.Windows.Shapes.Path)(this.FindName("Path_00")));
     this.Path_01            = ((System.Windows.Shapes.Path)(this.FindName("Path_01")));
     this.Path_02            = ((System.Windows.Shapes.Path)(this.FindName("Path_02")));
     this.Path_03            = ((System.Windows.Shapes.Path)(this.FindName("Path_03")));
 }
コード例 #59
0
 public void PresentContent(System.Windows.Controls.UserControl AScreen)
 {
     if (CurrentActivity != null)
     {
         this.ActivityStack.Push(CurrentActivity);
     }
     CurrentActivity            = AScreen;
     this.ContentHolder.Content = CurrentActivity;
 }
コード例 #60
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/WP7Filmographie;component/UserControlPersonne.xaml", System.UriKind.Relative));
     this.root = ((System.Windows.Controls.UserControl)(this.FindName("root")));
 }