public ProfessorDialog(BackGroundType BackGroundType, bool SpotLight)
        {
            this.InitializeComponent();

            SetBackground(BackGroundType);
            SetSpotlight(SpotLight);
            this.DataContext = this;
        }
Beispiel #2
0
        public void SetClip(AudioClip clip, BackGroundType type)
        {
            IBackGroundAudio audio = GetBackGroundAudio(type);

            if (audio != null)
            {
                audio.SetClip(clip);
            }
        }
Beispiel #3
0
        public void SetClip(AudioClip audio, BackGroundType type)
        {
            BackGroundAudio backGroundAudio = GetBackGroundAudio();

            if (backGroundAudio != null)
            {
                backGroundAudio.SetClip(audio, type);
            }
        }
Beispiel #4
0
        private IBackGroundAudio GetBackGroundAudio(BackGroundType type)
        {
            IBackGroundAudio audio = null;

            if (mAudioDic.TryGetValue(type, out audio))
            {
                return(audio);
            }
            return(null);
        }
Beispiel #5
0
        /// <summary>
        /// 构造一个自定义窗口
        /// </summary>
        public Window()
        {
            mWindowResouce.Source = new Uri("VCCustomControls;component/Windows/Themes/Window.xaml", UriKind.Relative);
            this.Resources.MergedDictionaries.Add(mWindowResouce);      //加载资源
            this.Style = (Style)mWindowResouce["WindowStyle"];
            var windowTemplate = (ControlTemplate)mWindowResouce["WindowTemplate"];

            this.Template   = windowTemplate;
            mTemplate       = windowTemplate;
            this.Loaded    += WindowBase_Loaded;
            this.MaxWidth   = SystemParameters.MaximizedPrimaryScreenWidth;
            this.MaxHeight  = SystemParameters.MaximizedPrimaryScreenHeight;
            mBackGroundType = BackGroundType.Blue;
        }
Beispiel #6
0
 public PrivateDialog()
 {
     InitializeComponent();
     InputBtn.Click += InputBtn_Click;
     //mWindowResouce.Source = new Uri("XJControls;component/Themes/Window.xaml", UriKind.Relative);
     mWindowResouce.Source = new Uri("WpfClient;component/Contacts/MyWindow.xaml", UriKind.Relative);
     this.Resources.MergedDictionaries.Add(mWindowResouce);
     //this.Style = (Style)mWindowResouce["WindowStyle"];
     //var windowTemplate = (ControlTemplate)mWindowResouce["WindowTemplate"];
     //this.Template = windowTemplate;
     //mTemplate = windowTemplate;
     this.Loaded    += new RoutedEventHandler(WindowBase_Loaded);
     this.MaxWidth   = SystemParameters.MaximizedPrimaryScreenWidth;
     this.MaxHeight  = SystemParameters.MaximizedPrimaryScreenHeight;
     mBackGroundType = BackGroundType.Blue;
     Init();
 }
Beispiel #7
0
        public WorkSpaceDialog()
        {
            InitializeComponent();
            mWindowResouce.Source = new Uri("WpfClient;component/Contacts/MyWindow.xaml", UriKind.Relative);
            this.Resources.MergedDictionaries.Add(mWindowResouce);
            this.Style = (Style)mWindowResouce["WindowStyle"];
            var windowTemplate = (ControlTemplate)mWindowResouce["WindowTemplate"];

            this.Template   = windowTemplate;
            mTemplate       = windowTemplate;
            this.Loaded    += new RoutedEventHandler(WindowBase_Loaded);
            this.MaxWidth   = SystemParameters.MaximizedPrimaryScreenWidth;
            this.MaxHeight  = SystemParameters.MaximizedPrimaryScreenHeight;
            mBackGroundType = BackGroundType.Blue;

            input.Click += InputNoticeBtn_Click;
            InputNoticeTBox.TextChanged += InputNoticeTBox_TextChanged;
        }
        public void SetBackground(BackGroundType backgroundType)
        {
            switch (backgroundType)
            {
            case BackGroundType.Dark:
                LightBackgroundRect.Visibility = Visibility.Collapsed;
                DarkBackgroundRect.Visibility  = Visibility.Visible;
                break;

            case BackGroundType.Light:
                LightBackgroundRect.Visibility = Visibility.Visible;
                DarkBackgroundRect.Visibility  = Visibility.Collapsed;
                break;

            default:
                LightBackgroundRect.Visibility    =
                    DarkBackgroundRect.Visibility = Visibility.Collapsed;
                break;
            }
        }