Beispiel #1
0
 public override void Draw(IWindowController windowController)
 {
     base.Draw(windowController);
     GUI.Box(Bound, mData.ProjectPath);
 }
Beispiel #2
0
 public override void Draw(IWindowController windowController)
 {
     GUI.Box(Bound, ToString());
 }
 public ShellViewModelTests()
 {
     _windowController = MockRepository.GenerateStub<IWindowController>();
     _eventAggregator = MockRepository.GenerateStub<IEventAggregator>();
 }
Beispiel #4
0
        /// <summary>
        /// Layout
        /// </summary>
        /// <param name="windowController"></param>

        public virtual void Layout(IWindowController windowController)
        {
            var parent = Parent;
            if (MarginLeftPoint != null)
            {
                X = MarginLeftPoint.Calc(parent.Width);
            }

            if (MarginTopPoint != null)
            {
                Y = MarginTopPoint.Calc(parent.Height);
            }

            if (MarginRightPoint != null)
                Width = Mathf.Abs(parent.Width - MarginRightPoint.Calc(parent.Width) - X);

            if (MarginBottomPoint != null)
                Height = Mathf.Abs(parent.Height - MarginBottomPoint.Calc(parent.Height) - Y);
        }
Beispiel #5
0
        /// <summary>
        /// 用于
        /// </summary>
        /// <param name="windowController"></param>

        internal void DrawControl(IWindowController windowController)
        {
            Draw(windowController);

            for (int i = 0; i < mChilds.Count; i++)
            {
                mChilds[i].DrawControl(windowController);
            }
        }
Beispiel #6
0
        /// <summary>
        /// 用于具体控件(子类)渲染
        /// </summary>
        /// <param name="windowController"></param>

        public virtual void Draw(IWindowController windowController)
        {   }
 public MiningViewModel(IController controller, IIdleTimeProvider idleTimeProvider, ISummaryDataManager summaryDataManager, IWindowController windowController, IVersionService versionService)
 {
     this.InitializeDesignTime(controller, idleTimeProvider, summaryDataManager, windowController, versionService);
 }
        private void InitializeDesignTime(IController controller, IIdleTimeProvider idleTimeProvider, ISummaryDataManager summaryDataManager, IWindowController windowController, IVersionService versionService)
        {
            this.ApplicationTitle = Title;
            this.idleTimeProvider = idleTimeProvider;
            this.summaryDataManager = summaryDataManager;
            this.summaryDataManager.Message += (s, e) => { AddMessage(e.Message); };
            this.windowController = windowController;

            this.Messages = new ObservableCollection<string>();
            this.DataPointsHashRate = new ObservableCollection<DataPoint>();
            this.GraphTimeSpans = new ObservableCollection<GraphTimeSpan>(LoadGraphTimeSpans());

            var durations = new List<TimeSpan>();
            foreach (string durationText in Settings.Default.SnoozeDurations)
            {
                TimeSpan duration;
                if (TimeSpan.TryParse(durationText, out duration))
                {
                    durations.Add(duration);
                    if (duration == Settings.Default.DefaultSnoozeDuration)
                    {
                        this.SnoozeDuration = duration;
                    }
                }
            }

            this.SnoozeDurations = durations;

            if (!IsDesignMode)
            {
                this.InitializeRunTime(controller, versionService);
            }

            this.Activity = UserActivity.Active; // initial setting
        }